mono_decimalIncr (struct decimal_repr * pA, struct decimal_repr * pB)
{
  unsigned int D.8069;
  long long unsigned int D.8070;
  long long unsigned int D.8071;
  unsigned int D.8072;
  long long unsigned int D.8073;
  long long unsigned int alo.0;
  unsigned int D.8075;
  long long unsigned int ahi.1;
  unsigned int D.8077;
  long long unsigned int D.8078;
  long long unsigned int D.8079;
  unsigned int D.8080;
  long long unsigned int D.8081;
  long long unsigned int blo.2;
  unsigned int D.8083;
  long long unsigned int bhi.3;
  <unnamed-unsigned:1> D.8085;
  <unnamed-unsigned:1> D.8086;
  int D.8087;
  unsigned char D.8088;
  int scaleA.4;
  unsigned char D.8090;
  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.8109;
  int D.8114;
  int D.8115;
  int D.8118;
  int scaleA.15;
  int D.8122;
  gint32 D.8125;
  int D.8126;
  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.8069 = pA->mid32;
      D.8070 = (long long unsigned int) D.8069;
      D.8071 = D.8070 << 32;
      D.8072 = pA->lo32;
      D.8073 = (long long unsigned int) D.8072;
      alo.0 = D.8071 | D.8073;
      alo = alo.0;
      D.8075 = pA->hi32;
      ahi.1 = (long long unsigned int) D.8075;
      ahi = ahi.1;
      D.8077 = pB->mid32;
      D.8078 = (long long unsigned int) D.8077;
      D.8079 = D.8078 << 32;
      D.8080 = pB->lo32;
      D.8081 = (long long unsigned int) D.8080;
      blo.2 = D.8079 | D.8081;
      blo = blo.2;
      D.8083 = pB->hi32;
      bhi.3 = (long long unsigned int) D.8083;
      bhi = bhi.3;
      D.8085 = pA->u.signscale.sign;
      sign = (int) D.8085;
      D.8086 = pB->u.signscale.sign;
      D.8087 = (int) D.8086;
      subFlag = sign - D.8087;
      D.8088 = pA->u.signscale.scale;
      scaleA.4 = (int) D.8088;
      scaleA = scaleA.4;
      D.8090 = pB->u.signscale.scale;
      scaleB = (int) D.8090;
      scaleA.5 = scaleA;
      if (scaleA.5 == scaleB) goto <D.8092>; else goto <D.8093>;
      <D.8092>:
      if (subFlag != 0) goto <D.8094>; else goto <D.8095>;
      <D.8094>:
      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.8101>; else goto <D.8102>;
      <D.8101>:
      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.8105>; else goto <D.8106>;
      <D.8105>:
      ahi.7 = ahi;
      ahi.13 = ahi.7 + 18446744073709551615;
      ahi = ahi.13;
      <D.8106>:
      ahi.7 = ahi;
      ahi.14 = ~ahi.7;
      ahi = ahi.14;
      D.8109 = sign == 0;
      sign = (int) D.8109;
      <D.8102>:
      goto <D.8110>;
      <D.8095>:
      alo.6 = alo;
      ahi.7 = ahi;
      blo.8 = blo;
      bhi.9 = bhi;
      add128 (alo.6, ahi.7, blo.8, bhi.9, &alo, &ahi);
      <D.8110>:
      rc = normalize128 (&alo, &ahi, &scaleA, 1, 0);
      goto <D.8111>;
      <D.8093>:
      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.8112>; else goto <D.8113>;
      <D.8112>:
      log2Result = log2Result + 1;
      <D.8113>:
      D.8114 = log2Result * 1000;
      D.8115 = D.8114 / 3322;
      log10Result = D.8115 + 1;
      scaleA.5 = scaleA;
      if (scaleB > scaleA.5) goto <D.8116>; else goto <D.8117>;
      <D.8116>:
      scaleA = scaleB;
      <D.8117>:
      scaleA.5 = scaleA;
      D.8118 = scaleA.5 + log10Result;
      if (D.8118 > 35) goto <D.8119>; else goto <D.8120>;
      <D.8119>:
      scaleA.15 = 35 - log10Result;
      scaleA = scaleA.15;
      <D.8120>:
      scaleA.5 = scaleA;
      D.8088 = pA->u.signscale.scale;
      scaleA.4 = (int) D.8088;
      D.8122 = scaleA.5 - scaleA.4;
      rc = adjustScale128 (&alo, &ahi, D.8122);
      if (rc != 0) goto <D.8123>; else goto <D.8124>;
      <D.8123>:
      D.8125 = rc;
      return D.8125;
      <D.8124>:
      scaleA.5 = scaleA;
      D.8126 = scaleA.5 - scaleB;
      rc = adjustScale128 (&blo, &bhi, D.8126);
      if (rc != 0) goto <D.8127>; else goto <D.8128>;
      <D.8127>:
      D.8125 = rc;
      return D.8125;
      <D.8128>:
      if (subFlag != 0) goto <D.8129>; else goto <D.8130>;
      <D.8129>:
      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.8131>; else goto <D.8132>;
      <D.8131>:
      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.8133>; else goto <D.8134>;
      <D.8133>:
      ahi.7 = ahi;
      ahi.13 = ahi.7 + 18446744073709551615;
      ahi = ahi.13;
      <D.8134>:
      ahi.7 = ahi;
      ahi.14 = ~ahi.7;
      ahi = ahi.14;
      D.8109 = sign == 0;
      sign = (int) D.8109;
      <D.8132>:
      goto <D.8135>;
      <D.8130>:
      alo.6 = alo;
      ahi.7 = ahi;
      blo.8 = blo;
      bhi.9 = bhi;
      add128 (alo.6, ahi.7, blo.8, bhi.9, &alo, &ahi);
      <D.8135>:
      rc = rescale128 (&alo, &ahi, &scaleA, 0, 0, 28, 1);
      <D.8111>:
      if (rc != 0) goto <D.8136>; else goto <D.8137>;
      <D.8136>:
      D.8125 = rc;
      return D.8125;
      <D.8137>:
      alo.6 = alo;
      ahi.7 = ahi;
      scaleA.5 = scaleA;
      D.8125 = pack128toDecimal (pA, alo.6, ahi.7, scaleA.5, sign);
      return D.8125;
    }
  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.8140;
  long long unsigned int D.8141;
  unsigned int D.8142;
  int D.8146;
  long long unsigned int D.8151;
  int D.8154;
  guint32 overhang;
  int scale;
  int deltaScale;

  D.8140 = *pchi;
  D.8141 = D.8140 >> 32;
  overhang = (guint32) D.8141;
  scale = *pScale;
  goto <D.7699>;
  <D.7698>:
  deltaScale = 1;
  goto <D.7697>;
  <D.7696>:
  D.8142 = constantsDecadeInt32Factors[deltaScale];
  if (D.8142 > overhang) goto <D.7695>; else goto <D.8143>;
  <D.8143>:
  deltaScale = deltaScale + 1;
  <D.7697>:
  if (deltaScale <= 8) goto <D.7696>; else goto <D.7695>;
  <D.7695>:
  scale = scale - deltaScale;
  if (scale < 0) goto <D.8144>; else goto <D.8145>;
  <D.8144>:
  D.8146 = 2;
  return D.8146;
  <D.8145>:
  D.8142 = constantsDecadeInt32Factors[deltaScale];
  roundBit = div128by32 (pclo, pchi, D.8142, 0B);
  D.8140 = *pchi;
  D.8141 = D.8140 >> 32;
  overhang = (guint32) D.8141;
  if (roundFlag != 0) goto <D.8147>; else goto <D.8148>;
  <D.8147>:
  if (roundBit != 0) goto <D.8149>; else goto <D.8150>;
  <D.8149>:
  D.8151 = *pclo;
  if (D.8151 == 18446744073709551615) goto <D.8152>; else goto <D.8153>;
  <D.8152>:
  D.8140 = *pchi;
  D.8154 = (int) D.8140;
  if (D.8154 == -1) goto <D.8155>; else goto <D.8156>;
  <D.8155>:
  overhang = 1;
  <D.8156>:
  <D.8153>:
  <D.8150>:
  <D.8148>:
  <D.7699>:
  if (overhang != 0) goto <D.7698>; else goto <D.7700>;
  <D.7700>:
  *pScale = scale;
  if (roundFlag != 0) goto <D.8157>; else goto <D.8158>;
  <D.8157>:
  if (roundBit != 0) goto <D.8159>; else goto <D.8160>;
  <D.8159>:
  roundUp128 (pclo, pchi);
  <D.8160>:
  <D.8158>:
  D.8146 = 0;
  return D.8146;
}


div128by32 (guint64 * plo, guint64 * phi, guint32 factor, guint32 * pRest)
{
  long long unsigned int D.8162;
  unsigned int D.8163;
  long long unsigned int D.8164;
  long long unsigned int D.8165;
  unsigned int D.8166;
  long long unsigned int D.8167;
  long long unsigned int D.8168;
  long long unsigned int D.8169;
  unsigned int D.8170;
  long long unsigned int D.8171;
  long long unsigned int D.8172;
  long long unsigned int D.8173;
  unsigned int D.8176;
  int D.8177;
  int iftmp.16;
  long long unsigned int D.8184;
  guint64 a;
  guint64 b;
  guint64 c;
  guint64 h;

  h = *phi;
  D.8162 = h >> 32;
  D.8163 = (unsigned int) D.8162;
  a = (guint64) D.8163;
  D.8164 = (long long unsigned int) factor;
  b = a / D.8164;
  D.8164 = (long long unsigned int) factor;
  D.8165 = D.8164 * b;
  a = a - D.8165;
  a = a << 32;
  D.8166 = (unsigned int) h;
  D.8167 = (long long unsigned int) D.8166;
  a = D.8167 | a;
  D.8164 = (long long unsigned int) factor;
  c = a / D.8164;
  D.8164 = (long long unsigned int) factor;
  D.8168 = D.8164 * c;
  a = a - D.8168;
  a = a << 32;
  D.8169 = b << 32;
  D.8170 = (unsigned int) c;
  D.8171 = (long long unsigned int) D.8170;
  D.8172 = D.8169 | D.8171;
  *phi = D.8172;
  h = *plo;
  D.8162 = h >> 32;
  D.8163 = (unsigned int) D.8162;
  D.8173 = (long long unsigned int) D.8163;
  a = D.8173 | a;
  D.8164 = (long long unsigned int) factor;
  b = a / D.8164;
  D.8164 = (long long unsigned int) factor;
  D.8165 = D.8164 * b;
  a = a - D.8165;
  a = a << 32;
  D.8166 = (unsigned int) h;
  D.8167 = (long long unsigned int) D.8166;
  a = D.8167 | a;
  D.8164 = (long long unsigned int) factor;
  c = a / D.8164;
  D.8164 = (long long unsigned int) factor;
  D.8168 = D.8164 * c;
  a = a - D.8168;
  D.8169 = b << 32;
  D.8170 = (unsigned int) c;
  D.8171 = (long long unsigned int) D.8170;
  D.8172 = D.8169 | D.8171;
  *plo = D.8172;
  if (pRest != 0B) goto <D.8174>; else goto <D.8175>;
  <D.8174>:
  D.8176 = (unsigned int) a;
  *pRest = D.8176;
  <D.8175>:
  a = a << 1;
  D.8164 = (long long unsigned int) factor;
  if (D.8164 <= a) goto <D.8179>; else goto <D.8182>;
  <D.8182>:
  D.8164 = (long long unsigned int) factor;
  if (D.8164 == a) goto <D.8183>; else goto <D.8180>;
  <D.8183>:
  D.8184 = c & 1;
  if (D.8184 != 0) goto <D.8179>; else goto <D.8180>;
  <D.8179>:
  iftmp.16 = 1;
  goto <D.8181>;
  <D.8180>:
  iftmp.16 = 0;
  <D.8181>:
  D.8177 = iftmp.16;
  return D.8177;
}


