int get_osversion(void)

{

    static int osversion;

    struct new_utsname buf;

    const char *s;

    int i, n, tmp;

    if (osversion)

        return osversion;

    if (qemu_uname_release && *qemu_uname_release) {

        s = qemu_uname_release;

    } else {

        if (sys_uname(&buf))

            return 0;

        s = buf.release;

    }

    tmp = 0;

    for (i = 0; i < 3; i++) {

        n = 0;

        while (*s >= '0' && *s <= '9') {

            n *= 10;

            n += *s - '0';

            s++;

        }

        tmp = (tmp << 8) + n;

        if (*s == '.')

            s++;

    }

    osversion = tmp;

    return osversion;

}

int get_osversion(void)

{

    static int osversion;

    struct new_utsname buf;

    const char *s;

    int i, n, tmp;

    if (osversion)

        return osversion;

    if (qemu_uname_release && *qemu_uname_release) {

        s = qemu_uname_release;

    } else {

        if (sys_uname(&buf))

            return 0;

        s = buf.release;

    }

    tmp = 0;

    for (i = 0; i < 3; i++) {

        n = 0;

        while (*s >= '0' && *s <= '9') {

            n *= 10;

            n += *s - '0';

            s++;

        }

        tmp = (tmp << 8) + n;

        if (*s == '.')

            s++;

    }

    osversion = tmp;

    return osversion;

}

int FUNC_0(void)

{

    static int VAR_0;

    struct new_utsname VAR_1;

    const char *VAR_2;

    int VAR_3, VAR_4, VAR_5;

    if (VAR_0)

        return VAR_0;

    if (qemu_uname_release && *qemu_uname_release) {

        VAR_2 = qemu_uname_release;

    } else {

        if (sys_uname(&VAR_1))

            return 0;

        VAR_2 = VAR_1.release;

    }

    VAR_5 = 0;

    for (VAR_3 = 0; VAR_3 < 3; VAR_3++) {

        VAR_4 = 0;

        while (*VAR_2 >= '0' && *VAR_2 <= '9') {

            VAR_4 *= 10;

            VAR_4 += *VAR_2 - '0';

            VAR_2++;

        }

        VAR_5 = (VAR_5 << 8) + VAR_4;

        if (*VAR_2 == '.')

            VAR_2++;

    }

    VAR_0 = VAR_5;

    return VAR_0;

}

int FUNC_0(void)
{ static int VAR_0; struct new_utsname VAR_1; const char *VAR_2; int VAR_3, VAR_4, VAR_5; if (VAR_0)
return VAR_0; if (qemu_uname_release && *qemu_uname_release) { VAR_2 = qemu_uname_release; } else { if (sys_uname(&VAR_1))
return 0; VAR_2 = VAR_1.release; } VAR_5 = 0; for (VAR_3 = 0; VAR_3 < 3; VAR_3++) { VAR_4 = 0; while (*VAR_2 >= '0' && *VAR_2 <= '9') { VAR_4 *= 10; VAR_4 += *VAR_2 - '0'; VAR_2++; } VAR_5 = (VAR_5 << 8) + VAR_4; if (*VAR_2 == '.')
VAR_2++; } VAR_0 = VAR_5; return VAR_0; }