mono_decimalIncr (struct decimal_repr * pA, struct decimal_repr * pB)
{
  unsigned int D.10910;
  long long unsigned int D.10911;
  long long unsigned int D.10912;
  unsigned int D.10913;
  long long unsigned int D.10914;
  long long unsigned int alo.0;
  unsigned int D.10916;
  long long unsigned int ahi.1;
  unsigned int D.10918;
  long long unsigned int D.10919;
  long long unsigned int D.10920;
  unsigned int D.10921;
  long long unsigned int D.10922;
  long long unsigned int blo.2;
  unsigned int D.10924;
  long long unsigned int bhi.3;
  <unnamed-unsigned:1> D.10926;
  <unnamed-unsigned:1> D.10927;
  int D.10928;
  unsigned char D.10929;
  int scaleA.4;
  unsigned char D.10931;
  int scaleA.5;
  long long unsigned int alo.6;
  long long unsigned int ahi.7;
  long long unsigned int blo.8;
  long long unsigned int bhi.9;
  signed long long ahi.10;
  long long unsigned int alo.11;
  long long unsigned int alo.12;
  long long unsigned int ahi.13;
  long long unsigned int ahi.14;
  _Bool D.10950;
  int D.10955;
  int D.10956;
  int D.10959;
  int scaleA.15;
  int D.10963;
  gint32 D.10966;
  int D.10967;
  guint64 alo;
  guint64 ahi;
  guint64 blo;
  guint64 bhi;
  int log2A;
  int log2B;
  int log2Result;
  int log10Result;
  int rc;
  int subFlag;
  int sign;
  int scaleA;
  int scaleB;

  try
    {
      D.10910 = pA->mid32;
      D.10911 = (long long unsigned int) D.10910;
      D.10912 = D.10911 << 32;
      D.10913 = pA->lo32;
      D.10914 = (long long unsigned int) D.10913;
      alo.0 = D.10912 | D.10914;
      alo = alo.0;
      D.10916 = pA->hi32;
      ahi.1 = (long long unsigned int) D.10916;
      ahi = ahi.1;
      D.10918 = pB->mid32;
      D.10919 = (long long unsigned int) D.10918;
      D.10920 = D.10919 << 32;
      D.10921 = pB->lo32;
      D.10922 = (long long unsigned int) D.10921;
      blo.2 = D.10920 | D.10922;
      blo = blo.2;
      D.10924 = pB->hi32;
      bhi.3 = (long long unsigned int) D.10924;
      bhi = bhi.3;
      D.10926 = pA->u.signscale.sign;
      sign = (int) D.10926;
      D.10927 = pB->u.signscale.sign;
      D.10928 = (int) D.10927;
      subFlag = sign - D.10928;
      D.10929 = pA->u.signscale.scale;
      scaleA.4 = (int) D.10929;
      scaleA = scaleA.4;
      D.10931 = pB->u.signscale.scale;
      scaleB = (int) D.10931;
      scaleA.5 = scaleA;
      if (scaleA.5 == scaleB) goto <D.10933>; else goto <D.10934>;
      <D.10933>:
      if (subFlag != 0) goto <D.10935>; else goto <D.10936>;
      <D.10935>:
      alo.6 = alo;
      ahi.7 = ahi;
      blo.8 = blo;
      bhi.9 = bhi;
      sub128 (alo.6, ahi.7, blo.8, bhi.9, &alo, &ahi);
      ahi.7 = ahi;
      ahi.10 = (signed long long) ahi.7;
      if (ahi.10 < 0) goto <D.10942>; else goto <D.10943>;
      <D.10942>:
      alo.6 = alo;
      alo.11 = alo.6 + 18446744073709551615;
      alo = alo.11;
      alo.6 = alo;
      alo.12 = ~alo.6;
      alo = alo.12;
      alo.6 = alo;
      if (alo.6 == 0) goto <D.10946>; else goto <D.10947>;
      <D.10946>:
      ahi.7 = ahi;
      ahi.13 = ahi.7 + 18446744073709551615;
      ahi = ahi.13;
      <D.10947>:
      ahi.7 = ahi;
      ahi.14 = ~ahi.7;
      ahi = ahi.14;
      D.10950 = sign == 0;
      sign = (int) D.10950;
      <D.10943>:
      goto <D.10951>;
      <D.10936>:
      alo.6 = alo;
      ahi.7 = ahi;
      blo.8 = blo;
      bhi.9 = bhi;
      add128 (alo.6, ahi.7, blo.8, bhi.9, &alo, &ahi);
      <D.10951>:
      rc = normalize128 (&alo, &ahi, &scaleA, 1, 0);
      goto <D.10952>;
      <D.10934>:
      alo.6 = alo;
      ahi.7 = ahi;
      scaleA.5 = scaleA;
      log2A = log2withScale_128 (alo.6, ahi.7, scaleA.5);
      blo.8 = blo;
      bhi.9 = bhi;
      log2B = log2withScale_128 (blo.8, bhi.9, scaleB);
      log2Result = MAX_EXPR <log2B, log2A>;
      if (subFlag == 0) goto <D.10953>; else goto <D.10954>;
      <D.10953>:
      log2Result = log2Result + 1;
      <D.10954>:
      D.10955 = log2Result * 1000;
      D.10956 = D.10955 / 3322;
      log10Result = D.10956 + 1;
      scaleA.5 = scaleA;
      if (scaleB > scaleA.5) goto <D.10957>; else goto <D.10958>;
      <D.10957>:
      scaleA = scaleB;
      <D.10958>:
      scaleA.5 = scaleA;
      D.10959 = scaleA.5 + log10Result;
      if (D.10959 > 35) goto <D.10960>; else goto <D.10961>;
      <D.10960>:
      scaleA.15 = 35 - log10Result;
      scaleA = scaleA.15;
      <D.10961>:
      scaleA.5 = scaleA;
      D.10929 = pA->u.signscale.scale;
      scaleA.4 = (int) D.10929;
      D.10963 = scaleA.5 - scaleA.4;
      rc = adjustScale128 (&alo, &ahi, D.10963);
      if (rc != 0) goto <D.10964>; else goto <D.10965>;
      <D.10964>:
      D.10966 = rc;
      return D.10966;
      <D.10965>:
      scaleA.5 = scaleA;
      D.10967 = scaleA.5 - scaleB;
      rc = adjustScale128 (&blo, &bhi, D.10967);
      if (rc != 0) goto <D.10968>; else goto <D.10969>;
      <D.10968>:
      D.10966 = rc;
      return D.10966;
      <D.10969>:
      if (subFlag != 0) goto <D.10970>; else goto <D.10971>;
      <D.10970>:
      alo.6 = alo;
      ahi.7 = ahi;
      blo.8 = blo;
      bhi.9 = bhi;
      sub128 (alo.6, ahi.7, blo.8, bhi.9, &alo, &ahi);
      ahi.7 = ahi;
      ahi.10 = (signed long long) ahi.7;
      if (ahi.10 < 0) goto <D.10972>; else goto <D.10973>;
      <D.10972>:
      alo.6 = alo;
      alo.11 = alo.6 + 18446744073709551615;
      alo = alo.11;
      alo.6 = alo;
      alo.12 = ~alo.6;
      alo = alo.12;
      alo.6 = alo;
      if (alo.6 == 0) goto <D.10974>; else goto <D.10975>;
      <D.10974>:
      ahi.7 = ahi;
      ahi.13 = ahi.7 + 18446744073709551615;
      ahi = ahi.13;
      <D.10975>:
      ahi.7 = ahi;
      ahi.14 = ~ahi.7;
      ahi = ahi.14;
      D.10950 = sign == 0;
      sign = (int) D.10950;
      <D.10973>:
      goto <D.10976>;
      <D.10971>:
      alo.6 = alo;
      ahi.7 = ahi;
      blo.8 = blo;
      bhi.9 = bhi;
      add128 (alo.6, ahi.7, blo.8, bhi.9, &alo, &ahi);
      <D.10976>:
      rc = rescale128 (&alo, &ahi, &scaleA, 0, 0, 28, 1);
      <D.10952>:
      if (rc != 0) goto <D.10977>; else goto <D.10978>;
      <D.10977>:
      D.10966 = rc;
      return D.10966;
      <D.10978>:
      alo.6 = alo;
      ahi.7 = ahi;
      scaleA.5 = scaleA;
      D.10966 = pack128toDecimal (pA, alo.6, ahi.7, scaleA.5, sign);
      return D.10966;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
      blo = {CLOBBER};
      bhi = {CLOBBER};
      scaleA = {CLOBBER};
    }
}


normalize128 (guint64 * pclo, guint64 * pchi, int * pScale, int roundFlag, int roundBit)
{
  long long unsigned int D.10981;
  long long unsigned int D.10982;
  unsigned int D.10983;
  int D.10987;
  _Bool D.10988;
  _Bool D.10989;
  _Bool D.10990;
  long long unsigned int D.10993;
  int D.10996;
  guint32 overhang;
  int scale;
  int deltaScale;

  D.10981 = *pchi;
  D.10982 = D.10981 >> 32;
  overhang = (guint32) D.10982;
  scale = *pScale;
  goto <D.10538>;
  <D.10537>:
  deltaScale = 1;
  goto <D.10536>;
  <D.10535>:
  D.10983 = constantsDecadeInt32Factors[deltaScale];
  if (D.10983 > overhang) goto <D.10534>; else goto <D.10984>;
  <D.10984>:
  deltaScale = deltaScale + 1;
  <D.10536>:
  if (deltaScale <= 8) goto <D.10535>; else goto <D.10534>;
  <D.10534>:
  scale = scale - deltaScale;
  if (scale < 0) goto <D.10985>; else goto <D.10986>;
  <D.10985>:
  D.10987 = 2;
  return D.10987;
  <D.10986>:
  D.10983 = constantsDecadeInt32Factors[deltaScale];
  roundBit = div128by32 (pclo, pchi, D.10983, 0B);
  D.10981 = *pchi;
  D.10982 = D.10981 >> 32;
  overhang = (guint32) D.10982;
  D.10988 = roundFlag != 0;
  D.10989 = roundBit != 0;
  D.10990 = D.10988 & D.10989;
  if (D.10990 != 0) goto <D.10991>; else goto <D.10992>;
  <D.10991>:
  D.10993 = *pclo;
  if (D.10993 == 18446744073709551615) goto <D.10994>; else goto <D.10995>;
  <D.10994>:
  D.10981 = *pchi;
  D.10996 = (int) D.10981;
  if (D.10996 == -1) goto <D.10997>; else goto <D.10998>;
  <D.10997>:
  overhang = 1;
  <D.10998>:
  <D.10995>:
  <D.10992>:
  <D.10538>:
  if (overhang != 0) goto <D.10537>; else goto <D.10539>;
  <D.10539>:
  *pScale = scale;
  D.10988 = roundFlag != 0;
  D.10989 = roundBit != 0;
  D.10990 = D.10988 & D.10989;
  if (D.10990 != 0) goto <D.10999>; else goto <D.11000>;
  <D.10999>:
  roundUp128 (pclo, pchi);
  <D.11000>:
  D.10987 = 0;
  return D.10987;
}


div128by32 (guint64 * plo, guint64 * phi, guint32 factor, guint32 * pRest)
{
  long long unsigned int D.11002;
  unsigned int D.11003;
  long long unsigned int D.11004;
  long long unsigned int D.11005;
  unsigned int D.11006;
  long long unsigned int D.11007;
  long long unsigned int D.11008;
  long long unsigned int D.11009;
  unsigned int D.11010;
  long long unsigned int D.11011;
  long long unsigned int D.11012;
  long long unsigned int D.11013;
  unsigned int D.11016;
  int D.11017;
  int iftmp.16;
  long long unsigned int D.11024;
  guint64 a;
  guint64 b;
  guint64 c;
  guint64 h;

  h = *phi;
  D.11002 = h >> 32;
  D.11003 = (unsigned int) D.11002;
  a = (guint64) D.11003;
  D.11004 = (long long unsigned int) factor;
  b = a / D.11004;
  D.11004 = (long long unsigned int) factor;
  D.11005 = D.11004 * b;
  a = a - D.11005;
  a = a << 32;
  D.11006 = (unsigned int) h;
  D.11007 = (long long unsigned int) D.11006;
  a = D.11007 | a;
  D.11004 = (long long unsigned int) factor;
  c = a / D.11004;
  D.11004 = (long long unsigned int) factor;
  D.11008 = D.11004 * c;
  a = a - D.11008;
  a = a << 32;
  D.11009 = b << 32;
  D.11010 = (unsigned int) c;
  D.11011 = (long long unsigned int) D.11010;
  D.11012 = D.11009 | D.11011;
  *phi = D.11012;
  h = *plo;
  D.11002 = h >> 32;
  D.11003 = (unsigned int) D.11002;
  D.11013 = (long long unsigned int) D.11003;
  a = D.11013 | a;
  D.11004 = (long long unsigned int) factor;
  b = a / D.11004;
  D.11004 = (long long unsigned int) factor;
  D.11005 = D.11004 * b;
  a = a - D.11005;
  a = a << 32;
  D.11006 = (unsigned int) h;
  D.11007 = (long long unsigned int) D.11006;
  a = D.11007 | a;
  D.11004 = (long long unsigned int) factor;
  c = a / D.11004;
  D.11004 = (long long unsigned int) factor;
  D.11008 = D.11004 * c;
  a = a - D.11008;
  D.11009 = b << 32;
  D.11010 = (unsigned int) c;
  D.11011 = (long long unsigned int) D.11010;
  D.11012 = D.11009 | D.11011;
  *plo = D.11012;
  if (pRest != 0B) goto <D.11014>; else goto <D.11015>;
  <D.11014>:
  D.11016 = (unsigned int) a;
  *pRest = D.11016;
  <D.11015>:
  a = a << 1;
  D.11004 = (long long unsigned int) factor;
  if (D.11004 <= a) goto <D.11019>; else goto <D.11022>;
  <D.11022>:
  D.11004 = (long long unsigned int) factor;
  if (D.11004 == a) goto <D.11023>; else goto <D.11020>;
  <D.11023>:
  D.11024 = c & 1;
  if (D.11024 != 0) goto <D.11019>; else goto <D.11020>;
  <D.11019>:
  iftmp.16 = 1;
  goto <D.11021>;
  <D.11020>:
  iftmp.16 = 0;
  <D.11021>:
  D.11017 = iftmp.16;
  return D.11017;
}