roundUp128 (guint64 * pclo, guint64 * pchi)
{
  long long unsigned int D.8186;
  long long unsigned int D.8187;
  long long unsigned int D.8190;
  long long unsigned int D.8191;

  D.8186 = *pclo;
  D.8187 = D.8186 + 1;
  *pclo = D.8187;
  D.8186 = *pclo;
  if (D.8186 == 0) goto <D.8188>; else goto <D.8189>;
  <D.8188>:
  D.8190 = *pchi;
  D.8191 = D.8190 + 1;
  *pchi = D.8191;
  <D.8189>:
}


log2withScale_128 (guint64 alo, guint64 ahi, int scale)
{
  int D.8194;
  int D.8195;
  int D.8196;
  int tlog2;

  tlog2 = log2_128 (alo, ahi);
  if (tlog2 < 0) goto <D.8192>; else goto <D.8193>;
  <D.8192>:
  tlog2 = 0;
  <D.8193>:
  D.8195 = scale * 33219;
  D.8196 = D.8195 / -10000;
  D.8194 = D.8196 + tlog2;
  return D.8194;
}


log2_128 (guint64 alo, guint64 ahi)
{
  int D.8200;
  int D.8201;

  if (ahi == 0) goto <D.8198>; else goto <D.8199>;
  <D.8198>:
  D.8200 = log2_64 (alo);
  return D.8200;
  <D.8199>:
  D.8201 = log2_64 (ahi);
  D.8200 = D.8201 + 64;
  return D.8200;
}


log2_64 (guint64 a)
{
  int D.8205;
  long long unsigned int D.8206;
  unsigned int D.8209;
  int D.8210;
  unsigned int D.8211;
  int D.8212;

  if (a == 0) goto <D.8203>; else goto <D.8204>;
  <D.8203>:
  D.8205 = -1000;
  return D.8205;
  <D.8204>:
  D.8206 = a >> 32;
  if (D.8206 == 0) goto <D.8207>; else goto <D.8208>;
  <D.8207>:
  D.8209 = (unsigned int) a;
  D.8210 = my_g_bit_nth_msf (D.8209);
  D.8205 = D.8210 + 1;
  return D.8205;
  <D.8208>:
  D.8206 = a >> 32;
  D.8211 = (unsigned int) D.8206;
  D.8212 = my_g_bit_nth_msf (D.8211);
  D.8205 = D.8212 + 33;
  return D.8205;
}


my_g_bit_nth_msf (gsize mask)
{
  long unsigned int D.8214;
  long unsigned int D.8215;
  gint D.8218;
  int i;

  i = 32;
  goto <D.7733>;
  <D.7732>:
  i = i + -1;
  D.8214 = mask >> i;
  D.8215 = D.8214 & 1;
  if (D.8215 != 0) goto <D.8216>; else goto <D.8217>;
  <D.8216>:
  D.8218 = i;
  return D.8218;
  <D.8217>:
  <D.7733>:
  if (i > 0) goto <D.7732>; else goto <D.7734>;
  <D.7734>:
  D.8218 = -1;
  return D.8218;
}


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

  if (deltaScale < 0) goto <D.8220>; else goto <D.8221>;
  <D.8220>:
  deltaScale = -deltaScale;
  if (deltaScale > 28) goto <D.8222>; else goto <D.8223>;
  <D.8222>:
  D.8224 = 3;
  return D.8224;
  <D.8223>:
  goto <D.7766>;
  <D.7765>:
  idx = MIN_EXPR <deltaScale, 9>;
  deltaScale = deltaScale - idx;
  D.8225 = constantsDecadeInt32Factors[idx];
  div128by32 (palo, pahi, D.8225, 0B);
  <D.7766>:
  if (deltaScale > 0) goto <D.7765>; else goto <D.7767>;
  <D.7767>:
  goto <D.8226>;
  <D.8221>:
  if (deltaScale > 0) goto <D.8227>; else goto <D.8228>;
  <D.8227>:
  if (deltaScale > 28) goto <D.8229>; else goto <D.8230>;
  <D.8229>:
  D.8224 = 3;
  return D.8224;
  <D.8230>:
  goto <D.7769>;
  <D.7768>:
  idx = MIN_EXPR <deltaScale, 9>;
  deltaScale = deltaScale - idx;
  D.8225 = constantsDecadeInt32Factors[idx];
  rc = mult128by32 (palo, pahi, D.8225, 0);
  if (rc != 0) goto <D.8231>; else goto <D.8232>;
  <D.8231>:
  D.8224 = rc;
  return D.8224;
  <D.8232>:
  <D.7769>:
  if (deltaScale > 0) goto <D.7768>; else goto <D.7770>;
  <D.7770>:
  <D.8228>:
  <D.8226>:
  D.8224 = 0;
  return D.8224;
}


mult128by32 (guint64 * pclo, guint64 * pchi, guint32 factor, int roundBit)
{
  long long unsigned int D.8234;
  unsigned int D.8235;
  long long unsigned int D.8236;
  long long unsigned int D.8237;
  unsigned int D.8240;
  long long unsigned int D.8241;
  long long unsigned int D.8242;
  long long unsigned int D.8243;
  long long unsigned int D.8244;
  long long unsigned int D.8245;
  long long unsigned int D.8246;
  long long unsigned int D.8247;
  long long unsigned int D.8248;
  long long unsigned int D.8249;
  unsigned int D.8250;
  long long unsigned int D.8251;
  long long unsigned int D.8252;
  long long unsigned int D.8253;
  long long unsigned int D.8254;
  int D.8255;
  int iftmp.17;
  long long unsigned int D.8257;
  guint64 a;
  guint32 h0;
  guint32 h1;

  D.8234 = *pclo;
  D.8235 = (unsigned int) D.8234;
  D.8236 = (long long unsigned int) D.8235;
  D.8237 = (long long unsigned int) factor;
  a = D.8236 * D.8237;
  if (roundBit != 0) goto <D.8238>; else goto <D.8239>;
  <D.8238>:
  D.8240 = factor / 2;
  D.8241 = (long long unsigned int) D.8240;
  a = D.8241 + a;
  <D.8239>:
  h0 = (guint32) a;
  a = a >> 32;
  D.8234 = *pclo;
  D.8242 = D.8234 >> 32;
  D.8243 = (long long unsigned int) factor;
  D.8244 = D.8242 * D.8243;
  a = D.8244 + a;
  h1 = (guint32) a;
  D.8245 = (long long unsigned int) h1;
  D.8246 = D.8245 << 32;
  D.8247 = (long long unsigned int) h0;
  D.8248 = D.8246 | D.8247;
  *pclo = D.8248;
  a = a >> 32;
  D.8249 = *pchi;
  D.8250 = (unsigned int) D.8249;
  D.8251 = (long long unsigned int) D.8250;
  D.8237 = (long long unsigned int) factor;
  D.8252 = D.8251 * D.8237;
  a = D.8252 + a;
  h0 = (guint32) a;
  a = a >> 32;
  D.8249 = *pchi;
  D.8253 = D.8249 >> 32;
  D.8243 = (long long unsigned int) factor;
  D.8254 = D.8253 * D.8243;
  a = D.8254 + a;
  h1 = (guint32) a;
  D.8245 = (long long unsigned int) h1;
  D.8246 = D.8245 << 32;
  D.8247 = (long long unsigned int) h0;
  D.8248 = D.8246 | D.8247;
  *pchi = D.8248;
  D.8257 = a >> 32;
  if (D.8257 == 0) goto <D.8258>; else goto <D.8259>;
  <D.8258>:
  iftmp.17 = 0;
  goto <D.8260>;
  <D.8259>:
  iftmp.17 = 2;
  <D.8260>:
  D.8255 = iftmp.17;
  return D.8255;
}


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.8262>; else goto <D.8263>;
  <D.8262>:
  chi = chi + 18446744073709551615;
  <D.8263>:
  *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.8264>; else goto <D.8265>;
  <D.8264>:
  ahi = ahi + 1;
  <D.8265>:
  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.8268;
  long long unsigned int D.8269;
  long long unsigned int D.8276;
  long long unsigned int D.8277;
  int D.8278;
  int D.8279;
  long long unsigned int D.8280;
  long long unsigned int D.8281;
  int D.8282;
  long long unsigned int D.8283;
  long long unsigned int D.8284;
  long long unsigned int D.8285;
  _Bool D.8286;
  long int D.8287;
  long int D.8288;
  _Bool D.8291;
  long int D.8292;
  long int D.8293;
  int D.8298;
  long long unsigned int D.8301;
  int D.8305;
  unsigned int D.8309;
  int D.8321;
  guint32 factor;
  guint32 overhang;
  int scale;
  int i;
  int rc;
  int roundBit;

  roundBit = 0;
  scale = *pScale;
  if (texp > 0) goto <D.8266>; else goto <D.8267>;
  <D.8266>:
  goto <D.7793>;
  <D.7792>:
  D.8268 = *pchi;
  D.8269 = D.8268 >> 32;
  overhang = (guint32) D.8269;
  if (overhang != 0) goto <D.8270>; else goto <D.8271>;
  <D.8270>:
  {
    int msf;
    int shift;

    msf = my_g_bit_nth_msf (overhang);
    shift = msf + -11;
    if (shift >= texp) goto <D.8272>; else goto <D.8273>;
    <D.8272>:
    shift = texp + -1;
    <D.8273>:
    if (shift > 0) goto <D.8274>; else goto <D.8275>;
    <D.8274>:
    texp = texp - shift;
    D.8276 = *pclo;
    D.8277 = D.8276 >> shift;
    D.8268 = *pchi;
    D.8278 = 1 << shift;
    D.8279 = D.8278 + -1;
    D.8280 = (long long unsigned int) D.8279;
    D.8281 = D.8268 & D.8280;
    D.8282 = 64 - shift;
    D.8283 = D.8281 << D.8282;
    D.8284 = D.8277 | D.8283;
    *pclo = D.8284;
    D.8268 = *pchi;
    D.8285 = D.8268 >> shift;
    *pchi = D.8285;
    overhang = overhang >> shift;
    D.8286 = texp <= 0;
    D.8287 = (long int) D.8286;
    D.8288 = __builtin_expect (D.8287, 0);
    if (D.8288 != 0) goto <D.8289>; else goto <D.8290>;
    <D.8289>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "decimal.c", 730, "texp > 0");
    <D.8290>:
    D.8291 = overhang <= 1024;
    D.8292 = (long int) D.8291;
    D.8293 = __builtin_expect (D.8292, 0);
    if (D.8293 != 0) goto <D.8294>; else goto <D.8295>;
    <D.8294>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "decimal.c", 731, "overhang > (2 << DECIMAL_MAX_INTFACTORS)");
    <D.8295>:
    <D.8275>:
  }
  <D.8271>:
  goto <D.7789>;
  <D.7788>:
  texp = texp + -1;
  if (texp == 0) goto <D.8296>; else goto <D.8297>;
  <D.8296>:
  D.8276 = *pclo;
  D.8298 = (int) D.8276;
  roundBit = D.8298 & 1;
  <D.8297>:
  rshift128 (pclo, pchi);
  overhang = overhang >> 1;
  <D.7789>:
  if (texp > 0) goto <D.8299>; else goto <D.7790>;
  <D.8299>:
  if (overhang > 1024) goto <D.7788>; else goto <D.8300>;
  <D.8300>:
  D.8276 = *pclo;
  D.8301 = D.8276 & 1;
  if (D.8301 == 0) goto <D.7788>; else goto <D.7790>;
  <D.7790>:
  if (texp > 9) goto <D.8302>; else goto <D.8303>;
  <D.8302>:
  i = 9;
  goto <D.8304>;
  <D.8303>:
  i = texp;
  <D.8304>:
  D.8305 = scale + i;
  if (D.8305 > maxScale) goto <D.8306>; else goto <D.8307>;
  <D.8306>:
  i = maxScale - scale;
  <D.8307>:
  if (i == 0) goto <D.7791>; else goto <D.8308>;
  <D.8308>:
  texp = texp - i;
  scale = scale + i;
  D.8309 = constantsDecadeInt32Factors[i];
  factor = D.8309 >> i;
  mult128by32 (pclo, pchi, factor, 0);
  <D.7793>:
  if (texp > 0) goto <D.8310>; else goto <D.7791>;
  <D.8310>:
  if (scale <= maxScale) goto <D.7792>; else goto <D.7791>;
  <D.7791>:
  goto <D.7795>;
  <D.7794>:
  texp = texp + -1;
  if (texp == 0) goto <D.8311>; else goto <D.8312>;
  <D.8311>:
  D.8276 = *pclo;
  D.8298 = (int) D.8276;
  roundBit = D.8298 & 1;
  <D.8312>:
  rshift128 (pclo, pchi);
  <D.7795>:
  if (texp > 0) goto <D.7794>; else goto <D.7796>;
  <D.7796>:
  <D.8267>:
  goto <D.7798>;
  <D.7797>:
  i = scale - maxScale;
  if (i > 9) goto <D.8313>; else goto <D.8314>;
  <D.8313>:
  i = 9;
  <D.8314>:
  scale = scale - i;
  D.8309 = constantsDecadeInt32Factors[i];
  roundBit = div128by32 (pclo, pchi, D.8309, 0B);
  <D.7798>:
  if (scale > maxScale) goto <D.7797>; else goto <D.7799>;
  <D.7799>:
  goto <D.7801>;
  <D.7800>:
  if (roundFlag == 0) goto <D.8315>; else goto <D.8316>;
  <D.8315>:
  roundBit = 0;
  <D.8316>:
  i = minScale - scale;
  if (i > 9) goto <D.8317>; else goto <D.8318>;
  <D.8317>:
  i = 9;
  <D.8318>:
  scale = scale + i;
  D.8309 = constantsDecadeInt32Factors[i];
  rc = mult128by32 (pclo, pchi, D.8309, roundBit);
  if (rc != 0) goto <D.8319>; else goto <D.8320>;
  <D.8319>:
  D.8321 = rc;
  return D.8321;
  <D.8320>:
  roundBit = 0;
  <D.7801>:
  if (scale < minScale) goto <D.7800>; else goto <D.7802>;
  <D.7802>:
  *pScale = scale;
  D.8321 = normalize128 (pclo, pchi, pScale, roundFlag, roundBit);
  return D.8321;
}


