static void numa_add(const char *optarg)

{

    char option[128];

    char *endptr;

    unsigned long long value, endvalue;

    unsigned long long nodenr;



    value = endvalue = 0ULL;



    optarg = get_opt_name(option, 128, optarg, ',');

    if (*optarg == ',') {

        optarg++;

    }

    if (!strcmp(option, "node")) {



        if (nb_numa_nodes >= MAX_NODES) {

            fprintf(stderr, "qemu: too many NUMA nodes\n");

            exit(1);

        }



        if (get_param_value(option, 128, "nodeid", optarg) == 0) {

            nodenr = nb_numa_nodes;

        } else {

            nodenr = strtoull(option, NULL, 10);

        }



        if (nodenr >= MAX_NODES) {

            fprintf(stderr, "qemu: invalid NUMA nodeid: %llu\n", nodenr);

            exit(1);

        }



        if (get_param_value(option, 128, "mem", optarg) == 0) {

            node_mem[nodenr] = 0;

        } else {

            int64_t sval;

            sval = strtosz(option, &endptr);

            if (sval < 0 || *endptr) {

                fprintf(stderr, "qemu: invalid numa mem size: %s\n", optarg);

                exit(1);

            }

            node_mem[nodenr] = sval;

        }

        if (get_param_value(option, 128, "cpus", optarg) != 0) {

            value = strtoull(option, &endptr, 10);

            if (*endptr == '-') {

                endvalue = strtoull(endptr+1, &endptr, 10);

            } else {

                endvalue = value;

            }



            if (!(endvalue < MAX_CPUMASK_BITS)) {

                endvalue = MAX_CPUMASK_BITS - 1;

                fprintf(stderr,

                    "A max of %d CPUs are supported in a guest\n",

                     MAX_CPUMASK_BITS);

            }



            bitmap_set(node_cpumask[nodenr], value, endvalue-value+1);

        }

        nb_numa_nodes++;

    } else {

        fprintf(stderr, "Invalid -numa option: %s\n", option);

        exit(1);

    }

}

static void numa_add(const char *optarg)

{

    char option[128];

    char *endptr;

    unsigned long long value, endvalue;

    unsigned long long nodenr;



    value = endvalue = 0ULL;



    optarg = get_opt_name(option, 128, optarg, ',');

    if (*optarg == ',') {

        optarg++;

    }

    if (!strcmp(option, "node")) {



        if (nb_numa_nodes >= MAX_NODES) {

            fprintf(stderr, "qemu: too many NUMA nodes\n");

            exit(1);

        }



        if (get_param_value(option, 128, "nodeid", optarg) == 0) {

            nodenr = nb_numa_nodes;

        } else {

            nodenr = strtoull(option, NULL, 10);

        }



        if (nodenr >= MAX_NODES) {

            fprintf(stderr, "qemu: invalid NUMA nodeid: %llu\n", nodenr);

            exit(1);

        }



        if (get_param_value(option, 128, "mem", optarg) == 0) {

            node_mem[nodenr] = 0;

        } else {

            int64_t sval;

            sval = strtosz(option, &endptr);

            if (sval < 0 || *endptr) {

                fprintf(stderr, "qemu: invalid numa mem size: %s\n", optarg);

                exit(1);

            }

            node_mem[nodenr] = sval;

        }

        if (get_param_value(option, 128, "cpus", optarg) != 0) {

            value = strtoull(option, &endptr, 10);

            if (*endptr == '-') {

                endvalue = strtoull(endptr+1, &endptr, 10);

            } else {

                endvalue = value;

            }



            if (!(endvalue < MAX_CPUMASK_BITS)) {

                endvalue = MAX_CPUMASK_BITS - 1;

                fprintf(stderr,

                    "A max of %d CPUs are supported in a guest\n",

                     MAX_CPUMASK_BITS);

            }



            bitmap_set(node_cpumask[nodenr], value, endvalue-value+1);

        }

        nb_numa_nodes++;

    } else {

        fprintf(stderr, "Invalid -numa option: %s\n", option);

        exit(1);

    }

}

            nodenr = strtoull(option, NULL, 10);
static void FUNC_0(const char *VAR_0)