roundUp128 (guint64 * pclo, guint64 * pchi)
{
  long long unsigned int D.11026;
  long long unsigned int D.11027;
  long long unsigned int D.11030;
  long long unsigned int D.11031;

  D.11026 = *pclo;
  D.11027 = D.11026 + 1;
  *pclo = D.11027;
  D.11026 = *pclo;
  if (D.11026 == 0) goto <D.11028>; else goto <D.11029>;
  <D.11028>:
  D.11030 = *pchi;
  D.11031 = D.11030 + 1;
  *pchi = D.11031;
  <D.11029>:
}


log2withScale_128 (guint64 alo, guint64 ahi, int scale)
{
  int D.11034;
  int D.11035;
  int D.11036;
  int tlog2;

  tlog2 = log2_128 (alo, ahi);
  if (tlog2 < 0) goto <D.11032>; else goto <D.11033>;
  <D.11032>:
  tlog2 = 0;
  <D.11033>:
  D.11035 = scale * 33219;
  D.11036 = D.11035 / -10000;
  D.11034 = D.11036 + tlog2;
  return D.11034;
}


log2_128 (guint64 alo, guint64 ahi)
{
  int D.11040;
  int D.11041;

  if (ahi == 0) goto <D.11038>; else goto <D.11039>;
  <D.11038>:
  D.11040 = log2_64 (alo);
  return D.11040;
  <D.11039>:
  D.11041 = log2_64 (ahi);
  D.11040 = D.11041 + 64;
  return D.11040;
}


log2_64 (guint64 a)
{
  int D.11045;
  long long unsigned int D.11046;
  unsigned int D.11049;
  int D.11050;
  unsigned int D.11051;
  int D.11052;

  if (a == 0) goto <D.11043>; else goto <D.11044>;
  <D.11043>:
  D.11045 = -1000;
  return D.11045;
  <D.11044>:
  D.11046 = a >> 32;
  if (D.11046 == 0) goto <D.11047>; else goto <D.11048>;
  <D.11047>:
  D.11049 = (unsigned int) a;
  D.11050 = my_g_bit_nth_msf (D.11049);
  D.11045 = D.11050 + 1;
  return D.11045;
  <D.11048>:
  D.11046 = a >> 32;
  D.11051 = (unsigned int) D.11046;
  D.11052 = my_g_bit_nth_msf (D.11051);
  D.11045 = D.11052 + 33;
  return D.11045;
}


my_g_bit_nth_msf (gsize mask)
{
  long unsigned int D.11054;
  long unsigned int D.11055;
  gint D.11058;
  int i;

  i = 32;
  goto <D.10572>;
  <D.10571>:
  i = i + -1;
  D.11054 = mask >> i;
  D.11055 = D.11054 & 1;
  if (D.11055 != 0) goto <D.11056>; else goto <D.11057>;
  <D.11056>:
  D.11058 = i;
  return D.11058;
  <D.11057>:
  <D.10572>:
  if (i > 0) goto <D.10571>; else goto <D.10573>;
  <D.10573>:
  D.11058 = -1;
  return D.11058;
}


adjustScale128 (guint64 * palo, guint64 * pahi, int deltaScale)
{
  int D.11064;
  unsigned int D.11065;
  int idx;
  int rc;

  if (deltaScale < 0) goto <D.11060>; else goto <D.11061>;
  <D.11060>:
  deltaScale = -deltaScale;
  if (deltaScale > 28) goto <D.11062>; else goto <D.11063>;
  <D.11062>:
  D.11064 = 3;
  return D.11064;
  <D.11063>:
  goto <D.10605>;
  <D.10604>:
  idx = MIN_EXPR <deltaScale, 9>;
  deltaScale = deltaScale - idx;
  D.11065 = constantsDecadeInt32Factors[idx];
  div128by32 (palo, pahi, D.11065, 0B);
  <D.10605>:
  if (deltaScale > 0) goto <D.10604>; else goto <D.10606>;
  <D.10606>:
  goto <D.11066>;
  <D.11061>:
  if (deltaScale > 0) goto <D.11067>; else goto <D.11068>;
  <D.11067>:
  if (deltaScale > 28) goto <D.11069>; else goto <D.11070>;
  <D.11069>:
  D.11064 = 3;
  return D.11064;
  <D.11070>:
  goto <D.10608>;
  <D.10607>:
  idx = MIN_EXPR <deltaScale, 9>;
  deltaScale = deltaScale - idx;
  D.11065 = constantsDecadeInt32Factors[idx];
  rc = mult128by32 (palo, pahi, D.11065, 0);
  if (rc != 0) goto <D.11071>; else goto <D.11072>;
  <D.11071>:
  D.11064 = rc;
  return D.11064;
  <D.11072>:
  <D.10608>:
  if (deltaScale > 0) goto <D.10607>; else goto <D.10609>;
  <D.10609>:
  <D.11068>:
  <D.11066>:
  D.11064 = 0;
  return D.11064;
}


mult128by32 (guint64 * pclo, guint64 * pchi, guint32 factor, int roundBit)
{
  long long unsigned int D.11074;
  unsigned int D.11075;
  long long unsigned int D.11076;
  long long unsigned int D.11077;
  unsigned int D.11080;
  long long unsigned int D.11081;
  long long unsigned int D.11082;
  long long unsigned int D.11083;
  long long unsigned int D.11084;
  long long unsigned int D.11085;
  long long unsigned int D.11086;
  long long unsigned int D.11087;
  long long unsigned int D.11088;
  long long unsigned int D.11089;
  unsigned int D.11090;
  long long unsigned int D.11091;
  long long unsigned int D.11092;
  long long unsigned int D.11093;
  long long unsigned int D.11094;
  int D.11095;
  int iftmp.17;
  long long unsigned int D.11097;
  guint64 a;
  guint32 h0;
  guint32 h1;

  D.11074 = *pclo;
  D.11075 = (unsigned int) D.11074;
  D.11076 = (long long unsigned int) D.11075;
  D.11077 = (long long unsigned int) factor;
  a = D.11076 * D.11077;
  if (roundBit != 0) goto <D.11078>; else goto <D.11079>;
  <D.11078>:
  D.11080 = factor / 2;
  D.11081 = (long long unsigned int) D.11080;
  a = D.11081 + a;
  <D.11079>:
  h0 = (guint32) a;
  a = a >> 32;
  D.11074 = *pclo;
  D.11082 = D.11074 >> 32;
  D.11083 = (long long unsigned int) factor;
  D.11084 = D.11082 * D.11083;
  a = D.11084 + a;
  h1 = (guint32) a;
  D.11085 = (long long unsigned int) h1;
  D.11086 = D.11085 << 32;
  D.11087 = (long long unsigned int) h0;
  D.11088 = D.11086 | D.11087;
  *pclo = D.11088;
  a = a >> 32;
  D.11089 = *pchi;
  D.11090 = (unsigned int) D.11089;
  D.11091 = (long long unsigned int) D.11090;
  D.11077 = (long long unsigned int) factor;
  D.11092 = D.11091 * D.11077;
  a = D.11092 + a;
  h0 = (guint32) a;
  a = a >> 32;
  D.11089 = *pchi;
  D.11093 = D.11089 >> 32;
  D.11083 = (long long unsigned int) factor;
  D.11094 = D.11093 * D.11083;
  a = D.11094 + a;
  h1 = (guint32) a;
  D.11085 = (long long unsigned int) h1;
  D.11086 = D.11085 << 32;
  D.11087 = (long long unsigned int) h0;
  D.11088 = D.11086 | D.11087;
  *pchi = D.11088;
  D.11097 = a >> 32;
  if (D.11097 == 0) goto <D.11098>; else goto <D.11099>;
  <D.11098>:
  iftmp.17 = 0;
  goto <D.11100>;
  <D.11099>:
  iftmp.17 = 2;
  <D.11100>:
  D.11095 = iftmp.17;
  return D.11095;
}


sub128 (guint64 alo, guint64 ahi, guint64 blo, guint64 bhi, guint64 * pclo, guint64 * pchi)
{
  guint64 clo;
  guint64 chi;

  clo = alo - blo;
  chi = ahi - bhi;
  if (alo < blo) goto <D.11102>; else goto <D.11103>;
  <D.11102>:
  chi = chi + 18446744073709551615;
  <D.11103>:
  *pclo = clo;
  *pchi = chi;
}


add128 (guint64 alo, guint64 ahi, guint64 blo, guint64 bhi, guint64 * pclo, guint64 * pchi)
{
  alo = alo + blo;
  if (alo < blo) goto <D.11104>; else goto <D.11105>;
  <D.11104>:
  ahi = ahi + 1;
  <D.11105>:
  ahi = ahi + bhi;
  *pclo = alo;
  *pchi = ahi;
}


rescale128 (guint64 * pclo, guint64 * pchi, int * pScale, int texp, int minScale, int maxScale, int roundFlag)
{
  long long unsigned int D.11108;
  long long unsigned int D.11109;
  long long unsigned int D.11116;
  long long unsigned int D.11117;
  int D.11118;
  int D.11119;
  long long unsigned int D.11120;
  long long unsigned int D.11121;
  int D.11122;
  long long unsigned int D.11123;
  long long unsigned int D.11124;
  long long unsigned int D.11125;
  _Bool D.11126;
  long int D.11127;
  long int D.11128;
  _Bool D.11131;
  long int D.11132;
  long int D.11133;
  int D.11138;
  long long unsigned int D.11141;
  int D.11145;
  unsigned int D.11149;
  _Bool D.11150;
  _Bool D.11151;
  _Bool D.11152;
  int D.11163;
  guint32 factor;
  guint32 overhang;
  int scale;
  int i;
  int rc;
  int roundBit;

  roundBit = 0;
  scale = *pScale;
  if (texp > 0) goto <D.11106>; else goto <D.11107>;
  <D.11106>:
  goto <D.10632>;
  <D.10631>:
  D.11108 = *pchi;
  D.11109 = D.11108 >> 32;
  overhang = (guint32) D.11109;
  if (overhang != 0) goto <D.11110>; else goto <D.11111>;
  <D.11110>:
  {
    int msf;
    int shift;

    msf = my_g_bit_nth_msf (overhang);
    shift = msf + -11;
    if (shift >= texp) goto <D.11112>; else goto <D.11113>;
    <D.11112>:
    shift = texp + -1;
    <D.11113>:
    if (shift > 0) goto <D.11114>; else goto <D.11115>;
    <D.11114>:
    texp = texp - shift;
    D.11116 = *pclo;
    D.11117 = D.11116 >> shift;
    D.11108 = *pchi;
    D.11118 = 1 << shift;
    D.11119 = D.11118 + -1;
    D.11120 = (long long unsigned int) D.11119;
    D.11121 = D.11108 & D.11120;
    D.11122 = 64 - shift;
    D.11123 = D.11121 << D.11122;
    D.11124 = D.11117 | D.11123;
    *pclo = D.11124;
    D.11108 = *pchi;
    D.11125 = D.11108 >> shift;
    *pchi = D.11125;
    overhang = overhang >> shift;
    D.11126 = texp <= 0;
    D.11127 = (long int) D.11126;
    D.11128 = __builtin_expect (D.11127, 0);
    if (D.11128 != 0) goto <D.11129>; else goto <D.11130>;
    <D.11129>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "decimal.c", 730, "texp > 0");
    <D.11130>:
    D.11131 = overhang <= 1024;
    D.11132 = (long int) D.11131;
    D.11133 = __builtin_expect (D.11132, 0);
    if (D.11133 != 0) goto <D.11134>; else goto <D.11135>;
    <D.11134>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "decimal.c", 731, "overhang > (2 << DECIMAL_MAX_INTFACTORS)");
    <D.11135>:
    <D.11115>:
  }
  <D.11111>:
  goto <D.10628>;
  <D.10627>:
  texp = texp + -1;
  if (texp == 0) goto <D.11136>; else goto <D.11137>;
  <D.11136>:
  D.11116 = *pclo;
  D.11138 = (int) D.11116;
  roundBit = D.11138 & 1;
  <D.11137>:
  rshift128 (pclo, pchi);
  overhang = overhang >> 1;
  <D.10628>:
  if (texp > 0) goto <D.11139>; else goto <D.10629>;
  <D.11139>:
  if (overhang > 1024) goto <D.10627>; else goto <D.11140>;
  <D.11140>:
  D.11116 = *pclo;
  D.11141 = D.11116 & 1;
  if (D.11141 == 0) goto <D.10627>; else goto <D.10629>;
  <D.10629>:
  if (texp > 9) goto <D.11142>; else goto <D.11143>;
  <D.11142>:
  i = 9;
  goto <D.11144>;
  <D.11143>:
  i = texp;
  <D.11144>:
  D.11145 = scale + i;
  if (D.11145 > maxScale) goto <D.11146>; else goto <D.11147>;
  <D.11146>:
  i = maxScale - scale;
  <D.11147>:
  if (i == 0) goto <D.10630>; else goto <D.11148>;
  <D.11148>:
  texp = texp - i;
  scale = scale + i;
  D.11149 = constantsDecadeInt32Factors[i];
  factor = D.11149 >> i;
  mult128by32 (pclo, pchi, factor, 0);
  <D.10632>:
  D.11150 = texp > 0;
  D.11151 = scale <= maxScale;
  D.11152 = D.11150 & D.11151;
  if (D.11152 != 0) goto <D.10631>; else goto <D.10630>;
  <D.10630>:
  goto <D.10634>;
  <D.10633>:
  texp = texp + -1;
  if (texp == 0) goto <D.11153>; else goto <D.11154>;
  <D.11153>:
  D.11116 = *pclo;
  D.11138 = (int) D.11116;
  roundBit = D.11138 & 1;
  <D.11154>:
  rshift128 (pclo, pchi);
  <D.10634>:
  if (texp > 0) goto <D.10633>; else goto <D.10635>;
  <D.10635>:
  <D.11107>:
  goto <D.10637>;
  <D.10636>:
  i = scale - maxScale;
  if (i > 9) goto <D.11155>; else goto <D.11156>;
  <D.11155>:
  i = 9;
  <D.11156>:
  scale = scale - i;
  D.11149 = constantsDecadeInt32Factors[i];
  roundBit = div128by32 (pclo, pchi, D.11149, 0B);
  <D.10637>:
  if (scale > maxScale) goto <D.10636>; else goto <D.10638>;
  <D.10638>:
  goto <D.10640>;
  <D.10639>:
  if (roundFlag == 0) goto <D.11157>; else goto <D.11158>;
  <D.11157>:
  roundBit = 0;
  <D.11158>:
  i = minScale - scale;
  if (i > 9) goto <D.11159>; else goto <D.11160>;
  <D.11159>:
  i = 9;
  <D.11160>:
  scale = scale + i;
  D.11149 = constantsDecadeInt32Factors[i];
  rc = mult128by32 (pclo, pchi, D.11149, roundBit);
  if (rc != 0) goto <D.11161>; else goto <D.11162>;
  <D.11161>:
  D.11163 = rc;
  return D.11163;
  <D.11162>:
  roundBit = 0;
  <D.10640>:
  if (scale < minScale) goto <D.10639>; else goto <D.10641>;
  <D.10641>:
  *pScale = scale;
  D.11163 = normalize128 (pclo, pchi, pScale, roundFlag, roundBit);
  return D.11163;
}