rshift128 (guint64 * pclo, guint64 * pchi)
{
  long long unsigned int D.8323;
  long long unsigned int D.8324;
  long long unsigned int D.8325;
  long long unsigned int D.8326;
  long long unsigned int D.8327;
  long long unsigned int D.8328;

  D.8323 = *pclo;
  D.8324 = D.8323 >> 1;
  *pclo = D.8324;
  D.8323 = *pclo;
  D.8325 = *pchi;
  D.8326 = D.8325 << 63;
  D.8327 = D.8323 | D.8326;
  *pclo = D.8327;
  D.8325 = *pchi;
  D.8328 = D.8325 >> 1;
  *pchi = D.8328;
}


pack128toDecimal (struct decimal_repr * pA, guint64 alo, guint64 ahi, int scale, int sign)
{
  unsigned int scale.18;
  long long unsigned int D.8333;
  int D.8334;
  unsigned int D.8335;
  long long unsigned int D.8336;
  unsigned int D.8337;
  unsigned int D.8338;
  unsigned char D.8339;
  <unnamed-unsigned:1> D.8340;
  unsigned char D.8341;

  scale.18 = (unsigned int) scale;
  if (scale.18 > 28) goto <D.8329>; else goto <D.8332>;
  <D.8332>:
  D.8333 = ahi >> 32;
  if (D.8333 != 0) goto <D.8329>; else goto <D.8330>;
  <D.8329>:
  D.8334 = 2;
  return D.8334;
  <D.8330>:
  D.8335 = (unsigned int) alo;
  pA->lo32 = D.8335;
  D.8336 = alo >> 32;
  D.8337 = (unsigned int) D.8336;
  pA->mid32 = D.8337;
  D.8338 = (unsigned int) ahi;
  pA->hi32 = D.8338;
  D.8339 = (unsigned char) sign;
  D.8340 = (<unnamed-unsigned:1>) D.8339;
  pA->u.signscale.sign = D.8340;
  D.8341 = (unsigned char) scale;
  pA->u.signscale.scale = D.8341;
  D.8334 = 0;
  return D.8334;
}


mono_double2decimal (struct decimal_repr * pA, double val, gint32 digits)
{
  long long unsigned int D.8343;
  signed long long D.8344;
  _Bool D.8345;
  long long unsigned int D.8346;
  short unsigned int D.8347;
  long long unsigned int D.8348;
  long long unsigned int alo.19;
  int D.8350;
  int D.8351;
  gint32 D.8355;
  int D.8361;
  long long unsigned int alo.20;
  long long unsigned int ahi.21;
  int D.8368;
  int D.8369;
  int scale.22;
  int scale.23;
  long long unsigned int D.8372;
  long long unsigned int D.8375;
  int scale.24;
  int D.8381;
  guint64 alo;
  guint64 ahi;
  guint64 * p;
  int sigDigits;
  int sign;
  int texp;
  int rc;
  int scale;
  guint16 k;

  try
    {
      p = &val;
      D.8343 = *p;
      D.8344 = (signed long long) D.8343;
      D.8345 = D.8344 < 0;
      sign = (int) D.8345;
      D.8343 = *p;
      D.8346 = D.8343 >> 52;
      D.8347 = (short unsigned int) D.8346;
      k = D.8347 & 2047;
      D.8343 = *p;
      D.8348 = D.8343 & 4503599627370495;
      alo.19 = D.8348 | 4503599627370496;
      alo = alo.19;
      ahi = 0;
      D.8350 = (int) k;
      D.8351 = D.8350 & 2047;
      texp = D.8351 + -1023;
      if (k == 2047) goto <D.8352>; else goto <D.8354>;
      <D.8354>:
      if (texp > 95) goto <D.8352>; else goto <D.8353>;
      <D.8352>:
      D.8355 = 2;
      return D.8355;
      <D.8353>:
      if (k == 0) goto <D.8356>; else goto <D.8358>;
      <D.8358>:
      if (texp < -93) goto <D.8356>; else goto <D.8357>;
      <D.8356>:
      memset (pA, 0, 16);
      D.8355 = 0;
      return D.8355;
      <D.8357>:
      texp = texp + -52;
      if (texp > 0) goto <D.8359>; else goto <D.8360>;
      <D.8359>:
      goto <D.7876>;
      <D.7875>:
      lshift128 (&alo, &ahi);
      texp = texp + -1;
      <D.7876>:
      if (texp > 0) goto <D.7875>; else goto <D.7877>;
      <D.7877>:
      <D.8360>:
      scale = 0;
      D.8361 = -texp;
      rc = rescale128 (&alo, &ahi, &scale, D.8361, 0, 28, 1);
      if (rc != 0) goto <D.8362>; else goto <D.8363>;
      <D.8362>:
      D.8355 = rc;
      return D.8355;
      <D.8363>:
      alo.20 = alo;
      ahi.21 = ahi;
      sigDigits = calcDigits (alo.20, ahi.21);
      if (sigDigits > digits) goto <D.8366>; else goto <D.8367>;
      <D.8366>:
      D.8368 = sigDigits - digits;
      div128DecadeFactor (&alo, &ahi, D.8368);
      D.8369 = digits - sigDigits;
      scale.22 = scale;
      scale.23 = D.8369 + scale.22;
      scale = scale.23;
      D.8372 = dec128decadeFactors[digits].hi;
      ahi.21 = ahi;
      if (D.8372 == ahi.21) goto <D.8373>; else goto <D.8374>;
      <D.8373>:
      D.8375 = dec128decadeFactors[digits].lo;
      alo.20 = alo;
      if (D.8375 == alo.20) goto <D.8376>; else goto <D.8377>;
      <D.8376>:
      div128by32 (&alo, &ahi, 10, 0B);
      scale.22 = scale;
      scale.24 = scale.22 + -1;
      scale = scale.24;
      <D.8377>:
      <D.8374>:
      scale.22 = scale;
      if (scale.22 < 0) goto <D.8379>; else goto <D.8380>;
      <D.8379>:
      scale.22 = scale;
      D.8381 = -scale.22;
      rc = mult128DecadeFactor (&alo, &ahi, D.8381);
      if (rc != 0) goto <D.8382>; else goto <D.8383>;
      <D.8382>:
      D.8355 = rc;
      return D.8355;
      <D.8383>:
      scale = 0;
      <D.8380>:
      <D.8367>:
      trimExcessScale (&alo, &ahi, &scale);
      alo.20 = alo;
      ahi.21 = ahi;
      scale.22 = scale;
      D.8355 = pack128toDecimal (pA, alo.20, ahi.21, scale.22, sign);
      return D.8355;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
      scale = {CLOBBER};
    }
}


memset (void * __dest, int __ch, size_t __len)
{
  int D.8388;
  int D.8393;
  void * D.8395;
  unsigned int D.8396;

  D.8388 = __builtin_constant_p (__len);
  if (D.8388 != 0) goto <D.8389>; else goto <D.8390>;
  <D.8389>:
  if (__len == 0) goto <D.8391>; else goto <D.8392>;
  <D.8391>:
  D.8393 = __builtin_constant_p (__ch);
  if (D.8393 == 0) goto <D.8386>; else goto <D.8394>;
  <D.8394>:
  if (__ch != 0) goto <D.8386>; else goto <D.8387>;
  <D.8386>:
  __warn_memset_zero_len ();
  D.8395 = __dest;
  return D.8395;
  <D.8387>:
  <D.8392>:
  <D.8390>:
  D.8396 = __builtin_object_size (__dest, 0);
  D.8395 = __builtin___memset_chk (__dest, __ch, __len, D.8396);
  return D.8395;
}


lshift128 (guint64 * pclo, guint64 * pchi)
{
  long long unsigned int D.8398;
  long long unsigned int D.8399;
  long long unsigned int D.8400;
  long long unsigned int D.8401;
  long long unsigned int D.8402;
  long long unsigned int D.8403;

  D.8398 = *pchi;
  D.8399 = D.8398 << 1;
  *pchi = D.8399;
  D.8398 = *pchi;
  D.8400 = *pclo;
  D.8401 = D.8400 >> 63;
  D.8402 = D.8398 | D.8401;
  *pchi = D.8402;
  D.8400 = *pclo;
  D.8403 = D.8400 << 1;
  *pclo = D.8403;
}


