__attribute__((visibility ("hidden")))
mono_basic_block_free (struct MonoSimpleBasicBlock * bb)
{
  struct GSList * D.16771;

  goto <D.16723>;
  <D.16722>:
  {
    struct MonoSimpleBasicBlock * next;

    next = bb->next;
    D.16771 = bb->out_bb;
    if (D.16771 != 0B) goto <D.16772>; else goto <D.16773>;
    <D.16772>:
    D.16771 = bb->out_bb;
    monoeg_g_slist_free (D.16771);
    <D.16773>:
    monoeg_g_free (bb);
    bb = next;
  }
  <D.16723>:
  if (bb != 0B) goto <D.16722>; else goto <D.16724>;
  <D.16724>:
}


__attribute__((visibility ("hidden")))
mono_basic_block_split (struct MonoMethod * method, struct MonoError * error)
{
  unsigned int D.16774;
  sizetype D.16775;
  struct MonoSimpleBasicBlock * D.16778;
  long int end.0;
  long int start.1;
  long int D.16781;
  int D.16782;
  int D.16783;
  int D.16785;
  struct MonoSimpleBasicBlock * bb;
  struct MonoSimpleBasicBlock * root;
  const unsigned char * start;
  const unsigned char * end;
  struct MonoMethodHeader * header;
  void fail = <<< error >>>;

  try
    {
      header = mono_method_get_header (method);
      start = header->code;
      D.16774 = header->code_size;
      D.16775 = (sizetype) D.16774;
      end = start + D.16775;
      mono_error_init (error);
      if (header == 0B) goto <D.16776>; else goto <D.16777>;
      <D.16776>:
      mono_error_set_not_verifiable (error, method, "Could not decode header");
      D.16778 = 0B;
      return D.16778;
      <D.16777>:
      bb = monoeg_malloc0 (56);
      bb->start = 0;
      end.0 = (long int) end;
      start.1 = (long int) start;
      D.16781 = end.0 - start.1;
      D.16782 = (int) D.16781;
      bb->end = D.16782;
      bb->colour = 1;
      bb->dead = 0;
      root = bb;
      bb_formation_il_pass (start, end, bb, &root, method, error);
      D.16783 = mono_error_ok (error);
      if (D.16783 == 0) goto fail; else goto <D.16784>;
      <D.16784>:
      bb_formation_eh_pass (header, bb, &root, method, error);
      D.16785 = mono_error_ok (error);
      if (D.16785 == 0) goto fail; else goto <D.16786>;
      <D.16786>:
      bb_liveness (bb);
      mono_metadata_free_mh (header);
      D.16778 = bb;
      return D.16778;
      fail:
      mono_metadata_free_mh (header);
      mono_basic_block_free (bb);
      D.16778 = 0B;
      return D.16778;
    }
  finally
    {
      root = {CLOBBER};
    }
}