rshift128 (guint64 * pclo, guint64 * pchi)
{
  long long unsigned int D.11165;
  long long unsigned int D.11166;
  long long unsigned int D.11167;
  long long unsigned int D.11168;
  long long unsigned int D.11169;
  long long unsigned int D.11170;

  D.11165 = *pclo;
  D.11166 = D.11165 >> 1;
  *pclo = D.11166;
  D.11165 = *pclo;
  D.11167 = *pchi;
  D.11168 = D.11167 << 63;
  D.11169 = D.11165 | D.11168;
  *pclo = D.11169;
  D.11167 = *pchi;
  D.11170 = D.11167 >> 1;
  *pchi = D.11170;
}


pack128toDecimal (struct decimal_repr * pA, guint64 alo, guint64 ahi, int scale, int sign)
{
  unsigned int scale.18;
  long long unsigned int D.11175;
  int D.11176;
  unsigned int D.11177;
  long long unsigned int D.11178;
  unsigned int D.11179;
  unsigned int D.11180;
  unsigned char D.11181;
  <unnamed-unsigned:1> D.11182;
  unsigned char D.11183;

  scale.18 = (unsigned int) scale;
  if (scale.18 > 28) goto <D.11171>; else goto <D.11174>;
  <D.11174>:
  D.11175 = ahi >> 32;
  if (D.11175 != 0) goto <D.11171>; else goto <D.11172>;
  <D.11171>:
  D.11176 = 2;
  return D.11176;
  <D.11172>:
  D.11177 = (unsigned int) alo;
  pA->lo32 = D.11177;
  D.11178 = alo >> 32;
  D.11179 = (unsigned int) D.11178;
  pA->mid32 = D.11179;
  D.11180 = (unsigned int) ahi;
  pA->hi32 = D.11180;
  D.11181 = (unsigned char) sign;
  D.11182 = (<unnamed-unsigned:1>) D.11181;
  pA->u.signscale.sign = D.11182;
  D.11183 = (unsigned char) scale;
  pA->u.signscale.scale = D.11183;
  D.11176 = 0;
  return D.11176;
}


mono_double2decimal (struct decimal_repr * pA, double val, gint32 digits)
{
  long long unsigned int D.11185;
  signed long long D.11186;
  _Bool D.11187;
  long long unsigned int D.11188;
  short unsigned int D.11189;
  long long unsigned int D.11190;
  long long unsigned int alo.19;
  int D.11192;
  int D.11193;
  _Bool D.11194;
  _Bool D.11195;
  _Bool D.11196;
  gint32 D.11199;
  _Bool D.11200;
  _Bool D.11201;
  _Bool D.11202;
  int D.11207;
  long long unsigned int alo.20;
  long long unsigned int ahi.21;
  int D.11214;
  int D.11215;
  int scale.22;
  int scale.23;
  long long unsigned int D.11218;
  long long unsigned int D.11221;
  int scale.24;
  int D.11227;
  guint64 alo;
  guint64 ahi;
  guint64 * p;
  int sigDigits;
  int sign;
  int texp;
  int rc;
  int scale;
  guint16 k;

  try
    {
      p = &val;
      D.11185 = *p;
      D.11186 = (signed long long) D.11185;
      D.11187 = D.11186 < 0;
      sign = (int) D.11187;
      D.11185 = *p;
      D.11188 = D.11185 >> 52;
      D.11189 = (short unsigned int) D.11188;
      k = D.11189 & 2047;
      D.11185 = *p;
      D.11190 = D.11185 & 4503599627370495;
      alo.19 = D.11190 | 4503599627370496;
      alo = alo.19;
      ahi = 0;
      D.11192 = (int) k;
      D.11193 = D.11192 & 2047;
      texp = D.11193 + -1023;
      D.11194 = k == 2047;
      D.11195 = texp > 95;
      D.11196 = D.11194 | D.11195;
      if (D.11196 != 0) goto <D.11197>; else goto <D.11198>;
      <D.11197>:
      D.11199 = 2;
      return D.11199;
      <D.11198>:
      D.11200 = k == 0;
      D.11201 = texp < -93;
      D.11202 = D.11200 | D.11201;
      if (D.11202 != 0) goto <D.11203>; else goto <D.11204>;
      <D.11203>:
      memset (pA, 0, 16);
      D.11199 = 0;
      return D.11199;
      <D.11204>:
      texp = texp + -52;
      if (texp > 0) goto <D.11205>; else goto <D.11206>;
      <D.11205>:
      goto <D.10715>;
      <D.10714>:
      lshift128 (&alo, &ahi);
      texp = texp + -1;
      <D.10715>:
      if (texp > 0) goto <D.10714>; else goto <D.10716>;
      <D.10716>:
      <D.11206>:
      scale = 0;
      D.11207 = -texp;
      rc = rescale128 (&alo, &ahi, &scale, D.11207, 0, 28, 1);
      if (rc != 0) goto <D.11208>; else goto <D.11209>;
      <D.11208>:
      D.11199 = rc;
      return D.11199;
      <D.11209>:
      alo.20 = alo;
      ahi.21 = ahi;
      sigDigits = calcDigits (alo.20, ahi.21);
      if (sigDigits > digits) goto <D.11212>; else goto <D.11213>;
      <D.11212>:
      D.11214 = sigDigits - digits;
      div128DecadeFactor (&alo, &ahi, D.11214);
      D.11215 = digits - sigDigits;
      scale.22 = scale;
      scale.23 = D.11215 + scale.22;
      scale = scale.23;
      D.11218 = dec128decadeFactors[digits].hi;
      ahi.21 = ahi;
      if (D.11218 == ahi.21) goto <D.11219>; else goto <D.11220>;
      <D.11219>:
      D.11221 = dec128decadeFactors[digits].lo;
      alo.20 = alo;
      if (D.11221 == alo.20) goto <D.11222>; else goto <D.11223>;
      <D.11222>:
      div128by32 (&alo, &ahi, 10, 0B);
      scale.22 = scale;
      scale.24 = scale.22 + -1;
      scale = scale.24;
      <D.11223>:
      <D.11220>:
      scale.22 = scale;
      if (scale.22 < 0) goto <D.11225>; else goto <D.11226>;
      <D.11225>:
      scale.22 = scale;
      D.11227 = -scale.22;
      rc = mult128DecadeFactor (&alo, &ahi, D.11227);
      if (rc != 0) goto <D.11228>; else goto <D.11229>;
      <D.11228>:
      D.11199 = rc;
      return D.11199;
      <D.11229>:
      scale = 0;
      <D.11226>:
      <D.11213>:
      trimExcessScale (&alo, &ahi, &scale);
      alo.20 = alo;
      ahi.21 = ahi;
      scale.22 = scale;
      D.11199 = pack128toDecimal (pA, alo.20, ahi.21, scale.22, sign);
      return D.11199;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
      scale = {CLOBBER};
    }
}


memset (void * __dest, int __ch, size_t __len)
{
  int D.11234;
  int D.11239;
  void * D.11241;
  unsigned int D.11242;

  D.11234 = __builtin_constant_p (__len);
  if (D.11234 != 0) goto <D.11235>; else goto <D.11236>;
  <D.11235>:
  if (__len == 0) goto <D.11237>; else goto <D.11238>;
  <D.11237>:
  D.11239 = __builtin_constant_p (__ch);
  if (D.11239 == 0) goto <D.11232>; else goto <D.11240>;
  <D.11240>:
  if (__ch != 0) goto <D.11232>; else goto <D.11233>;
  <D.11232>:
  __warn_memset_zero_len ();
  D.11241 = __dest;
  return D.11241;
  <D.11233>:
  <D.11238>:
  <D.11236>:
  D.11242 = __builtin_object_size (__dest, 0);
  D.11241 = __builtin___memset_chk (__dest, __ch, __len, D.11242);
  return D.11241;
}


lshift128 (guint64 * pclo, guint64 * pchi)
{
  long long unsigned int D.11244;
  long long unsigned int D.11245;
  long long unsigned int D.11246;
  long long unsigned int D.11247;
  long long unsigned int D.11248;
  long long unsigned int D.11249;

  D.11244 = *pchi;
  D.11245 = D.11244 << 1;
  *pchi = D.11245;
  D.11244 = *pchi;
  D.11246 = *pclo;
  D.11247 = D.11246 >> 63;
  D.11248 = D.11244 | D.11247;
  *pchi = D.11248;
  D.11246 = *pclo;
  D.11249 = D.11246 << 1;
  *pclo = D.11249;
}


calcDigits (guint64 alo, guint64 ahi)
{
  int D.11254;
  int D.11256;
  int D.11257;
  long long unsigned int D.11260;
  long long unsigned int D.11263;
  int tlog2;
  int tlog10;

  tlog2 = 0;
  if (ahi == 0) goto <D.11250>; else goto <D.11251>;
  <D.11250>:
  if (alo == 0) goto <D.11252>; else goto <D.11253>;
  <D.11252>:
  D.11254 = 0;
  return D.11254;
  <D.11253>:
  tlog2 = log2_64 (alo);
  goto <D.11255>;
  <D.11251>:
  D.11256 = log2_64 (ahi);
  tlog2 = D.11256 + 64;
  <D.11255>:
  D.11257 = tlog2 * 1000;
  tlog10 = D.11257 / 3322;
  D.11260 = dec128decadeFactors[tlog10].hi;
  if (D.11260 > ahi) goto <D.11258>; else goto <D.11261>;
  <D.11261>:
  D.11260 = dec128decadeFactors[tlog10].hi;
  if (D.11260 == ahi) goto <D.11262>; else goto <D.11259>;
  <D.11262>:
  D.11263 = dec128decadeFactors[tlog10].lo;
  if (D.11263 > alo) goto <D.11258>; else goto <D.11259>;
  <D.11258>:
  tlog10 = tlog10 + -1;
  <D.11259>:
  D.11254 = tlog10 + 1;
  return D.11254;
}


div128DecadeFactor (guint64 * palo, guint64 * pahi, int powerOfTen)
{
  unsigned int D.11265;
  int idx;
  int roundBit;

  roundBit = 0;
  goto <D.10692>;
  <D.10691>:
  idx = MIN_EXPR <powerOfTen, 9>;
  powerOfTen = powerOfTen - idx;
  D.11265 = constantsDecadeInt32Factors[idx];
  roundBit = div128by32 (palo, pahi, D.11265, 0B);
  <D.10692>:
  if (powerOfTen > 0) goto <D.10691>; else goto <D.10693>;
  <D.10693>:
  if (roundBit != 0) goto <D.11266>; else goto <D.11267>;
  <D.11266>:
  roundUp128 (palo, pahi);
  <D.11267>:
}


mult128DecadeFactor (guint64 * pclo, guint64 * pchi, int powerOfTen)
{
  unsigned int D.11268;
  int D.11271;
  int idx;
  int rc;

  goto <D.10466>;
  <D.10465>:
  idx = MIN_EXPR <powerOfTen, 9>;
  powerOfTen = powerOfTen - idx;
  D.11268 = constantsDecadeInt32Factors[idx];
  rc = mult128by32 (pclo, pchi, D.11268, 0);
  if (rc != 0) goto <D.11269>; else goto <D.11270>;
  <D.11269>:
  D.11271 = rc;
  return D.11271;
  <D.11270>:
  <D.10466>:
  if (powerOfTen > 0) goto <D.10465>; else goto <D.10467>;
  <D.10467>:
  D.11271 = 0;
  return D.11271;
}


