main (int argc, char * * argv)
{
  int D.20766;

  {
    struct Suite * s;

    gst_check_init (&argc, &argv);
    s = videotestsrc_suite ();
    D.20766 = gst_check_run_suite (s, "videotestsrc", "elements/videotestsrc.c");
    return D.20766;
  }
  D.20766 = 0;
  return D.20766;
}


videotestsrc_suite ()
{
  struct Suite * D.20768;
  struct Suite * s;
  struct TCase * tc_chain;

  s = suite_create ("videotestsrc");
  tc_chain = tcase_create ("general");
  suite_add_tcase (s, tc_chain);
  __gst_tcase_add_test (tc_chain, test_all_patterns, "test_all_patterns", 0, 0, 0, 1);
  __gst_tcase_add_test (tc_chain, test_rgb_formats, "test_rgb_formats", 0, 0, 0, 1);
  __gst_tcase_add_test (tc_chain, test_backward_playback, "test_backward_playback", 0, 0, 0, 1);
  __gst_tcase_add_test (tc_chain, test_duration_query, "test_duration_query", 0, 0, 0, 1);
  D.20768 = s;
  return D.20768;
}


test_duration_query (int __i__)
{
  int D.20746;
  <unnamed type> _gst_debug_min.0;
  long int D.20774;
  long int D.20775;
  struct GstDebugCategory * check_debug.1;
  _Bool D.20781;
  int D.20782;
  long int duration.2;
  _Bool D.20790;
  int D.20791;
  int D.20754;
  long int D.20795;
  long int D.20796;
  static const char __PRETTY_FUNCTION__[20] = "test_duration_query";

  {
    int _g_boolean_var_;

    {
      _gst_debug_min.0 = _gst_debug_min;
      if (_gst_debug_min.0 > 4) goto <D.20771>; else goto <D.20772>;
      <D.20771>:
      _g_boolean_var_ = 1;
      goto <D.20773>;
      <D.20772>:
      _g_boolean_var_ = 0;
      <D.20773>:
    }
    D.20746 = _g_boolean_var_;
  }
  D.20774 = (long int) D.20746;
  D.20775 = __builtin_expect (D.20774, 0);
  if (D.20775 != 0) goto <D.20776>; else goto <D.20777>;
  <D.20776>:
  check_debug.1 = check_debug;
  gst_debug_log (check_debug.1, 5, "elements/videotestsrc.c", &__PRETTY_FUNCTION__, 476, 0B, "test start");
  <D.20777>:
  tcase_fn_start ("test_duration_query", "elements/videotestsrc.c", 476);
  {
    struct GstElement * bin;
    struct GError * error;
    GstStateChangeReturn ret;
    gboolean queryret;
    gint64 duration;

    try
      {
        error = 0B;
        duration = -1;
        bin = gst_parse_launch ("videotestsrc ! fakesink name=sink sync=true", &error);
        ret = gst_element_set_state (bin, 3);
        if (ret == 2) goto <D.20779>; else goto <D.20780>;
        <D.20779>:
        ret = gst_element_get_state (bin, 0B, 0B, 18446744073709551615);
        D.20781 = ret == 1;
        D.20782 = (int) D.20781;
        _fail_unless (D.20782, "elements/videotestsrc.c", 489, "Failure \'ret != GST_STATE_CHANGE_SUCCESS\' occured", "Could not start test pipeline", 0B);
        <D.20780>:
        queryret = gst_element_query_duration (bin, 3, &duration);
        if (queryret != 0) goto <D.20783>; else goto <D.20784>;
        <D.20783>:
        duration.2 = duration;
        if (duration.2 != -1) goto <D.20786>; else goto <D.20787>;
        <D.20786>:
        _fail_unless (0, "elements/videotestsrc.c", 494, "Failed", "Should return false on duration query", 0B);
        <D.20787>:
        <D.20784>:
        gst_element_set_state (bin, 1);
        gst_object_unref (bin);
        bin = gst_parse_launch ("videotestsrc num-buffers=100 ! capsfilter caps=\"video/x-raw,framerate=(fraction)10/1\" ! fakesink name=sink sync=true", &error);
        ret = gst_element_set_state (bin, 3);
        if (ret == 2) goto <D.20788>; else goto <D.20789>;
        <D.20788>:
        ret = gst_element_get_state (bin, 0B, 0B, 18446744073709551615);
        D.20781 = ret == 1;
        D.20782 = (int) D.20781;
        _fail_unless (D.20782, "elements/videotestsrc.c", 505, "Failure \'ret != GST_STATE_CHANGE_SUCCESS\' occured", "Could not start test pipeline", 0B);
        <D.20789>:
        queryret = gst_element_query_duration (bin, 3, &duration);
        _fail_unless (queryret, "elements/videotestsrc.c", 508, "Assertion \'queryret\' failed", "Duration should be returned", 0B);
        duration.2 = duration;
        D.20790 = duration.2 == 10000000000;
        D.20791 = (int) D.20790;
        _fail_unless (D.20791, "elements/videotestsrc.c", 509, "Assertion \'duration == GST_SECOND * 10\' failed", "Expected duration didn\'t match", 0B);
        gst_element_seek (bin, -1.0e+0, 3, 3, 1, 0, 1, 1000000000);
        queryret = gst_element_query_duration (bin, 3, &duration);
        _fail_unless (queryret, "elements/videotestsrc.c", 516, "Assertion \'queryret\' failed", "Duration should be returned", 0B);
        duration.2 = duration;
        D.20790 = duration.2 == 10000000000;
        D.20791 = (int) D.20790;
        _fail_unless (D.20791, "elements/videotestsrc.c", 517, "Assertion \'duration == GST_SECOND * 10\' failed", "Expected duration didn\'t match", 0B);
        gst_element_set_state (bin, 1);
        gst_object_unref (bin);
      }
    finally
      {
        error = {CLOBBER};
        duration = {CLOBBER};
      }
  }
  {
    int _g_boolean_var_;

    {
      _gst_debug_min.0 = _gst_debug_min;
      if (_gst_debug_min.0 > 5) goto <D.20792>; else goto <D.20793>;
      <D.20792>:
      _g_boolean_var_ = 1;
      goto <D.20794>;
      <D.20793>:
      _g_boolean_var_ = 0;
      <D.20794>:
    }
    D.20754 = _g_boolean_var_;
  }
  D.20795 = (long int) D.20754;
  D.20796 = __builtin_expect (D.20795, 0);
  if (D.20796 != 0) goto <D.20797>; else goto <D.20798>;
  <D.20797>:
  check_debug.1 = check_debug;
  gst_debug_log (check_debug.1, 6, "elements/videotestsrc.c", &__PRETTY_FUNCTION__, 523, 0B, "cleaning up tasks");
  <D.20798>:
  gst_task_cleanup_all ();
}