bb_formation_il_pass (const unsigned char * start, const unsigned char * end, struct MonoSimpleBasicBlock * bb, struct MonoSimpleBasicBlock * * root, struct MonoMethod * method, struct MonoError * error)
{
  const unsigned char * ip.2;
  long int ip.3;
  long int start.4;
  long int D.16792;
  unsigned char D.16795;
  int D.16796;
  int D.16798;
  unsigned int D.16799;
  _Bool D.16800;
  long int D.16801;
  long int D.16802;
  int value.5;
  unsigned char D.16806;
  int D.16807;
  const unsigned char * ip.6;
  int D.16809;
  unsigned int D.16812;
  const unsigned char * ip.7;
  const unsigned char * ip.8;
  const unsigned char * ip.9;
  const unsigned char * ip.10;
  unsigned char D.16825;
  signed char D.16826;
  unsigned int D.16827;
  unsigned int D.16828;
  unsigned int D.16830;
  unsigned int D.16831;
  unsigned int D.16832;
  unsigned int D.16833;
  unsigned int D.16834;
  unsigned int D.16835;
  unsigned int D.16836;
  unsigned int D.16837;
  unsigned int D.16838;
  unsigned int D.16839;
  unsigned int D.16840;
  int D.16845;
  int D.16846;
  unsigned char D.16851;
  _Bool D.16852;
  int D.16853;
  unsigned int D.16863;
  unsigned int D.16864;
  unsigned int D.16869;
  unsigned int D.16870;
  unsigned int D.16871;
  unsigned int D.16872;
  unsigned int D.16873;
  unsigned int D.16874;
  unsigned int D.16875;
  unsigned int D.16876;
  unsigned int D.16877;
  unsigned int D.16878;
  unsigned int D.16879;
  const unsigned char * ip.11;
  const unsigned char * ip;
  int value;
  int size;
  guint cli_addr;
  guint offset;
  struct MonoSimpleBasicBlock * branch;
  struct MonoSimpleBasicBlock * next;
  struct MonoSimpleBasicBlock * current;
  const struct MonoOpcode * opcode;

  try
    {
      ip = start;
      current = bb;
      goto <D.16700>;
      <D.16699>:
      ip.2 = ip;
      ip.3 = (long int) ip.2;
      start.4 = (long int) start;
      D.16792 = ip.3 - start.4;
      cli_addr = (guint) D.16792;
      size = mono_opcode_value_and_size (&ip, end, &value);
      if (size < 0) goto <D.16793>; else goto <D.16794>;
      <D.16793>:
      ip.2 = ip;
      D.16795 = *ip.2;
      D.16796 = (int) D.16795;
      mono_error_set_not_verifiable (error, method, "Invalid instruction %x", D.16796);
      return;
      <D.16794>:
      goto <D.16672>;
      <D.16671>:
      current = current->next;
      <D.16672>:
      if (current != 0B) goto <D.16797>; else goto <D.16673>;
      <D.16797>:
      D.16798 = current->end;
      D.16799 = (unsigned int) D.16798;
      if (D.16799 <= cli_addr) goto <D.16671>; else goto <D.16673>;
      <D.16673>:
      D.16800 = current == 0B;
      D.16801 = (long int) D.16800;
      D.16802 = __builtin_expect (D.16801, 0);
      if (D.16802 != 0) goto <D.16803>; else goto <D.16804>;
      <D.16803>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-basic-block.c", 350, "current");
      <D.16804>:
      value.5 = value;
      opcode = &mono_opcodes[value.5];
      D.16806 = opcode->argument;
      D.16807 = (int) D.16806;
      switch (D.16807) <default: <D.16698>, case 0: <D.16674>, case 1: <D.16677>, case 2: <D.16678>, case 3: <D.16683>, case 4: <D.16679>, case 5: <D.16676>, case 6: <D.16680>, case 7: <D.16684>, case 8: <D.16685>, case 9: <D.16690>, case 10: <D.16689>, case 11: <D.16691>, case 12: <D.16687>, case 13: <D.16681>, case 14: <D.16682>, case 15: <D.16686>, case 16: <D.16688>>
      <D.16674>:
      ip.2 = ip;
      ip.6 = ip.2 + 1;
      ip = ip.6;
      value.5 = value;
      D.16809 = mono_opcode_has_static_branch (value.5);
      if (D.16809 == 0) goto <D.16675>; else goto <D.16810>;
      <D.16810>:
      ip.2 = ip;
      if (ip.2 >= end) goto <D.16675>; else goto <D.16811>;
      <D.16811>:
      ip.2 = ip;
      ip.3 = (long int) ip.2;
      start.4 = (long int) start;
      D.16792 = ip.3 - start.4;
      D.16812 = (unsigned int) D.16792;
      next = bb_split (bb, current, root, D.16812, 0, method, error);
      if (next == 0B) goto <D.16813>; else goto <D.16814>;
      <D.16813>:
      return;
      <D.16814>:
      bb_unlink (current, next);
      current = next;
      goto <D.16675>;
      <D.16676>:
      <D.16677>:
      <D.16678>:
      <D.16679>:
      <D.16680>:
      <D.16681>:
      <D.16682>:
      ip.2 = ip;
      ip.7 = ip.2 + 5;
      ip = ip.7;
      goto <D.16675>;
      <D.16683>:
      ip.2 = ip;
      ip.7 = ip.2 + 5;
      ip = ip.7;
      value.5 = value;
      if (value.5 != 39) goto <D.16675>; else goto <D.16816>;
      <D.16816>:
      ip.2 = ip;
      if (ip.2 >= end) goto <D.16675>; else goto <D.16817>;
      <D.16817>:
      ip.2 = ip;
      ip.3 = (long int) ip.2;
      start.4 = (long int) start;
      D.16792 = ip.3 - start.4;
      D.16812 = (unsigned int) D.16792;
      next = bb_split (bb, current, root, D.16812, 0, method, error);
      if (next == 0B) goto <D.16818>; else goto <D.16819>;
      <D.16818>:
      return;
      <D.16819>:
      bb_unlink (current, next);
      current = next;
      goto <D.16675>;
      <D.16684>:
      ip.2 = ip;
      ip.8 = ip.2 + 3;
      ip = ip.8;
      goto <D.16675>;
      <D.16685>:
      <D.16686>:
      ip.2 = ip;
      ip.9 = ip.2 + 2;
      ip = ip.9;
      goto <D.16675>;
      <D.16687>:
      <D.16688>:
      ip.2 = ip;
      ip.10 = ip.2 + 9;
      ip = ip.10;
      goto <D.16675>;
      <D.16689>:
      <D.16690>:
      D.16806 = opcode->argument;
      if (D.16806 == 10) goto <D.16823>; else goto <D.16824>;
      <D.16823>:
      ip.2 = ip;
      ip.6 = ip.2 + 1;
      D.16825 = *ip.6;
      D.16826 = (signed char) D.16825;
      D.16827 = (unsigned int) D.16826;
      D.16828 = D.16827 + cli_addr;
      offset = D.16828 + 2;
      ip.2 = ip;
      ip.9 = ip.2 + 2;
      ip = ip.9;
      goto <D.16829>;
      <D.16824>:
      ip.2 = ip;
      ip.6 = ip.2 + 1;
      D.16830 = MEM[(const guint32 *)ip.6];
      D.16831 = D.16830 << 24;
      ip.2 = ip;
      ip.6 = ip.2 + 1;
      D.16830 = MEM[(const guint32 *)ip.6];
      D.16832 = D.16830 >> 8;
      D.16833 = D.16832 & 65280;
      D.16834 = D.16831 | D.16833;
      ip.2 = ip;
      ip.6 = ip.2 + 1;
      D.16830 = MEM[(const guint32 *)ip.6];
      D.16835 = D.16830 << 8;
      D.16836 = D.16835 & 16711680;
      D.16837 = D.16834 | D.16836;
      ip.2 = ip;
      ip.6 = ip.2 + 1;
      D.16830 = MEM[(const guint32 *)ip.6];
      D.16838 = D.16830 >> 24;
      D.16839 = D.16837 | D.16838;
      D.16840 = D.16839 + cli_addr;
      offset = D.16840 + 5;
      ip.2 = ip;
      ip.7 = ip.2 + 5;
      ip = ip.7;
      <D.16829>:
      branch = bb_split (bb, current, root, offset, 1, method, error);
      if (branch == 0B) goto <D.16841>; else goto <D.16842>;
      <D.16841>:
      return;
      <D.16842>:
      if (offset < cli_addr) goto <D.16843>; else goto <D.16844>;
      <D.16843>:
      D.16845 = branch->start;
      D.16846 = current->start;
      if (D.16845 > D.16846) goto <D.16847>; else goto <D.16848>;
      <D.16847>:
      current = branch;
      <D.16848>:
      <D.16844>:
      ip.2 = ip;
      if (ip.2 < end) goto <D.16849>; else goto <D.16850>;
      <D.16849>:
      ip.2 = ip;
      ip.3 = (long int) ip.2;
      start.4 = (long int) start;
      D.16792 = ip.3 - start.4;
      D.16812 = (unsigned int) D.16792;
      D.16851 = opcode->flow_type;
      D.16852 = D.16851 != 1;
      D.16853 = (int) D.16852;
      next = bb_split (bb, current, root, D.16812, D.16853, method, error);
      if (next == 0B) goto <D.16854>; else goto <D.16855>;
      <D.16854>:
      return;
      <D.16855>:
      goto <D.16856>;
      <D.16850>:
      next = 0B;
      <D.16856>:
      bb_link (current, branch);
      if (next != 0B) goto <D.16857>; else goto <D.16858>;
      <D.16857>:
      D.16851 = opcode->flow_type;
      if (D.16851 == 1) goto <D.16859>; else goto <D.16860>;
      <D.16859>:
      if (next != branch) goto <D.16861>; else goto <D.16862>;
      <D.16861>:
      bb_unlink (current, next);
      current = next;
      <D.16862>:
      <D.16860>:
      <D.16858>:
      goto <D.16675>;
      <D.16691>:
      {
        struct MonoSimpleBasicBlock * tmp;
        guint32 j;
        guint32 n;

        ip.2 = ip;
        ip.6 = ip.2 + 1;
        D.16830 = MEM[(const guint32 *)ip.6];
        D.16831 = D.16830 << 24;
        ip.2 = ip;
        ip.6 = ip.2 + 1;
        D.16830 = MEM[(const guint32 *)ip.6];
        D.16832 = D.16830 >> 8;
        D.16833 = D.16832 & 65280;
        D.16834 = D.16831 | D.16833;
        ip.2 = ip;
        ip.6 = ip.2 + 1;
        D.16830 = MEM[(const guint32 *)ip.6];
        D.16835 = D.16830 << 8;
        D.16836 = D.16835 & 16711680;
        D.16837 = D.16834 | D.16836;
        ip.2 = ip;
        ip.6 = ip.2 + 1;
        D.16830 = MEM[(const guint32 *)ip.6];
        D.16838 = D.16830 >> 24;
        n = D.16837 | D.16838;
        ip.2 = ip;
        ip.7 = ip.2 + 5;
        ip = ip.7;
        D.16863 = n * 4;
        D.16864 = D.16863 + cli_addr;
        offset = D.16864 + 5;
        next = bb_split (bb, current, root, offset, 1, method, error);
        if (next == 0B) goto <D.16865>; else goto <D.16866>;
        <D.16865>:
        return;
        <D.16866>:
        bb_link (current, next);
        tmp = next;
        j = 0;
        goto <D.16696>;
        <D.16695>:
        ip.2 = ip;
        if (ip.2 >= end) goto <D.16867>; else goto <D.16868>;
        <D.16867>:
        mono_error_set_not_verifiable (error, method, "Invalid switch instruction %x", cli_addr);
        return;
        <D.16868>:
        ip.2 = ip;
        D.16869 = MEM[(const guint32 *)ip.2];
        D.16870 = D.16869 << 24;
        ip.2 = ip;
        D.16869 = MEM[(const guint32 *)ip.2];
        D.16871 = D.16869 >> 8;
        D.16872 = D.16871 & 65280;
        D.16873 = D.16870 | D.16872;
        ip.2 = ip;
        D.16869 = MEM[(const guint32 *)ip.2];
        D.16874 = D.16869 << 8;
        D.16875 = D.16874 & 16711680;
        D.16876 = D.16873 | D.16875;
        ip.2 = ip;
        D.16869 = MEM[(const guint32 *)ip.2];
        D.16877 = D.16869 >> 24;
        D.16878 = D.16876 | D.16877;
        D.16879 = D.16878 + offset;
        next = bb_split (bb, next, root, D.16879, 1, method, error);
        if (next == 0B) goto <D.16880>; else goto <D.16881>;
        <D.16880>:
        return;
        <D.16881>:
        bb_link (current, next);
        ip.2 = ip;
        ip.11 = ip.2 + 4;
        ip = ip.11;
        j = j + 1;
        <D.16696>:
        if (j < n) goto <D.16695>; else goto <D.16697>;
        <D.16697>:
        current = tmp;
        goto <D.16675>;
      }
      <D.16698>:
      ip.2 = ip;
      D.16795 = *ip.2;
      D.16796 = (int) D.16795;
      mono_error_set_not_verifiable (error, method, "Invalid instruction %x", D.16796);
      return;
      <D.16675>:
      <D.16700>:
      ip.2 = ip;
      if (ip.2 < end) goto <D.16699>; else goto <D.16701>;
      <D.16701>:
      ip.2 = ip;
      if (ip.2 != end) goto <D.16883>; else goto <D.16884>;
      <D.16883>:
      mono_error_set_not_verifiable (error, method, "Invalid last instruction");
      <D.16884>:
    }
  finally
    {
      ip = {CLOBBER};
      value = {CLOBBER};
    }
}