trimExcessScale (guint64 * pclo, guint64 * pchi, int * pScale)
{
  long long unsigned int ilo.25;
  long long unsigned int ihi.26;
  unsigned int rest.27;
  int D.11280;
  guint64 ilo;
  guint64 lastlo;
  guint64 ihi;
  guint64 lasthi;
  int scale;
  int i;
  int roundBit;

  try
    {
      ilo.25 = *pclo;
      ilo = ilo.25;
      ihi.26 = *pchi;
      ihi = ihi.26;
      scale = *pScale;
      i = 0;
      goto <D.10656>;
      <D.10655>:
      scale = scale + -1;
      i = i + 1;
      lastlo = ilo;
      lasthi = ihi;
      roundBit = div128by32 (&ilo, &ihi, 10, &rest);
      rest.27 = rest;
      if (rest.27 != 0) goto <D.11276>; else goto <D.11277>;
      <D.11276>:
      i = i + -1;
      if (i == 0) goto <D.11278>; else goto <D.11279>;
      <D.11278>:
      return;
      <D.11279>:
      *pclo = lastlo;
      *pchi = lasthi;
      D.11280 = scale + 1;
      *pScale = D.11280;
      return;
      <D.11277>:
      <D.10656>:
      if (scale > 0) goto <D.10655>; else goto <D.10657>;
      <D.10657>:
    }
  finally
    {
      ilo = {CLOBBER};
      ihi = {CLOBBER};
    }
}


mono_string2decimal (struct decimal_repr * pA, struct MonoString * str, gint32 decrDecimal, gint32 sign)
{
  long long unsigned int ahi.28;
  short unsigned int D.11285;
  int D.11286;
  unsigned int n.29;
  gint32 D.11290;
  int iftmp.30;
  int D.11296;
  int D.11300;
  int D.11304;
  int D.11305;
  _Bool D.11308;
  _Bool D.11309;
  _Bool D.11310;
  int scale.31;
  unsigned int i.32;
  unsigned int D.11317;
  gushort * D.11318;
  short unsigned int D.11319;
  int D.11320;
  sizetype i.33;
  sizetype D.11329;
  sizetype D.11330;
  gushort * D.11331;
  short unsigned int D.11332;
  int D.11333;
  int D.11338;
  long long unsigned int alo.34;
  int scale.35;
  gushort * buf;
  gushort * p;
  guint64 alo;
  guint64 ahi;
  int n;
  int rc;
  int i;
  int len;
  int sigLen;
  int firstNonZero;
  int scale;
  int roundBit;

  try
    {
      buf = mono_string_chars (str);
      sigLen = -1;
      roundBit = 0;
      ahi = 0;
      ahi.28 = ahi;
      alo = ahi.28;
      memset (pA, 0, 16);
      p = buf;
      len = 0;
      goto <D.10736>;
      <D.10735>:
      len = len + 1;
      p = p + 2;
      <D.10736>:
      D.11285 = *p;
      if (D.11285 != 0) goto <D.10735>; else goto <D.10737>;
      <D.10737>:
      p = buf;
      i = 0;
      goto <D.10740>;
      <D.10739>:
      D.11285 = *p;
      D.11286 = (int) D.11285;
      n = D.11286 + -48;
      n.29 = (unsigned int) n;
      if (n.29 > 9) goto <D.11288>; else goto <D.11289>;
      <D.11288>:
      D.11290 = 2;
      return D.11290;
      <D.11289>:
      if (n != 0) goto <D.11291>; else goto <D.11292>;
      <D.11291>:
      if (sigLen < 0) goto <D.11293>; else goto <D.11294>;
      <D.11293>:
      firstNonZero = i;
      D.11296 = len - firstNonZero;
      if (D.11296 > 29) goto <D.11297>; else goto <D.11298>;
      <D.11297>:
      iftmp.30 = firstNonZero + 29;
      goto <D.11299>;
      <D.11298>:
      iftmp.30 = len;
      <D.11299>:
      sigLen = iftmp.30;
      D.11300 = sigLen + 1;
      if (D.11300 < decrDecimal) goto <D.11301>; else goto <D.11302>;
      <D.11301>:
      D.11290 = 2;
      return D.11290;
      <D.11302>:
      <D.11294>:
      if (i >= sigLen) goto <D.10738>; else goto <D.11303>;
      <D.11303>:
      D.11304 = sigLen + -1;
      D.11305 = D.11304 - i;
      rc = incMultConstant128 (&alo, &ahi, D.11305, n);
      if (rc != 0) goto <D.11306>; else goto <D.11307>;
      <D.11306>:
      D.11290 = rc;
      return D.11290;
      <D.11307>:
      <D.11292>:
      i = i + 1;
      p = p + 2;
      <D.10740>:
      D.11285 = *p;
      if (D.11285 != 0) goto <D.10739>; else goto <D.10738>;
      <D.10738>:
      D.11308 = sigLen < 0;
      D.11309 = len > decrDecimal;
      D.11310 = D.11308 & D.11309;
      if (D.11310 != 0) goto <D.11311>; else goto <D.11312>;
      <D.11311>:
      sigLen = len;
      <D.11312>:
      scale.31 = sigLen - decrDecimal;
      scale = scale.31;
      if (i < len) goto <D.11314>; else goto <D.11315>;
      <D.11314>:
      i.32 = (unsigned int) i;
      D.11317 = i.32 * 2;
      D.11318 = buf + D.11317;
      D.11319 = *D.11318;
      D.11320 = (int) D.11319;
      n = D.11320 + -48;
      n.29 = (unsigned int) n;
      if (n.29 > 9) goto <D.11321>; else goto <D.11322>;
      <D.11321>:
      D.11290 = 2;
      return D.11290;
      <D.11322>:
      if (n > 5) goto <D.11323>; else goto <D.11324>;
      <D.11323>:
      roundBit = 1;
      goto <D.11325>;
      <D.11324>:
      if (n == 5) goto <D.11326>; else goto <D.11327>;
      <D.11326>:
      i.33 = (sizetype) i;
      D.11329 = i.33 + 2147483647;
      D.11330 = D.11329 * 2;
      D.11331 = buf + D.11330;
      D.11332 = *D.11331;
      D.11333 = (int) D.11332;
      n = D.11333 + -48;
      i = i + 1;
      goto <D.10743>;
      <D.10742>:
      i.32 = (unsigned int) i;
      D.11317 = i.32 * 2;
      D.11318 = buf + D.11317;
      D.11319 = *D.11318;
      if (D.11319 != 48) goto <D.10741>; else goto <D.11334>;
      <D.11334>:
      i = i + 1;
      <D.10743>:
      if (i < len) goto <D.10742>; else goto <D.10741>;
      <D.10741>:
      if (i < len) goto <D.11335>; else goto <D.11337>;
      <D.11337>:
      D.11338 = n % 2;
      if (D.11338 == 1) goto <D.11335>; else goto <D.11336>;
      <D.11335>:
      roundBit = 1;
      <D.11336>:
      <D.11327>:
      <D.11325>:
      <D.11315>:
      ahi.28 = ahi;
      if (ahi.28 != 0) goto <D.11339>; else goto <D.11340>;
      <D.11339>:
      rc = normalize128 (&alo, &ahi, &scale, 1, roundBit);
      if (rc != 0) goto <D.11341>; else goto <D.11342>;
      <D.11341>:
      D.11290 = rc;
      return D.11290;
      <D.11342>:
      <D.11340>:
      alo.34 = alo;
      if (alo.34 == 0) goto <D.11345>; else goto <D.11343>;
      <D.11345>:
      ahi.28 = ahi;
      if (ahi.28 == 0) goto <D.11346>; else goto <D.11343>;
      <D.11346>:
      scale.35 = scale;
      if (scale.35 <= 0) goto <D.11348>; else goto <D.11343>;
      <D.11348>:
      D.11290 = 0;
      return D.11290;
      <D.11343>:
      alo.34 = alo;
      ahi.28 = ahi;
      scale.31 = sigLen - decrDecimal;
      D.11290 = pack128toDecimal (pA, alo.34, ahi.28, scale.31, sign);
      return D.11290;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
      scale = {CLOBBER};
    }
}


incMultConstant128 (guint64 * palo, guint64 * pahi, int idx, int factor)
{
  long long unsigned int blo.36;
  long long unsigned int bhi.37;
  unsigned int factor.38;
  long long unsigned int bhi.39;
  int D.11359;
  long long unsigned int D.11360;
  long long unsigned int D.11361;
  long long unsigned int blo.40;
  guint64 blo;
  guint64 bhi;
  guint64 h;

  try
    {
      blo.36 = dec128decadeFactors[idx].lo;
      blo = blo.36;
      bhi.37 = dec128decadeFactors[idx].hi;
      bhi = bhi.37;
      h = bhi;
      if (factor != 1) goto <D.11353>; else goto <D.11354>;
      <D.11353>:
      factor.38 = (unsigned int) factor;
      mult128by32 (&blo, &bhi, factor.38, 0);
      bhi.39 = bhi;
      if (h > bhi.39) goto <D.11357>; else goto <D.11358>;
      <D.11357>:
      D.11359 = 2;
      return D.11359;
      <D.11358>:
      <D.11354>:
      h = *pahi;
      D.11360 = *palo;
      D.11361 = *pahi;
      blo.40 = blo;
      bhi.39 = bhi;
      add128 (D.11360, D.11361, blo.40, bhi.39, palo, pahi);
      D.11361 = *pahi;
      if (D.11361 < h) goto <D.11363>; else goto <D.11364>;
      <D.11363>:
      D.11359 = 2;
      return D.11359;
      <D.11364>:
      D.11359 = 0;
      return D.11359;
    }
  finally
    {
      blo = {CLOBBER};
      bhi = {CLOBBER};
    }
}


mono_decimal2UInt64 (struct decimal_repr * pA, guint64 * pResult)
{
  unsigned int D.11367;
  long long unsigned int D.11368;
  long long unsigned int D.11369;
  unsigned int D.11370;
  long long unsigned int D.11371;
  long long unsigned int alo.41;
  unsigned int D.11373;
  long long unsigned int ahi.42;
  unsigned char D.11375;
  long long unsigned int ahi.43;
  long long unsigned int alo.44;
  unsigned char D.11384;
  unsigned char D.11385;
  gint32 D.11386;
  guint64 alo;
  guint64 ahi;
  int scale;

  try
    {
      D.11367 = pA->mid32;
      D.11368 = (long long unsigned int) D.11367;
      D.11369 = D.11368 << 32;
      D.11370 = pA->lo32;
      D.11371 = (long long unsigned int) D.11370;
      alo.41 = D.11369 | D.11371;
      alo = alo.41;
      D.11373 = pA->hi32;
      ahi.42 = (long long unsigned int) D.11373;
      ahi = ahi.42;
      D.11375 = pA->u.signscale.scale;
      scale = (int) D.11375;
      if (scale > 0) goto <D.11376>; else goto <D.11377>;
      <D.11376>:
      div128DecadeFactor (&alo, &ahi, scale);
      <D.11377>:
      ahi.43 = ahi;
      if (ahi.43 != 0) goto <D.11378>; else goto <D.11381>;
      <D.11381>:
      alo.44 = alo;
      if (alo.44 != 0) goto <D.11383>; else goto <D.11379>;
      <D.11383>:
      D.11384 = BIT_FIELD_REF <*pA, 8, 24>;
      D.11385 = D.11384 & 128;
      if (D.11385 != 0) goto <D.11378>; else goto <D.11379>;
      <D.11378>:
      D.11386 = 2;
      return D.11386;
      <D.11379>:
      alo.44 = alo;
      *pResult = alo.44;
      D.11386 = 0;
      return D.11386;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
    }
}


mono_decimal2Int64 (struct decimal_repr * pA, gint64 * pResult)
{
  unsigned int D.11389;
  long long unsigned int D.11390;
  long long unsigned int D.11391;
  unsigned int D.11392;
  long long unsigned int D.11393;
  long long unsigned int alo.45;
  unsigned int D.11395;
  long long unsigned int ahi.46;
  unsigned char D.11397;
  long long unsigned int ahi.47;
  gint32 D.11403;
  <unnamed-unsigned:1> D.11404;
  long long unsigned int alo.48;
  long long unsigned int D.11412;
  long long int D.11413;
  signed long long alo.49;
  long long int alo.50;
  guint64 alo;
  guint64 ahi;
  int sign;
  int scale;

  try
    {
      D.11389 = pA->mid32;
      D.11390 = (long long unsigned int) D.11389;
      D.11391 = D.11390 << 32;
      D.11392 = pA->lo32;
      D.11393 = (long long unsigned int) D.11392;
      alo.45 = D.11391 | D.11393;
      alo = alo.45;
      D.11395 = pA->hi32;
      ahi.46 = (long long unsigned int) D.11395;
      ahi = ahi.46;
      D.11397 = pA->u.signscale.scale;
      scale = (int) D.11397;
      if (scale > 0) goto <D.11398>; else goto <D.11399>;
      <D.11398>:
      div128DecadeFactor (&alo, &ahi, scale);
      <D.11399>:
      ahi.47 = ahi;
      if (ahi.47 != 0) goto <D.11401>; else goto <D.11402>;
      <D.11401>:
      D.11403 = 2;
      return D.11403;
      <D.11402>:
      D.11404 = pA->u.signscale.sign;
      sign = (int) D.11404;
      if (sign != 0) goto <D.11407>; else goto <D.11405>;
      <D.11407>:
      alo.48 = alo;
      if (alo.48 != 0) goto <D.11409>; else goto <D.11405>;
      <D.11409>:
      alo.48 = alo;
      if (alo.48 > 9223372036854775808) goto <D.11410>; else goto <D.11411>;
      <D.11410>:
      D.11403 = 2;
      return D.11403;
      <D.11411>:
      alo.48 = alo;
      D.11412 = -alo.48;
      D.11413 = (long long int) D.11412;
      *pResult = D.11413;
      goto <D.11406>;
      <D.11405>:
      alo.48 = alo;
      alo.49 = (signed long long) alo.48;
      if (alo.49 < 0) goto <D.11415>; else goto <D.11416>;
      <D.11415>:
      D.11403 = 2;
      return D.11403;
      <D.11416>:
      alo.48 = alo;
      alo.50 = (long long int) alo.48;
      *pResult = alo.50;
      <D.11406>:
      D.11403 = 0;
      return D.11403;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
    }
}