test_backward_playback (int __i__)
{
  int D.20728;
  <unnamed type> _gst_debug_min.3;
  long int D.20803;
  long int D.20804;
  struct GstDebugCategory * check_debug.4;
  _Bool D.20810;
  int D.20811;
  long unsigned int D.20812;
  struct GTypeInstance * D.20813;
  _Bool D.20814;
  int D.20815;
  const gchar * D.20820;
  int D.20741;
  long int D.20826;
  long int D.20827;
  static const char __PRETTY_FUNCTION__[23] = "test_backward_playback";

  {
    int _g_boolean_var_;

    {
      _gst_debug_min.3 = _gst_debug_min;
      if (_gst_debug_min.3 > 4) goto <D.20800>; else goto <D.20801>;
      <D.20800>:
      _g_boolean_var_ = 1;
      goto <D.20802>;
      <D.20801>:
      _g_boolean_var_ = 0;
      <D.20802>:
    }
    D.20728 = _g_boolean_var_;
  }
  D.20803 = (long int) D.20728;
  D.20804 = __builtin_expect (D.20803, 0);
  if (D.20804 != 0) goto <D.20805>; else goto <D.20806>;
  <D.20805>:
  check_debug.4 = check_debug;
  gst_debug_log (check_debug.4, 5, "elements/videotestsrc.c", &__PRETTY_FUNCTION__, 405, 0B, "test start");
  <D.20806>:
  tcase_fn_start ("test_backward_playback", "elements/videotestsrc.c", 405);
  {
    struct GstBus * bus;
    struct GstElement * bin;
    struct GError * error;
    struct GMainLoop * loop;
    guint bus_watch;
    GstStateChangeReturn ret;
    struct GstElement * src;
    struct GstPad * pad;
    gulong pad_probe;
    struct BackwardsPlaybackData pdata;

    try
      {
        error = 0B;
        bus_watch = 0;
        pdata.last_ts = 18446744073709551615;
        pdata.error_msg = 0B;
        bin = gst_parse_launch ("videotestsrc name=src ! fakesink name=sink sync=true", &error);
        loop = g_main_loop_new (0B, 0);
        bus = gst_element_get_bus (bin);
        bus_watch = gst_bus_add_watch (bus, eos_watch, loop);
        gst_object_unref (bus);
        ret = gst_element_set_state (bin, 3);
        if (ret == 2) goto <D.20808>; else goto <D.20809>;
        <D.20808>:
        ret = gst_element_get_state (bin, 0B, 0B, 18446744073709551615);
        D.20810 = ret == 1;
        D.20811 = (int) D.20810;
        _fail_unless (D.20811, "elements/videotestsrc.c", 435, "Failure \'ret != GST_STATE_CHANGE_SUCCESS\' occured", "Could not start test pipeline", 0B);
        <D.20809>:
        D.20812 = gst_bin_get_type ();
        D.20813 = g_type_check_instance_cast (bin, D.20812);
        src = gst_bin_get_by_name (D.20813, "src");
        pad = gst_element_get_static_pad (src, "src");
        pad_probe = gst_pad_add_probe (pad, 16, backward_check_probe, &pdata, 0B);
        gst_element_seek (bin, -1.0e+0, 3, 3, 1, 0, 1, 1000000000);
        ret = gst_element_set_state (bin, 4);
        D.20814 = ret != 0;
        D.20815 = (int) D.20814;
        _fail_unless (D.20815, "elements/videotestsrc.c", 448, "Failure \'ret == GST_STATE_CHANGE_FAILURE\' occured", "Could not start test pipeline", 0B);
        if (ret == 2) goto <D.20816>; else goto <D.20817>;
        <D.20816>:
        ret = gst_element_get_state (bin, 0B, 0B, 18446744073709551615);
        D.20810 = ret == 1;
        D.20811 = (int) D.20810;
        _fail_unless (D.20811, "elements/videotestsrc.c", 451, "Failure \'ret != GST_STATE_CHANGE_SUCCESS\' occured", "Could not start test pipeline", 0B);
        <D.20817>:
        g_main_loop_run (loop);
        ret = gst_element_set_state (bin, 1);
        D.20814 = ret != 0;
        D.20815 = (int) D.20814;
        _fail_unless (D.20815, "elements/videotestsrc.c", 456, "Failure \'ret == GST_STATE_CHANGE_FAILURE\' occured", "Could not stop test pipeline", 0B);
        if (ret == 2) goto <D.20818>; else goto <D.20819>;
        <D.20818>:
        ret = gst_element_get_state (bin, 0B, 0B, 18446744073709551615);
        D.20810 = ret == 1;
        D.20811 = (int) D.20810;
        _fail_unless (D.20811, "elements/videotestsrc.c", 459, "Failure \'ret != GST_STATE_CHANGE_SUCCESS\' occured", "Could not stop test pipeline", 0B);
        <D.20819>:
        D.20820 = pdata.error_msg;
        if (D.20820 != 0B) goto <D.20821>; else goto <D.20822>;
        <D.20821>:
        D.20820 = pdata.error_msg;
        _fail_unless (0, "elements/videotestsrc.c", 463, "Failed", "%s", D.20820, 0B);
        <D.20822>:
        gst_pad_remove_probe (pad, pad_probe);
        gst_object_unref (pad);
        gst_object_unref (src);
        g_main_loop_unref (loop);
        g_source_remove (bus_watch);
        gst_object_unref (bin);
      }
    finally
      {
        error = {CLOBBER};
        pdata = {CLOBBER};
      }
  }
  {
    int _g_boolean_var_;

    {
      _gst_debug_min.3 = _gst_debug_min;
      if (_gst_debug_min.3 > 5) goto <D.20823>; else goto <D.20824>;
      <D.20823>:
      _g_boolean_var_ = 1;
      goto <D.20825>;
      <D.20824>:
      _g_boolean_var_ = 0;
      <D.20825>:
    }
    D.20741 = _g_boolean_var_;
  }
  D.20826 = (long int) D.20741;
  D.20827 = __builtin_expect (D.20826, 0);
  if (D.20827 != 0) goto <D.20828>; else goto <D.20829>;
  <D.20828>:
  check_debug.4 = check_debug;
  gst_debug_log (check_debug.4, 6, "elements/videotestsrc.c", &__PRETTY_FUNCTION__, 474, 0B, "cleaning up tasks");
  <D.20829>:
  gst_task_cleanup_all ();
}


