static int check_exception(int intno, int *error_code)

{

    int first_contributory = env->old_exception == 0 ||

                              (env->old_exception >= 10 &&

                               env->old_exception <= 13);

    int second_contributory = intno == 0 ||

                               (intno >= 10 && intno <= 13);



    qemu_log_mask(CPU_LOG_INT, "check_exception old: 0x%x new 0x%x\n",

                env->old_exception, intno);



    if (env->old_exception == EXCP08_DBLE)

        cpu_abort(env, "triple fault");



    if ((first_contributory && second_contributory)

        || (env->old_exception == EXCP0E_PAGE &&

            (second_contributory || (intno == EXCP0E_PAGE)))) {

        intno = EXCP08_DBLE;

        *error_code = 0;

    }



    if (second_contributory || (intno == EXCP0E_PAGE) ||

        (intno == EXCP08_DBLE))

        env->old_exception = intno;



    return intno;

}

static int check_exception(int intno, int *error_code)

{

    int first_contributory = env->old_exception == 0 ||

                              (env->old_exception >= 10 &&

                               env->old_exception <= 13);

    int second_contributory = intno == 0 ||

                               (intno >= 10 && intno <= 13);



    qemu_log_mask(CPU_LOG_INT, "check_exception old: 0x%x new 0x%x\n",

                env->old_exception, intno);



    if (env->old_exception == EXCP08_DBLE)

        cpu_abort(env, "triple fault");



    if ((first_contributory && second_contributory)

        || (env->old_exception == EXCP0E_PAGE &&

            (second_contributory || (intno == EXCP0E_PAGE)))) {

        intno = EXCP08_DBLE;

        *error_code = 0;

    }



    if (second_contributory || (intno == EXCP0E_PAGE) ||

        (intno == EXCP08_DBLE))

        env->old_exception = intno;



    return intno;

}

    if (env->old_exception == EXCP08_DBLE)         cpu_abort(env, "triple fault");
static int FUNC_0(int VAR_0, int *VAR_1)

{

    int VAR_2 = env->old_exception == 0 ||

                              (env->old_exception >= 10 &&

                               env->old_exception <= 13);

    int VAR_3 = VAR_0 == 0 ||

                               (VAR_0 >= 10 && VAR_0 <= 13);



    qemu_log_mask(CPU_LOG_INT, "FUNC_0 old: 0x%x new 0x%x\n",

                env->old_exception, VAR_0);



    if (env->old_exception == EXCP08_DBLE)

        cpu_abort(env, "triple fault");



    if ((VAR_2 && VAR_3)

        || (env->old_exception == EXCP0E_PAGE &&

            (VAR_3 || (VAR_0 == EXCP0E_PAGE)))) {

        VAR_0 = EXCP08_DBLE;

        *VAR_1 = 0;

    }



    if (VAR_3 || (VAR_0 == EXCP0E_PAGE) ||

        (VAR_0 == EXCP08_DBLE))

        env->old_exception = VAR_0;



    return VAR_0;

}

static int FUNC_0(int VAR_0, int *VAR_1)
{ int VAR_2 = env->old_exception == 0 ||
(env->old_exception >= 10 &&
env->old_exception <= 13); int VAR_3 = VAR_0 == 0 ||
(VAR_0 >= 10 && VAR_0 <= 13); qemu_log_mask(CPU_LOG_INT, "FUNC_0 old: 0x%x new 0x%x\n",
env->old_exception, VAR_0); if (env->old_exception == EXCP08_DBLE)
cpu_abort(env, "triple fault"); if ((VAR_2 && VAR_3)
|| (env->old_exception == EXCP0E_PAGE &&
(VAR_3 || (VAR_0 == EXCP0E_PAGE)))) { VAR_0 = EXCP08_DBLE; *VAR_1 = 0; } if (VAR_3 || (VAR_0 == EXCP0E_PAGE) ||
(VAR_0 == EXCP08_DBLE))
env->old_exception = VAR_0; return VAR_0; }