static void test_ide_drive_user(const char *dev, bool trans)

{

    char *argv[256], *opts;

    int argc;

    int secs = img_secs[backend_small];

    const CHST expected_chst = { secs / (4 * 32) , 4, 32, trans };



    argc = setup_common(argv, ARRAY_SIZE(argv));

    opts = g_strdup_printf("%s,%s%scyls=%d,heads=%d,secs=%d",

                           dev ?: "",

                           trans && dev ? "bios-chs-" : "",

                           trans ? "trans=lba," : "",

                           expected_chst.cyls, expected_chst.heads,

                           expected_chst.secs);

    cur_ide[0] = &expected_chst;

    argc = setup_ide(argc, argv, ARRAY_SIZE(argv),

                     0, dev ? opts : NULL, backend_small, mbr_chs,

                     dev ? "" : opts);

    g_free(opts);

    qtest_start(g_strjoinv(" ", argv));

    test_cmos();

    qtest_end();

}

static void test_ide_drive_user(const char *dev, bool trans)

{

    char *argv[256], *opts;

    int argc;

    int secs = img_secs[backend_small];

    const CHST expected_chst = { secs / (4 * 32) , 4, 32, trans };



    argc = setup_common(argv, ARRAY_SIZE(argv));

    opts = g_strdup_printf("%s,%s%scyls=%d,heads=%d,secs=%d",

                           dev ?: "",

                           trans && dev ? "bios-chs-" : "",

                           trans ? "trans=lba," : "",

                           expected_chst.cyls, expected_chst.heads,

                           expected_chst.secs);

    cur_ide[0] = &expected_chst;

    argc = setup_ide(argc, argv, ARRAY_SIZE(argv),

                     0, dev ? opts : NULL, backend_small, mbr_chs,

                     dev ? "" : opts);

    g_free(opts);

    qtest_start(g_strjoinv(" ", argv));

    test_cmos();

    qtest_end();

}

    qtest_start(g_strjoinv(" ", argv));     argc = setup_common(argv, ARRAY_SIZE(argv));     qtest_start(g_strjoinv(" ", argv));     char *argv[256], *opts;     argc = setup_common(argv, ARRAY_SIZE(argv));     argc = setup_ide(argc, argv, ARRAY_SIZE(argv),     qtest_start(g_strjoinv(" ", argv));     argc = setup_common(argv, ARRAY_SIZE(argv));     qtest_start(g_strjoinv(" ", argv));
static void FUNC_0(const char *VAR_0, bool VAR_1)

{

    char *VAR_2[256], *VAR_3;

    int VAR_4;

    int VAR_5 = img_secs[backend_small];

    const CHST VAR_6 = { VAR_5 / (4 * 32) , 4, 32, VAR_1 };



    VAR_4 = setup_common(VAR_2, ARRAY_SIZE(VAR_2));

    VAR_3 = g_strdup_printf("%s,%s%scyls=%d,heads=%d,VAR_5=%d",

                           VAR_0 ?: "",

                           VAR_1 && VAR_0 ? "bios-chs-" : "",

                           VAR_1 ? "VAR_1=lba," : "",

                           VAR_6.cyls, VAR_6.heads,

                           VAR_6.VAR_5);

    cur_ide[0] = &VAR_6;

    VAR_4 = setup_ide(VAR_4, VAR_2, ARRAY_SIZE(VAR_2),

                     0, VAR_0 ? VAR_3 : NULL, backend_small, mbr_chs,

                     VAR_0 ? "" : VAR_3);

    g_free(VAR_3);

    qtest_start(g_strjoinv(" ", VAR_2));

    test_cmos();

    qtest_end();

}

static void FUNC_0(const char *VAR_0, bool VAR_1)
{ char *VAR_2[256], *VAR_3; int VAR_4; int VAR_5 = img_secs[backend_small]; const CHST VAR_6 = { VAR_5 / (4 * 32) , 4, 32, VAR_1 }; VAR_4 = setup_common(VAR_2, ARRAY_SIZE(VAR_2)); VAR_3 = g_strdup_printf("%s,%s%scyls=%d,heads=%d,VAR_5=%d",
VAR_0 ?: "",
VAR_1 && VAR_0 ? "bios-chs-" : "",
VAR_1 ? "VAR_1=lba," : "",
VAR_6.cyls, VAR_6.heads,
VAR_6.VAR_5); cur_ide[0] = &VAR_6; VAR_4 = setup_ide(VAR_4, VAR_2, ARRAY_SIZE(VAR_2),
0, VAR_0 ? VAR_3 : NULL, backend_small, mbr_chs,
VAR_0 ? "" : VAR_3); g_free(VAR_3); qtest_start(g_strjoinv(" ", VAR_2)); test_cmos(); qtest_end(); }