backward_check_probe (struct GstPad * pad, struct GstPadProbeInfo * info, void * udata)
{
  <unnamed type> D.20830;
  unsigned int D.20831;
  long unsigned int D.20834;
  long unsigned int D.20837;
  GstPadProbeReturn D.20843;

  D.20830 = info->type;
  D.20831 = D.20830 & 16;
  if (D.20831 != 0) goto <D.20832>; else goto <D.20833>;
  <D.20832>:
  {
    struct GstBuffer * buf;
    struct BackwardsPlaybackData * pdata;

    buf = info->data;
    pdata = udata;
    D.20834 = buf->pts;
    if (D.20834 != 18446744073709551615) goto <D.20835>; else goto <D.20836>;
    <D.20835>:
    D.20837 = pdata->last_ts;
    if (D.20837 != 18446744073709551615) goto <D.20838>; else goto <D.20839>;
    <D.20838>:
    D.20837 = pdata->last_ts;
    D.20834 = buf->pts;
    if (D.20837 < D.20834) goto <D.20840>; else goto <D.20841>;
    <D.20840>:
    pdata->error_msg = "Received buffer with increasing timestamp";
    <D.20841>:
    <D.20839>:
    D.20834 = buf->pts;
    pdata->last_ts = D.20834;
    goto <D.20842>;
    <D.20836>:
    pdata->error_msg = "Received buffer without timestamp";
    <D.20842>:
  }
  <D.20833>:
  D.20843 = 1;
  return D.20843;
}


eos_watch (struct GstBus * bus, struct GstMessage * message, struct GMainLoop * loop)
{
  <unnamed type> D.20845;
  gboolean D.20848;

  D.20845 = message->type;
  if (D.20845 == 1) goto <D.20846>; else goto <D.20847>;
  <D.20846>:
  g_main_loop_quit (loop);
  <D.20847>:
  D.20848 = 1;
  return D.20848;
}