mono_opcode_has_static_branch (int opcode)
{
  gboolean D.16888;

  switch (opcode) <default: <D.16889>, case 42: <D.16650>, case 122: <D.16651>, case 220: <D.16653>, case 282: <D.16652>>
  <D.16650>:
  <D.16651>:
  <D.16652>:
  <D.16653>:
  D.16888 = 1;
  return D.16888;
  <D.16889>:
  D.16888 = 0;
  return D.16888;
}


bb_unlink (struct MonoSimpleBasicBlock * from, struct MonoSimpleBasicBlock * to)
{
  struct GSList * D.16891;
  struct GSList * D.16894;

  D.16891 = from->out_bb;
  if (D.16891 != 0B) goto <D.16892>; else goto <D.16893>;
  <D.16892>:
  D.16891 = from->out_bb;
  D.16894 = monoeg_g_slist_remove (D.16891, to);
  from->out_bb = D.16894;
  <D.16893>:
}


bb_split (struct MonoSimpleBasicBlock * first, struct MonoSimpleBasicBlock * hint, struct MonoSimpleBasicBlock * * root, guint target, gboolean link_blocks, struct MonoMethod * method, struct MonoError * error)
{
  int target.12;
  int D.16896;
  struct MonoSimpleBasicBlock * D.16901;
  int D.16903;
  int D.16905;
  int D.16907;
  unsigned int D.16908;
  struct MonoSimpleBasicBlock * D.16914;
  int D.16917;
  struct MonoSimpleBasicBlock * D.16918;
  struct GSList * D.16919;
  int D.16920;
  struct MonoSimpleBasicBlock * res;
  struct MonoSimpleBasicBlock * bb;

  bb = first;
  target.12 = (int) target;
  D.16896 = bb_idx_is_contained (hint, target.12);
  if (D.16896 != 0) goto <D.16897>; else goto <D.16898>;
  <D.16897>:
  first = hint;
  goto <D.16899>;
  <D.16898>:
  D.16901 = hint->next;
  if (D.16901 != 0B) goto <D.16902>; else goto <D.16900>;
  <D.16902>:
  D.16901 = hint->next;
  target.12 = (int) target;
  D.16903 = bb_idx_is_contained (D.16901, target.12);
  if (D.16903 != 0) goto <D.16904>; else goto <D.16900>;
  <D.16904>:
  first = hint->next;
  goto <D.16629>;
  <D.16900>:
  first = *root;
  <D.16630>:
  target.12 = (int) target;
  D.16905 = bb_idx_is_contained (first, target.12);
  if (D.16905 != 0) goto <D.16629>; else goto <D.16906>;
  <D.16906>:
  D.16907 = first->start;
  D.16908 = (unsigned int) D.16907;
  if (D.16908 > target) goto <D.16909>; else goto <D.16910>;
  <D.16909>:
  first = first->left;
  goto <D.16911>;
  <D.16910>:
  first = first->right;
  <D.16911>:
  if (first != 0B) goto <D.16630>; else goto <D.16629>;
  <D.16629>:
  <D.16899>:
  if (first == 0B) goto <D.16912>; else goto <D.16913>;
  <D.16912>:
  mono_error_set_not_verifiable (error, method, "Invalid instruction target %x", target);
  D.16914 = 0B;
  return D.16914;
  <D.16913>:
  D.16907 = first->start;
  D.16908 = (unsigned int) D.16907;
  if (D.16908 == target) goto <D.16915>; else goto <D.16916>;
  <D.16915>:
  D.16914 = first;
  return D.16914;
  <D.16916>:
  res = monoeg_malloc0 (56);
  target.12 = (int) target;
  res->start = target.12;
  D.16917 = first->end;
  res->end = D.16917;
  D.16918 = first->next;
  res->next = D.16918;
  D.16919 = first->out_bb;
  res->out_bb = D.16919;
  res->dead = 1;
  D.16920 = res->start;
  first->end = D.16920;
  first->next = res;
  first->out_bb = 0B;
  if (link_blocks != 0) goto <D.16921>; else goto <D.16922>;
  <D.16921>:
  bb_link (first, res);
  <D.16922>:
  bb_insert (bb, res, root);
  D.16914 = res;
  return D.16914;
}