calcDigits (guint64 alo, guint64 ahi)
{
  int D.8408;
  int D.8410;
  int D.8411;
  long long unsigned int D.8414;
  long long unsigned int D.8417;
  int tlog2;
  int tlog10;

  tlog2 = 0;
  if (ahi == 0) goto <D.8404>; else goto <D.8405>;
  <D.8404>:
  if (alo == 0) goto <D.8406>; else goto <D.8407>;
  <D.8406>:
  D.8408 = 0;
  return D.8408;
  <D.8407>:
  tlog2 = log2_64 (alo);
  goto <D.8409>;
  <D.8405>:
  D.8410 = log2_64 (ahi);
  tlog2 = D.8410 + 64;
  <D.8409>:
  D.8411 = tlog2 * 1000;
  tlog10 = D.8411 / 3322;
  D.8414 = dec128decadeFactors[tlog10].hi;
  if (D.8414 > ahi) goto <D.8412>; else goto <D.8415>;
  <D.8415>:
  D.8414 = dec128decadeFactors[tlog10].hi;
  if (D.8414 == ahi) goto <D.8416>; else goto <D.8413>;
  <D.8416>:
  D.8417 = dec128decadeFactors[tlog10].lo;
  if (D.8417 > alo) goto <D.8412>; else goto <D.8413>;
  <D.8412>:
  tlog10 = tlog10 + -1;
  <D.8413>:
  D.8408 = tlog10 + 1;
  return D.8408;
}


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

  roundBit = 0;
  goto <D.7853>;
  <D.7852>:
  idx = MIN_EXPR <powerOfTen, 9>;
  powerOfTen = powerOfTen - idx;
  D.8419 = constantsDecadeInt32Factors[idx];
  roundBit = div128by32 (palo, pahi, D.8419, 0B);
  <D.7853>:
  if (powerOfTen > 0) goto <D.7852>; else goto <D.7854>;
  <D.7854>:
  if (roundBit != 0) goto <D.8420>; else goto <D.8421>;
  <D.8420>:
  roundUp128 (palo, pahi);
  <D.8421>:
}


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

  goto <D.7627>;
  <D.7626>:
  idx = MIN_EXPR <powerOfTen, 9>;
  powerOfTen = powerOfTen - idx;
  D.8422 = constantsDecadeInt32Factors[idx];
  rc = mult128by32 (pclo, pchi, D.8422, 0);
  if (rc != 0) goto <D.8423>; else goto <D.8424>;
  <D.8423>:
  D.8425 = rc;
  return D.8425;
  <D.8424>:
  <D.7627>:
  if (powerOfTen > 0) goto <D.7626>; else goto <D.7628>;
  <D.7628>:
  D.8425 = 0;
  return D.8425;
}


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.8434;
  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.7817>;
      <D.7816>:
      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.8430>; else goto <D.8431>;
      <D.8430>:
      i = i + -1;
      if (i == 0) goto <D.8432>; else goto <D.8433>;
      <D.8432>:
      return;
      <D.8433>:
      *pclo = lastlo;
      *pchi = lasthi;
      D.8434 = scale + 1;
      *pScale = D.8434;
      return;
      <D.8431>:
      <D.7817>:
      if (scale > 0) goto <D.7816>; else goto <D.7818>;
      <D.7818>:
    }
  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.8439;
  int D.8440;
  unsigned int n.29;
  gint32 D.8444;
  int iftmp.30;
  int D.8450;
  int D.8454;
  int D.8458;
  int D.8459;
  int scale.31;
  unsigned int i.32;
  unsigned int D.8470;
  gushort * D.8471;
  short unsigned int D.8472;
  int D.8473;
  sizetype i.33;
  sizetype D.8482;
  sizetype D.8483;
  gushort * D.8484;
  short unsigned int D.8485;
  int D.8486;
  int D.8491;
  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.7897>;
      <D.7896>:
      len = len + 1;
      p = p + 2;
      <D.7897>:
      D.8439 = *p;
      if (D.8439 != 0) goto <D.7896>; else goto <D.7898>;
      <D.7898>:
      p = buf;
      i = 0;
      goto <D.7901>;
      <D.7900>:
      D.8439 = *p;
      D.8440 = (int) D.8439;
      n = D.8440 + -48;
      n.29 = (unsigned int) n;
      if (n.29 > 9) goto <D.8442>; else goto <D.8443>;
      <D.8442>:
      D.8444 = 2;
      return D.8444;
      <D.8443>:
      if (n != 0) goto <D.8445>; else goto <D.8446>;
      <D.8445>:
      if (sigLen < 0) goto <D.8447>; else goto <D.8448>;
      <D.8447>:
      firstNonZero = i;
      D.8450 = len - firstNonZero;
      if (D.8450 > 29) goto <D.8451>; else goto <D.8452>;
      <D.8451>:
      iftmp.30 = firstNonZero + 29;
      goto <D.8453>;
      <D.8452>:
      iftmp.30 = len;
      <D.8453>:
      sigLen = iftmp.30;
      D.8454 = sigLen + 1;
      if (D.8454 < decrDecimal) goto <D.8455>; else goto <D.8456>;
      <D.8455>:
      D.8444 = 2;
      return D.8444;
      <D.8456>:
      <D.8448>:
      if (i >= sigLen) goto <D.7899>; else goto <D.8457>;
      <D.8457>:
      D.8458 = sigLen + -1;
      D.8459 = D.8458 - i;
      rc = incMultConstant128 (&alo, &ahi, D.8459, n);
      if (rc != 0) goto <D.8460>; else goto <D.8461>;
      <D.8460>:
      D.8444 = rc;
      return D.8444;
      <D.8461>:
      <D.8446>:
      i = i + 1;
      p = p + 2;
      <D.7901>:
      D.8439 = *p;
      if (D.8439 != 0) goto <D.7900>; else goto <D.7899>;
      <D.7899>:
      if (sigLen < 0) goto <D.8462>; else goto <D.8463>;
      <D.8462>:
      if (len > decrDecimal) goto <D.8464>; else goto <D.8465>;
      <D.8464>:
      sigLen = len;
      <D.8465>:
      <D.8463>:
      scale.31 = sigLen - decrDecimal;
      scale = scale.31;
      if (i < len) goto <D.8467>; else goto <D.8468>;
      <D.8467>:
      i.32 = (unsigned int) i;
      D.8470 = i.32 * 2;
      D.8471 = buf + D.8470;
      D.8472 = *D.8471;
      D.8473 = (int) D.8472;
      n = D.8473 + -48;
      n.29 = (unsigned int) n;
      if (n.29 > 9) goto <D.8474>; else goto <D.8475>;
      <D.8474>:
      D.8444 = 2;
      return D.8444;
      <D.8475>:
      if (n > 5) goto <D.8476>; else goto <D.8477>;
      <D.8476>:
      roundBit = 1;
      goto <D.8478>;
      <D.8477>:
      if (n == 5) goto <D.8479>; else goto <D.8480>;
      <D.8479>:
      i.33 = (sizetype) i;
      D.8482 = i.33 + 2147483647;
      D.8483 = D.8482 * 2;
      D.8484 = buf + D.8483;
      D.8485 = *D.8484;
      D.8486 = (int) D.8485;
      n = D.8486 + -48;
      i = i + 1;
      goto <D.7904>;
      <D.7903>:
      i.32 = (unsigned int) i;
      D.8470 = i.32 * 2;
      D.8471 = buf + D.8470;
      D.8472 = *D.8471;
      if (D.8472 != 48) goto <D.7902>; else goto <D.8487>;
      <D.8487>:
      i = i + 1;
      <D.7904>:
      if (i < len) goto <D.7903>; else goto <D.7902>;
      <D.7902>:
      if (i < len) goto <D.8488>; else goto <D.8490>;
      <D.8490>:
      D.8491 = n % 2;
      if (D.8491 == 1) goto <D.8488>; else goto <D.8489>;
      <D.8488>:
      roundBit = 1;
      <D.8489>:
      <D.8480>:
      <D.8478>:
      <D.8468>:
      ahi.28 = ahi;
      if (ahi.28 != 0) goto <D.8492>; else goto <D.8493>;
      <D.8492>:
      rc = normalize128 (&alo, &ahi, &scale, 1, roundBit);
      if (rc != 0) goto <D.8494>; else goto <D.8495>;
      <D.8494>:
      D.8444 = rc;
      return D.8444;
      <D.8495>:
      <D.8493>:
      alo.34 = alo;
      if (alo.34 == 0) goto <D.8498>; else goto <D.8496>;
      <D.8498>:
      ahi.28 = ahi;
      if (ahi.28 == 0) goto <D.8499>; else goto <D.8496>;
      <D.8499>:
      scale.35 = scale;
      if (scale.35 <= 0) goto <D.8501>; else goto <D.8496>;
      <D.8501>:
      D.8444 = 0;
      return D.8444;
      <D.8496>:
      alo.34 = alo;
      ahi.28 = ahi;
      scale.31 = sigLen - decrDecimal;
      D.8444 = pack128toDecimal (pA, alo.34, ahi.28, scale.31, sign);
      return D.8444;
    }
  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.8512;
  long long unsigned int D.8513;
  long long unsigned int D.8514;
  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.8506>; else goto <D.8507>;
      <D.8506>:
      factor.38 = (unsigned int) factor;
      mult128by32 (&blo, &bhi, factor.38, 0);
      bhi.39 = bhi;
      if (h > bhi.39) goto <D.8510>; else goto <D.8511>;
      <D.8510>:
      D.8512 = 2;
      return D.8512;
      <D.8511>:
      <D.8507>:
      h = *pahi;
      D.8513 = *palo;
      D.8514 = *pahi;
      blo.40 = blo;
      bhi.39 = bhi;
      add128 (D.8513, D.8514, blo.40, bhi.39, palo, pahi);
      D.8514 = *pahi;
      if (D.8514 < h) goto <D.8516>; else goto <D.8517>;
      <D.8516>:
      D.8512 = 2;
      return D.8512;
      <D.8517>:
      D.8512 = 0;
      return D.8512;
    }
  finally
    {
      blo = {CLOBBER};
      bhi = {CLOBBER};
    }
}


mono_decimal2UInt64 (struct decimal_repr * pA, guint64 * pResult)
{
  unsigned int D.8520;
  long long unsigned int D.8521;
  long long unsigned int D.8522;
  unsigned int D.8523;
  long long unsigned int D.8524;
  long long unsigned int alo.41;
  unsigned int D.8526;
  long long unsigned int ahi.42;
  unsigned char D.8528;
  long long unsigned int ahi.43;
  long long unsigned int alo.44;
  unsigned int D.8537;
  unsigned int D.8538;
  gint32 D.8539;
  guint64 alo;
  guint64 ahi;
  int scale;

  try
    {
      D.8520 = pA->mid32;
      D.8521 = (long long unsigned int) D.8520;
      D.8522 = D.8521 << 32;
      D.8523 = pA->lo32;
      D.8524 = (long long unsigned int) D.8523;
      alo.41 = D.8522 | D.8524;
      alo = alo.41;
      D.8526 = pA->hi32;
      ahi.42 = (long long unsigned int) D.8526;
      ahi = ahi.42;
      D.8528 = pA->u.signscale.scale;
      scale = (int) D.8528;
      if (scale > 0) goto <D.8529>; else goto <D.8530>;
      <D.8529>:
      div128DecadeFactor (&alo, &ahi, scale);
      <D.8530>:
      ahi.43 = ahi;
      if (ahi.43 != 0) goto <D.8531>; else goto <D.8534>;
      <D.8534>:
      alo.44 = alo;
      if (alo.44 != 0) goto <D.8536>; else goto <D.8532>;
      <D.8536>:
      D.8537 = BIT_FIELD_REF <*pA, 32, 0>;
      D.8538 = D.8537 & 2147483648;
      if (D.8538 != 0) goto <D.8531>; else goto <D.8532>;
      <D.8531>:
      D.8539 = 2;
      return D.8539;
      <D.8532>:
      alo.44 = alo;
      *pResult = alo.44;
      D.8539 = 0;
      return D.8539;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
    }
}


mono_decimal2Int64 (struct decimal_repr * pA, gint64 * pResult)
{
  unsigned int D.8542;
  long long unsigned int D.8543;
  long long unsigned int D.8544;
  unsigned int D.8545;
  long long unsigned int D.8546;
  long long unsigned int alo.45;
  unsigned int D.8548;
  long long unsigned int ahi.46;
  unsigned char D.8550;
  long long unsigned int ahi.47;
  gint32 D.8556;
  <unnamed-unsigned:1> D.8557;
  long long unsigned int alo.48;
  long long unsigned int D.8565;
  long long int D.8566;
  signed long long alo.49;
  long long int alo.50;
  guint64 alo;
  guint64 ahi;
  int sign;
  int scale;

  try
    {
      D.8542 = pA->mid32;
      D.8543 = (long long unsigned int) D.8542;
      D.8544 = D.8543 << 32;
      D.8545 = pA->lo32;
      D.8546 = (long long unsigned int) D.8545;
      alo.45 = D.8544 | D.8546;
      alo = alo.45;
      D.8548 = pA->hi32;
      ahi.46 = (long long unsigned int) D.8548;
      ahi = ahi.46;
      D.8550 = pA->u.signscale.scale;
      scale = (int) D.8550;
      if (scale > 0) goto <D.8551>; else goto <D.8552>;
      <D.8551>:
      div128DecadeFactor (&alo, &ahi, scale);
      <D.8552>:
      ahi.47 = ahi;
      if (ahi.47 != 0) goto <D.8554>; else goto <D.8555>;
      <D.8554>:
      D.8556 = 2;
      return D.8556;
      <D.8555>:
      D.8557 = pA->u.signscale.sign;
      sign = (int) D.8557;
      if (sign != 0) goto <D.8560>; else goto <D.8558>;
      <D.8560>:
      alo.48 = alo;
      if (alo.48 != 0) goto <D.8562>; else goto <D.8558>;
      <D.8562>:
      alo.48 = alo;
      if (alo.48 > 9223372036854775808) goto <D.8563>; else goto <D.8564>;
      <D.8563>:
      D.8556 = 2;
      return D.8556;
      <D.8564>:
      alo.48 = alo;
      D.8565 = -alo.48;
      D.8566 = (long long int) D.8565;
      *pResult = D.8566;
      goto <D.8559>;
      <D.8558>:
      alo.48 = alo;
      alo.49 = (signed long long) alo.48;
      if (alo.49 < 0) goto <D.8568>; else goto <D.8569>;
      <D.8568>:
      D.8556 = 2;
      return D.8556;
      <D.8569>:
      alo.48 = alo;
      alo.50 = (long long int) alo.48;
      *pResult = alo.50;
      <D.8559>:
      D.8556 = 0;
      return D.8556;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
    }
}