test_rgb_formats (int __i__)
{
  int D.20657;
  <unnamed type> _gst_debug_min.5;
  long int D.20854;
  long int D.20855;
  struct GstDebugCategory * check_debug.6;
  unsigned int D.20872;
  _Bool D.20873;
  int D.20874;
  long unsigned int D.20875;
  struct GTypeInstance * D.20876;
  int D.20877;
  int D.20878;
  int D.20686;
  long int D.20882;
  long int D.20883;
  long unsigned int _gst_fraction_type.7;
  const gchar * D.20887;
  int D.20888;
  int D.20891;
  int D.20691;
  long int D.20895;
  long int D.20896;
  const gchar * D.20899;
  unsigned int D.20900;
  unsigned int D.20901;
  unsigned int D.20902;
  unsigned int D.20903;
  unsigned int D.20904;
  unsigned int D.20905;
  _Bool D.20906;
  int D.20907;
  _Bool D.20908;
  int D.20909;
  struct GstSample * sample.8;
  _Bool D.20911;
  int D.20912;
  _Bool D.20913;
  int D.20914;
  _Bool D.20915;
  int D.20916;
  int D.20917;
  unsigned char D.20918;
  int D.20919;
  unsigned char D.20920;
  int D.20921;
  unsigned char D.20922;
  int D.20923;
  guint8 * D.20924;
  unsigned int p.9;
  int D.20700;
  long int D.20930;
  long int D.20931;
  unsigned int i.10;
  int D.20708;
  long int D.20938;
  long int D.20939;
  static const char __PRETTY_FUNCTION__[17] = "test_rgb_formats";

  {
    int _g_boolean_var_;

    {
      _gst_debug_min.5 = _gst_debug_min;
      if (_gst_debug_min.5 > 4) goto <D.20851>; else goto <D.20852>;
      <D.20851>:
      _g_boolean_var_ = 1;
      goto <D.20853>;
      <D.20852>:
      _g_boolean_var_ = 0;
      <D.20853>:
    }
    D.20657 = _g_boolean_var_;
  }
  D.20854 = (long int) D.20657;
  D.20855 = __builtin_expect (D.20854, 0);
  if (D.20855 != 0) goto <D.20856>; else goto <D.20857>;
  <D.20856>:
  check_debug.6 = check_debug;
  gst_debug_log (check_debug.6, 5, "elements/videotestsrc.c", &__PRETTY_FUNCTION__, 222, 0B, "test start");
  <D.20857>:
  tcase_fn_start ("test_rgb_formats", "elements/videotestsrc.c", 222);
  {
    typedef struct 
  {
    const gchar * pattern_name;
    gint pattern_enum;
    guint8 r_expected;
    guint8 g_expected;
    guint8 b_expected;
  } struct struct 
  {
    const gchar * pattern_name;
    gint pattern_enum;
    guint8 r_expected;
    guint8 g_expected;
    guint8 b_expected;
  };
    const struct 
  {
    const gchar * pattern_name;
    gint pattern_enum;
    guint8 r_expected;
    guint8 g_expected;
    guint8 b_expected;
  } test_patterns[5];
    typedef struct 
  {
    const gchar * nick;
    guint bpp;
    guint depth;
    guint32 red_mask;
    guint32 green_mask;
    guint32 blue_mask;
    guint32 alpha_mask;
  } struct struct 
  {
    const gchar * nick;
    guint bpp;
    guint depth;
    guint32 red_mask;
    guint32 green_mask;
    guint32 blue_mask;
    guint32 alpha_mask;
  };
    const struct 
  {
    const gchar * nick;
    guint bpp;
    guint depth;
    guint32 red_mask;
    guint32 green_mask;
    guint32 blue_mask;
    guint32 alpha_mask;
  } rgb_formats[12];
    struct GstElement * pipeline;
    struct GstElement * src;
    struct GstElement * filter;
    struct GstElement * sink;
    struct GstCaps * template_caps;
    struct GstSample * sample;
    struct GstPad * srcpad;
    gint p;
    gint i;
    gint e;

    try
      {
        test_patterns[0].pattern_name = "white";
        test_patterns[0].pattern_enum = 3;
        test_patterns[0].r_expected = 255;
        test_patterns[0].g_expected = 255;
        test_patterns[0].b_expected = 255;
        test_patterns[1].pattern_name = "red";
        test_patterns[1].pattern_enum = 4;
        test_patterns[1].r_expected = 255;
        test_patterns[1].g_expected = 0;
        test_patterns[1].b_expected = 0;
        test_patterns[2].pattern_name = "green";
        test_patterns[2].pattern_enum = 5;
        test_patterns[2].r_expected = 0;
        test_patterns[2].g_expected = 255;
        test_patterns[2].b_expected = 0;
        test_patterns[3].pattern_name = "blue";
        test_patterns[3].pattern_enum = 6;
        test_patterns[3].r_expected = 0;
        test_patterns[3].g_expected = 0;
        test_patterns[3].b_expected = 255;
        test_patterns[4].pattern_name = "black";
        test_patterns[4].pattern_enum = 2;
        test_patterns[4].r_expected = 0;
        test_patterns[4].g_expected = 0;
        test_patterns[4].b_expected = 0;
        rgb_formats = *.LC12;
        sample = 0B;
        D.20872 = right_shift_colour (16711680, 287454020);
        D.20873 = D.20872 == 34;
        D.20874 = (int) D.20873;
        _fail_unless (D.20874, "elements/videotestsrc.c", 266, "Assertion \'right_shift_colour (0x00ff0000, 0x11223344) == 0x22\' failed", 0B);
        pipeline = gst_pipeline_new ("pipeline");
        src = gst_check_setup_element ("videotestsrc");
        filter = gst_check_setup_element ("capsfilter");
        sink = gst_check_setup_element ("fakesink");
        D.20875 = gst_bin_get_type ();
        D.20876 = g_type_check_instance_cast (pipeline, D.20875);
        gst_bin_add_many (D.20876, src, filter, sink, 0B);
        D.20877 = gst_element_link (src, filter);
        _fail_unless (D.20877, "elements/videotestsrc.c", 275, "Assertion \'gst_element_link (src, filter)\' failed", 0B);
        D.20878 = gst_element_link (filter, sink);
        _fail_unless (D.20878, "elements/videotestsrc.c", 276, "Assertion \'gst_element_link (filter, sink)\' failed", 0B);
        srcpad = gst_element_get_static_pad (src, "src");
        template_caps = gst_pad_get_pad_template_caps (srcpad);
        g_object_set (sink, "signal-handoffs", 1, 0B);
        g_signal_connect_data (sink, "preroll-handoff", got_buf_cb, &sample, 0B, 0);
        {
          int _g_boolean_var_;

          {
            _gst_debug_min.5 = _gst_debug_min;
            if (_gst_debug_min.5 > 5) goto <D.20879>; else goto <D.20880>;
            <D.20879>:
            _g_boolean_var_ = 1;
            goto <D.20881>;
            <D.20880>:
            _g_boolean_var_ = 0;
            <D.20881>:
          }
          D.20686 = _g_boolean_var_;
        }
        D.20882 = (long int) D.20686;
        D.20883 = __builtin_expect (D.20882, 0);
        if (D.20883 != 0) goto <D.20884>; else goto <D.20885>;
        <D.20884>:
        check_debug.6 = check_debug;
        gst_debug_log (check_debug.6, 6, "elements/videotestsrc.c", &__PRETTY_FUNCTION__, 284, 0B, "videotestsrc src template caps: %p\7A", template_caps);
        <D.20885>:
        i = 0;
        goto <D.20705>;
        <D.20704>:
        e = 0;
        goto <D.20702>;
        <D.20701>:
        {
          struct GstCaps * caps;

          _gst_fraction_type.7 = _gst_fraction_type;
          D.20887 = rgb_formats[i].nick;
          caps = gst_caps_new_simple ("video/x-raw", "format", 64, D.20887, "width", 24, 16, "height", 24, 16, "framerate", _gst_fraction_type.7, 1, 1, 0B);
          D.20888 = gst_caps_is_subset (caps, template_caps);
          if (D.20888 != 0) goto <D.20889>; else goto <D.20890>;
          <D.20889>:
          p = 0;
          goto <D.20697>;
          <D.20696>:
          {
            GstStateChangeReturn state_ret;
            struct GstMapInfo map;

            try
              {
                D.20891 = test_patterns[p].pattern_enum;
                g_object_set (src, "pattern", D.20891, 0B);
                {
                  int _g_boolean_var_;

                  {
                    _gst_debug_min.5 = _gst_debug_min;
                    if (_gst_debug_min.5 > 3) goto <D.20892>; else goto <D.20893>;
                    <D.20892>:
                    _g_boolean_var_ = 1;
                    goto <D.20894>;
                    <D.20893>:
                    _g_boolean_var_ = 0;
                    <D.20894>:
                  }
                  D.20691 = _g_boolean_var_;
                }
                D.20895 = (long int) D.20691;
                D.20896 = __builtin_expect (D.20895, 0);
                if (D.20896 != 0) goto <D.20897>; else goto <D.20898>;
                <D.20897>:
                D.20899 = test_patterns[p].pattern_name;
                D.20900 = rgb_formats[i].alpha_mask;
                D.20901 = rgb_formats[i].blue_mask;
                D.20902 = rgb_formats[i].green_mask;
                D.20903 = rgb_formats[i].red_mask;
                D.20904 = rgb_formats[i].depth;
                D.20905 = rgb_formats[i].bpp;
                D.20887 = rgb_formats[i].nick;
                check_debug.6 = check_debug;
                gst_debug_log (check_debug.6, 4, "elements/videotestsrc.c", &__PRETTY_FUNCTION__, 307, 0B, "%5s %u/%u %08x %08x %08x %08x, pattern=%s", D.20887, D.20905, D.20904, D.20903, D.20902, D.20901, D.20900, D.20899);
                <D.20898>:
                g_object_set (filter, "caps", caps, 0B);
                state_ret = gst_element_set_state (pipeline, 3);
                D.20906 = state_ret != 0;
                D.20907 = (int) D.20906;
                _fail_unless (D.20907, "elements/videotestsrc.c", 314, "Assertion \'state_ret != GST_STATE_CHANGE_FAILURE\' failed", "pipeline _set_state() to PAUSED failed", 0B);
                state_ret = gst_element_get_state (pipeline, 0B, 0B, 18446744073709551615);
                D.20908 = state_ret == 1;
                D.20909 = (int) D.20908;
                _fail_unless (D.20909, "elements/videotestsrc.c", 317, "Assertion \'state_ret == GST_STATE_CHANGE_SUCCESS\' failed", "pipeline failed going to PAUSED state", 0B);
                state_ret = gst_element_set_state (pipeline, 1);
                D.20908 = state_ret == 1;
                D.20909 = (int) D.20908;
                _fail_unless (D.20909, "elements/videotestsrc.c", 320, "Assertion \'state_ret == GST_STATE_CHANGE_SUCCESS\' failed", 0B);
                sample.8 = sample;
                D.20911 = sample.8 != 0B;
                D.20912 = (int) D.20911;
                _fail_unless (D.20912, "elements/videotestsrc.c", 322, "Assertion \'sample != NULL\' failed", 0B);
                {
                  struct GstBuffer * buf;
                  struct GstStructure * s;
                  struct GstCaps * caps;
                  const gchar * format;

                  sample.8 = sample;
                  buf = gst_sample_get_buffer (sample.8);
                  D.20913 = buf != 0B;
                  D.20914 = (int) D.20913;
                  _fail_unless (D.20914, "elements/videotestsrc.c", 332, "Assertion \'buf != NULL\' failed", 0B);
                  sample.8 = sample;
                  caps = gst_sample_get_caps (sample.8);
                  D.20915 = caps != 0B;
                  D.20916 = (int) D.20915;
                  _fail_unless (D.20916, "elements/videotestsrc.c", 334, "Assertion \'caps != NULL\' failed", 0B);
                  s = gst_caps_get_structure (caps, 0);
                  format = gst_structure_get_string (s, "format");
                  D.20887 = rgb_formats[i].nick;
                  D.20917 = g_str_equal (format, D.20887);
                  _fail_unless (D.20917, "elements/videotestsrc.c", 338, "Assertion \'g_str_equal (format, rgb_formats[i].nick)\' failed", 0B);
                  gst_buffer_map (buf, &map, 1);
                  D.20904 = rgb_formats[i].depth;
                  D.20905 = rgb_formats[i].bpp;
                  D.20918 = test_patterns[p].b_expected;
                  D.20919 = (int) D.20918;
                  D.20920 = test_patterns[p].g_expected;
                  D.20921 = (int) D.20920;
                  D.20922 = test_patterns[p].r_expected;
                  D.20923 = (int) D.20922;
                  D.20900 = rgb_formats[i].alpha_mask;
                  D.20901 = rgb_formats[i].blue_mask;
                  D.20902 = rgb_formats[i].green_mask;
                  D.20903 = rgb_formats[i].red_mask;
                  D.20924 = map.data;
                  check_rgb_buf (D.20924, D.20903, D.20902, D.20901, D.20900, D.20923, D.20921, D.20919, D.20905, D.20904);
                  gst_buffer_unmap (buf, &map);
                  sample.8 = sample;
                  gst_sample_unref (sample.8);
                  sample = 0B;
                }
              }
            finally
              {
                map = {CLOBBER};
              }
          }
          p = p + 1;
          <D.20697>:
          p.9 = (unsigned int) p;
          if (p.9 <= 4) goto <D.20696>; else goto <D.20698>;
          <D.20698>:
          goto <D.20926>;
          <D.20890>:
          {
            int _g_boolean_var_;

            {
              _gst_debug_min.5 = _gst_debug_min;
              if (_gst_debug_min.5 > 3) goto <D.20927>; else goto <D.20928>;
              <D.20927>:
              _g_boolean_var_ = 1;
              goto <D.20929>;
              <D.20928>:
              _g_boolean_var_ = 0;
              <D.20929>:
            }
            D.20700 = _g_boolean_var_;
          }
          D.20930 = (long int) D.20700;
          D.20931 = __builtin_expect (D.20930, 0);
          if (D.20931 != 0) goto <D.20932>; else goto <D.20933>;
          <D.20932>:
          check_debug.6 = check_debug;
          gst_debug_log (check_debug.6, 4, "elements/videotestsrc.c", &__PRETTY_FUNCTION__, 355, 0B, "videotestsrc doesn\'t support format %p\7A", caps);
          <D.20933>:
          <D.20926>:
          gst_caps_unref (caps);
        }
        e = e + 1;
        <D.20702>:
        if (e <= 1) goto <D.20701>; else goto <D.20703>;
        <D.20703>:
        i = i + 1;
        <D.20705>:
        i.10 = (unsigned int) i;
        if (i.10 <= 11) goto <D.20704>; else goto <D.20706>;
        <D.20706>:
        gst_caps_unref (template_caps);
        gst_object_unref (srcpad);
        gst_object_unref (pipeline);
      }
    finally
      {
        test_patterns = {CLOBBER};
        rgb_formats = {CLOBBER};
        sample = {CLOBBER};
      }
  }
  {
    int _g_boolean_var_;

    {
      _gst_debug_min.5 = _gst_debug_min;
      if (_gst_debug_min.5 > 5) goto <D.20935>; else goto <D.20936>;
      <D.20935>:
      _g_boolean_var_ = 1;
      goto <D.20937>;
      <D.20936>:
      _g_boolean_var_ = 0;
      <D.20937>:
    }
    D.20708 = _g_boolean_var_;
  }
  D.20938 = (long int) D.20708;
  D.20939 = __builtin_expect (D.20938, 0);
  if (D.20939 != 0) goto <D.20940>; else goto <D.20941>;
  <D.20940>:
  check_debug.6 = check_debug;
  gst_debug_log (check_debug.6, 6, "elements/videotestsrc.c", &__PRETTY_FUNCTION__, 367, 0B, "cleaning up tasks");
  <D.20941>:
  gst_task_cleanup_all ();
}