mono_decimalFloorAndTrunc (struct decimal_repr * pA, gint32 floorFlag)
{
  unsigned char D.11420;
  unsigned int D.11423;
  long long unsigned int D.11424;
  long long unsigned int D.11425;
  unsigned int D.11426;
  long long unsigned int D.11427;
  long long unsigned int alo.51;
  unsigned int D.11429;
  long long unsigned int ahi.52;
  <unnamed-unsigned:1> D.11431;
  int iftmp.53;
  unsigned int rest.54;
  _Bool D.11438;
  _Bool D.11439;
  _Bool D.11440;
  long long unsigned int alo.55;
  long long unsigned int ahi.56;
  guint64 alo;
  guint64 ahi;
  guint32 factor;
  guint32 rest;
  int scale;
  int sign;
  int idx;
  int hasRest;

  try
    {
      hasRest = 0;
      D.11420 = pA->u.signscale.scale;
      scale = (int) D.11420;
      if (scale == 0) goto <D.11421>; else goto <D.11422>;
      <D.11421>:
      return;
      <D.11422>:
      D.11423 = pA->mid32;
      D.11424 = (long long unsigned int) D.11423;
      D.11425 = D.11424 << 32;
      D.11426 = pA->lo32;
      D.11427 = (long long unsigned int) D.11426;
      alo.51 = D.11425 | D.11427;
      alo = alo.51;
      D.11429 = pA->hi32;
      ahi.52 = (long long unsigned int) D.11429;
      ahi = ahi.52;
      D.11431 = pA->u.signscale.sign;
      sign = (int) D.11431;
      goto <D.10772>;
      <D.10771>:
      idx = MIN_EXPR <scale, 9>;
      factor = constantsDecadeInt32Factors[idx];
      scale = scale - idx;
      div128by32 (&alo, &ahi, factor, &rest);
      if (hasRest != 0) goto <D.11433>; else goto <D.11436>;
      <D.11436>:
      rest.54 = rest;
      if (rest.54 != 0) goto <D.11433>; else goto <D.11434>;
      <D.11433>:
      iftmp.53 = 1;
      goto <D.11435>;
      <D.11434>:
      iftmp.53 = 0;
      <D.11435>:
      hasRest = iftmp.53;
      <D.10772>:
      if (scale > 0) goto <D.10771>; else goto <D.10773>;
      <D.10773>:
      D.11438 = floorFlag != 0;
      D.11439 = hasRest != 0;
      D.11440 = D.11438 & D.11439;
      if (D.11440 != 0) goto <D.11441>; else goto <D.11442>;
      <D.11441>:
      if (sign != 0) goto <D.11443>; else goto <D.11444>;
      <D.11443>:
      roundUp128 (&alo, &ahi);
      <D.11444>:
      <D.11442>:
      alo.55 = alo;
      ahi.56 = ahi;
      pack128toDecimal (pA, alo.55, ahi.56, 0, sign);
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
      rest = {CLOBBER};
    }
}


mono_decimalRound (struct decimal_repr * pA, gint32 decimals)
{
  unsigned int D.11450;
  long long unsigned int D.11451;
  long long unsigned int D.11452;
  unsigned int D.11453;
  long long unsigned int D.11454;
  long long unsigned int alo.57;
  unsigned int D.11456;
  long long unsigned int ahi.58;
  unsigned char D.11458;
  <unnamed-unsigned:1> D.11459;
  int D.11462;
  long long unsigned int alo.59;
  long long unsigned int ahi.60;
  guint64 alo;
  guint64 ahi;
  int scale;
  int sign;

  try
    {
      D.11450 = pA->mid32;
      D.11451 = (long long unsigned int) D.11450;
      D.11452 = D.11451 << 32;
      D.11453 = pA->lo32;
      D.11454 = (long long unsigned int) D.11453;
      alo.57 = D.11452 | D.11454;
      alo = alo.57;
      D.11456 = pA->hi32;
      ahi.58 = (long long unsigned int) D.11456;
      ahi = ahi.58;
      D.11458 = pA->u.signscale.scale;
      scale = (int) D.11458;
      D.11459 = pA->u.signscale.sign;
      sign = (int) D.11459;
      if (scale > decimals) goto <D.11460>; else goto <D.11461>;
      <D.11460>:
      D.11462 = scale - decimals;
      div128DecadeFactor (&alo, &ahi, D.11462);
      scale = decimals;
      <D.11461>:
      alo.59 = alo;
      ahi.60 = ahi;
      pack128toDecimal (pA, alo.59, ahi.60, scale, sign);
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
    }
}


mono_decimalMult (struct decimal_repr * pA, struct decimal_repr * pB)
{
  unsigned int D.11465;
  unsigned int D.11466;
  unsigned int D.11467;
  unsigned int D.11468;
  unsigned int D.11469;
  unsigned int D.11470;
  unsigned char D.11471;
  int D.11472;
  unsigned char D.11473;
  int D.11474;
  int scale.61;
  <unnamed-unsigned:1> D.11476;
  int D.11477;
  <unnamed-unsigned:1> D.11478;
  int D.11479;
  long long unsigned int high.62;
  int scale.63;
  int scale.64;
  int scale.65;
  long long unsigned int mid.66;
  long long unsigned int D.11489;
  long long unsigned int D.11490;
  gint32 D.11493;
  long long unsigned int low.67;
  guint64 low;
  guint64 mid;
  guint64 high;
  guint32 factor;
  int scale;
  int sign;
  int rc;

  try
    {
      D.11465 = pA->lo32;
      D.11466 = pA->mid32;
      D.11467 = pA->hi32;
      D.11468 = pB->lo32;
      D.11469 = pB->mid32;
      D.11470 = pB->hi32;
      mult96by96to192 (D.11465, D.11466, D.11467, D.11468, D.11469, D.11470, &low, &mid, &high);
      D.11471 = pA->u.signscale.scale;
      D.11472 = (int) D.11471;
      D.11473 = pB->u.signscale.scale;
      D.11474 = (int) D.11473;
      scale.61 = D.11472 + D.11474;
      scale = scale.61;
      D.11476 = pA->u.signscale.sign;
      D.11477 = (int) D.11476;
      D.11478 = pB->u.signscale.sign;
      D.11479 = (int) D.11478;
      sign = D.11477 ^ D.11479;
      factor = 1000000000;
      goto <D.10794>;
      <D.10793>:
      high.62 = high;
      if (high.62 <= 99) goto <D.11481>; else goto <D.11482>;
      <D.11481>:
      factor = factor / 1000;
      scale.63 = scale;
      scale.64 = scale.63 + -6;
      scale = scale.64;
      goto <D.11485>;
      <D.11482>:
      scale.63 = scale;
      scale.65 = scale.63 + -9;
      scale = scale.65;
      <D.11485>:
      div192by32 (&low, &mid, &high, factor);
      <D.10794>:
      high.62 = high;
      if (high.62 != 0) goto <D.10793>; else goto <D.11487>;
      <D.11487>:
      mid.66 = mid;
      D.11489 = mid.66 >> 32;
      D.11490 = (long long unsigned int) factor;
      if (D.11489 >= D.11490) goto <D.10793>; else goto <D.10795>;
      <D.10795>:
      rc = rescale128 (&low, &mid, &scale, 0, 0, 28, 1);
      if (rc != 0) goto <D.11491>; else goto <D.11492>;
      <D.11491>:
      D.11493 = rc;
      return D.11493;
      <D.11492>:
      low.67 = low;
      mid.66 = mid;
      scale.63 = scale;
      D.11493 = pack128toDecimal (pA, low.67, mid.66, scale.63, sign);
      return D.11493;
    }
  finally
    {
      low = {CLOBBER};
      mid = {CLOBBER};
      high = {CLOBBER};
      scale = {CLOBBER};
    }
}


mult96by96to192 (guint32 alo, guint32 ami, guint32 ahi, guint32 blo, guint32 bmi, guint32 bhi, guint64 * pclo, guint64 * pcmi, guint64 * pchi)
{
  long long unsigned int D.11497;
  long long unsigned int D.11498;
  long long unsigned int D.11499;
  long long unsigned int D.11500;
  long long unsigned int D.11505;
  long long unsigned int D.11506;
  long long unsigned int D.11513;
  long long unsigned int D.11518;
  long long unsigned int D.11519;
  long long unsigned int D.11520;
  long long unsigned int D.11521;
  long long unsigned int D.11522;
  long long unsigned int D.11523;
  long long unsigned int D.11524;
  long long unsigned int D.11525;
  long long unsigned int D.11526;
  long long unsigned int D.11527;
  long long unsigned int D.11528;
  long long unsigned int D.11529;
  long long unsigned int D.11530;
  guint64 a;
  guint64 b;
  guint64 c;
  guint64 d;
  guint32 h0;
  guint32 h1;
  guint32 h2;
  guint32 h3;
  guint32 h4;
  guint32 h5;
  int carry0;
  int carry1;

  D.11497 = (long long unsigned int) alo;
  D.11498 = (long long unsigned int) blo;
  a = D.11497 * D.11498;
  h0 = (guint32) a;
  a = a >> 32;
  carry0 = 0;
  D.11497 = (long long unsigned int) alo;
  D.11499 = (long long unsigned int) bmi;
  b = D.11497 * D.11499;
  D.11500 = (long long unsigned int) ami;
  D.11498 = (long long unsigned int) blo;
  c = D.11500 * D.11498;
  a = a + b;
  if (a < b) goto <D.11501>; else goto <D.11502>;
  <D.11501>:
  carry0 = carry0 + 1;
  <D.11502>:
  a = a + c;
  if (a < c) goto <D.11503>; else goto <D.11504>;
  <D.11503>:
  carry0 = carry0 + 1;
  <D.11504>:
  h1 = (guint32) a;
  a = a >> 32;
  carry1 = 0;
  D.11497 = (long long unsigned int) alo;
  D.11505 = (long long unsigned int) bhi;
  b = D.11497 * D.11505;
  D.11500 = (long long unsigned int) ami;
  D.11499 = (long long unsigned int) bmi;
  c = D.11500 * D.11499;
  D.11506 = (long long unsigned int) ahi;
  D.11498 = (long long unsigned int) blo;
  d = D.11506 * D.11498;
  a = a + b;
  if (a < b) goto <D.11507>; else goto <D.11508>;
  <D.11507>:
  carry1 = carry1 + 1;
  <D.11508>:
  a = a + c;
  if (a < c) goto <D.11509>; else goto <D.11510>;
  <D.11509>:
  carry1 = carry1 + 1;
  <D.11510>:
  a = a + d;
  if (a < d) goto <D.11511>; else goto <D.11512>;
  <D.11511>:
  carry1 = carry1 + 1;
  <D.11512>:
  h2 = (guint32) a;
  a = a >> 32;
  D.11513 = (long long unsigned int) carry0;
  a = D.11513 + a;
  carry0 = 0;
  D.11500 = (long long unsigned int) ami;
  D.11505 = (long long unsigned int) bhi;
  b = D.11500 * D.11505;
  D.11506 = (long long unsigned int) ahi;
  D.11499 = (long long unsigned int) bmi;
  c = D.11506 * D.11499;
  a = a + b;
  if (a < b) goto <D.11514>; else goto <D.11515>;
  <D.11514>:
  carry0 = carry0 + 1;
  <D.11515>:
  a = a + c;
  if (a < c) goto <D.11516>; else goto <D.11517>;
  <D.11516>:
  carry0 = carry0 + 1;
  <D.11517>:
  h3 = (guint32) a;
  a = a >> 32;
  D.11518 = (long long unsigned int) carry1;
  a = D.11518 + a;
  D.11506 = (long long unsigned int) ahi;
  D.11505 = (long long unsigned int) bhi;
  b = D.11506 * D.11505;
  a = a + b;
  h4 = (guint32) a;
  a = a >> 32;
  D.11513 = (long long unsigned int) carry0;
  a = D.11513 + a;
  h5 = (guint32) a;
  D.11519 = (long long unsigned int) h1;
  D.11520 = D.11519 << 32;
  D.11521 = (long long unsigned int) h0;
  D.11522 = D.11520 | D.11521;
  *pclo = D.11522;
  D.11523 = (long long unsigned int) h3;
  D.11524 = D.11523 << 32;
  D.11525 = (long long unsigned int) h2;
  D.11526 = D.11524 | D.11525;
  *pcmi = D.11526;
  D.11527 = (long long unsigned int) h5;
  D.11528 = D.11527 << 32;
  D.11529 = (long long unsigned int) h4;
  D.11530 = D.11528 | D.11529;
  *pchi = D.11530;
}