bb_idx_is_contained (struct MonoSimpleBasicBlock * bb, int target)
{
  gboolean D.16924;
  int iftmp.13;
  int D.16928;
  int D.16930;

  D.16928 = bb->start;
  if (D.16928 <= target) goto <D.16929>; else goto <D.16926>;
  <D.16929>:
  D.16930 = bb->end;
  if (D.16930 > target) goto <D.16931>; else goto <D.16926>;
  <D.16931>:
  iftmp.13 = 1;
  goto <D.16927>;
  <D.16926>:
  iftmp.13 = 0;
  <D.16927>:
  D.16924 = iftmp.13;
  return D.16924;
}


bb_insert (struct MonoSimpleBasicBlock * first, struct MonoSimpleBasicBlock * bb, struct MonoSimpleBasicBlock * * root)
{
  int D.16933;
  struct MonoSimpleBasicBlock * D.16936;
  struct MonoSimpleBasicBlock * D.16940;
  _Bool D.16943;
  long int D.16944;
  long int D.16945;
  struct MonoSimpleBasicBlock * D.16948;
  long unsigned int D.16951;
  long unsigned int D.16952;
  long unsigned int D.16956;
  long unsigned int D.16957;
  struct MonoSimpleBasicBlock * D.16962;
  struct MonoSimpleBasicBlock * D.16964;
  struct MonoSimpleBasicBlock * D.16966;
  struct MonoSimpleBasicBlock * D.16969;
  struct MonoSimpleBasicBlock * parent;
  struct MonoSimpleBasicBlock * uncle;
  struct MonoSimpleBasicBlock * grandparent;
  int bb_start;

  bb_start = bb->start;
  parent = *root;
  <D.16610>:
  D.16933 = parent->start;
  if (D.16933 > bb_start) goto <D.16934>; else goto <D.16935>;
  <D.16934>:
  D.16936 = parent->left;
  if (D.16936 == 0B) goto <D.16937>; else goto <D.16938>;
  <D.16937>:
  parent->left = bb;
  goto <D.16609>;
  <D.16938>:
  parent = parent->left;
  goto <D.16939>;
  <D.16935>:
  D.16940 = parent->right;
  if (D.16940 == 0B) goto <D.16941>; else goto <D.16942>;
  <D.16941>:
  parent->right = bb;
  goto <D.16609>;
  <D.16942>:
  parent = parent->right;
  <D.16939>:
  if (parent != 0B) goto <D.16610>; else goto <D.16609>;
  <D.16609>:
  D.16943 = parent == 0B;
  D.16944 = (long int) D.16943;
  D.16945 = __builtin_expect (D.16944, 0);
  if (D.16945 != 0) goto <D.16946>; else goto <D.16947>;
  <D.16946>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-basic-block.c", 180, "parent");
  <D.16947>:
  bb->parent = parent;
  bb->colour = 0;
  <D.16613>:
  D.16948 = bb->parent;
  if (D.16948 == 0B) goto <D.16949>; else goto <D.16950>;
  <D.16949>:
  bb->colour = 1;
  goto <D.16611>;
  <D.16950>:
  D.16948 = bb->parent;
  D.16951 = BIT_FIELD_REF <*D.16948, 64, 384>;
  D.16952 = D.16951 & 9223372036854775808;
  if (D.16952 != 0) goto <D.16611>; else goto <D.16953>;
  <D.16953>:
  uncle = bb_uncle (bb);
  if (uncle != 0B) goto <D.16954>; else goto <D.16955>;
  <D.16954>:
  D.16956 = BIT_FIELD_REF <*uncle, 64, 384>;
  D.16957 = D.16956 & 9223372036854775808;
  if (D.16957 == 0) goto <D.16958>; else goto <D.16959>;
  <D.16958>:
  grandparent = bb_grandparent (bb);
  D.16948 = bb->parent;
  D.16948->colour = 1;
  uncle->colour = 1;
  grandparent->colour = 0;
  bb = grandparent;
  // predicted unlikely by continue predictor.
  goto <D.16612>;
  <D.16959>:
  <D.16955>:
  grandparent = bb_grandparent (bb);
  D.16948 = bb->parent;
  D.16962 = D.16948->right;
  if (D.16962 == bb) goto <D.16963>; else goto <D.16960>;
  <D.16963>:
  D.16948 = bb->parent;
  D.16964 = grandparent->left;
  if (D.16948 == D.16964) goto <D.16965>; else goto <D.16960>;
  <D.16965>:
  D.16948 = bb->parent;
  rotate_left (D.16948, root);
  bb = bb->left;
  goto <D.16961>;
  <D.16960>:
  D.16948 = bb->parent;
  D.16966 = D.16948->left;
  if (D.16966 == bb) goto <D.16967>; else goto <D.16968>;
  <D.16967>:
  D.16948 = bb->parent;
  D.16969 = grandparent->right;
  if (D.16948 == D.16969) goto <D.16970>; else goto <D.16971>;
  <D.16970>:
  D.16948 = bb->parent;
  rotate_right (D.16948, root);
  bb = bb->right;
  <D.16971>:
  <D.16968>:
  <D.16961>:
  grandparent = bb_grandparent (bb);
  D.16948 = bb->parent;
  D.16948->colour = 1;
  grandparent->colour = 0;
  D.16948 = bb->parent;
  D.16966 = D.16948->left;
  if (D.16966 == bb) goto <D.16974>; else goto <D.16972>;
  <D.16974>:
  D.16948 = bb->parent;
  D.16964 = grandparent->left;
  if (D.16948 == D.16964) goto <D.16975>; else goto <D.16972>;
  <D.16975>:
  rotate_right (grandparent, root);
  goto <D.16973>;
  <D.16972>:
  rotate_left (grandparent, root);
  <D.16973>:
  goto <D.16611>;
  <D.16612>:
  goto <D.16613>;
  <D.16611>:
}