mono_decimalFloorAndTrunc (struct decimal_repr * pA, gint32 floorFlag)
{
  unsigned char D.8573;
  unsigned int D.8576;
  long long unsigned int D.8577;
  long long unsigned int D.8578;
  unsigned int D.8579;
  long long unsigned int D.8580;
  long long unsigned int alo.51;
  unsigned int D.8582;
  long long unsigned int ahi.52;
  <unnamed-unsigned:1> D.8584;
  int iftmp.53;
  unsigned int rest.54;
  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.8573 = pA->u.signscale.scale;
      scale = (int) D.8573;
      if (scale == 0) goto <D.8574>; else goto <D.8575>;
      <D.8574>:
      return;
      <D.8575>:
      D.8576 = pA->mid32;
      D.8577 = (long long unsigned int) D.8576;
      D.8578 = D.8577 << 32;
      D.8579 = pA->lo32;
      D.8580 = (long long unsigned int) D.8579;
      alo.51 = D.8578 | D.8580;
      alo = alo.51;
      D.8582 = pA->hi32;
      ahi.52 = (long long unsigned int) D.8582;
      ahi = ahi.52;
      D.8584 = pA->u.signscale.sign;
      sign = (int) D.8584;
      goto <D.7933>;
      <D.7932>:
      idx = MIN_EXPR <scale, 9>;
      factor = constantsDecadeInt32Factors[idx];
      scale = scale - idx;
      div128by32 (&alo, &ahi, factor, &rest);
      if (hasRest != 0) goto <D.8586>; else goto <D.8589>;
      <D.8589>:
      rest.54 = rest;
      if (rest.54 != 0) goto <D.8586>; else goto <D.8587>;
      <D.8586>:
      iftmp.53 = 1;
      goto <D.8588>;
      <D.8587>:
      iftmp.53 = 0;
      <D.8588>:
      hasRest = iftmp.53;
      <D.7933>:
      if (scale > 0) goto <D.7932>; else goto <D.7934>;
      <D.7934>:
      if (floorFlag != 0) goto <D.8591>; else goto <D.8592>;
      <D.8591>:
      if (hasRest != 0) goto <D.8593>; else goto <D.8594>;
      <D.8593>:
      if (sign != 0) goto <D.8595>; else goto <D.8596>;
      <D.8595>:
      roundUp128 (&alo, &ahi);
      <D.8596>:
      <D.8594>:
      <D.8592>:
      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.8602;
  long long unsigned int D.8603;
  long long unsigned int D.8604;
  unsigned int D.8605;
  long long unsigned int D.8606;
  long long unsigned int alo.57;
  unsigned int D.8608;
  long long unsigned int ahi.58;
  unsigned char D.8610;
  <unnamed-unsigned:1> D.8611;
  int D.8614;
  long long unsigned int alo.59;
  long long unsigned int ahi.60;
  guint64 alo;
  guint64 ahi;
  int scale;
  int sign;

  try
    {
      D.8602 = pA->mid32;
      D.8603 = (long long unsigned int) D.8602;
      D.8604 = D.8603 << 32;
      D.8605 = pA->lo32;
      D.8606 = (long long unsigned int) D.8605;
      alo.57 = D.8604 | D.8606;
      alo = alo.57;
      D.8608 = pA->hi32;
      ahi.58 = (long long unsigned int) D.8608;
      ahi = ahi.58;
      D.8610 = pA->u.signscale.scale;
      scale = (int) D.8610;
      D.8611 = pA->u.signscale.sign;
      sign = (int) D.8611;
      if (scale > decimals) goto <D.8612>; else goto <D.8613>;
      <D.8612>:
      D.8614 = scale - decimals;
      div128DecadeFactor (&alo, &ahi, D.8614);
      scale = decimals;
      <D.8613>:
      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.8617;
  unsigned int D.8618;
  unsigned int D.8619;
  unsigned int D.8620;
  unsigned int D.8621;
  unsigned int D.8622;
  unsigned char D.8623;
  int D.8624;
  unsigned char D.8625;
  int D.8626;
  int scale.61;
  <unnamed-unsigned:1> D.8628;
  int D.8629;
  <unnamed-unsigned:1> D.8630;
  int D.8631;
  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.8641;
  long long unsigned int D.8642;
  gint32 D.8645;
  long long unsigned int low.67;
  guint64 low;
  guint64 mid;
  guint64 high;
  guint32 factor;
  int scale;
  int sign;
  int rc;

  try
    {
      D.8617 = pA->lo32;
      D.8618 = pA->mid32;
      D.8619 = pA->hi32;
      D.8620 = pB->lo32;
      D.8621 = pB->mid32;
      D.8622 = pB->hi32;
      mult96by96to192 (D.8617, D.8618, D.8619, D.8620, D.8621, D.8622, &low, &mid, &high);
      D.8623 = pA->u.signscale.scale;
      D.8624 = (int) D.8623;
      D.8625 = pB->u.signscale.scale;
      D.8626 = (int) D.8625;
      scale.61 = D.8624 + D.8626;
      scale = scale.61;
      D.8628 = pA->u.signscale.sign;
      D.8629 = (int) D.8628;
      D.8630 = pB->u.signscale.sign;
      D.8631 = (int) D.8630;
      sign = D.8629 ^ D.8631;
      factor = 1000000000;
      goto <D.7955>;
      <D.7954>:
      high.62 = high;
      if (high.62 <= 99) goto <D.8633>; else goto <D.8634>;
      <D.8633>:
      factor = factor / 1000;
      scale.63 = scale;
      scale.64 = scale.63 + -6;
      scale = scale.64;
      goto <D.8637>;
      <D.8634>:
      scale.63 = scale;
      scale.65 = scale.63 + -9;
      scale = scale.65;
      <D.8637>:
      div192by32 (&low, &mid, &high, factor);
      <D.7955>:
      high.62 = high;
      if (high.62 != 0) goto <D.7954>; else goto <D.8639>;
      <D.8639>:
      mid.66 = mid;
      D.8641 = mid.66 >> 32;
      D.8642 = (long long unsigned int) factor;
      if (D.8641 >= D.8642) goto <D.7954>; else goto <D.7956>;
      <D.7956>:
      rc = rescale128 (&low, &mid, &scale, 0, 0, 28, 1);
      if (rc != 0) goto <D.8643>; else goto <D.8644>;
      <D.8643>:
      D.8645 = rc;
      return D.8645;
      <D.8644>:
      low.67 = low;
      mid.66 = mid;
      scale.63 = scale;
      D.8645 = pack128toDecimal (pA, low.67, mid.66, scale.63, sign);
      return D.8645;
    }
  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.8649;
  long long unsigned int D.8650;
  long long unsigned int D.8651;
  long long unsigned int D.8652;
  long long unsigned int D.8657;
  long long unsigned int D.8658;
  long long unsigned int D.8665;
  long long unsigned int D.8670;
  long long unsigned int D.8671;
  long long unsigned int D.8672;
  long long unsigned int D.8673;
  long long unsigned int D.8674;
  long long unsigned int D.8675;
  long long unsigned int D.8676;
  long long unsigned int D.8677;
  long long unsigned int D.8678;
  long long unsigned int D.8679;
  long long unsigned int D.8680;
  long long unsigned int D.8681;
  long long unsigned int D.8682;
  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.8649 = (long long unsigned int) alo;
  D.8650 = (long long unsigned int) blo;
  a = D.8649 * D.8650;
  h0 = (guint32) a;
  a = a >> 32;
  carry0 = 0;
  D.8649 = (long long unsigned int) alo;
  D.8651 = (long long unsigned int) bmi;
  b = D.8649 * D.8651;
  D.8652 = (long long unsigned int) ami;
  D.8650 = (long long unsigned int) blo;
  c = D.8652 * D.8650;
  a = a + b;
  if (a < b) goto <D.8653>; else goto <D.8654>;
  <D.8653>:
  carry0 = carry0 + 1;
  <D.8654>:
  a = a + c;
  if (a < c) goto <D.8655>; else goto <D.8656>;
  <D.8655>:
  carry0 = carry0 + 1;
  <D.8656>:
  h1 = (guint32) a;
  a = a >> 32;
  carry1 = 0;
  D.8649 = (long long unsigned int) alo;
  D.8657 = (long long unsigned int) bhi;
  b = D.8649 * D.8657;
  D.8652 = (long long unsigned int) ami;
  D.8651 = (long long unsigned int) bmi;
  c = D.8652 * D.8651;
  D.8658 = (long long unsigned int) ahi;
  D.8650 = (long long unsigned int) blo;
  d = D.8658 * D.8650;
  a = a + b;
  if (a < b) goto <D.8659>; else goto <D.8660>;
  <D.8659>:
  carry1 = carry1 + 1;
  <D.8660>:
  a = a + c;
  if (a < c) goto <D.8661>; else goto <D.8662>;
  <D.8661>:
  carry1 = carry1 + 1;
  <D.8662>:
  a = a + d;
  if (a < d) goto <D.8663>; else goto <D.8664>;
  <D.8663>:
  carry1 = carry1 + 1;
  <D.8664>:
  h2 = (guint32) a;
  a = a >> 32;
  D.8665 = (long long unsigned int) carry0;
  a = D.8665 + a;
  carry0 = 0;
  D.8652 = (long long unsigned int) ami;
  D.8657 = (long long unsigned int) bhi;
  b = D.8652 * D.8657;
  D.8658 = (long long unsigned int) ahi;
  D.8651 = (long long unsigned int) bmi;
  c = D.8658 * D.8651;
  a = a + b;
  if (a < b) goto <D.8666>; else goto <D.8667>;
  <D.8666>:
  carry0 = carry0 + 1;
  <D.8667>:
  a = a + c;
  if (a < c) goto <D.8668>; else goto <D.8669>;
  <D.8668>:
  carry0 = carry0 + 1;
  <D.8669>:
  h3 = (guint32) a;
  a = a >> 32;
  D.8670 = (long long unsigned int) carry1;
  a = D.8670 + a;
  D.8658 = (long long unsigned int) ahi;
  D.8657 = (long long unsigned int) bhi;
  b = D.8658 * D.8657;
  a = a + b;
  h4 = (guint32) a;
  a = a >> 32;
  D.8665 = (long long unsigned int) carry0;
  a = D.8665 + a;
  h5 = (guint32) a;
  D.8671 = (long long unsigned int) h1;
  D.8672 = D.8671 << 32;
  D.8673 = (long long unsigned int) h0;
  D.8674 = D.8672 | D.8673;
  *pclo = D.8674;
  D.8675 = (long long unsigned int) h3;
  D.8676 = D.8675 << 32;
  D.8677 = (long long unsigned int) h2;
  D.8678 = D.8676 | D.8677;
  *pcmi = D.8678;
  D.8679 = (long long unsigned int) h5;
  D.8680 = D.8679 << 32;
  D.8681 = (long long unsigned int) h4;
  D.8682 = D.8680 | D.8681;
  *pchi = D.8682;
}


div192by32 (guint64 * plo, guint64 * pmi, guint64 * phi, guint32 factor)
{
  long long unsigned int D.8683;
  unsigned int D.8684;
  long long unsigned int D.8685;
  long long unsigned int D.8686;
  unsigned int D.8687;
  long long unsigned int D.8688;
  long long unsigned int D.8689;
  long long unsigned int D.8690;
  unsigned int D.8691;
  long long unsigned int D.8692;
  long long unsigned int D.8693;
  long long unsigned int D.8694;
  guint64 a;
  guint64 b;
  guint64 c;
  guint64 h;

  h = *phi;
  D.8683 = h >> 32;
  D.8684 = (unsigned int) D.8683;
  a = (guint64) D.8684;
  D.8685 = (long long unsigned int) factor;
  b = a / D.8685;
  D.8685 = (long long unsigned int) factor;
  D.8686 = D.8685 * b;
  a = a - D.8686;
  a = a << 32;
  D.8687 = (unsigned int) h;
  D.8688 = (long long unsigned int) D.8687;
  a = D.8688 | a;
  D.8685 = (long long unsigned int) factor;
  c = a / D.8685;
  D.8685 = (long long unsigned int) factor;
  D.8689 = D.8685 * c;
  a = a - D.8689;
  a = a << 32;
  D.8690 = b << 32;
  D.8691 = (unsigned int) c;
  D.8692 = (long long unsigned int) D.8691;
  D.8693 = D.8690 | D.8692;
  *phi = D.8693;
  h = *pmi;
  D.8683 = h >> 32;
  D.8684 = (unsigned int) D.8683;
  D.8694 = (long long unsigned int) D.8684;
  a = D.8694 | a;
  D.8685 = (long long unsigned int) factor;
  b = a / D.8685;
  D.8685 = (long long unsigned int) factor;
  D.8686 = D.8685 * b;
  a = a - D.8686;
  a = a << 32;
  D.8687 = (unsigned int) h;
  D.8688 = (long long unsigned int) D.8687;
  a = D.8688 | a;
  D.8685 = (long long unsigned int) factor;
  c = a / D.8685;
  D.8685 = (long long unsigned int) factor;
  D.8689 = D.8685 * c;
  a = a - D.8689;
  a = a << 32;
  D.8690 = b << 32;
  D.8691 = (unsigned int) c;
  D.8692 = (long long unsigned int) D.8691;
  D.8693 = D.8690 | D.8692;
  *pmi = D.8693;
  h = *plo;
  D.8683 = h >> 32;
  D.8684 = (unsigned int) D.8683;
  D.8694 = (long long unsigned int) D.8684;
  a = D.8694 | a;
  D.8685 = (long long unsigned int) factor;
  b = a / D.8685;
  D.8685 = (long long unsigned int) factor;
  D.8686 = D.8685 * b;
  a = a - D.8686;
  a = a << 32;
  D.8687 = (unsigned int) h;
  D.8688 = (long long unsigned int) D.8687;
  a = D.8688 | a;
  D.8685 = (long long unsigned int) factor;
  c = a / D.8685;
  D.8685 = (long long unsigned int) factor;
  D.8689 = D.8685 * c;
  a = a - D.8689;
  a = a << 32;
  D.8690 = b << 32;
  D.8691 = (unsigned int) c;
  D.8692 = (long long unsigned int) D.8691;
  D.8693 = D.8690 | D.8692;
  *plo = D.8693;
}


mono_decimalDiv (struct decimal_repr * pC, struct decimal_repr * pA, struct decimal_repr * pB)
{
  int D.8695;
  gint32 D.8698;
  unsigned int D.8699;
  signed int D.8700;
  _Bool D.8701;
  int D.8702;
  unsigned char D.8709;
  int D.8710;
  unsigned char D.8711;
  int D.8712;
  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.8720;
  int D.8721;
  <unnamed-unsigned:1> D.8722;
  int D.8723;
  int D.8724;
  guint64 clo;
  guint64 chi;
  int scale;
  int texp;
  int rc;

  try
    {
      D.8695 = mono_decimalCompare (pA, pB);
      if (D.8695 == 0) goto <D.8696>; else goto <D.8697>;
      <D.8696>:
      D.8698 = pack128toDecimal (pC, 1, 0, 0, 0);
      return D.8698;
      <D.8697>:
      D.8699 = BIT_FIELD_REF <*pA, 32, 0>;
      D.8700 = (signed int) D.8699;
      D.8701 = D.8700 >= 0;
      pA->u.signscale.sign = D.8701;
      D.8702 = mono_decimalCompare (pA, pB);
      if (D.8702 == 0) goto <D.8703>; else goto <D.8704>;
      <D.8703>:
      D.8698 = pack128toDecimal (pC, 1, 0, 0, 1);
      return D.8698;
      <D.8704>:
      D.8699 = BIT_FIELD_REF <*pA, 32, 0>;
      D.8700 = (signed int) D.8699;
      D.8701 = D.8700 >= 0;
      pA->u.signscale.sign = D.8701;
      rc = decimalDivSub (pA, pB, &clo, &chi, &texp);
      if (rc != 0) goto <D.8705>; else goto <D.8706>;
      <D.8705>:
      if (rc == 1) goto <D.8707>; else goto <D.8708>;
      <D.8707>:
      rc = 0;
      <D.8708>:
      D.8698 = rc;
      return D.8698;
      <D.8706>:
      D.8709 = pA->u.signscale.scale;
      D.8710 = (int) D.8709;
      D.8711 = pB->u.signscale.scale;
      D.8712 = (int) D.8711;
      scale.68 = D.8710 - D.8712;
      scale = scale.68;
      texp.69 = texp;
      rc = rescale128 (&clo, &chi, &scale, texp.69, 0, 28, 1);
      if (rc != 0) goto <D.8715>; else goto <D.8716>;
      <D.8715>:
      D.8698 = rc;
      return D.8698;
      <D.8716>:
      clo.70 = clo;
      chi.71 = chi;
      scale.72 = scale;
      D.8720 = pA->u.signscale.sign;
      D.8721 = (int) D.8720;
      D.8722 = pB->u.signscale.sign;
      D.8723 = (int) D.8722;
      D.8724 = D.8721 ^ D.8723;
      D.8698 = pack128toDecimal (pC, clo.70, chi.71, scale.72, D.8724);
      return D.8698;
    }
  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.8727;
  long long unsigned int D.8728;
  long long unsigned int D.8729;
  unsigned int D.8730;
  long long unsigned int D.8731;
  long long unsigned int ahi.73;
  unsigned int D.8733;
  long long unsigned int D.8734;
  long long unsigned int ami.74;
  int D.8742;
  long long unsigned int ami.75;
  long long unsigned int ahi.76;
  long long unsigned int D.8749;
  long long unsigned int ahi.77;
  signed long long ahi.78;
  int D.8759;
  int D.8760;
  int hi_shift.79;
  unsigned int D.8762;
  unsigned int D.8764;
  signed int bhi.80;
  unsigned int D.8767;
  long long unsigned int D.8768;
  long long unsigned int D.8769;
  long long unsigned int D.8770;
  long long unsigned int D.8771;
  long long unsigned int alo.81;
  int D.8778;
  long long unsigned int D.8781;
  long long unsigned int D.8783;
  long long unsigned int D.8784;
  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.8727 = pA->hi32;
      D.8728 = (long long unsigned int) D.8727;
      D.8729 = D.8728 << 32;
      D.8730 = pA->mid32;
      D.8731 = (long long unsigned int) D.8730;
      ahi.73 = D.8729 | D.8731;
      ahi = ahi.73;
      D.8733 = pA->lo32;
      D.8734 = (long long unsigned int) D.8733;
      ami.74 = D.8734 << 32;
      ami = ami.74;
      alo = 0;
      blo = pB->lo32;
      bmi = pB->mid32;
      bhi = pB->hi32;
      if (blo == 0) goto <D.8736>; else goto <D.8737>;
      <D.8736>:
      if (bmi == 0) goto <D.8738>; else goto <D.8739>;
      <D.8738>:
      if (bhi == 0) goto <D.8740>; else goto <D.8741>;
      <D.8740>:
      D.8742 = 5;
      return D.8742;
      <D.8741>:
      <D.8739>:
      <D.8737>:
      ami.75 = ami;
      if (ami.75 == 0) goto <D.8744>; else goto <D.8745>;
      <D.8744>:
      ahi.76 = ahi;
      if (ahi.76 == 0) goto <D.8747>; else goto <D.8748>;
      <D.8747>:
      *pchi = 0;
      D.8749 = *pchi;
      *pclo = D.8749;
      D.8742 = 1;
      return D.8742;
      <D.8748>:
      <D.8745>:
      ahi.76 = ahi;
      if (ahi.76 == 0) goto <D.8750>; else goto <D.8751>;
      <D.8750>:
      ami.75 = ami;
      ahi = ami.75;
      ami = 0;
      ashift = 64;
      goto <D.7978>;
      <D.7977>:
      ahi.76 = ahi;
      ahi.77 = ahi.76 << 1;
      ahi = ahi.77;
      ashift = ashift + 1;
      <D.7978>:
      ahi.76 = ahi;
      ahi.78 = (signed long long) ahi.76;
      if (ahi.78 >= 0) goto <D.7977>; else goto <D.7979>;
      <D.7979>:
      goto <D.8754>;
      <D.8751>:
      ashift = 0;
      goto <D.7981>;
      <D.7980>:
      lshift128 (&ami, &ahi);
      ashift = ashift + 1;
      <D.7981>:
      ahi.76 = ahi;
      ahi.78 = (signed long long) ahi.76;
      if (ahi.78 >= 0) goto <D.7980>; else goto <D.7982>;
      <D.7982>:
      <D.8754>:
      if (bhi == 0) goto <D.8755>; else goto <D.8756>;
      <D.8755>:
      if (bmi == 0) goto <D.8757>; else goto <D.8758>;
      <D.8757>:
      {
        guint32 hi_shift;

        bhi = blo;
        bmi = 0;
        blo = 0;
        D.8759 = my_g_bit_nth_msf (bhi);
        D.8760 = 31 - D.8759;
        hi_shift = (guint32) D.8760;
        hi_shift.79 = (int) hi_shift;
        bhi = bhi << hi_shift.79;
        D.8762 = hi_shift + 64;
        bshift = (int) D.8762;
      }
      goto <D.8763>;
      <D.8758>:
      bhi = bmi;
      bmi = blo;
      blo = 0;
      bshift = 32;
      goto <D.7985>;
      <D.7984>:
      bhi = bhi << 1;
      D.8764 = bmi >> 31;
      bhi = D.8764 | bhi;
      bmi = bmi << 1;
      bshift = bshift + 1;
      <D.7985>:
      bhi.80 = (signed int) bhi;
      if (bhi.80 >= 0) goto <D.7984>; else goto <D.7986>;
      <D.7986>:
      <D.8763>:
      goto <D.8766>;
      <D.8756>:
      bshift = 0;
      goto <D.7988>;
      <D.7987>:
      bhi = bhi << 1;
      D.8764 = bmi >> 31;
      bhi = D.8764 | bhi;
      bmi = bmi << 1;
      D.8767 = blo >> 31;
      bmi = D.8767 | bmi;
      blo = blo << 1;
      bshift = bshift + 1;
      <D.7988>:
      bhi.80 = (signed int) bhi;
      if (bhi.80 >= 0) goto <D.7987>; else goto <D.7989>;
      <D.7989>:
      <D.8766>:
      D.8768 = (long long unsigned int) bhi;
      D.8769 = D.8768 << 32;
      D.8770 = (long long unsigned int) bmi;
      thi = D.8769 | D.8770;
      D.8771 = (long long unsigned int) blo;
      tmi = D.8771 << 32;
      tlo = 0;
      ahi.76 = ahi;
      if (ahi.76 > thi) goto <D.8772>; else goto <D.8775>;
      <D.8775>:
      ahi.76 = ahi;
      if (ahi.76 == thi) goto <D.8776>; else goto <D.8773>;
      <D.8776>:
      ami.75 = ami;
      if (ami.75 >= tmi) goto <D.8772>; else goto <D.8773>;
      <D.8772>:
      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.8774>;
      <D.8773>:
      extraBit = 0;
      <D.8774>:
      alo.81 = alo;
      ami.75 = ami;
      ahi.76 = ahi;
      div192by96to128 (alo.81, ami.75, ahi.76, blo, bmi, bhi, pclo, pchi);
      D.8778 = ashift + 128;
      texp = D.8778 - bshift;
      if (extraBit != 0) goto <D.8779>; else goto <D.8780>;
      <D.8779>:
      rshift128 (pclo, pchi);
      D.8749 = *pchi;
      D.8781 = D.8749 + 9223372036854775808;
      *pchi = D.8781;
      texp = texp + -1;
      <D.8780>:
      goto <D.7991>;
      <D.7990>:
      rshift128 (pclo, pchi);
      texp = texp + -1;
      <D.7991>:
      if (texp > 0) goto <D.8782>; else goto <D.7992>;
      <D.8782>:
      D.8783 = *pclo;
      D.8784 = D.8783 & 1;
      if (D.8784 == 0) goto <D.7990>; else goto <D.7992>;
      <D.7992>:
      *pExp = texp;
      D.8742 = 0;
      return D.8742;
    }
  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.8787>; else goto <D.8788>;
  <D.8787>:
  if (cmi == 0) goto <D.8789>; else goto <D.8790>;
  <D.8789>:
  chi = chi + 18446744073709551615;
  <D.8790>:
  cmi = cmi + 18446744073709551615;
  <D.8788>:
  if (ami < bmi) goto <D.8791>; else goto <D.8792>;
  <D.8791>:
  chi = chi + 18446744073709551615;
  <D.8792>:
  *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.8796;
  long long unsigned int rhi.84;
  long long unsigned int D.8798;
  long long unsigned int rlo.85;
  long long unsigned int D.8800;
  long long unsigned int rmi.86;
  long long unsigned int rlo.87;
  long long unsigned int D.8803;
  long long unsigned int D.8804;
  unsigned int D.8805;
  long long unsigned int D.8806;
  long long unsigned int D.8807;
  long long unsigned int D.8808;
  long long unsigned int D.8812;
  long long unsigned int D.8813;
  long long unsigned int D.8814;
  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.8796 = rmi.83 >> 32;
      rhi.84 = rhi.88 | D.8796;
      rhi = rhi.84;
      rmi.83 = rmi;
      D.8798 = rmi.83 << 32;
      rlo.85 = rlo;
      D.8800 = rlo.85 >> 32;
      rmi.86 = D.8798 | D.8800;
      rmi = rmi.86;
      rlo.85 = rlo;
      rlo.87 = rlo.85 << 32;
      rlo = rlo.87;
      D.8803 = (long long unsigned int) h;
      D.8804 = D.8803 << 32;
      D.8805 = div192by96to32withRest (&rlo, &rmi, &rhi, blo, bmi, bhi);
      D.8806 = (long long unsigned int) D.8805;
      D.8807 = D.8804 | D.8806;
      *pchi = D.8807;
      rhi.82 = rhi;
      rhi.88 = rhi.82 << 32;
      rmi.83 = rmi;
      D.8796 = rmi.83 >> 32;
      rhi.84 = rhi.88 | D.8796;
      rhi = rhi.84;
      rmi.83 = rmi;
      D.8798 = rmi.83 << 32;
      rlo.85 = rlo;
      D.8800 = rlo.85 >> 32;
      rmi.86 = D.8798 | D.8800;
      rmi = rmi.86;
      rlo.85 = rlo;
      rlo.87 = rlo.85 << 32;
      rlo = rlo.87;
      h = div192by96to32withRest (&rlo, &rmi, &rhi, blo, bmi, bhi);
      D.8808 = (long long unsigned int) bhi;
      rhi.82 = rhi;
      if (D.8808 <= rhi.82) goto <D.8809>; else goto <D.8810>;
      <D.8809>:
      c = 4294967295;
      goto <D.8811>;
      <D.8810>:
      rhi.82 = rhi;
      rhi.88 = rhi.82 << 32;
      rhi = rhi.88;
      rhi.82 = rhi;
      D.8808 = (long long unsigned int) bhi;
      D.8812 = rhi.82 / D.8808;
      c = (guint32) D.8812;
      <D.8811>:
      D.8803 = (long long unsigned int) h;
      D.8804 = D.8803 << 32;
      D.8813 = (long long unsigned int) c;
      D.8814 = D.8804 | D.8813;
      *pclo = D.8814;
    }
  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.8818;
  long long unsigned int D.8819;
  long long unsigned int rhi.92;
  long long unsigned int D.8824;
  long long unsigned int D.8825;
  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.8830;
  long long unsigned int D.8831;
  long long unsigned int D.8832;
  long long unsigned int D.8833;
  long long int rhi.97;
  guint32 D.8835;
  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.8818 = (long long unsigned int) bhi;
      D.8819 = D.8818 << 32;
      rhi.92 = rhi;
      if (D.8819 <= rhi.92) goto <D.8821>; else goto <D.8822>;
      <D.8821>:
      c = 4294967295;
      goto <D.8823>;
      <D.8822>:
      rhi.92 = rhi;
      D.8824 = (long long unsigned int) bhi;
      D.8825 = rhi.92 / D.8824;
      c = (guint32) D.8825;
      <D.8823>:
      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.7664>;
      <D.7663>:
      c = c + 4294967295;
      rlo.93 = rlo;
      rmi.94 = rmi;
      rhi.92 = rhi;
      D.8830 = (long long unsigned int) bmi;
      D.8831 = D.8830 << 32;
      D.8832 = (long long unsigned int) blo;
      D.8833 = D.8831 | D.8832;
      D.8824 = (long long unsigned int) bhi;
      add192 (rlo.93, rmi.94, rhi.92, 0, D.8833, D.8824, &rlo, &rmi, &rhi);
      <D.7664>:
      rhi.92 = rhi;
      rhi.97 = (long long int) rhi.92;
      if (rhi.97 < 0) goto <D.7663>; else goto <D.7665>;
      <D.7665>:
      rlo.93 = rlo;
      *palo = rlo.93;
      rmi.94 = rmi;
      *pami = rmi.94;
      rhi.92 = rhi;
      *pahi = rhi.92;
      D.8835 = c;
      return D.8835;
    }
  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.8838;
  long long unsigned int D.8839;
  long long unsigned int D.8840;
  long long unsigned int D.8841;
  long long unsigned int D.8842;
  long long unsigned int D.8843;
  long long unsigned int D.8844;
  long long unsigned int D.8845;
  long long unsigned int D.8846;
  long long unsigned int D.8847;
  guint64 a;
  guint32 h0;
  guint32 h1;

  D.8838 = (long long unsigned int) alo;
  D.8839 = (long long unsigned int) factor;
  a = D.8838 * D.8839;
  h0 = (guint32) a;
  a = a >> 32;
  D.8840 = (long long unsigned int) ami;
  D.8839 = (long long unsigned int) factor;
  D.8841 = D.8840 * D.8839;
  a = D.8841 + a;
  h1 = (guint32) a;
  a = a >> 32;
  D.8842 = (long long unsigned int) ahi;
  D.8839 = (long long unsigned int) factor;
  D.8843 = D.8842 * D.8839;
  a = D.8843 + a;
  D.8844 = (long long unsigned int) h1;
  D.8845 = D.8844 << 32;
  D.8846 = (long long unsigned int) h0;
  D.8847 = D.8845 | D.8846;
  *pclo = D.8847;
  *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.8848>; else goto <D.8849>;
  <D.8848>:
  ami = ami + 1;
  if (ami == 0) goto <D.8850>; else goto <D.8851>;
  <D.8850>:
  ahi = ahi + 1;
  <D.8851>:
  <D.8849>:
  ami = ami + bmi;
  if (ami < bmi) goto <D.8852>; else goto <D.8853>;
  <D.8852>:
  ahi = ahi + 1;
  <D.8853>:
  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.8858;
  unsigned char D.8859;
  int D.8860;
  unsigned char D.8861;
  int D.8862;
  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.8870;
  int D.8871;
  guint64 clo;
  guint64 chi;
  int scale;
  int texp;
  int rc;

  try
    {
      rc = decimalDivSub (pA, pB, &clo, &chi, &texp);
      if (rc != 0) goto <D.8854>; else goto <D.8855>;
      <D.8854>:
      if (rc == 1) goto <D.8856>; else goto <D.8857>;
      <D.8856>:
      rc = 0;
      <D.8857>:
      D.8858 = rc;
      return D.8858;
      <D.8855>:
      D.8859 = pA->u.signscale.scale;
      D.8860 = (int) D.8859;
      D.8861 = pB->u.signscale.scale;
      D.8862 = (int) D.8861;
      scale.98 = D.8860 - D.8862;
      scale = scale.98;
      texp.99 = texp;
      rc = rescale128 (&clo, &chi, &scale, texp.99, 0, 0, 0);
      if (rc != 0) goto <D.8865>; else goto <D.8866>;
      <D.8865>:
      D.8858 = rc;
      return D.8858;
      <D.8866>:
      clo.100 = clo;
      chi.101 = chi;
      scale.102 = scale;
      D.8870 = pA->u.signscale.sign;
      D.8871 = (int) D.8870;
      D.8858 = pack128toDecimal (pC, clo.100, chi.101, scale.102, D.8871);
      return D.8858;
    }
  finally
    {
      clo = {CLOBBER};
      chi = {CLOBBER};
      scale = {CLOBBER};
      texp = {CLOBBER};
    }
}