got_buf_cb (struct GstElement * sink, struct GstBuffer * new_buf, struct GstPad * pad, struct GstSample * * p_old_sample)
{
  struct GstSample * D.20942;
  struct GstSample * D.20945;
  struct GstCaps * caps;

  caps = gst_pad_get_current_caps (pad);
  D.20942 = *p_old_sample;
  if (D.20942 != 0B) goto <D.20943>; else goto <D.20944>;
  <D.20943>:
  D.20942 = *p_old_sample;
  gst_sample_unref (D.20942);
  <D.20944>:
  D.20945 = gst_sample_new (new_buf, caps, 0B, 0B);
  *p_old_sample = D.20945;
  gst_caps_unref (caps);
}


right_shift_colour (guint32 mask, guint32 pixel)
{
  guint32 D.20948;
  unsigned int D.20949;

  if (mask == 0) goto <D.20946>; else goto <D.20947>;
  <D.20946>:
  D.20948 = 0;
  return D.20948;
  <D.20947>:
  pixel = pixel & mask;
  goto <D.20611>;
  <D.20610>:
  mask = mask >> 1;
  pixel = pixel >> 1;
  <D.20611>:
  D.20949 = mask & 1;
  if (D.20949 == 0) goto <D.20610>; else goto <D.20612>;
  <D.20612>:
  D.20948 = pixel;
  return D.20948;
}