{

    char VAR_1[128];

    char *VAR_2;

    unsigned long long VAR_3, VAR_4;

    unsigned long long VAR_5;



    VAR_3 = VAR_4 = 0ULL;



    VAR_0 = get_opt_name(VAR_1, 128, VAR_0, ',');

    if (*VAR_0 == ',') {

        VAR_0++;

    }

    if (!strcmp(VAR_1, "node")) {



        if (nb_numa_nodes >= MAX_NODES) {

            fprintf(stderr, "qemu: too many NUMA nodes\n");

            exit(1);

        }



        if (get_param_value(VAR_1, 128, "nodeid", VAR_0) == 0) {

            VAR_5 = nb_numa_nodes;

        } else {

            VAR_5 = strtoull(VAR_1, NULL, 10);

        }



        if (VAR_5 >= MAX_NODES) {

            fprintf(stderr, "qemu: invalid NUMA nodeid: %llu\n", VAR_5);

            exit(1);

        }



        if (get_param_value(VAR_1, 128, "mem", VAR_0) == 0) {

            node_mem[VAR_5] = 0;

        } else {

            int64_t sval;

            sval = strtosz(VAR_1, &VAR_2);

            if (sval < 0 || *VAR_2) {

                fprintf(stderr, "qemu: invalid numa mem size: %s\n", VAR_0);

                exit(1);

            }

            node_mem[VAR_5] = sval;

        }

        if (get_param_value(VAR_1, 128, "cpus", VAR_0) != 0) {

            VAR_3 = strtoull(VAR_1, &VAR_2, 10);

            if (*VAR_2 == '-') {

                VAR_4 = strtoull(VAR_2+1, &VAR_2, 10);

            } else {

                VAR_4 = VAR_3;

            }



            if (!(VAR_4 < MAX_CPUMASK_BITS)) {

                VAR_4 = MAX_CPUMASK_BITS - 1;

                fprintf(stderr,

                    "A max of %d CPUs are supported in a guest\n",

                     MAX_CPUMASK_BITS);

            }



            bitmap_set(node_cpumask[VAR_5], VAR_3, VAR_4-VAR_3+1);

        }

        nb_numa_nodes++;

    } else {

        fprintf(stderr, "Invalid -numa VAR_1: %s\n", VAR_1);

        exit(1);

    }

}

static void FUNC_0(const char *VAR_0)
{ char VAR_1[128]; char *VAR_2; unsigned long long VAR_3, VAR_4; unsigned long long VAR_5; VAR_3 = VAR_4 = 0ULL; VAR_0 = get_opt_name(VAR_1, 128, VAR_0, ','); if (*VAR_0 == ',') { VAR_0++; } if (!strcmp(VAR_1, "node")) { if (nb_numa_nodes >= MAX_NODES) { fprintf(stderr, "qemu: too many NUMA nodes\n"); exit(1); } if (get_param_value(VAR_1, 128, "nodeid", VAR_0) == 0) { VAR_5 = nb_numa_nodes; } else { VAR_5 = strtoull(VAR_1, NULL, 10); } if (VAR_5 >= MAX_NODES) { fprintf(stderr, "qemu: invalid NUMA nodeid: %llu\n", VAR_5); exit(1); } if (get_param_value(VAR_1, 128, "mem", VAR_0) == 0) { node_mem[VAR_5] = 0; } else { int64_t sval; sval = strtosz(VAR_1, &VAR_2); if (sval < 0 || *VAR_2) { fprintf(stderr, "qemu: invalid numa mem size: %s\n", VAR_0); exit(1); } node_mem[VAR_5] = sval; } if (get_param_value(VAR_1, 128, "cpus", VAR_0) != 0) { VAR_3 = strtoull(VAR_1, &VAR_2, 10); if (*VAR_2 == '-') { VAR_4 = strtoull(VAR_2+1, &VAR_2, 10); } else { VAR_4 = VAR_3; } if (!(VAR_4 < MAX_CPUMASK_BITS)) { VAR_4 = MAX_CPUMASK_BITS - 1; fprintf(stderr,
"A max of %d CPUs are supported in a guest\n",
MAX_CPUMASK_BITS); } bitmap_set(node_cpumask[VAR_5], VAR_3, VAR_4-VAR_3+1); } nb_numa_nodes++; } else { fprintf(stderr, "Invalid -numa VAR_1: %s\n", VAR_1); exit(1); } }