mono_decimalCompare (struct decimal_repr * pA, struct decimal_repr * pB)
{
  int iftmp.103;
  unsigned int D.8875;
  unsigned int D.8876;
  unsigned int D.8880;
  unsigned int D.8881;
  signed int D.8882;
  gint32 D.8885;
  gint32 iftmp.104;
  int D.8890;
  int D.8892;
  <unnamed-unsigned:1> D.8897;
  unsigned char D.8898;
  unsigned char D.8899;
  <unnamed-unsigned:1> D.8900;
  int D.8901;
  gint32 iftmp.105;
  unsigned int D.8905;
  unsigned int D.8906;
  int log2a;
  int log2b;
  int delta;
  int sign;
  struct decimal_repr aa;

  try
    {
      D.8875 = BIT_FIELD_REF <*pA, 32, 0>;
      D.8876 = D.8875 & 2147483648;
      if (D.8876 != 0) goto <D.8877>; else goto <D.8878>;
      <D.8877>:
      iftmp.103 = -1;
      goto <D.8879>;
      <D.8878>:
      iftmp.103 = 1;
      <D.8879>:
      sign = iftmp.103;
      D.8875 = BIT_FIELD_REF <*pA, 32, 0>;
      D.8880 = BIT_FIELD_REF <*pB, 32, 0>;
      D.8881 = D.8875 ^ D.8880;
      D.8882 = (signed int) D.8881;
      if (D.8882 < 0) goto <D.8883>; else goto <D.8884>;
      <D.8883>:
      D.8890 = decimalIsZero (pA);
      if (D.8890 == 0) goto <D.8887>; else goto <D.8891>;
      <D.8891>:
      D.8892 = decimalIsZero (pB);
      if (D.8892 == 0) goto <D.8887>; else goto <D.8888>;
      <D.8887>:
      iftmp.104 = sign;
      goto <D.8889>;
      <D.8888>:
      iftmp.104 = 0;
      <D.8889>:
      D.8885 = iftmp.104;
      return D.8885;
      <D.8884>:
      log2a = decimalLog2 (pA);
      log2b = decimalLog2 (pB);
      delta = log2a - log2b;
      if (delta < -1) goto <D.8893>; else goto <D.8894>;
      <D.8893>:
      D.8885 = -sign;
      return D.8885;
      <D.8894>:
      if (delta > 1) goto <D.8895>; else goto <D.8896>;
      <D.8895>:
      D.8885 = sign;
      return D.8885;
      <D.8896>:
      memcpy (&aa, pA, 16);
      D.8897 = aa.u.signscale.sign;
      D.8898 = (unsigned char) D.8897;
      D.8899 = 1 - D.8898;
      D.8900 = (<unnamed-unsigned:1>) D.8899;
      aa.u.signscale.sign = D.8900;
      mono_decimalIncr (&aa, pB);
      D.8901 = decimalIsZero (&aa);
      if (D.8901 != 0) goto <D.8902>; else goto <D.8903>;
      <D.8902>:
      D.8885 = 0;
      return D.8885;
      <D.8903>:
      D.8905 = BIT_FIELD_REF <aa, 32, 0>;
      D.8906 = D.8905 & 2147483648;
      if (D.8906 != 0) goto <D.8907>; else goto <D.8908>;
      <D.8907>:
      iftmp.105 = 1;
      goto <D.8909>;
      <D.8908>:
      iftmp.105 = -1;
      <D.8909>:
      D.8885 = iftmp.105;
      return D.8885;
    }
  finally
    {
      aa = {CLOBBER};
    }
}