div192by32 (guint64 * plo, guint64 * pmi, guint64 * phi, guint32 factor)
{
  long long unsigned int D.11531;
  unsigned int D.11532;
  long long unsigned int D.11533;
  long long unsigned int D.11534;
  unsigned int D.11535;
  long long unsigned int D.11536;
  long long unsigned int D.11537;
  long long unsigned int D.11538;
  unsigned int D.11539;
  long long unsigned int D.11540;
  long long unsigned int D.11541;
  long long unsigned int D.11542;
  guint64 a;
  guint64 b;
  guint64 c;
  guint64 h;

  h = *phi;
  D.11531 = h >> 32;
  D.11532 = (unsigned int) D.11531;
  a = (guint64) D.11532;
  D.11533 = (long long unsigned int) factor;
  b = a / D.11533;
  D.11533 = (long long unsigned int) factor;
  D.11534 = D.11533 * b;
  a = a - D.11534;
  a = a << 32;
  D.11535 = (unsigned int) h;
  D.11536 = (long long unsigned int) D.11535;
  a = D.11536 | a;
  D.11533 = (long long unsigned int) factor;
  c = a / D.11533;
  D.11533 = (long long unsigned int) factor;
  D.11537 = D.11533 * c;
  a = a - D.11537;
  a = a << 32;
  D.11538 = b << 32;
  D.11539 = (unsigned int) c;
  D.11540 = (long long unsigned int) D.11539;
  D.11541 = D.11538 | D.11540;
  *phi = D.11541;
  h = *pmi;
  D.11531 = h >> 32;
  D.11532 = (unsigned int) D.11531;
  D.11542 = (long long unsigned int) D.11532;
  a = D.11542 | a;
  D.11533 = (long long unsigned int) factor;
  b = a / D.11533;
  D.11533 = (long long unsigned int) factor;
  D.11534 = D.11533 * b;
  a = a - D.11534;
  a = a << 32;
  D.11535 = (unsigned int) h;
  D.11536 = (long long unsigned int) D.11535;
  a = D.11536 | a;
  D.11533 = (long long unsigned int) factor;
  c = a / D.11533;
  D.11533 = (long long unsigned int) factor;
  D.11537 = D.11533 * c;
  a = a - D.11537;
  a = a << 32;
  D.11538 = b << 32;
  D.11539 = (unsigned int) c;
  D.11540 = (long long unsigned int) D.11539;
  D.11541 = D.11538 | D.11540;
  *pmi = D.11541;
  h = *plo;
  D.11531 = h >> 32;
  D.11532 = (unsigned int) D.11531;
  D.11542 = (long long unsigned int) D.11532;
  a = D.11542 | a;
  D.11533 = (long long unsigned int) factor;
  b = a / D.11533;
  D.11533 = (long long unsigned int) factor;
  D.11534 = D.11533 * b;
  a = a - D.11534;
  a = a << 32;
  D.11535 = (unsigned int) h;
  D.11536 = (long long unsigned int) D.11535;
  a = D.11536 | a;
  D.11533 = (long long unsigned int) factor;
  c = a / D.11533;
  D.11533 = (long long unsigned int) factor;
  D.11537 = D.11533 * c;
  a = a - D.11537;
  a = a << 32;
  D.11538 = b << 32;
  D.11539 = (unsigned int) c;
  D.11540 = (long long unsigned int) D.11539;
  D.11541 = D.11538 | D.11540;
  *plo = D.11541;
}


mono_decimalDiv (struct decimal_repr * pC, struct decimal_repr * pA, struct decimal_repr * pB)
{
  int D.11543;
  gint32 D.11546;
  unsigned char D.11547;
  signed char D.11548;
  _Bool D.11549;
  int D.11550;
  unsigned char D.11557;
  int D.11558;
  unsigned char D.11559;
  int D.11560;
  int scale.68;
  int texp.69;
  long long unsigned int clo.70;
  long long unsigned int chi.71;
  int scale.72;
  <unnamed-unsigned:1> D.11568;
  int D.11569;
  <unnamed-unsigned:1> D.11570;
  int D.11571;
  int D.11572;
  guint64 clo;
  guint64 chi;
  int scale;
  int texp;
  int rc;

  try
    {
      D.11543 = mono_decimalCompare (pA, pB);
      if (D.11543 == 0) goto <D.11544>; else goto <D.11545>;
      <D.11544>:
      D.11546 = pack128toDecimal (pC, 1, 0, 0, 0);
      return D.11546;
      <D.11545>:
      D.11547 = BIT_FIELD_REF <*pA, 8, 24>;
      D.11548 = (signed char) D.11547;
      D.11549 = D.11548 >= 0;
      pA->u.signscale.sign = D.11549;
      D.11550 = mono_decimalCompare (pA, pB);
      if (D.11550 == 0) goto <D.11551>; else goto <D.11552>;
      <D.11551>:
      D.11546 = pack128toDecimal (pC, 1, 0, 0, 1);
      return D.11546;
      <D.11552>:
      D.11547 = BIT_FIELD_REF <*pA, 8, 24>;
      D.11548 = (signed char) D.11547;
      D.11549 = D.11548 >= 0;
      pA->u.signscale.sign = D.11549;
      rc = decimalDivSub (pA, pB, &clo, &chi, &texp);
      if (rc != 0) goto <D.11553>; else goto <D.11554>;
      <D.11553>:
      if (rc == 1) goto <D.11555>; else goto <D.11556>;
      <D.11555>:
      rc = 0;
      <D.11556>:
      D.11546 = rc;
      return D.11546;
      <D.11554>:
      D.11557 = pA->u.signscale.scale;
      D.11558 = (int) D.11557;
      D.11559 = pB->u.signscale.scale;
      D.11560 = (int) D.11559;
      scale.68 = D.11558 - D.11560;
      scale = scale.68;
      texp.69 = texp;
      rc = rescale128 (&clo, &chi, &scale, texp.69, 0, 28, 1);
      if (rc != 0) goto <D.11563>; else goto <D.11564>;
      <D.11563>:
      D.11546 = rc;
      return D.11546;
      <D.11564>:
      clo.70 = clo;
      chi.71 = chi;
      scale.72 = scale;
      D.11568 = pA->u.signscale.sign;
      D.11569 = (int) D.11568;
      D.11570 = pB->u.signscale.sign;
      D.11571 = (int) D.11570;
      D.11572 = D.11569 ^ D.11571;
      D.11546 = pack128toDecimal (pC, clo.70, chi.71, scale.72, D.11572);
      return D.11546;
    }
  finally
    {
      clo = {CLOBBER};
      chi = {CLOBBER};
      scale = {CLOBBER};
      texp = {CLOBBER};
    }
}


decimalDivSub (struct decimal_repr * pA, struct decimal_repr * pB, guint64 * pclo, guint64 * pchi, int * pExp)
{
  unsigned int D.11575;
  long long unsigned int D.11576;
  long long unsigned int D.11577;
  unsigned int D.11578;
  long long unsigned int D.11579;
  long long unsigned int ahi.73;
  unsigned int D.11581;
  long long unsigned int D.11582;
  long long unsigned int ami.74;
  unsigned int D.11584;
  unsigned int D.11585;
  int D.11588;
  long long unsigned int ami.75;
  long long unsigned int ahi.76;
  long long unsigned int D.11591;
  long long unsigned int D.11594;
  long long unsigned int ahi.77;
  signed long long ahi.78;
  int D.11604;
  int D.11605;
  int hi_shift.79;
  unsigned int D.11607;
  unsigned int D.11609;
  signed int bhi.80;
  unsigned int D.11612;
  long long unsigned int D.11613;
  long long unsigned int D.11614;
  long long unsigned int D.11615;
  long long unsigned int D.11616;
  long long unsigned int alo.81;
  int D.11623;
  long long unsigned int D.11626;
  long long unsigned int D.11628;
  long long unsigned int D.11629;
  guint64 alo;
  guint64 ami;
  guint64 ahi;
  guint64 tlo;
  guint64 tmi;
  guint64 thi;
  guint32 blo;
  guint32 bmi;
  guint32 bhi;
  int ashift;
  int bshift;
  int extraBit;
  int texp;

  try
    {
      D.11575 = pA->hi32;
      D.11576 = (long long unsigned int) D.11575;
      D.11577 = D.11576 << 32;
      D.11578 = pA->mid32;
      D.11579 = (long long unsigned int) D.11578;
      ahi.73 = D.11577 | D.11579;
      ahi = ahi.73;
      D.11581 = pA->lo32;
      D.11582 = (long long unsigned int) D.11581;
      ami.74 = D.11582 << 32;
      ami = ami.74;
      alo = 0;
      blo = pB->lo32;
      bmi = pB->mid32;
      bhi = pB->hi32;
      D.11584 = blo | bmi;
      D.11585 = D.11584 | bhi;
      if (D.11585 == 0) goto <D.11586>; else goto <D.11587>;
      <D.11586>:
      D.11588 = 5;
      return D.11588;
      <D.11587>:
      ami.75 = ami;
      ahi.76 = ahi;
      D.11591 = ami.75 | ahi.76;
      if (D.11591 == 0) goto <D.11592>; else goto <D.11593>;
      <D.11592>:
      *pchi = 0;
      D.11594 = *pchi;
      *pclo = D.11594;
      D.11588 = 1;
      return D.11588;
      <D.11593>:
      ahi.76 = ahi;
      if (ahi.76 == 0) goto <D.11595>; else goto <D.11596>;
      <D.11595>:
      ami.75 = ami;
      ahi = ami.75;
      ami = 0;
      ashift = 64;
      goto <D.10817>;
      <D.10816>:
      ahi.76 = ahi;
      ahi.77 = ahi.76 << 1;
      ahi = ahi.77;
      ashift = ashift + 1;
      <D.10817>:
      ahi.76 = ahi;
      ahi.78 = (signed long long) ahi.76;
      if (ahi.78 >= 0) goto <D.10816>; else goto <D.10818>;
      <D.10818>:
      goto <D.11599>;
      <D.11596>:
      ashift = 0;
      goto <D.10820>;
      <D.10819>:
      lshift128 (&ami, &ahi);
      ashift = ashift + 1;
      <D.10820>:
      ahi.76 = ahi;
      ahi.78 = (signed long long) ahi.76;
      if (ahi.78 >= 0) goto <D.10819>; else goto <D.10821>;
      <D.10821>:
      <D.11599>:
      if (bhi == 0) goto <D.11600>; else goto <D.11601>;
      <D.11600>:
      if (bmi == 0) goto <D.11602>; else goto <D.11603>;
      <D.11602>:
      {
        guint32 hi_shift;

        bhi = blo;
        bmi = 0;
        blo = 0;
        D.11604 = my_g_bit_nth_msf (bhi);
        D.11605 = 31 - D.11604;
        hi_shift = (guint32) D.11605;
        hi_shift.79 = (int) hi_shift;
        bhi = bhi << hi_shift.79;
        D.11607 = hi_shift + 64;
        bshift = (int) D.11607;
      }
      goto <D.11608>;
      <D.11603>:
      bhi = bmi;
      bmi = blo;
      blo = 0;
      bshift = 32;
      goto <D.10824>;
      <D.10823>:
      bhi = bhi << 1;
      D.11609 = bmi >> 31;
      bhi = D.11609 | bhi;
      bmi = bmi << 1;
      bshift = bshift + 1;
      <D.10824>:
      bhi.80 = (signed int) bhi;
      if (bhi.80 >= 0) goto <D.10823>; else goto <D.10825>;
      <D.10825>:
      <D.11608>:
      goto <D.11611>;
      <D.11601>:
      bshift = 0;
      goto <D.10827>;
      <D.10826>:
      bhi = bhi << 1;
      D.11609 = bmi >> 31;
      bhi = D.11609 | bhi;
      bmi = bmi << 1;
      D.11612 = blo >> 31;
      bmi = D.11612 | bmi;
      blo = blo << 1;
      bshift = bshift + 1;
      <D.10827>:
      bhi.80 = (signed int) bhi;
      if (bhi.80 >= 0) goto <D.10826>; else goto <D.10828>;
      <D.10828>:
      <D.11611>:
      D.11613 = (long long unsigned int) bhi;
      D.11614 = D.11613 << 32;
      D.11615 = (long long unsigned int) bmi;
      thi = D.11614 | D.11615;
      D.11616 = (long long unsigned int) blo;
      tmi = D.11616 << 32;
      tlo = 0;
      ahi.76 = ahi;
      if (ahi.76 > thi) goto <D.11617>; else goto <D.11620>;
      <D.11620>:
      ahi.76 = ahi;
      if (ahi.76 == thi) goto <D.11621>; else goto <D.11618>;
      <D.11621>:
      ami.75 = ami;
      if (ami.75 >= tmi) goto <D.11617>; else goto <D.11618>;
      <D.11617>:
      alo.81 = alo;
      ami.75 = ami;
      ahi.76 = ahi;
      sub192 (alo.81, ami.75, ahi.76, tlo, tmi, thi, &alo, &ami, &ahi);
      extraBit = 1;
      goto <D.11619>;
      <D.11618>:
      extraBit = 0;
      <D.11619>:
      alo.81 = alo;
      ami.75 = ami;
      ahi.76 = ahi;
      div192by96to128 (alo.81, ami.75, ahi.76, blo, bmi, bhi, pclo, pchi);
      D.11623 = ashift + 128;
      texp = D.11623 - bshift;
      if (extraBit != 0) goto <D.11624>; else goto <D.11625>;
      <D.11624>:
      rshift128 (pclo, pchi);
      D.11594 = *pchi;
      D.11626 = D.11594 + 9223372036854775808;
      *pchi = D.11626;
      texp = texp + -1;
      <D.11625>:
      goto <D.10830>;
      <D.10829>:
      rshift128 (pclo, pchi);
      texp = texp + -1;
      <D.10830>:
      if (texp > 0) goto <D.11627>; else goto <D.10831>;
      <D.11627>:
      D.11628 = *pclo;
      D.11629 = D.11628 & 1;
      if (D.11629 == 0) goto <D.10829>; else goto <D.10831>;
      <D.10831>:
      *pExp = texp;
      D.11588 = 0;
      return D.11588;
    }
  finally
    {
      alo = {CLOBBER};
      ami = {CLOBBER};
      ahi = {CLOBBER};
    }
}