check_rgb_buf (const guint8 * pixels, guint32 r_mask, guint32 g_mask, guint32 b_mask, guint32 a_mask, guint8 r_expected, guint8 g_expected, guint8 b_expected, guint bpp, guint depth)
{
  unsigned char D.20951;
  int D.20952;
  int D.20953;
  const guint8 * D.20954;
  unsigned char D.20955;
  int D.20956;
  int D.20957;
  int D.20958;
  const guint8 * D.20959;
  unsigned char D.20960;
  int D.20961;
  int D.20962;
  short unsigned int D.20965;
  short unsigned int D.20967;
  int D.20970;
  int D.20971;
  int D.20972;
  unsigned int D.20973;
  _Bool D.20974;
  int D.20975;
  unsigned int D.20976;
  _Bool D.20977;
  int D.20978;
  unsigned int D.20979;
  _Bool D.20980;
  int D.20981;
  _Bool D.20982;
  _Bool D.20983;
  _Bool D.20984;
  int D.20985;
  guint32 pixel;
  guint32 red;
  guint32 green;
  guint32 blue;
  guint32 alpha;
  static const char __func__[14] = "check_rgb_buf";

  switch (bpp) <default: <D.20644>, case 16: <D.20643>, case 24: <D.20642>, case 32: <D.20640>>
  <D.20640>:
  pixel = __gst_fast_read_swap32 (pixels);
  goto <D.20641>;
  <D.20642>:
  D.20951 = *pixels;
  D.20952 = (int) D.20951;
  D.20953 = D.20952 << 16;
  D.20954 = pixels + 1;
  D.20955 = *D.20954;
  D.20956 = (int) D.20955;
  D.20957 = D.20956 << 8;
  D.20958 = D.20953 | D.20957;
  D.20959 = pixels + 2;
  D.20960 = *D.20959;
  D.20961 = (int) D.20960;
  D.20962 = D.20958 | D.20961;
  pixel = (guint32) D.20962;
  goto <D.20641>;
  <D.20643>:
  if (1 != 0) goto <D.20963>; else goto <D.20964>;
  <D.20963>:
  D.20965 = __gst_fast_read16 (pixels);
  pixel = (guint32) D.20965;
  goto <D.20966>;
  <D.20964>:
  D.20967 = __gst_fast_read_swap16 (pixels);
  pixel = (guint32) D.20967;
  <D.20966>:
  goto <D.20641>;
  <D.20644>:
  g_log (0B, 8, "file %s: line %d (%s): should not be reached", "elements/videotestsrc.c", 176, &__func__);
  return;
  <D.20641>:
  red = right_shift_colour (r_mask, pixel);
  green = right_shift_colour (g_mask, pixel);
  blue = right_shift_colour (b_mask, pixel);
  alpha = right_shift_colour (a_mask, pixel);
  if (bpp == 16) goto <D.20968>; else goto <D.20969>;
  <D.20968>:
  D.20970 = (int) r_expected;
  r_expected = fix_expected_colour (r_mask, D.20970);
  D.20971 = (int) g_expected;
  g_expected = fix_expected_colour (g_mask, D.20971);
  D.20972 = (int) b_expected;
  b_expected = fix_expected_colour (b_mask, D.20972);
  <D.20969>:
  D.20970 = (int) r_expected;
  D.20973 = (unsigned int) r_expected;
  D.20974 = D.20973 == red;
  D.20975 = (int) D.20974;
  _fail_unless (D.20975, "elements/videotestsrc.c", 197, "Assertion \'red == r_expected\' failed", "RED: expected 0x%02x, found 0x%02x", D.20970, red, 0B);
  D.20971 = (int) g_expected;
  D.20976 = (unsigned int) g_expected;
  D.20977 = D.20976 == green;
  D.20978 = (int) D.20977;
  _fail_unless (D.20978, "elements/videotestsrc.c", 199, "Assertion \'green == g_expected\' failed", "GREEN: expected 0x%02x, found 0x%02x", D.20971, green, 0B);
  D.20972 = (int) b_expected;
  D.20979 = (unsigned int) b_expected;
  D.20980 = D.20979 == blue;
  D.20981 = (int) D.20980;
  _fail_unless (D.20981, "elements/videotestsrc.c", 201, "Assertion \'blue == b_expected\' failed", "BLUE: expected 0x%02x, found 0x%02x", D.20972, blue, 0B);
  D.20982 = a_mask == 0;
  D.20983 = alpha != 0;
  D.20984 = D.20982 | D.20983;
  D.20985 = (int) D.20984;
  _fail_unless (D.20985, "elements/videotestsrc.c", 203, "Assertion \'a_mask == 0 || alpha != 0\' failed", 0B);
}


__gst_fast_read_swap32 (const guint8 * v)
{
  guint32 D.20988;
  unsigned int D.20989;

  D.20989 = MEM[(const guint32 *)v];
  D.20988 = __builtin_bswap32 (D.20989);
  return D.20988;
}


__gst_fast_read16 (const guint8 * v)
{
  guint16 D.20991;

  D.20991 = MEM[(const guint16 *)v];
  return D.20991;
}


fix_expected_colour (guint32 col_mask, guint8 col_expected)
{
  long unsigned int D.20993;
  int D.20994;
  int D.20995;
  int D.20996;
  int D.20621;
  unsigned char D.20997;
  long int D.21001;
  long int D.21002;
  guint8 D.21006;
  unsigned char D.21007;
  guint32 mask;
  gint last;
  gint first;
  static const char __func__[20] = "fix_expected_colour";

  D.20993 = (long unsigned int) col_mask;
  last = g_bit_nth_msf (D.20993, -1);
  D.20993 = (long unsigned int) col_mask;
  first = g_bit_nth_lsf (D.20993, -1);
  D.20994 = last - first;
  D.20995 = D.20994 + 1;
  D.20996 = 1 << D.20995;
  mask = (guint32) D.20996;
  mask = mask + 4294967295;
  {
    int _g_boolean_var_;

    {
      D.20997 = col_expected + 255;
      if (D.20997 > 253) goto <D.20998>; else goto <D.20999>;
      <D.20998>:
      _g_boolean_var_ = 1;
      goto <D.21000>;
      <D.20999>:
      _g_boolean_var_ = 0;
      <D.21000>:
    }
    D.20621 = _g_boolean_var_;
  }
  D.21001 = (long int) D.20621;
  D.21002 = __builtin_expect (D.21001, 1);
  if (D.21002 != 0) goto <D.21003>; else goto <D.21004>;
  <D.21003>:
  goto <D.21005>;
  <D.21004>:
  g_assertion_message_expr (0B, "elements/videotestsrc.c", 147, &__func__, "col_expected == 0x00 || col_expected == 0xff");
  <D.21005>:
  D.21007 = (unsigned char) mask;
  D.21006 = D.21007 & col_expected;
  return D.21006;
}


g_bit_nth_msf (gulong mask, gint nth_bit)
{
  int D.8356;
  long int D.21015;
  long int D.21016;
  long unsigned int D.21017;
  long unsigned int D.21018;
  gint D.21021;

  if (nth_bit < 0) goto <D.21009>; else goto <D.21011>;
  <D.21011>:
  {
    int _g_boolean_var_;

    {
      if (nth_bit > 64) goto <D.21012>; else goto <D.21013>;
      <D.21012>:
      _g_boolean_var_ = 1;
      goto <D.21014>;
      <D.21013>:
      _g_boolean_var_ = 0;
      <D.21014>:
    }
    D.8356 = _g_boolean_var_;
  }
  D.21015 = (long int) D.8356;
  D.21016 = __builtin_expect (D.21015, 0);
  if (D.21016 != 0) goto <D.21009>; else goto <D.21010>;
  <D.21009>:
  nth_bit = 64;
  <D.21010>:
  goto <D.8358>;
  <D.8357>:
  nth_bit = nth_bit + -1;
  D.21017 = mask >> nth_bit;
  D.21018 = D.21017 & 1;
  if (D.21018 != 0) goto <D.21019>; else goto <D.21020>;
  <D.21019>:
  D.21021 = nth_bit;
  return D.21021;
  <D.21020>:
  <D.8358>:
  if (nth_bit > 0) goto <D.8357>; else goto <D.8359>;
  <D.8359>:
  D.21021 = -1;
  return D.21021;
}