decimalLog2 (struct decimal_repr * pA)
{
  unsigned char D.8912;
  unsigned int D.8913;
  int D.8916;
  unsigned int D.8918;
  int D.8921;
  unsigned int D.8923;
  int D.8926;
  int D.8927;
  int D.8928;
  int tlog2;
  int scale;

  D.8912 = pA->u.signscale.scale;
  scale = (int) D.8912;
  D.8913 = pA->hi32;
  if (D.8913 != 0) goto <D.8914>; else goto <D.8915>;
  <D.8914>:
  D.8913 = pA->hi32;
  D.8916 = log2_32 (D.8913);
  tlog2 = D.8916 + 64;
  goto <D.8917>;
  <D.8915>:
  D.8918 = pA->mid32;
  if (D.8918 != 0) goto <D.8919>; else goto <D.8920>;
  <D.8919>:
  D.8918 = pA->mid32;
  D.8921 = log2_32 (D.8918);
  tlog2 = D.8921 + 32;
  goto <D.8922>;
  <D.8920>:
  D.8923 = pA->lo32;
  tlog2 = log2_32 (D.8923);
  <D.8922>:
  <D.8917>:
  if (tlog2 != -1000) goto <D.8924>; else goto <D.8925>;
  <D.8924>:
  D.8926 = scale * 33219;
  D.8927 = D.8926 / -10000;
  tlog2 = D.8927 + tlog2;
  <D.8925>:
  D.8928 = tlog2;
  return D.8928;
}