sub192 (guint64 alo, guint64 ami, guint64 ahi, guint64 blo, guint64 bmi, guint64 bhi, guint64 * pclo, guint64 * pcmi, guint64 * pchi)
{
  guint64 clo;
  guint64 cmi;
  guint64 chi;

  clo = alo - blo;
  cmi = ami - bmi;
  chi = ahi - bhi;
  if (alo < blo) goto <D.11632>; else goto <D.11633>;
  <D.11632>:
  if (cmi == 0) goto <D.11634>; else goto <D.11635>;
  <D.11634>:
  chi = chi + 18446744073709551615;
  <D.11635>:
  cmi = cmi + 18446744073709551615;
  <D.11633>:
  if (ami < bmi) goto <D.11636>; else goto <D.11637>;
  <D.11636>:
  chi = chi + 18446744073709551615;
  <D.11637>:
  *pclo = clo;
  *pcmi = cmi;
  *pchi = chi;
}


div192by96to128 (guint64 alo, guint64 ami, guint64 ahi, guint32 blo, guint32 bmi, guint32 bhi, guint64 * pclo, guint64 * pchi)
{
  long long unsigned int rhi.82;
  long long unsigned int rhi.88;
  long long unsigned int rmi.83;
  long long unsigned int D.11641;
  long long unsigned int rhi.84;
  long long unsigned int D.11643;
  long long unsigned int rlo.85;
  long long unsigned int D.11645;
  long long unsigned int rmi.86;
  long long unsigned int rlo.87;
  long long unsigned int D.11648;
  long long unsigned int D.11649;
  unsigned int D.11650;
  long long unsigned int D.11651;
  long long unsigned int D.11652;
  long long unsigned int D.11653;
  long long unsigned int D.11657;
  long long unsigned int D.11658;
  long long unsigned int D.11659;
  guint64 rlo;
  guint64 rmi;
  guint64 rhi;
  guint32 h;
  guint32 c;

  try
    {
      rlo = alo;
      rmi = ami;
      rhi = ahi;
      h = div192by96to32withRest (&rlo, &rmi, &rhi, blo, bmi, bhi);
      rhi.82 = rhi;
      rhi.88 = rhi.82 << 32;
      rmi.83 = rmi;
      D.11641 = rmi.83 >> 32;
      rhi.84 = rhi.88 | D.11641;
      rhi = rhi.84;
      rmi.83 = rmi;
      D.11643 = rmi.83 << 32;
      rlo.85 = rlo;
      D.11645 = rlo.85 >> 32;
      rmi.86 = D.11643 | D.11645;
      rmi = rmi.86;
      rlo.85 = rlo;
      rlo.87 = rlo.85 << 32;
      rlo = rlo.87;
      D.11648 = (long long unsigned int) h;
      D.11649 = D.11648 << 32;
      D.11650 = div192by96to32withRest (&rlo, &rmi, &rhi, blo, bmi, bhi);
      D.11651 = (long long unsigned int) D.11650;
      D.11652 = D.11649 | D.11651;
      *pchi = D.11652;
      rhi.82 = rhi;
      rhi.88 = rhi.82 << 32;
      rmi.83 = rmi;
      D.11641 = rmi.83 >> 32;
      rhi.84 = rhi.88 | D.11641;
      rhi = rhi.84;
      rmi.83 = rmi;
      D.11643 = rmi.83 << 32;
      rlo.85 = rlo;
      D.11645 = rlo.85 >> 32;
      rmi.86 = D.11643 | D.11645;
      rmi = rmi.86;
      rlo.85 = rlo;
      rlo.87 = rlo.85 << 32;
      rlo = rlo.87;
      h = div192by96to32withRest (&rlo, &rmi, &rhi, blo, bmi, bhi);
      D.11653 = (long long unsigned int) bhi;
      rhi.82 = rhi;
      if (D.11653 <= rhi.82) goto <D.11654>; else goto <D.11655>;
      <D.11654>:
      c = 4294967295;
      goto <D.11656>;
      <D.11655>:
      rhi.82 = rhi;
      rhi.88 = rhi.82 << 32;
      rhi = rhi.88;
      rhi.82 = rhi;
      D.11653 = (long long unsigned int) bhi;
      D.11657 = rhi.82 / D.11653;
      c = (guint32) D.11657;
      <D.11656>:
      D.11648 = (long long unsigned int) h;
      D.11649 = D.11648 << 32;
      D.11658 = (long long unsigned int) c;
      D.11659 = D.11649 | D.11658;
      *pclo = D.11659;
    }
  finally
    {
      rlo = {CLOBBER};
      rmi = {CLOBBER};
      rhi = {CLOBBER};
    }
}


div192by96to32withRest (guint64 * palo, guint64 * pami, guint64 * pahi, guint32 blo, guint32 bmi, guint32 bhi)
{
  long long unsigned int rlo.89;
  long long unsigned int rmi.90;
  long long unsigned int rhi.91;
  long long unsigned int D.11663;
  long long unsigned int D.11664;
  long long unsigned int rhi.92;
  long long unsigned int D.11669;
  long long unsigned int D.11670;
  long long unsigned int rlo.93;
  long long unsigned int rmi.94;
  long long unsigned int tlo.95;
  long long unsigned int thi.96;
  long long unsigned int D.11675;
  long long unsigned int D.11676;
  long long unsigned int D.11677;
  long long unsigned int D.11678;
  long long int rhi.97;
  guint32 D.11680;
  guint64 rlo;
  guint64 rmi;
  guint64 rhi;
  guint64 tlo;
  guint64 thi;
  guint32 c;

  try
    {
      rlo.89 = *palo;
      rlo = rlo.89;
      rmi.90 = *pami;
      rmi = rmi.90;
      rhi.91 = *pahi;
      rhi = rhi.91;
      D.11663 = (long long unsigned int) bhi;
      D.11664 = D.11663 << 32;
      rhi.92 = rhi;
      if (D.11664 <= rhi.92) goto <D.11666>; else goto <D.11667>;
      <D.11666>:
      c = 4294967295;
      goto <D.11668>;
      <D.11667>:
      rhi.92 = rhi;
      D.11669 = (long long unsigned int) bhi;
      D.11670 = rhi.92 / D.11669;
      c = (guint32) D.11670;
      <D.11668>:
      mult96by32to128 (blo, bmi, bhi, c, &tlo, &thi);
      rlo.93 = rlo;
      rmi.94 = rmi;
      rhi.92 = rhi;
      tlo.95 = tlo;
      thi.96 = thi;
      sub192 (rlo.93, rmi.94, rhi.92, 0, tlo.95, thi.96, &rlo, &rmi, &rhi);
      goto <D.10503>;
      <D.10502>:
      c = c + 4294967295;
      rlo.93 = rlo;
      rmi.94 = rmi;
      rhi.92 = rhi;
      D.11675 = (long long unsigned int) bmi;
      D.11676 = D.11675 << 32;
      D.11677 = (long long unsigned int) blo;
      D.11678 = D.11676 | D.11677;
      D.11669 = (long long unsigned int) bhi;
      add192 (rlo.93, rmi.94, rhi.92, 0, D.11678, D.11669, &rlo, &rmi, &rhi);
      <D.10503>:
      rhi.92 = rhi;
      rhi.97 = (long long int) rhi.92;
      if (rhi.97 < 0) goto <D.10502>; else goto <D.10504>;
      <D.10504>:
      rlo.93 = rlo;
      *palo = rlo.93;
      rmi.94 = rmi;
      *pami = rmi.94;
      rhi.92 = rhi;
      *pahi = rhi.92;
      D.11680 = c;
      return D.11680;
    }
  finally
    {
      rlo = {CLOBBER};
      rmi = {CLOBBER};
      rhi = {CLOBBER};
      tlo = {CLOBBER};
      thi = {CLOBBER};
    }
}


mult96by32to128 (guint32 alo, guint32 ami, guint32 ahi, guint32 factor, guint64 * pclo, guint64 * pchi)
{
  long long unsigned int D.11683;
  long long unsigned int D.11684;
  long long unsigned int D.11685;
  long long unsigned int D.11686;
  long long unsigned int D.11687;
  long long unsigned int D.11688;
  long long unsigned int D.11689;
  long long unsigned int D.11690;
  long long unsigned int D.11691;
  long long unsigned int D.11692;
  guint64 a;
  guint32 h0;
  guint32 h1;

  D.11683 = (long long unsigned int) alo;
  D.11684 = (long long unsigned int) factor;
  a = D.11683 * D.11684;
  h0 = (guint32) a;
  a = a >> 32;
  D.11685 = (long long unsigned int) ami;
  D.11684 = (long long unsigned int) factor;
  D.11686 = D.11685 * D.11684;
  a = D.11686 + a;
  h1 = (guint32) a;
  a = a >> 32;
  D.11687 = (long long unsigned int) ahi;
  D.11684 = (long long unsigned int) factor;
  D.11688 = D.11687 * D.11684;
  a = D.11688 + a;
  D.11689 = (long long unsigned int) h1;
  D.11690 = D.11689 << 32;
  D.11691 = (long long unsigned int) h0;
  D.11692 = D.11690 | D.11691;
  *pclo = D.11692;
  *pchi = a;
}


add192 (guint64 alo, guint64 ami, guint64 ahi, guint64 blo, guint64 bmi, guint64 bhi, guint64 * pclo, guint64 * pcmi, guint64 * pchi)
{
  alo = alo + blo;
  if (alo < blo) goto <D.11693>; else goto <D.11694>;
  <D.11693>:
  ami = ami + 1;
  if (ami == 0) goto <D.11695>; else goto <D.11696>;
  <D.11695>:
  ahi = ahi + 1;
  <D.11696>:
  <D.11694>:
  ami = ami + bmi;
  if (ami < bmi) goto <D.11697>; else goto <D.11698>;
  <D.11697>:
  ahi = ahi + 1;
  <D.11698>:
  ahi = ahi + bhi;
  *pclo = alo;
  *pcmi = ami;
  *pchi = ahi;
}


mono_decimalIntDiv (struct decimal_repr * pC, struct decimal_repr * pA, struct decimal_repr * pB)
{
  gint32 D.11703;
  unsigned char D.11704;
  int D.11705;
  unsigned char D.11706;
  int D.11707;
  int scale.98;
  int texp.99;
  long long unsigned int clo.100;
  long long unsigned int chi.101;
  int scale.102;
  <unnamed-unsigned:1> D.11715;
  int D.11716;
  guint64 clo;
  guint64 chi;
  int scale;
  int texp;
  int rc;

  try
    {
      rc = decimalDivSub (pA, pB, &clo, &chi, &texp);
      if (rc != 0) goto <D.11699>; else goto <D.11700>;
      <D.11699>:
      if (rc == 1) goto <D.11701>; else goto <D.11702>;
      <D.11701>:
      rc = 0;
      <D.11702>:
      D.11703 = rc;
      return D.11703;
      <D.11700>:
      D.11704 = pA->u.signscale.scale;
      D.11705 = (int) D.11704;
      D.11706 = pB->u.signscale.scale;
      D.11707 = (int) D.11706;
      scale.98 = D.11705 - D.11707;
      scale = scale.98;
      texp.99 = texp;
      rc = rescale128 (&clo, &chi, &scale, texp.99, 0, 0, 0);
      if (rc != 0) goto <D.11710>; else goto <D.11711>;
      <D.11710>:
      D.11703 = rc;
      return D.11703;
      <D.11711>:
      clo.100 = clo;
      chi.101 = chi;
      scale.102 = scale;
      D.11715 = pA->u.signscale.sign;
      D.11716 = (int) D.11715;
      D.11703 = pack128toDecimal (pC, clo.100, chi.101, scale.102, D.11716);
      return D.11703;
    }
  finally
    {
      clo = {CLOBBER};
      chi = {CLOBBER};
      scale = {CLOBBER};
      texp = {CLOBBER};
    }
}