g_bit_nth_lsf (gulong mask, gint nth_bit)
{
  int D.8347;
  long int D.21026;
  long int D.21027;
  long unsigned int D.21030;
  long unsigned int D.21031;
  gint D.21034;

  {
    int _g_boolean_var_;

    {
      if (nth_bit < -1) goto <D.21023>; else goto <D.21024>;
      <D.21023>:
      _g_boolean_var_ = 1;
      goto <D.21025>;
      <D.21024>:
      _g_boolean_var_ = 0;
      <D.21025>:
    }
    D.8347 = _g_boolean_var_;
  }
  D.21026 = (long int) D.8347;
  D.21027 = __builtin_expect (D.21026, 0);
  if (D.21027 != 0) goto <D.21028>; else goto <D.21029>;
  <D.21028>:
  nth_bit = -1;
  <D.21029>:
  goto <D.8349>;
  <D.8348>:
  nth_bit = nth_bit + 1;
  D.21030 = mask >> nth_bit;
  D.21031 = D.21030 & 1;
  if (D.21031 != 0) goto <D.21032>; else goto <D.21033>;
  <D.21032>:
  D.21034 = nth_bit;
  return D.21034;
  <D.21033>:
  <D.8349>:
  if (nth_bit <= 62) goto <D.8348>; else goto <D.8350>;
  <D.8350>:
  D.21034 = -1;
  return D.21034;
}


gst_sample_unref (struct GstSample * sample)
{
  gst_mini_object_unref (sample);
}


gst_caps_unref (struct GstCaps * caps)
{
  gst_mini_object_unref (caps);
}


test_all_patterns (int __i__)
{
  int D.20583;
  <unnamed type> _gst_debug_min.11;
  long int D.21040;
  long int D.21041;
  struct GstDebugCategory * check_debug.12;
  gboolean D.20593;
  GType * g_param_spec_types.13;
  struct GTypeClass * D.21051;
  long unsigned int D.21053;
  long unsigned int D.21055;
  void * D.21056;
  struct GTypeClass * D.21057;
  int D.20595;
  long int D.21061;
  long int D.21062;
  long unsigned int D.21065;
  long unsigned int D.21066;
  struct GEnumValue * D.21067;
  const gchar * D.21068;
  <unnamed type> D.21069;
  _Bool D.21070;
  int D.21071;
  int D.20597;
  long int D.21075;
  long int D.21076;
  struct GList * buffers.14;
  unsigned int D.21080;
  int D.20605;
  long int D.21084;
  long int D.21085;
  static const char __PRETTY_FUNCTION__[18] = "test_all_patterns";

  {
    int _g_boolean_var_;

    {
      _gst_debug_min.11 = _gst_debug_min;
      if (_gst_debug_min.11 > 4) goto <D.21037>; else goto <D.21038>;
      <D.21037>:
      _g_boolean_var_ = 1;
      goto <D.21039>;
      <D.21038>:
      _g_boolean_var_ = 0;
      <D.21039>:
    }
    D.20583 = _g_boolean_var_;
  }
  D.21040 = (long int) D.20583;
  D.21041 = __builtin_expect (D.21040, 0);
  if (D.21041 != 0) goto <D.21042>; else goto <D.21043>;
  <D.21042>:
  check_debug.12 = check_debug;
  gst_debug_log (check_debug.12, 5, "elements/videotestsrc.c", &__PRETTY_FUNCTION__, 80, 0B, "test start");
  <D.21043>:
  tcase_fn_start ("test_all_patterns", "elements/videotestsrc.c", 80);
  {
    struct GstElement * videotestsrc;
    struct GObjectClass * oclass;
    struct GParamSpec * property;
    struct GEnumValue * values;
    guint j;

    j = 0;
    videotestsrc = setup_videotestsrc ();
    oclass = MEM[(struct GTypeInstance *)videotestsrc].g_class;
    property = g_object_class_find_property (oclass, "pattern");
    {
      struct GTypeInstance * __inst;
      GType __t;
      gboolean __r;

      __inst = property;
      g_param_spec_types.13 = g_param_spec_types;
      __t = MEM[(GType *)g_param_spec_types.13 + 80B];
      {
        if (__inst == 0B) goto <D.21046>; else goto <D.21047>;
        <D.21046>:
        __r = 0;
        goto <D.21048>;
        <D.21047>:
        D.21051 = __inst->g_class;
        if (D.21051 != 0B) goto <D.21052>; else goto <D.21049>;
        <D.21052>:
        D.21051 = __inst->g_class;
        D.21053 = D.21051->g_type;
        if (D.21053 == __t) goto <D.21054>; else goto <D.21049>;
        <D.21054>:
        __r = 1;
        goto <D.21050>;
        <D.21049>:
        __r = g_type_check_instance_is_a (__inst, __t);
        <D.21050>:
        <D.21048>:
      }
      D.20593 = __r;
    }
    _fail_unless (D.20593, "elements/videotestsrc.c", 91, "Assertion \'G_IS_PARAM_SPEC_ENUM (property)\' failed", 0B);
    D.21055 = property->value_type;
    D.21056 = g_type_class_ref (D.21055);
    D.21057 = g_type_check_class_cast (D.21056, 48);
    values = MEM[(struct GEnumClass *)D.21057].values;
    goto <D.20602>;
    <D.20601>:
    {
      int _g_boolean_var_;

      {
        _gst_debug_min.11 = _gst_debug_min;
        if (_gst_debug_min.11 > 4) goto <D.21058>; else goto <D.21059>;
        <D.21058>:
        _g_boolean_var_ = 1;
        goto <D.21060>;
        <D.21059>:
        _g_boolean_var_ = 0;
        <D.21060>:
      }
      D.20595 = _g_boolean_var_;
    }
    D.21061 = (long int) D.20595;
    D.21062 = __builtin_expect (D.21061, 0);
    if (D.21062 != 0) goto <D.21063>; else goto <D.21064>;
    <D.21063>:
    D.21065 = (long unsigned int) j;
    D.21066 = D.21065 * 24;
    D.21067 = values + D.21066;
    D.21068 = D.21067->value_name;
    check_debug.12 = check_debug;
    gst_debug_log (check_debug.12, 5, "elements/videotestsrc.c", &__PRETTY_FUNCTION__, 95, videotestsrc, "testing pattern %s", D.21068);
    <D.21064>:
    g_object_set (videotestsrc, "pattern", j, 0B);
    D.21069 = gst_element_set_state (videotestsrc, 4);
    D.21070 = D.21069 == 1;
    D.21071 = (int) D.21070;
    _fail_unless (D.21071, "elements/videotestsrc.c", 101, "Assertion \'gst_element_set_state (videotestsrc, GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS\' failed", "could not set to playing", 0B);
    g_mutex_lock (&check_mutex);
    goto <D.20599>;
    <D.20598>:
    {
      int _g_boolean_var_;

      {
        _gst_debug_min.11 = _gst_debug_min;
        if (_gst_debug_min.11 > 4) goto <D.21072>; else goto <D.21073>;
        <D.21072>:
        _g_boolean_var_ = 1;
        goto <D.21074>;
        <D.21073>:
        _g_boolean_var_ = 0;
        <D.21074>:
      }
      D.20597 = _g_boolean_var_;
    }
    D.21075 = (long int) D.20597;
    D.21076 = __builtin_expect (D.21075, 0);
    if (D.21076 != 0) goto <D.21077>; else goto <D.21078>;
    <D.21077>:
    check_debug.12 = check_debug;
    gst_debug_log (check_debug.12, 5, "elements/videotestsrc.c", &__PRETTY_FUNCTION__, 105, videotestsrc, "Waiting for more buffers");
    <D.21078>:
    g_cond_wait (&check_cond, &check_mutex);
    <D.20599>:
    buffers.14 = buffers;
    D.21080 = g_list_length (buffers.14);
    if (D.21080 <= 9) goto <D.20598>; else goto <D.20600>;
    <D.20600>:
    g_mutex_unlock (&check_mutex);
    gst_element_set_state (videotestsrc, 2);
    gst_check_drop_buffers ();
    j = j + 1;
    <D.20602>:
    D.21065 = (long unsigned int) j;
    D.21066 = D.21065 * 24;
    D.21067 = values + D.21066;
    D.21068 = D.21067->value_name;
    if (D.21068 != 0B) goto <D.20601>; else goto <D.20603>;
    <D.20603>:
    cleanup_videotestsrc (videotestsrc);
  }
  {
    int _g_boolean_var_;

    {
      _gst_debug_min.11 = _gst_debug_min;
      if (_gst_debug_min.11 > 5) goto <D.21081>; else goto <D.21082>;
      <D.21081>:
      _g_boolean_var_ = 1;
      goto <D.21083>;
      <D.21082>:
      _g_boolean_var_ = 0;
      <D.21083>:
    }
    D.20605 = _g_boolean_var_;
  }
  D.21084 = (long int) D.20605;
  D.21085 = __builtin_expect (D.21084, 0);
  if (D.21085 != 0) goto <D.21086>; else goto <D.21087>;
  <D.21086>:
  check_debug.12 = check_debug;
  gst_debug_log (check_debug.12, 6, "elements/videotestsrc.c", &__PRETTY_FUNCTION__, 120, 0B, "cleaning up tasks");
  <D.21087>:
  gst_task_cleanup_all ();
}


