void replay_configure(QemuOpts *opts)

{

    const char *fname;

    const char *rr;

    ReplayMode mode = REPLAY_MODE_NONE;

    Location loc;



    if (!opts) {

        return;

    }



    loc_push_none(&loc);

    qemu_opts_loc_restore(opts);



    rr = qemu_opt_get(opts, "rr");

    if (!rr) {

        /* Just enabling icount */

        return;

    } else if (!strcmp(rr, "record")) {

        mode = REPLAY_MODE_RECORD;

    } else if (!strcmp(rr, "replay")) {

        mode = REPLAY_MODE_PLAY;

    } else {

        error_report("Invalid icount rr option: %s", rr);

        exit(1);

    }



    fname = qemu_opt_get(opts, "rrfile");

    if (!fname) {

        error_report("File name not specified for replay");

        exit(1);

    }



    replay_enable(fname, mode);



    loc_pop(&loc);

}

void replay_configure(QemuOpts *opts)

{

    const char *fname;

    const char *rr;

    ReplayMode mode = REPLAY_MODE_NONE;

    Location loc;



    if (!opts) {

        return;

    }



    loc_push_none(&loc);

    qemu_opts_loc_restore(opts);



    rr = qemu_opt_get(opts, "rr");

    if (!rr) {

        

        return;

    } else if (!strcmp(rr, "record")) {

        mode = REPLAY_MODE_RECORD;

    } else if (!strcmp(rr, "replay")) {

        mode = REPLAY_MODE_PLAY;

    } else {

        error_report("Invalid icount rr option: %s", rr);

        exit(1);

    }



    fname = qemu_opt_get(opts, "rrfile");

    if (!fname) {

        error_report("File name not specified for replay");

        exit(1);

    }



    replay_enable(fname, mode);



    loc_pop(&loc);

}

void FUNC_0(QemuOpts *VAR_0)

{

    const char *VAR_1;

    const char *VAR_2;

    ReplayMode mode = REPLAY_MODE_NONE;

    Location loc;



    if (!VAR_0) {

        return;

    }



    loc_push_none(&loc);

    qemu_opts_loc_restore(VAR_0);



    VAR_2 = qemu_opt_get(VAR_0, "VAR_2");

    if (!VAR_2) {

        

        return;

    } else if (!strcmp(VAR_2, "record")) {

        mode = REPLAY_MODE_RECORD;

    } else if (!strcmp(VAR_2, "replay")) {

        mode = REPLAY_MODE_PLAY;

    } else {

        error_report("Invalid icount VAR_2 option: %s", VAR_2);

        exit(1);

    }



    VAR_1 = qemu_opt_get(VAR_0, "rrfile");

    if (!VAR_1) {

        error_report("File name not specified for replay");

        exit(1);

    }



    replay_enable(VAR_1, mode);



    loc_pop(&loc);

}

void FUNC_0(QemuOpts *VAR_0)
{ const char *VAR_1; const char *VAR_2; ReplayMode mode = REPLAY_MODE_NONE; Location loc; if (!VAR_0) { return; } loc_push_none(&loc); qemu_opts_loc_restore(VAR_0); VAR_2 = qemu_opt_get(VAR_0, "VAR_2"); if (!VAR_2) { return; } else if (!strcmp(VAR_2, "record")) { mode = REPLAY_MODE_RECORD; } else if (!strcmp(VAR_2, "replay")) { mode = REPLAY_MODE_PLAY; } else { error_report("Invalid icount VAR_2 option: %s", VAR_2); exit(1); } VAR_1 = qemu_opt_get(VAR_0, "rrfile"); if (!VAR_1) { error_report("File name not specified for replay"); exit(1); } replay_enable(VAR_1, mode); loc_pop(&loc); }