mono_decimalCompare (struct decimal_repr * pA, struct decimal_repr * pB)
{
  int iftmp.103;
  unsigned char D.11720;
  unsigned char D.11721;
  unsigned char D.11725;
  unsigned char D.11726;
  signed char D.11727;
  gint32 D.11730;
  gint32 iftmp.104;
  int D.11735;
  int D.11737;
  <unnamed-unsigned:1> D.11742;
  unsigned char D.11743;
  unsigned char D.11744;
  <unnamed-unsigned:1> D.11745;
  int D.11746;
  gint32 iftmp.105;
  unsigned char D.11750;
  unsigned char D.11751;
  int log2a;
  int log2b;
  int delta;
  int sign;
  struct decimal_repr aa;

  try
    {
      D.11720 = BIT_FIELD_REF <*pA, 8, 24>;
      D.11721 = D.11720 & 128;
      if (D.11721 != 0) goto <D.11722>; else goto <D.11723>;
      <D.11722>:
      iftmp.103 = -1;
      goto <D.11724>;
      <D.11723>:
      iftmp.103 = 1;
      <D.11724>:
      sign = iftmp.103;
      D.11720 = BIT_FIELD_REF <*pA, 8, 24>;
      D.11725 = BIT_FIELD_REF <*pB, 8, 24>;
      D.11726 = D.11720 ^ D.11725;
      D.11727 = (signed char) D.11726;
      if (D.11727 < 0) goto <D.11728>; else goto <D.11729>;
      <D.11728>:
      D.11735 = decimalIsZero (pA);
      if (D.11735 == 0) goto <D.11732>; else goto <D.11736>;
      <D.11736>:
      D.11737 = decimalIsZero (pB);
      if (D.11737 == 0) goto <D.11732>; else goto <D.11733>;
      <D.11732>:
      iftmp.104 = sign;
      goto <D.11734>;
      <D.11733>:
      iftmp.104 = 0;
      <D.11734>:
      D.11730 = iftmp.104;
      return D.11730;
      <D.11729>:
      log2a = decimalLog2 (pA);
      log2b = decimalLog2 (pB);
      delta = log2a - log2b;
      if (delta < -1) goto <D.11738>; else goto <D.11739>;
      <D.11738>:
      D.11730 = -sign;
      return D.11730;
      <D.11739>:
      if (delta > 1) goto <D.11740>; else goto <D.11741>;
      <D.11740>:
      D.11730 = sign;
      return D.11730;
      <D.11741>:
      memcpy (&aa, pA, 16);
      D.11742 = aa.u.signscale.sign;
      D.11743 = (unsigned char) D.11742;
      D.11744 = 1 - D.11743;
      D.11745 = (<unnamed-unsigned:1>) D.11744;
      aa.u.signscale.sign = D.11745;
      mono_decimalIncr (&aa, pB);
      D.11746 = decimalIsZero (&aa);
      if (D.11746 != 0) goto <D.11747>; else goto <D.11748>;
      <D.11747>:
      D.11730 = 0;
      return D.11730;
      <D.11748>:
      D.11750 = BIT_FIELD_REF <aa, 8, 24>;
      D.11751 = D.11750 & 128;
      if (D.11751 != 0) goto <D.11752>; else goto <D.11753>;
      <D.11752>:
      iftmp.105 = 1;
      goto <D.11754>;
      <D.11753>:
      iftmp.105 = -1;
      <D.11754>:
      D.11730 = iftmp.105;
      return D.11730;
    }
  finally
    {
      aa = {CLOBBER};
    }
}


decimalLog2 (struct decimal_repr * pA)
{
  unsigned char D.11757;
  unsigned int D.11758;
  int D.11761;
  unsigned int D.11763;
  int D.11766;
  unsigned int D.11768;
  int D.11771;
  int D.11772;
  int D.11773;
  int tlog2;
  int scale;

  D.11757 = pA->u.signscale.scale;
  scale = (int) D.11757;
  D.11758 = pA->hi32;
  if (D.11758 != 0) goto <D.11759>; else goto <D.11760>;
  <D.11759>:
  D.11758 = pA->hi32;
  D.11761 = log2_32 (D.11758);
  tlog2 = D.11761 + 64;
  goto <D.11762>;
  <D.11760>:
  D.11763 = pA->mid32;
  if (D.11763 != 0) goto <D.11764>; else goto <D.11765>;
  <D.11764>:
  D.11763 = pA->mid32;
  D.11766 = log2_32 (D.11763);
  tlog2 = D.11766 + 32;
  goto <D.11767>;
  <D.11765>:
  D.11768 = pA->lo32;
  tlog2 = log2_32 (D.11768);
  <D.11767>:
  <D.11762>:
  if (tlog2 != -1000) goto <D.11769>; else goto <D.11770>;
  <D.11769>:
  D.11771 = scale * 33219;
  D.11772 = D.11771 / -10000;
  tlog2 = D.11772 + tlog2;
  <D.11770>:
  D.11773 = tlog2;
  return D.11773;
}


log2_32 (guint32 a)
{
  int D.11777;
  int D.11778;

  if (a == 0) goto <D.11775>; else goto <D.11776>;
  <D.11775>:
  D.11777 = -1000;
  return D.11777;
  <D.11776>:
  D.11778 = my_g_bit_nth_msf (a);
  D.11777 = D.11778 + 1;
  return D.11777;
}


memcpy (void * restrict __dest, const void * restrict __src, size_t __len)
{
  void * D.11780;
  unsigned int D.11781;

  D.11781 = __builtin_object_size (__dest, 0);
  D.11780 = __builtin___memcpy_chk (__dest, __src, __len, D.11781);
  return D.11780;
}


decimalIsZero (struct decimal_repr * pA)
{
  int D.11783;
  int iftmp.106;
  unsigned int D.11787;
  unsigned int D.11789;
  unsigned int D.11791;

  D.11787 = pA->lo32;
  if (D.11787 == 0) goto <D.11788>; else goto <D.11785>;
  <D.11788>:
  D.11789 = pA->mid32;
  if (D.11789 == 0) goto <D.11790>; else goto <D.11785>;
  <D.11790>:
  D.11791 = pA->hi32;
  if (D.11791 == 0) goto <D.11792>; else goto <D.11785>;
  <D.11792>:
  iftmp.106 = 1;
  goto <D.11786>;
  <D.11785>:
  iftmp.106 = 0;
  <D.11786>:
  D.11783 = iftmp.106;
  return D.11783;
}


mono_decimal2double (struct decimal_repr * pA)
{
  unsigned int D.11794;
  long long unsigned int D.11795;
  long long unsigned int D.11796;
  unsigned int D.11797;
  long long unsigned int D.11798;
  long long unsigned int ahi.107;
  unsigned int D.11800;
  long long unsigned int D.11801;
  long long unsigned int alo.108;
  long long unsigned int ahi.109;
  long long unsigned int alo.110;
  long long unsigned int D.11805;
  double D.11808;
  unsigned char D.11809;
  signed long long ahi.111;
  long long unsigned int D.11811;
  int D.11814;
  int D.11815;
  unsigned int D.11818;
  unsigned int D.11819;
  unsigned int log5.112;
  unsigned int D.11821;
  unsigned int D.11825;
  unsigned int D.11826;
  long long unsigned int ahi.113;
  long long unsigned int ahi.114;
  unsigned int D.11832;
  long long unsigned int ahi.115;
  long long unsigned int D.11836;
  <unnamed-unsigned:1> D.11837;
  int D.11838;
  int D.11839;
  double d;
  guint64 alo;
  guint64 ahi;
  guint64 mantisse;
  guint32 overhang;
  guint32 factor;
  guint32 roundBits;
  int scale;
  int texp;
  int log5;
  int i;

  try
    {
      D.11794 = pA->hi32;
      D.11795 = (long long unsigned int) D.11794;
      D.11796 = D.11795 << 32;
      D.11797 = pA->mid32;
      D.11798 = (long long unsigned int) D.11797;
      ahi.107 = D.11796 | D.11798;
      ahi = ahi.107;
      D.11800 = pA->lo32;
      D.11801 = (long long unsigned int) D.11800;
      alo.108 = D.11801 << 32;
      alo = alo.108;
      ahi.109 = ahi;
      alo.110 = alo;
      D.11805 = ahi.109 | alo.110;
      if (D.11805 == 0) goto <D.11806>; else goto <D.11807>;
      <D.11806>:
      D.11808 = 0.0;
      return D.11808;
      <D.11807>:
      texp = 0;
      D.11809 = pA->u.signscale.scale;
      scale = (int) D.11809;
      goto <D.10894>;
      <D.10893>:
      goto <D.10891>;
      <D.10890>:
      lshift128 (&alo, &ahi);
      texp = texp + 1;
      <D.10891>:
      ahi.109 = ahi;
      ahi.111 = (signed long long) ahi.109;
      if (ahi.111 >= 0) goto <D.10890>; else goto <D.10892>;
      <D.10892>:
      ahi.109 = ahi;
      D.11811 = ahi.109 >> 32;
      overhang = (guint32) D.11811;
      if (overhang > 4) goto <D.11812>; else goto <D.11813>;
      <D.11812>:
      D.11814 = log2_32 (overhang);
      D.11815 = D.11814 * 1000;
      log5 = D.11815 / 2322;
      if (log5 <= 8) goto <D.11816>; else goto <D.11817>;
      <D.11816>:
      D.11818 = constantsDecadeInt32Factors[log5];
      factor = D.11818 >> log5;
      D.11819 = overhang / factor;
      log5.112 = (unsigned int) log5;
      D.11821 = D.11819 + log5.112;
      i = (int) D.11821;
      goto <D.11822>;
      <D.11817>:
      i = 9;
      <D.11822>:
      if (i > scale) goto <D.11823>; else goto <D.11824>;
      <D.11823>:
      i = scale;
      <D.11824>:
      D.11825 = constantsDecadeInt32Factors[i];
      factor = D.11825 >> i;
      div128by32 (&alo, &ahi, factor, 0B);
      scale = scale - i;
      texp = texp + i;
      <D.11813>:
      <D.10894>:
      if (scale > 0) goto <D.10893>; else goto <D.10895>;
      <D.10895>:
      goto <D.10897>;
      <D.10896>:
      lshift128 (&alo, &ahi);
      texp = texp + 1;
      <D.10897>:
      ahi.109 = ahi;
      ahi.111 = (signed long long) ahi.109;
      if (ahi.111 >= 0) goto <D.10896>; else goto <D.10898>;
      <D.10898>:
      ahi.109 = ahi;
      D.11826 = (unsigned int) ahi.109;
      roundBits = D.11826 & 2047;
      ahi.109 = ahi;
      ahi.113 = ahi.109 + 1024;
      ahi = ahi.113;
      ahi.109 = ahi;
      ahi.111 = (signed long long) ahi.109;
      if (ahi.111 >= 0) goto <D.11828>; else goto <D.11829>;
      <D.11828>:
      ahi.109 = ahi;
      ahi.114 = ahi.109 >> 1;
      ahi = ahi.114;
      texp = texp + -1;
      goto <D.11831>;
      <D.11829>:
      D.11832 = roundBits & 1024;
      if (D.11832 == 0) goto <D.11833>; else goto <D.11834>;
      <D.11833>:
      ahi.109 = ahi;
      ahi.115 = ahi.109 & 18446744073709551614;
      ahi = ahi.115;
      <D.11834>:
      <D.11831>:
      ahi.109 = ahi;
      D.11836 = ahi.109 & 9223372036854775807;
      mantisse = D.11836 >> 11;
      D.11837 = pA->u.signscale.sign;
      D.11838 = (int) D.11837;
      D.11839 = 95 - texp;
      buildIEEE754Double (&d, D.11838, D.11839, mantisse);
      D.11808 = d;
      return D.11808;
    }
  finally
    {
      d = {CLOBBER};
      alo = {CLOBBER};
      ahi = {CLOBBER};
    }
}


buildIEEE754Double (double * pd, int sign, int texp, guint64 mantisse)
{
  long long unsigned int D.11842;
  long long unsigned int D.11843;
  int D.11844;
  unsigned int D.11845;
  long long unsigned int D.11846;
  long long unsigned int D.11847;
  long long unsigned int D.11848;
  long long unsigned int D.11849;
  long long unsigned int D.11850;
  guint64 * p;

  p = pd;
  D.11842 = (long long unsigned int) sign;
  D.11843 = D.11842 << 63;
  D.11844 = texp + 1023;
  D.11845 = (unsigned int) D.11844;
  D.11846 = (long long unsigned int) D.11845;
  D.11847 = D.11846 & 2047;
  D.11848 = D.11847 << 52;
  D.11849 = D.11843 | D.11848;
  D.11850 = D.11849 | mantisse;
  *p = D.11850;
}


mono_decimalSetExponent (struct decimal_repr * pA, gint32 texp)
{
  unsigned char D.11851;
  int scale.116;
  int scale.117;
  int scale.118;
  unsigned int scale.119;
  unsigned int D.11858;
  long long unsigned int D.11859;
  long long unsigned int D.11860;
  unsigned int D.11861;
  long long unsigned int D.11862;
  long long unsigned int alo.120;
  unsigned int D.11864;
  long long unsigned int ahi.121;
  gint32 D.11868;
  long long unsigned int alo.122;
  long long unsigned int ahi.123;
  <unnamed-unsigned:1> D.11871;
  int D.11872;
  unsigned char D.11873;
  guint64 alo;
  guint64 ahi;
  int rc;
  int scale;

  try
    {
      D.11851 = pA->u.signscale.scale;
      scale.116 = (int) D.11851;
      scale = scale.116;
      scale.117 = scale;
      scale.118 = scale.117 - texp;
      scale = scale.118;
      scale.117 = scale;
      scale.119 = (unsigned int) scale.117;
      if (scale.119 > 28) goto <D.11856>; else goto <D.11857>;
      <D.11856>:
      D.11858 = pA->mid32;
      D.11859 = (long long unsigned int) D.11858;
      D.11860 = D.11859 << 32;
      D.11861 = pA->lo32;
      D.11862 = (long long unsigned int) D.11861;
      alo.120 = D.11860 | D.11862;
      alo = alo.120;
      D.11864 = pA->hi32;
      ahi.121 = (long long unsigned int) D.11864;
      ahi = ahi.121;
      rc = rescale128 (&alo, &ahi, &scale, 0, 0, 28, 1);
      if (rc != 0) goto <D.11866>; else goto <D.11867>;
      <D.11866>:
      D.11868 = rc;
      return D.11868;
      <D.11867>:
      alo.122 = alo;
      ahi.123 = ahi;
      scale.117 = scale;
      D.11871 = pA->u.signscale.sign;
      D.11872 = (int) D.11871;
      D.11868 = pack128toDecimal (pA, alo.122, ahi.123, scale.117, D.11872);
      return D.11868;
      <D.11857>:
      scale.117 = scale;
      D.11873 = (unsigned char) scale.117;
      pA->u.signscale.scale = D.11873;
      D.11868 = 0;
      return D.11868;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
      scale = {CLOBBER};
    }
}


