static void handle_arg_reserved_va(const char *arg)

{

    char *p;

    int shift = 0;

    reserved_va = strtoul(arg, &p, 0);

    switch (*p) {

    case 'k':

    case 'K':

        shift = 10;

        break;

    case 'M':

        shift = 20;

        break;

    case 'G':

        shift = 30;

        break;

    }

    if (shift) {

        unsigned long unshifted = reserved_va;

        p++;

        reserved_va <<= shift;

        if (((reserved_va >> shift) != unshifted)

#if HOST_LONG_BITS > TARGET_VIRT_ADDR_SPACE_BITS

            || (reserved_va > (1ul << TARGET_VIRT_ADDR_SPACE_BITS))

#endif

            ) {

            fprintf(stderr, "Reserved virtual address too big\n");

            exit(EXIT_FAILURE);

        }

    }

    if (*p) {

        fprintf(stderr, "Unrecognised -R size suffix '%s'\n", p);

        exit(EXIT_FAILURE);

    }

}

static void handle_arg_reserved_va(const char *arg)

{

    char *p;

    int shift = 0;

    reserved_va = strtoul(arg, &p, 0);

    switch (*p) {

    case 'k':

    case 'K':

        shift = 10;

        break;

    case 'M':

        shift = 20;

        break;

    case 'G':

        shift = 30;

        break;

    }

    if (shift) {

        unsigned long unshifted = reserved_va;

        p++;

        reserved_va <<= shift;

        if (((reserved_va >> shift) != unshifted)

#if HOST_LONG_BITS > TARGET_VIRT_ADDR_SPACE_BITS

            || (reserved_va > (1ul << TARGET_VIRT_ADDR_SPACE_BITS))

#endif

            ) {

            fprintf(stderr, "Reserved virtual address too big\n");

            exit(EXIT_FAILURE);

        }

    }

    if (*p) {

        fprintf(stderr, "Unrecognised -R size suffix '%s'\n", p);

        exit(EXIT_FAILURE);

    }

}

static void FUNC_0(const char *VAR_0)

{

    char *VAR_1;

    int VAR_2 = 0;

    reserved_va = strtoul(VAR_0, &VAR_1, 0);

    switch (*VAR_1) {

    case 'k':

    case 'K':

        VAR_2 = 10;

        break;

    case 'M':

        VAR_2 = 20;

        break;

    case 'G':

        VAR_2 = 30;

        break;

    }

    if (VAR_2) {

        unsigned long VAR_3 = reserved_va;

        VAR_1++;

        reserved_va <<= VAR_2;

        if (((reserved_va >> VAR_2) != VAR_3)

#if HOST_LONG_BITS > TARGET_VIRT_ADDR_SPACE_BITS

            || (reserved_va > (1ul << TARGET_VIRT_ADDR_SPACE_BITS))

#endif

            ) {

            fprintf(stderr, "Reserved virtual address too big\n");

            exit(EXIT_FAILURE);

        }

    }

    if (*VAR_1) {

        fprintf(stderr, "Unrecognised -R size suffix '%s'\n", VAR_1);

        exit(EXIT_FAILURE);

    }

}

static void FUNC_0(const char *VAR_0)
{ char *VAR_1; int VAR_2 = 0; reserved_va = strtoul(VAR_0, &VAR_1, 0); switch (*VAR_1) { case 'k':
case 'K':
VAR_2 = 10; break; case 'M':
VAR_2 = 20; break; case 'G':
VAR_2 = 30; break; } if (VAR_2) { unsigned long VAR_3 = reserved_va; VAR_1++; reserved_va <<= VAR_2; if (((reserved_va >> VAR_2) != VAR_3)
#if HOST_LONG_BITS > TARGET_VIRT_ADDR_SPACE_BITS
|| (reserved_va > (1ul << TARGET_VIRT_ADDR_SPACE_BITS))
#endif
) { fprintf(stderr, "Reserved virtual address too big\n"); exit(EXIT_FAILURE); } } if (*VAR_1) { fprintf(stderr, "Unrecognised -R size suffix '%s'\n", VAR_1); exit(EXIT_FAILURE); } }