bb_uncle (struct MonoSimpleBasicBlock * bb)
{
  struct MonoSimpleBasicBlock * D.16978;
  struct MonoSimpleBasicBlock * D.16979;
  struct MonoSimpleBasicBlock * D.16980;
  struct MonoSimpleBasicBlock * gp;

  gp = bb_grandparent (bb);
  if (gp == 0B) goto <D.16976>; else goto <D.16977>;
  <D.16976>:
  D.16978 = 0B;
  return D.16978;
  <D.16977>:
  D.16979 = bb->parent;
  D.16980 = gp->left;
  if (D.16979 == D.16980) goto <D.16981>; else goto <D.16982>;
  <D.16981>:
  D.16978 = gp->right;
  return D.16978;
  <D.16982>:
  D.16978 = gp->left;
  return D.16978;
}


bb_grandparent (struct MonoSimpleBasicBlock * bb)
{
  struct MonoSimpleBasicBlock * D.16984;
  struct MonoSimpleBasicBlock * iftmp.14;
  struct MonoSimpleBasicBlock * D.16989;

  if (bb != 0B) goto <D.16988>; else goto <D.16986>;
  <D.16988>:
  D.16989 = bb->parent;
  if (D.16989 != 0B) goto <D.16990>; else goto <D.16986>;
  <D.16990>:
  D.16989 = bb->parent;
  iftmp.14 = D.16989->parent;
  goto <D.16987>;
  <D.16986>:
  iftmp.14 = 0B;
  <D.16987>:
  D.16984 = iftmp.14;
  return D.16984;
}