log2_32 (guint32 a)
{
  int D.8932;
  int D.8933;

  if (a == 0) goto <D.8930>; else goto <D.8931>;
  <D.8930>:
  D.8932 = -1000;
  return D.8932;
  <D.8931>:
  D.8933 = my_g_bit_nth_msf (a);
  D.8932 = D.8933 + 1;
  return D.8932;
}


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

  D.8936 = __builtin_object_size (__dest, 0);
  D.8935 = __builtin___memcpy_chk (__dest, __src, __len, D.8936);
  return D.8935;
}


decimalIsZero (struct decimal_repr * pA)
{
  int D.8938;
  int iftmp.106;
  unsigned int D.8942;
  unsigned int D.8944;
  unsigned int D.8946;

  D.8942 = pA->lo32;
  if (D.8942 == 0) goto <D.8943>; else goto <D.8940>;
  <D.8943>:
  D.8944 = pA->mid32;
  if (D.8944 == 0) goto <D.8945>; else goto <D.8940>;
  <D.8945>:
  D.8946 = pA->hi32;
  if (D.8946 == 0) goto <D.8947>; else goto <D.8940>;
  <D.8947>:
  iftmp.106 = 1;
  goto <D.8941>;
  <D.8940>:
  iftmp.106 = 0;
  <D.8941>:
  D.8938 = iftmp.106;
  return D.8938;
}


mono_decimal2double (struct decimal_repr * pA)
{
  unsigned int D.8949;
  long long unsigned int D.8950;
  long long unsigned int D.8951;
  unsigned int D.8952;
  long long unsigned int D.8953;
  long long unsigned int ahi.107;
  unsigned int D.8955;
  long long unsigned int D.8956;
  long long unsigned int alo.108;
  long long unsigned int ahi.109;
  long long unsigned int alo.110;
  double D.8964;
  unsigned char D.8965;
  signed long long ahi.111;
  long long unsigned int D.8967;
  int D.8970;
  int D.8971;
  unsigned int D.8974;
  unsigned int D.8975;
  unsigned int log5.112;
  unsigned int D.8977;
  unsigned int D.8981;
  unsigned int D.8982;
  long long unsigned int ahi.113;
  long long unsigned int ahi.114;
  unsigned int D.8988;
  long long unsigned int ahi.115;
  long long unsigned int D.8992;
  <unnamed-unsigned:1> D.8993;
  int D.8994;
  int D.8995;
  double d;
  guint64 alo;
  guint64 ahi;
  guint64 mantisse;
  guint32 overhang;
  guint32 factor;
  guint32 roundBits;
  int scale;
  int texp;
  int log5;
  int i;

  try
    {
      D.8949 = pA->hi32;
      D.8950 = (long long unsigned int) D.8949;
      D.8951 = D.8950 << 32;
      D.8952 = pA->mid32;
      D.8953 = (long long unsigned int) D.8952;
      ahi.107 = D.8951 | D.8953;
      ahi = ahi.107;
      D.8955 = pA->lo32;
      D.8956 = (long long unsigned int) D.8955;
      alo.108 = D.8956 << 32;
      alo = alo.108;
      ahi.109 = ahi;
      if (ahi.109 == 0) goto <D.8959>; else goto <D.8960>;
      <D.8959>:
      alo.110 = alo;
      if (alo.110 == 0) goto <D.8962>; else goto <D.8963>;
      <D.8962>:
      D.8964 = 0.0;
      return D.8964;
      <D.8963>:
      <D.8960>:
      texp = 0;
      D.8965 = pA->u.signscale.scale;
      scale = (int) D.8965;
      goto <D.8055>;
      <D.8054>:
      goto <D.8052>;
      <D.8051>:
      lshift128 (&alo, &ahi);
      texp = texp + 1;
      <D.8052>:
      ahi.109 = ahi;
      ahi.111 = (signed long long) ahi.109;
      if (ahi.111 >= 0) goto <D.8051>; else goto <D.8053>;
      <D.8053>:
      ahi.109 = ahi;
      D.8967 = ahi.109 >> 32;
      overhang = (guint32) D.8967;
      if (overhang > 4) goto <D.8968>; else goto <D.8969>;
      <D.8968>:
      D.8970 = log2_32 (overhang);
      D.8971 = D.8970 * 1000;
      log5 = D.8971 / 2322;
      if (log5 <= 8) goto <D.8972>; else goto <D.8973>;
      <D.8972>:
      D.8974 = constantsDecadeInt32Factors[log5];
      factor = D.8974 >> log5;
      D.8975 = overhang / factor;
      log5.112 = (unsigned int) log5;
      D.8977 = D.8975 + log5.112;
      i = (int) D.8977;
      goto <D.8978>;
      <D.8973>:
      i = 9;
      <D.8978>:
      if (i > scale) goto <D.8979>; else goto <D.8980>;
      <D.8979>:
      i = scale;
      <D.8980>:
      D.8981 = constantsDecadeInt32Factors[i];
      factor = D.8981 >> i;
      div128by32 (&alo, &ahi, factor, 0B);
      scale = scale - i;
      texp = texp + i;
      <D.8969>:
      <D.8055>:
      if (scale > 0) goto <D.8054>; else goto <D.8056>;
      <D.8056>:
      goto <D.8058>;
      <D.8057>:
      lshift128 (&alo, &ahi);
      texp = texp + 1;
      <D.8058>:
      ahi.109 = ahi;
      ahi.111 = (signed long long) ahi.109;
      if (ahi.111 >= 0) goto <D.8057>; else goto <D.8059>;
      <D.8059>:
      ahi.109 = ahi;
      D.8982 = (unsigned int) ahi.109;
      roundBits = D.8982 & 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.8984>; else goto <D.8985>;
      <D.8984>:
      ahi.109 = ahi;
      ahi.114 = ahi.109 >> 1;
      ahi = ahi.114;
      texp = texp + -1;
      goto <D.8987>;
      <D.8985>:
      D.8988 = roundBits & 1024;
      if (D.8988 == 0) goto <D.8989>; else goto <D.8990>;
      <D.8989>:
      ahi.109 = ahi;
      ahi.115 = ahi.109 & 18446744073709551614;
      ahi = ahi.115;
      <D.8990>:
      <D.8987>:
      ahi.109 = ahi;
      D.8992 = ahi.109 & 9223372036854775807;
      mantisse = D.8992 >> 11;
      D.8993 = pA->u.signscale.sign;
      D.8994 = (int) D.8993;
      D.8995 = 95 - texp;
      buildIEEE754Double (&d, D.8994, D.8995, mantisse);
      D.8964 = d;
      return D.8964;
    }
  finally
    {
      d = {CLOBBER};
      alo = {CLOBBER};
      ahi = {CLOBBER};
    }
}


buildIEEE754Double (double * pd, int sign, int texp, guint64 mantisse)
{
  long long unsigned int D.8998;
  long long unsigned int D.8999;
  int D.9000;
  unsigned int D.9001;
  long long unsigned int D.9002;
  long long unsigned int D.9003;
  long long unsigned int D.9004;
  long long unsigned int D.9005;
  long long unsigned int D.9006;
  guint64 * p;

  p = pd;
  D.8998 = (long long unsigned int) sign;
  D.8999 = D.8998 << 63;
  D.9000 = texp + 1023;
  D.9001 = (unsigned int) D.9000;
  D.9002 = (long long unsigned int) D.9001;
  D.9003 = D.9002 & 2047;
  D.9004 = D.9003 << 52;
  D.9005 = D.8999 | D.9004;
  D.9006 = D.9005 | mantisse;
  *p = D.9006;
}


mono_decimalSetExponent (struct decimal_repr * pA, gint32 texp)
{
  unsigned char D.9007;
  int scale.116;
  int scale.117;
  int scale.118;
  unsigned int scale.119;
  unsigned int D.9014;
  long long unsigned int D.9015;
  long long unsigned int D.9016;
  unsigned int D.9017;
  long long unsigned int D.9018;
  long long unsigned int alo.120;
  unsigned int D.9020;
  long long unsigned int ahi.121;
  gint32 D.9024;
  long long unsigned int alo.122;
  long long unsigned int ahi.123;
  <unnamed-unsigned:1> D.9027;
  int D.9028;
  unsigned char D.9029;
  guint64 alo;
  guint64 ahi;
  int rc;
  int scale;

  try
    {
      D.9007 = pA->u.signscale.scale;
      scale.116 = (int) D.9007;
      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.9012>; else goto <D.9013>;
      <D.9012>:
      D.9014 = pA->mid32;
      D.9015 = (long long unsigned int) D.9014;
      D.9016 = D.9015 << 32;
      D.9017 = pA->lo32;
      D.9018 = (long long unsigned int) D.9017;
      alo.120 = D.9016 | D.9018;
      alo = alo.120;
      D.9020 = pA->hi32;
      ahi.121 = (long long unsigned int) D.9020;
      ahi = ahi.121;
      rc = rescale128 (&alo, &ahi, &scale, 0, 0, 28, 1);
      if (rc != 0) goto <D.9022>; else goto <D.9023>;
      <D.9022>:
      D.9024 = rc;
      return D.9024;
      <D.9023>:
      alo.122 = alo;
      ahi.123 = ahi;
      scale.117 = scale;
      D.9027 = pA->u.signscale.sign;
      D.9028 = (int) D.9027;
      D.9024 = pack128toDecimal (pA, alo.122, ahi.123, scale.117, D.9028);
      return D.9024;
      <D.9013>:
      scale.117 = scale;
      D.9029 = (unsigned char) scale.117;
      pA->u.signscale.scale = D.9029;
      D.9024 = 0;
      return D.9024;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
      scale = {CLOBBER};
    }
}


