static QEMUFile *open_test_file(bool write)

{

    int fd = dup(temp_fd);

    QIOChannel *ioc;

    lseek(fd, 0, SEEK_SET);

    if (write) {

        g_assert_cmpint(ftruncate(fd, 0), ==, 0);

    }

    ioc = QIO_CHANNEL(qio_channel_file_new_fd(fd));

    if (write) {

        return qemu_fopen_channel_output(ioc);

    } else {

        return qemu_fopen_channel_input(ioc);

    }

}

static QEMUFile *open_test_file(bool write)

{

    int fd = dup(temp_fd);

    QIOChannel *ioc;

    lseek(fd, 0, SEEK_SET);

    if (write) {

        g_assert_cmpint(ftruncate(fd, 0), ==, 0);

    }

    ioc = QIO_CHANNEL(qio_channel_file_new_fd(fd));

    if (write) {

        return qemu_fopen_channel_output(ioc);

    } else {

        return qemu_fopen_channel_input(ioc);

    }

}

        return qemu_fopen_channel_output(ioc);         return qemu_fopen_channel_input(ioc);
static QEMUFile *FUNC_0(bool write)

{

    int VAR_0 = dup(temp_fd);

    QIOChannel *ioc;

    lseek(VAR_0, 0, SEEK_SET);

    if (write) {

        g_assert_cmpint(ftruncate(VAR_0, 0), ==, 0);

    }

    ioc = QIO_CHANNEL(qio_channel_file_new_fd(VAR_0));

    if (write) {

        return qemu_fopen_channel_output(ioc);

    } else {

        return qemu_fopen_channel_input(ioc);

    }

}

static QEMUFile *FUNC_0(bool write)
{ int VAR_0 = dup(temp_fd); QIOChannel *ioc; lseek(VAR_0, 0, SEEK_SET); if (write) { g_assert_cmpint(ftruncate(VAR_0, 0), ==, 0); } ioc = QIO_CHANNEL(qio_channel_file_new_fd(VAR_0)); if (write) { return qemu_fopen_channel_output(ioc); } else { return qemu_fopen_channel_input(ioc); } }