rotate_right (struct MonoSimpleBasicBlock * parent, struct MonoSimpleBasicBlock * * root)
{
  struct MonoSimpleBasicBlock * D.16992;
  struct MonoSimpleBasicBlock * D.16995;
  struct MonoSimpleBasicBlock * bb;

  bb = parent->left;
  D.16992 = bb->right;
  if (D.16992 != 0B) goto <D.16993>; else goto <D.16994>;
  <D.16993>:
  D.16992 = bb->right;
  parent->left = D.16992;
  D.16995 = parent->left;
  D.16995->parent = parent;
  goto <D.16996>;
  <D.16994>:
  parent->left = 0B;
  <D.16996>:
  bb->right = parent;
  change_node (parent, bb, root);
  parent->parent = bb;
}


change_node (struct MonoSimpleBasicBlock * from, struct MonoSimpleBasicBlock * to, struct MonoSimpleBasicBlock * * root)
{
  struct MonoSimpleBasicBlock * D.16999;
  struct MonoSimpleBasicBlock * parent;

  parent = from->parent;
  if (parent != 0B) goto <D.16997>; else goto <D.16998>;
  <D.16997>:
  D.16999 = parent->left;
  if (D.16999 == from) goto <D.17000>; else goto <D.17001>;
  <D.17000>:
  parent->left = to;
  goto <D.17002>;
  <D.17001>:
  parent->right = to;
  <D.17002>:
  goto <D.17003>;
  <D.16998>:
  *root = to;
  <D.17003>:
  to->parent = parent;
}


rotate_left (struct MonoSimpleBasicBlock * bb, struct MonoSimpleBasicBlock * * root)
{
  struct MonoSimpleBasicBlock * D.17004;
  struct MonoSimpleBasicBlock * D.17007;
  struct MonoSimpleBasicBlock * other;

  other = bb->right;
  D.17004 = other->left;
  if (D.17004 != 0B) goto <D.17005>; else goto <D.17006>;
  <D.17005>:
  D.17004 = other->left;
  bb->right = D.17004;
  D.17007 = bb->right;
  D.17007->parent = bb;
  goto <D.17008>;
  <D.17006>:
  bb->right = 0B;
  <D.17008>:
  other->left = bb;
  change_node (bb, other, root);
  bb->parent = other;
}


bb_link (struct MonoSimpleBasicBlock * from, struct MonoSimpleBasicBlock * to)
{
  struct GSList * D.17009;
  struct GSList * D.17010;
  struct GSList * D.17013;

  D.17009 = from->out_bb;
  D.17010 = monoeg_g_slist_find (D.17009, to);
  if (D.17010 != 0B) goto <D.17011>; else goto <D.17012>;
  <D.17011>:
  return;
  <D.17012>:
  D.17009 = from->out_bb;
  D.17013 = monoeg_g_slist_prepend (D.17009, to);
  from->out_bb = D.17013;
}


