static int calculate_new_instance_id(const char *idstr)

{

    SaveStateEntry *se;

    int instance_id = 0;



    TAILQ_FOREACH(se, &savevm_handlers, entry) {

        if (strcmp(idstr, se->idstr) == 0

            && instance_id <= se->instance_id) {

            instance_id = se->instance_id + 1;

        }

    }

    return instance_id;

}

static int calculate_new_instance_id(const char *idstr)

{

    SaveStateEntry *se;

    int instance_id = 0;



    TAILQ_FOREACH(se, &savevm_handlers, entry) {

        if (strcmp(idstr, se->idstr) == 0

            && instance_id <= se->instance_id) {

            instance_id = se->instance_id + 1;

        }

    }

    return instance_id;

}

static int FUNC_0(const char *VAR_0)

{

    SaveStateEntry *se;

    int VAR_1 = 0;



    TAILQ_FOREACH(se, &savevm_handlers, entry) {

        if (strcmp(VAR_0, se->VAR_0) == 0

            && VAR_1 <= se->VAR_1) {

            VAR_1 = se->VAR_1 + 1;

        }

    }

    return VAR_1;

}

static int FUNC_0(const char *VAR_0)
{ SaveStateEntry *se; int VAR_1 = 0; TAILQ_FOREACH(se, &savevm_handlers, entry) { if (strcmp(VAR_0, se->VAR_0) == 0
&& VAR_1 <= se->VAR_1) { VAR_1 = se->VAR_1 + 1; } } return VAR_1; }