setup_videotestsrc ()
{
  int D.20571;
  <unnamed type> _gst_debug_min.15;
  long int D.21092;
  long int D.21093;
  struct GstDebugCategory * check_debug.16;
  struct GstPad * mysinkpad.17;
  struct GstPad * mysinkpad.18;
  struct GstElement * D.21099;
  struct GstElement * videotestsrc;
  static const char __PRETTY_FUNCTION__[19] = "setup_videotestsrc";

  {
    int _g_boolean_var_;

    {
      _gst_debug_min.15 = _gst_debug_min;
      if (_gst_debug_min.15 > 4) goto <D.21089>; else goto <D.21090>;
      <D.21089>:
      _g_boolean_var_ = 1;
      goto <D.21091>;
      <D.21090>:
      _g_boolean_var_ = 0;
      <D.21091>:
    }
    D.20571 = _g_boolean_var_;
  }
  D.21092 = (long int) D.20571;
  D.21093 = __builtin_expect (D.21092, 0);
  if (D.21093 != 0) goto <D.21094>; else goto <D.21095>;
  <D.21094>:
  check_debug.16 = check_debug;
  gst_debug_log (check_debug.16, 5, "elements/videotestsrc.c", &__PRETTY_FUNCTION__, 60, 0B, "setup_videotestsrc");
  <D.21095>:
  videotestsrc = gst_check_setup_element ("videotestsrc");
  mysinkpad.17 = gst_check_setup_sink_pad (videotestsrc, &sinktemplate);
  mysinkpad = mysinkpad.17;
  mysinkpad.18 = mysinkpad;
  gst_pad_set_active (mysinkpad.18, 1);
  D.21099 = videotestsrc;
  return D.21099;
}


cleanup_videotestsrc (struct GstElement * videotestsrc)
{
  int D.20577;
  <unnamed type> _gst_debug_min.19;
  long int D.21105;
  long int D.21106;
  struct GstDebugCategory * check_debug.20;
  struct GstPad * mysinkpad.21;
  static const char __PRETTY_FUNCTION__[21] = "cleanup_videotestsrc";

  {
    int _g_boolean_var_;

    {
      _gst_debug_min.19 = _gst_debug_min;
      if (_gst_debug_min.19 > 4) goto <D.21102>; else goto <D.21103>;
      <D.21102>:
      _g_boolean_var_ = 1;
      goto <D.21104>;
      <D.21103>:
      _g_boolean_var_ = 0;
      <D.21104>:
    }
    D.20577 = _g_boolean_var_;
  }
  D.21105 = (long int) D.20577;
  D.21106 = __builtin_expect (D.21105, 0);
  if (D.21106 != 0) goto <D.21107>; else goto <D.21108>;
  <D.21107>:
  check_debug.20 = check_debug;
  gst_debug_log (check_debug.20, 5, "elements/videotestsrc.c", &__PRETTY_FUNCTION__, 71, 0B, "cleanup_videotestsrc");
  <D.21108>:
  gst_check_drop_buffers ();
  mysinkpad.21 = mysinkpad;
  gst_pad_set_active (mysinkpad.21, 0);
  gst_check_teardown_sink_pad (videotestsrc);
  gst_check_teardown_element (videotestsrc);
}


__gst_tcase_add_test (struct TCase * tc, void (*TFun) (int) tf, const char * fname, int signal, int allowed_exit_value, int start, int end)
{
  int D.21111;

  D.21111 = _gst_check_run_test_func (fname);
  if (D.21111 != 0) goto <D.21112>; else goto <D.21113>;
  <D.21112>:
  _tcase_add_test (tc, tf, fname, signal, allowed_exit_value, start, end);
  <D.21113>:
}