bb_formation_eh_pass (struct MonoMethodHeader * header, struct MonoSimpleBasicBlock * bb, struct MonoSimpleBasicBlock * * root, struct MonoMethod * method, struct MonoError * error)
{
  unsigned int D.17015;
  struct MonoExceptionClause * D.17016;
  long unsigned int D.17017;
  long unsigned int D.17018;
  unsigned int D.17019;
  unsigned int D.17022;
  unsigned int D.17025;
  unsigned int D.17028;
  unsigned int D.17031;
  unsigned int D.17032;
  unsigned int end.15;
  struct MonoSimpleBasicBlock * D.17036;
  unsigned int D.17039;
  unsigned int D.17040;
  struct MonoSimpleBasicBlock * D.17043;
  <unnamed-unsigned:15> D.17046;
  int D.17047;
  int i;
  int end;

  D.17015 = header->code_size;
  end = (int) D.17015;
  i = 0;
  goto <D.16716>;
  <D.16715>:
  {
    struct MonoExceptionClause * clause;
    struct MonoSimpleBasicBlock * try_block;
    struct MonoSimpleBasicBlock * handler;

    D.17016 = header->clauses;
    D.17017 = (long unsigned int) i;
    D.17018 = D.17017 * 32;
    clause = D.17016 + D.17018;
    D.17019 = clause->try_offset;
    try_block = bb_split (bb, bb, root, D.17019, 1, method, error);
    if (try_block == 0B) goto <D.17020>; else goto <D.17021>;
    <D.17020>:
    return;
    <D.17021>:
    D.17022 = clause->handler_offset;
    handler = bb_split (bb, try_block, root, D.17022, 0, method, error);
    if (handler == 0B) goto <D.17023>; else goto <D.17024>;
    <D.17023>:
    return;
    <D.17024>:
    handler->dead = 0;
    D.17025 = clause->flags;
    if (D.17025 == 1) goto <D.17026>; else goto <D.17027>;
    <D.17026>:
    {
      struct MonoSimpleBasicBlock * filter;

      D.17028 = clause->data.filter_offset;
      filter = bb_split (bb, try_block, root, D.17028, 0, method, error);
      if (filter == 0B) goto <D.17029>; else goto <D.17030>;
      <D.17029>:
      return;
      <D.17030>:
      filter->dead = 0;
    }
    <D.17027>:
    D.17019 = clause->try_offset;
    D.17031 = clause->try_len;
    D.17032 = D.17019 + D.17031;
    end.15 = (unsigned int) end;
    if (D.17032 < end.15) goto <D.17034>; else goto <D.17035>;
    <D.17034>:
    D.17019 = clause->try_offset;
    D.17031 = clause->try_len;
    D.17032 = D.17019 + D.17031;
    D.17036 = bb_split (bb, try_block, root, D.17032, 0, method, error);
    if (D.17036 == 0B) goto <D.17037>; else goto <D.17038>;
    <D.17037>:
    return;
    <D.17038>:
    <D.17035>:
    D.17022 = clause->handler_offset;
    D.17039 = clause->handler_len;
    D.17040 = D.17022 + D.17039;
    end.15 = (unsigned int) end;
    if (D.17040 < end.15) goto <D.17041>; else goto <D.17042>;
    <D.17041>:
    D.17022 = clause->handler_offset;
    D.17039 = clause->handler_len;
    D.17040 = D.17022 + D.17039;
    D.17043 = bb_split (bb, handler, root, D.17040, 0, method, error);
    if (D.17043 == 0B) goto <D.17044>; else goto <D.17045>;
    <D.17044>:
    return;
    <D.17045>:
    <D.17042>:
  }
  i = i + 1;
  <D.16716>:
  D.17046 = header->num_clauses;
  D.17047 = (int) D.17046;
  if (D.17047 > i) goto <D.16715>; else goto <D.16717>;
  <D.16717>:
}


bb_liveness (struct MonoSimpleBasicBlock * bb)
{
  long unsigned int D.17049;
  long unsigned int D.17050;
  unsigned int D.17053;
  unsigned int D.17054;
  long unsigned int D.17055;
  long unsigned int D.17056;
  struct GPtrArray * mark_stack;
  struct GSList * tmp;

  mark_stack = monoeg_g_ptr_array_new ();
  goto <D.16637>;
  <D.16636>:
  D.17049 = BIT_FIELD_REF <*bb, 64, 384>;
  D.17050 = D.17049 & 4611686018427387904;
  if (D.17050 == 0) goto <D.17051>; else goto <D.17052>;
  <D.17051>:
  monoeg_g_ptr_array_add (mark_stack, bb);
  <D.17052>:
  bb = bb->next;
  <D.16637>:
  if (bb != 0B) goto <D.16636>; else goto <D.16638>;
  <D.16638>:
  goto <D.16645>;
  <D.16644>:
  {
    struct MonoSimpleBasicBlock * block;

    D.17053 = mark_stack->len;
    D.17054 = D.17053 + 4294967295;
    block = monoeg_g_ptr_array_remove_index_fast (mark_stack, D.17054);
    block->dead = 0;
    tmp = block->out_bb;
    goto <D.16642>;
    <D.16641>:
    {
      struct MonoSimpleBasicBlock * to;

      to = tmp->data;
      D.17055 = BIT_FIELD_REF <*to, 64, 384>;
      D.17056 = D.17055 & 4611686018427387904;
      if (D.17056 != 0) goto <D.17057>; else goto <D.17058>;
      <D.17057>:
      monoeg_g_ptr_array_add (mark_stack, to);
      <D.17058>:
    }
    tmp = tmp->next;
    <D.16642>:
    if (tmp != 0B) goto <D.16641>; else goto <D.16643>;
    <D.16643>:
  }
  <D.16645>:
  D.17053 = mark_stack->len;
  if (D.17053 != 0) goto <D.16644>; else goto <D.16646>;
  <D.16646>:
  monoeg_g_ptr_array_free (mark_stack, 1);
}


__attribute__((visibility ("hidden")))
mono_opcode_value_and_size (const unsigned char * * ip, const unsigned char * end, int * value)
{
  <unnamed type> D.17059;
  int D.17060;
  unsigned int i.16;
  int D.17064;
  unsigned char D.17065;
  int D.17066;
  const unsigned char * D.17069;
  long unsigned int p.17;
  const unsigned char * D.17072;
  unsigned int D.17073;
  unsigned int D.17074;
  unsigned int D.17075;
  unsigned int D.17076;
  unsigned int D.17077;
  unsigned int D.17078;
  unsigned int D.17079;
  unsigned int D.17080;
  unsigned int D.17081;
  unsigned int D.17084;
  unsigned int D.17085;
  sizetype D.17088;
  const unsigned char * D.17089;
  long unsigned int D.17091;
  long unsigned int D.17092;
  long int p.18;
  long int start.19;
  long int D.17095;
  unsigned int D.17096;
  unsigned int size.20;
  unsigned int D.17098;
  const unsigned char * start;
  const unsigned char * p;
  int i;
  int size;

  start = *ip;
  D.17059 = mono_opcode_value (ip, end);
  D.17060 = (int) D.17059;
  *value = D.17060;
  i = *value;
  size = 0;
  i.16 = (unsigned int) i;
  if (i.16 > 312) goto <D.17062>; else goto <D.17063>;
  <D.17062>:
  D.17064 = -1;
  return D.17064;
  <D.17063>:
  p = *ip;
  D.17065 = mono_opcodes[i].argument;
  D.17066 = (int) D.17065;
  switch (D.17066) <default: <D.16763>, case 0: <D.16744>, case 1: <D.16747>, case 2: <D.16748>, case 3: <D.16749>, case 4: <D.16750>, case 5: <D.16746>, case 6: <D.16751>, case 7: <D.16755>, case 8: <D.16756>, case 9: <D.16754>, case 10: <D.16758>, case 11: <D.16761>, case 12: <D.16759>, case 13: <D.16752>, case 14: <D.16753>, case 15: <D.16757>, case 16: <D.16760>>
  <D.16744>:
  size = 1;
  goto <D.16745>;
  <D.16746>:
  <D.16747>:
  <D.16748>:
  <D.16749>:
  <D.16750>:
  <D.16751>:
  <D.16752>:
  <D.16753>:
  <D.16754>:
  size = 5;
  goto <D.16745>;
  <D.16755>:
  size = 3;
  goto <D.16745>;
  <D.16756>:
  <D.16757>:
  <D.16758>:
  size = 2;
  goto <D.16745>;
  <D.16759>:
  <D.16760>:
  size = 9;
  goto <D.16745>;
  <D.16761>:
  {
    guint32 entries;

    D.17069 = p + 5;
    if (D.17069 > end) goto <D.17067>; else goto <D.17070>;
    <D.17070>:
    p.17 = (long unsigned int) p;
    if (p.17 > 18446744073709551610) goto <D.17067>; else goto <D.17068>;
    <D.17067>:
    D.17064 = -1;
    return D.17064;
    <D.17068>:
    D.17072 = p + 1;
    D.17073 = MEM[(const guint32 *)D.17072];
    D.17074 = D.17073 << 24;
    D.17072 = p + 1;
    D.17073 = MEM[(const guint32 *)D.17072];
    D.17075 = D.17073 >> 8;
    D.17076 = D.17075 & 65280;
    D.17077 = D.17074 | D.17076;
    D.17072 = p + 1;
    D.17073 = MEM[(const guint32 *)D.17072];
    D.17078 = D.17073 << 8;
    D.17079 = D.17078 & 16711680;
    D.17080 = D.17077 | D.17079;
    D.17072 = p + 1;
    D.17073 = MEM[(const guint32 *)D.17072];
    D.17081 = D.17073 >> 24;
    entries = D.17080 | D.17081;
    if (entries > 1073741822) goto <D.17082>; else goto <D.17083>;
    <D.17082>:
    D.17064 = -1;
    return D.17064;
    <D.17083>:
    D.17084 = entries + 1;
    D.17085 = D.17084 * 4;
    size = (int) D.17085;
    goto <D.16745>;
  }
  <D.16763>:
  D.17065 = mono_opcodes[i].argument;
  D.17066 = (int) D.17065;
  monoeg_g_log (0B, 4, "Invalid opcode %d argument %d max opcode %d\n", i, D.17066, 313);
  <D.16764>:
  goto <D.16764>;
  <D.16745>:
  D.17088 = (sizetype) size;
  D.17089 = p + D.17088;
  if (D.17089 > end) goto <D.17086>; else goto <D.17090>;
  <D.17090>:
  D.17091 = (long unsigned int) size;
  D.17092 = ~D.17091;
  p.17 = (long unsigned int) p;
  if (D.17092 < p.17) goto <D.17086>; else goto <D.17087>;
  <D.17086>:
  D.17064 = -1;
  return D.17064;
  <D.17087>:
  p.18 = (long int) p;
  start.19 = (long int) start;
  D.17095 = p.18 - start.19;
  D.17096 = (unsigned int) D.17095;
  size.20 = (unsigned int) size;
  D.17098 = D.17096 + size.20;
  D.17064 = (int) D.17098;
  return D.17064;
}


__attribute__((visibility ("hidden")))
mono_opcode_size (const unsigned char * ip, const unsigned char * end)
{
  int D.17100;
  int tmp;

  try
    {
      D.17100 = mono_opcode_value_and_size (&ip, end, &tmp);
      return D.17100;
    }
  finally
    {
      tmp = {CLOBBER};
    }
}


