mono_decimalIncr (struct decimal_repr * pA, struct decimal_repr * pB)
{
  unsigned int D.8165;
  long long unsigned int D.8166;
  long long unsigned int D.8167;
  unsigned int D.8168;
  long long unsigned int D.8169;
  long long unsigned int alo.0;
  unsigned int D.8171;
  long long unsigned int ahi.1;
  unsigned int D.8173;
  long long unsigned int D.8174;
  long long unsigned int D.8175;
  unsigned int D.8176;
  long long unsigned int D.8177;
  long long unsigned int blo.2;
  unsigned int D.8179;
  long long unsigned int bhi.3;
  <unnamed-unsigned:1> D.8181;
  <unnamed-unsigned:1> D.8182;
  int D.8183;
  unsigned char D.8184;
  int scaleA.4;
  unsigned char D.8186;
  int scaleA.5;
  long long unsigned int bhi.6;
  long long unsigned int blo.7;
  long long unsigned int ahi.8;
  long long unsigned int alo.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.8205;
  int D.8210;
  int D.8211;
  int D.8214;
  int scaleA.15;
  int D.8218;
  gint32 D.8221;
  int D.8222;
  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.8165 = pA->mid32;
      D.8166 = (long long unsigned int) D.8165;
      D.8167 = D.8166 << 32;
      D.8168 = pA->lo32;
      D.8169 = (long long unsigned int) D.8168;
      alo.0 = D.8167 | D.8169;
      alo = alo.0;
      D.8171 = pA->hi32;
      ahi.1 = (long long unsigned int) D.8171;
      ahi = ahi.1;
      D.8173 = pB->mid32;
      D.8174 = (long long unsigned int) D.8173;
      D.8175 = D.8174 << 32;
      D.8176 = pB->lo32;
      D.8177 = (long long unsigned int) D.8176;
      blo.2 = D.8175 | D.8177;
      blo = blo.2;
      D.8179 = pB->hi32;
      bhi.3 = (long long unsigned int) D.8179;
      bhi = bhi.3;
      D.8181 = pA->u.signscale.sign;
      sign = (int) D.8181;
      D.8182 = pB->u.signscale.sign;
      D.8183 = (int) D.8182;
      subFlag = sign - D.8183;
      D.8184 = pA->u.signscale.scale;
      scaleA.4 = (int) D.8184;
      scaleA = scaleA.4;
      D.8186 = pB->u.signscale.scale;
      scaleB = (int) D.8186;
      scaleA.5 = scaleA;
      if (scaleA.5 == scaleB) goto <D.8188>; else goto <D.8189>;
      <D.8188>:
      if (subFlag != 0) goto <D.8190>; else goto <D.8191>;
      <D.8190>:
      bhi.6 = bhi;
      blo.7 = blo;
      ahi.8 = ahi;
      alo.9 = alo;
      sub128 (alo.9, ahi.8, blo.7, bhi.6, &alo, &ahi);
      ahi.8 = ahi;
      ahi.10 = (signed long long) ahi.8;
      if (ahi.10 < 0) goto <D.8197>; else goto <D.8198>;
      <D.8197>:
      alo.9 = alo;
      alo.11 = alo.9 + 18446744073709551615;
      alo = alo.11;
      alo.9 = alo;
      alo.12 = ~alo.9;
      alo = alo.12;
      alo.9 = alo;
      if (alo.9 == 0) goto <D.8201>; else goto <D.8202>;
      <D.8201>:
      ahi.8 = ahi;
      ahi.13 = ahi.8 + 18446744073709551615;
      ahi = ahi.13;
      <D.8202>:
      ahi.8 = ahi;
      ahi.14 = ~ahi.8;
      ahi = ahi.14;
      D.8205 = sign == 0;
      sign = (int) D.8205;
      <D.8198>:
      goto <D.8206>;
      <D.8191>:
      bhi.6 = bhi;
      blo.7 = blo;
      ahi.8 = ahi;
      alo.9 = alo;
      add128 (alo.9, ahi.8, blo.7, bhi.6, &alo, &ahi);
      <D.8206>:
      rc = normalize128 (&alo, &ahi, &scaleA, 1, 0);
      goto <D.8207>;
      <D.8189>:
      scaleA.5 = scaleA;
      ahi.8 = ahi;
      alo.9 = alo;
      log2A = log2withScale_128 (alo.9, ahi.8, scaleA.5);
      bhi.6 = bhi;
      blo.7 = blo;
      log2B = log2withScale_128 (blo.7, bhi.6, scaleB);
      log2Result = MAX_EXPR <log2B, log2A>;
      if (subFlag == 0) goto <D.8208>; else goto <D.8209>;
      <D.8208>:
      log2Result = log2Result + 1;
      <D.8209>:
      D.8210 = log2Result * 1000;
      D.8211 = D.8210 / 3322;
      log10Result = D.8211 + 1;
      scaleA.5 = scaleA;
      if (scaleB > scaleA.5) goto <D.8212>; else goto <D.8213>;
      <D.8212>:
      scaleA = scaleB;
      <D.8213>:
      scaleA.5 = scaleA;
      D.8214 = scaleA.5 + log10Result;
      if (D.8214 > 35) goto <D.8215>; else goto <D.8216>;
      <D.8215>:
      scaleA.15 = 35 - log10Result;
      scaleA = scaleA.15;
      <D.8216>:
      scaleA.5 = scaleA;
      D.8184 = pA->u.signscale.scale;
      scaleA.4 = (int) D.8184;
      D.8218 = scaleA.5 - scaleA.4;
      rc = adjustScale128 (&alo, &ahi, D.8218);
      if (rc != 0) goto <D.8219>; else goto <D.8220>;
      <D.8219>:
      D.8221 = rc;
      return D.8221;
      <D.8220>:
      scaleA.5 = scaleA;
      D.8222 = scaleA.5 - scaleB;
      rc = adjustScale128 (&blo, &bhi, D.8222);
      if (rc != 0) goto <D.8223>; else goto <D.8224>;
      <D.8223>:
      D.8221 = rc;
      return D.8221;
      <D.8224>:
      if (subFlag != 0) goto <D.8225>; else goto <D.8226>;
      <D.8225>:
      bhi.6 = bhi;
      blo.7 = blo;
      ahi.8 = ahi;
      alo.9 = alo;
      sub128 (alo.9, ahi.8, blo.7, bhi.6, &alo, &ahi);
      ahi.8 = ahi;
      ahi.10 = (signed long long) ahi.8;
      if (ahi.10 < 0) goto <D.8227>; else goto <D.8228>;
      <D.8227>:
      alo.9 = alo;
      alo.11 = alo.9 + 18446744073709551615;
      alo = alo.11;
      alo.9 = alo;
      alo.12 = ~alo.9;
      alo = alo.12;
      alo.9 = alo;
      if (alo.9 == 0) goto <D.8229>; else goto <D.8230>;
      <D.8229>:
      ahi.8 = ahi;
      ahi.13 = ahi.8 + 18446744073709551615;
      ahi = ahi.13;
      <D.8230>:
      ahi.8 = ahi;
      ahi.14 = ~ahi.8;
      ahi = ahi.14;
      D.8205 = sign == 0;
      sign = (int) D.8205;
      <D.8228>:
      goto <D.8231>;
      <D.8226>:
      bhi.6 = bhi;
      blo.7 = blo;
      ahi.8 = ahi;
      alo.9 = alo;
      add128 (alo.9, ahi.8, blo.7, bhi.6, &alo, &ahi);
      <D.8231>:
      rc = rescale128 (&alo, &ahi, &scaleA, 0, 0, 28, 1);
      <D.8207>:
      if (rc != 0) goto <D.8232>; else goto <D.8233>;
      <D.8232>:
      D.8221 = rc;
      return D.8221;
      <D.8233>:
      scaleA.5 = scaleA;
      ahi.8 = ahi;
      alo.9 = alo;
      D.8221 = pack128toDecimal (pA, alo.9, ahi.8, scaleA.5, sign);
      return D.8221;
    }
  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.8236;
  long long unsigned int D.8237;
  unsigned int D.8238;
  int D.8242;
  _Bool D.8243;
  _Bool D.8244;
  _Bool D.8245;
  long long unsigned int D.8248;
  int D.8251;
  guint32 overhang;
  int scale;
  int deltaScale;

  D.8236 = *pchi;
  D.8237 = D.8236 >> 32;
  overhang = (guint32) D.8237;
  scale = *pScale;
  goto <D.7798>;
  <D.7797>:
  deltaScale = 1;
  goto <D.7796>;
  <D.7795>:
  D.8238 = constantsDecadeInt32Factors[deltaScale];
  if (D.8238 > overhang) goto <D.7794>; else goto <D.8239>;
  <D.8239>:
  deltaScale = deltaScale + 1;
  <D.7796>:
  if (deltaScale <= 8) goto <D.7795>; else goto <D.7794>;
  <D.7794>:
  scale = scale - deltaScale;
  if (scale < 0) goto <D.8240>; else goto <D.8241>;
  <D.8240>:
  D.8242 = 2;
  return D.8242;
  <D.8241>:
  D.8238 = constantsDecadeInt32Factors[deltaScale];
  roundBit = div128by32 (pclo, pchi, D.8238, 0B);
  D.8236 = *pchi;
  D.8237 = D.8236 >> 32;
  overhang = (guint32) D.8237;
  D.8243 = roundFlag != 0;
  D.8244 = roundBit != 0;
  D.8245 = D.8243 & D.8244;
  if (D.8245 != 0) goto <D.8246>; else goto <D.8247>;
  <D.8246>:
  D.8248 = *pclo;
  if (D.8248 == 18446744073709551615) goto <D.8249>; else goto <D.8250>;
  <D.8249>:
  D.8236 = *pchi;
  D.8251 = (int) D.8236;
  if (D.8251 == -1) goto <D.8252>; else goto <D.8253>;
  <D.8252>:
  overhang = 1;
  <D.8253>:
  <D.8250>:
  <D.8247>:
  <D.7798>:
  if (overhang != 0) goto <D.7797>; else goto <D.7799>;
  <D.7799>:
  *pScale = scale;
  D.8243 = roundFlag != 0;
  D.8244 = roundBit != 0;
  D.8245 = D.8243 & D.8244;
  if (D.8245 != 0) goto <D.8254>; else goto <D.8255>;
  <D.8254>:
  roundUp128 (pclo, pchi);
  <D.8255>:
  D.8242 = 0;
  return D.8242;
}


div128by32 (guint64 * plo, guint64 * phi, guint32 factor, guint32 * pRest)
{
  long long unsigned int D.8257;
  unsigned int D.8258;
  long long unsigned int D.8259;
  long long unsigned int D.8260;
  unsigned int D.8261;
  long long unsigned int D.8262;
  long long unsigned int D.8263;
  long long unsigned int D.8264;
  unsigned int D.8265;
  long long unsigned int D.8266;
  long long unsigned int D.8267;
  long long unsigned int D.8268;
  unsigned int D.8271;
  int D.8272;
  int iftmp.16;
  long long unsigned int D.8279;
  guint64 a;
  guint64 b;
  guint64 c;
  guint64 h;

  h = *phi;
  D.8257 = h >> 32;
  D.8258 = (unsigned int) D.8257;
  a = (guint64) D.8258;
  D.8259 = (long long unsigned int) factor;
  b = a / D.8259;
  D.8259 = (long long unsigned int) factor;
  D.8260 = D.8259 * b;
  a = a - D.8260;
  a = a << 32;
  D.8261 = (unsigned int) h;
  D.8262 = (long long unsigned int) D.8261;
  a = D.8262 | a;
  D.8259 = (long long unsigned int) factor;
  c = a / D.8259;
  D.8259 = (long long unsigned int) factor;
  D.8263 = D.8259 * c;
  a = a - D.8263;
  a = a << 32;
  D.8264 = b << 32;
  D.8265 = (unsigned int) c;
  D.8266 = (long long unsigned int) D.8265;
  D.8267 = D.8264 | D.8266;
  *phi = D.8267;
  h = *plo;
  D.8257 = h >> 32;
  D.8258 = (unsigned int) D.8257;
  D.8268 = (long long unsigned int) D.8258;
  a = D.8268 | a;
  D.8259 = (long long unsigned int) factor;
  b = a / D.8259;
  D.8259 = (long long unsigned int) factor;
  D.8260 = D.8259 * b;
  a = a - D.8260;
  a = a << 32;
  D.8261 = (unsigned int) h;
  D.8262 = (long long unsigned int) D.8261;
  a = D.8262 | a;
  D.8259 = (long long unsigned int) factor;
  c = a / D.8259;
  D.8259 = (long long unsigned int) factor;
  D.8263 = D.8259 * c;
  a = a - D.8263;
  D.8264 = b << 32;
  D.8265 = (unsigned int) c;
  D.8266 = (long long unsigned int) D.8265;
  D.8267 = D.8264 | D.8266;
  *plo = D.8267;
  if (pRest != 0B) goto <D.8269>; else goto <D.8270>;
  <D.8269>:
  D.8271 = (unsigned int) a;
  *pRest = D.8271;
  <D.8270>:
  a = a << 1;
  D.8259 = (long long unsigned int) factor;
  if (D.8259 <= a) goto <D.8274>; else goto <D.8277>;
  <D.8277>:
  D.8259 = (long long unsigned int) factor;
  if (D.8259 == a) goto <D.8278>; else goto <D.8275>;
  <D.8278>:
  D.8279 = c & 1;
  if (D.8279 != 0) goto <D.8274>; else goto <D.8275>;
  <D.8274>:
  iftmp.16 = 1;
  goto <D.8276>;
  <D.8275>:
  iftmp.16 = 0;
  <D.8276>:
  D.8272 = iftmp.16;
  return D.8272;
}


roundUp128 (guint64 * pclo, guint64 * pchi)
{
  long long unsigned int D.8281;
  long long unsigned int D.8282;
  long long unsigned int D.8285;
  long long unsigned int D.8286;

  D.8281 = *pclo;
  D.8282 = D.8281 + 1;
  *pclo = D.8282;
  D.8281 = *pclo;
  if (D.8281 == 0) goto <D.8283>; else goto <D.8284>;
  <D.8283>:
  D.8285 = *pchi;
  D.8286 = D.8285 + 1;
  *pchi = D.8286;
  <D.8284>:
}


log2withScale_128 (guint64 alo, guint64 ahi, int scale)
{
  int D.8289;
  int D.8290;
  int D.8291;
  int tlog2;

  tlog2 = log2_128 (alo, ahi);
  if (tlog2 < 0) goto <D.8287>; else goto <D.8288>;
  <D.8287>:
  tlog2 = 0;
  <D.8288>:
  D.8290 = scale * 33219;
  D.8291 = D.8290 / -10000;
  D.8289 = D.8291 + tlog2;
  return D.8289;
}


log2_128 (guint64 alo, guint64 ahi)
{
  int D.8295;
  int D.8296;

  if (ahi == 0) goto <D.8293>; else goto <D.8294>;
  <D.8293>:
  D.8295 = log2_64 (alo);
  return D.8295;
  <D.8294>:
  D.8296 = log2_64 (ahi);
  D.8295 = D.8296 + 64;
  return D.8295;
}


log2_64 (guint64 a)
{
  int D.8300;
  long long unsigned int D.8301;
  unsigned int D.8304;
  int D.8305;
  unsigned int D.8306;
  int D.8307;

  if (a == 0) goto <D.8298>; else goto <D.8299>;
  <D.8298>:
  D.8300 = -1000;
  return D.8300;
  <D.8299>:
  D.8301 = a >> 32;
  if (D.8301 == 0) goto <D.8302>; else goto <D.8303>;
  <D.8302>:
  D.8304 = (unsigned int) a;
  D.8305 = my_g_bit_nth_msf (D.8304);
  D.8300 = D.8305 + 1;
  return D.8300;
  <D.8303>:
  D.8301 = a >> 32;
  D.8306 = (unsigned int) D.8301;
  D.8307 = my_g_bit_nth_msf (D.8306);
  D.8300 = D.8307 + 33;
  return D.8300;
}


my_g_bit_nth_msf (gsize mask)
{
  gint D.8309;
  int r;

  __asm__("bsrl %1,%0
	" : "=r" r : "rm" mask);
  D.8309 = r;
  return D.8309;
}


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

  if (deltaScale < 0) goto <D.8311>; else goto <D.8312>;
  <D.8311>:
  deltaScale = -deltaScale;
  if (deltaScale > 28) goto <D.8313>; else goto <D.8314>;
  <D.8313>:
  D.8315 = 3;
  return D.8315;
  <D.8314>:
  goto <D.7862>;
  <D.7861>:
  idx = MIN_EXPR <deltaScale, 9>;
  deltaScale = deltaScale - idx;
  D.8316 = constantsDecadeInt32Factors[idx];
  div128by32 (palo, pahi, D.8316, 0B);
  <D.7862>:
  if (deltaScale > 0) goto <D.7861>; else goto <D.7863>;
  <D.7863>:
  goto <D.8317>;
  <D.8312>:
  if (deltaScale > 0) goto <D.8318>; else goto <D.8319>;
  <D.8318>:
  if (deltaScale > 28) goto <D.8320>; else goto <D.8321>;
  <D.8320>:
  D.8315 = 3;
  return D.8315;
  <D.8321>:
  goto <D.7865>;
  <D.7864>:
  idx = MIN_EXPR <deltaScale, 9>;
  deltaScale = deltaScale - idx;
  D.8316 = constantsDecadeInt32Factors[idx];
  rc = mult128by32 (palo, pahi, D.8316, 0);
  if (rc != 0) goto <D.8322>; else goto <D.8323>;
  <D.8322>:
  D.8315 = rc;
  return D.8315;
  <D.8323>:
  <D.7865>:
  if (deltaScale > 0) goto <D.7864>; else goto <D.7866>;
  <D.7866>:
  <D.8319>:
  <D.8317>:
  D.8315 = 0;
  return D.8315;
}


mult128by32 (guint64 * pclo, guint64 * pchi, guint32 factor, int roundBit)
{
  long long unsigned int D.8325;
  unsigned int D.8326;
  long long unsigned int D.8327;
  long long unsigned int D.8328;
  unsigned int D.8331;
  long long unsigned int D.8332;
  long long unsigned int D.8333;
  long long unsigned int D.8334;
  long long unsigned int D.8335;
  long long unsigned int D.8336;
  long long unsigned int D.8337;
  long long unsigned int D.8338;
  long long unsigned int D.8339;
  long long unsigned int D.8340;
  unsigned int D.8341;
  long long unsigned int D.8342;
  long long unsigned int D.8343;
  long long unsigned int D.8344;
  long long unsigned int D.8345;
  int D.8346;
  int iftmp.17;
  long long unsigned int D.8348;
  guint64 a;
  guint32 h0;
  guint32 h1;

  D.8325 = *pclo;
  D.8326 = (unsigned int) D.8325;
  D.8327 = (long long unsigned int) D.8326;
  D.8328 = (long long unsigned int) factor;
  a = D.8327 * D.8328;
  if (roundBit != 0) goto <D.8329>; else goto <D.8330>;
  <D.8329>:
  D.8331 = factor / 2;
  D.8332 = (long long unsigned int) D.8331;
  a = D.8332 + a;
  <D.8330>:
  h0 = (guint32) a;
  a = a >> 32;
  D.8325 = *pclo;
  D.8333 = D.8325 >> 32;
  D.8334 = (long long unsigned int) factor;
  D.8335 = D.8333 * D.8334;
  a = D.8335 + a;
  h1 = (guint32) a;
  D.8336 = (long long unsigned int) h1;
  D.8337 = D.8336 << 32;
  D.8338 = (long long unsigned int) h0;
  D.8339 = D.8337 | D.8338;
  *pclo = D.8339;
  a = a >> 32;
  D.8340 = *pchi;
  D.8341 = (unsigned int) D.8340;
  D.8342 = (long long unsigned int) D.8341;
  D.8328 = (long long unsigned int) factor;
  D.8343 = D.8342 * D.8328;
  a = D.8343 + a;
  h0 = (guint32) a;
  a = a >> 32;
  D.8340 = *pchi;
  D.8344 = D.8340 >> 32;
  D.8334 = (long long unsigned int) factor;
  D.8345 = D.8344 * D.8334;
  a = D.8345 + a;
  h1 = (guint32) a;
  D.8336 = (long long unsigned int) h1;
  D.8337 = D.8336 << 32;
  D.8338 = (long long unsigned int) h0;
  D.8339 = D.8337 | D.8338;
  *pchi = D.8339;
  D.8348 = a >> 32;
  if (D.8348 == 0) goto <D.8349>; else goto <D.8350>;
  <D.8349>:
  iftmp.17 = 0;
  goto <D.8351>;
  <D.8350>:
  iftmp.17 = 2;
  <D.8351>:
  D.8346 = iftmp.17;
  return D.8346;
}


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.8353>; else goto <D.8354>;
  <D.8353>:
  chi = chi + 18446744073709551615;
  <D.8354>:
  *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.8355>; else goto <D.8356>;
  <D.8355>:
  ahi = ahi + 1;
  <D.8356>:
  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.8359;
  long long unsigned int D.8360;
  long long unsigned int D.8367;
  long long unsigned int D.8368;
  int D.8369;
  int D.8370;
  long long unsigned int D.8371;
  long long unsigned int D.8372;
  int D.8373;
  long long unsigned int D.8374;
  long long unsigned int D.8375;
  long long unsigned int D.8376;
  _Bool D.8377;
  long int D.8378;
  long int D.8379;
  _Bool D.8382;
  long int D.8383;
  long int D.8384;
  int D.8389;
  long long unsigned int D.8392;
  int D.8396;
  unsigned int D.8400;
  _Bool D.8401;
  _Bool D.8402;
  _Bool D.8403;
  int D.8414;
  guint32 factor;
  guint32 overhang;
  int scale;
  int i;
  int rc;
  int roundBit;

  roundBit = 0;
  scale = *pScale;
  if (texp > 0) goto <D.8357>; else goto <D.8358>;
  <D.8357>:
  goto <D.7889>;
  <D.7888>:
  D.8359 = *pchi;
  D.8360 = D.8359 >> 32;
  overhang = (guint32) D.8360;
  if (overhang != 0) goto <D.8361>; else goto <D.8362>;
  <D.8361>:
  {
    int msf;
    int shift;

    msf = my_g_bit_nth_msf (overhang);
    shift = msf + -11;
    if (shift >= texp) goto <D.8363>; else goto <D.8364>;
    <D.8363>:
    shift = texp + -1;
    <D.8364>:
    if (shift > 0) goto <D.8365>; else goto <D.8366>;
    <D.8365>:
    texp = texp - shift;
    D.8367 = *pclo;
    D.8368 = D.8367 >> shift;
    D.8359 = *pchi;
    D.8369 = 1 << shift;
    D.8370 = D.8369 + -1;
    D.8371 = (long long unsigned int) D.8370;
    D.8372 = D.8359 & D.8371;
    D.8373 = 64 - shift;
    D.8374 = D.8372 << D.8373;
    D.8375 = D.8368 | D.8374;
    *pclo = D.8375;
    D.8359 = *pchi;
    D.8376 = D.8359 >> shift;
    *pchi = D.8376;
    overhang = overhang >> shift;
    D.8377 = texp <= 0;
    D.8378 = (long int) D.8377;
    D.8379 = __builtin_expect (D.8378, 0);
    if (D.8379 != 0) goto <D.8380>; else goto <D.8381>;
    <D.8380>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "decimal.c", 730, "texp > 0");
    <D.8381>:
    D.8382 = overhang <= 1024;
    D.8383 = (long int) D.8382;
    D.8384 = __builtin_expect (D.8383, 0);
    if (D.8384 != 0) goto <D.8385>; else goto <D.8386>;
    <D.8385>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "decimal.c", 731, "overhang > (2 << DECIMAL_MAX_INTFACTORS)");
    <D.8386>:
    <D.8366>:
  }
  <D.8362>:
  goto <D.7885>;
  <D.7884>:
  texp = texp + -1;
  if (texp == 0) goto <D.8387>; else goto <D.8388>;
  <D.8387>:
  D.8367 = *pclo;
  D.8389 = (int) D.8367;
  roundBit = D.8389 & 1;
  <D.8388>:
  rshift128 (pclo, pchi);
  overhang = overhang >> 1;
  <D.7885>:
  if (texp > 0) goto <D.8390>; else goto <D.7886>;
  <D.8390>:
  if (overhang > 1024) goto <D.7884>; else goto <D.8391>;
  <D.8391>:
  D.8367 = *pclo;
  D.8392 = D.8367 & 1;
  if (D.8392 == 0) goto <D.7884>; else goto <D.7886>;
  <D.7886>:
  if (texp > 9) goto <D.8393>; else goto <D.8394>;
  <D.8393>:
  i = 9;
  goto <D.8395>;
  <D.8394>:
  i = texp;
  <D.8395>:
  D.8396 = scale + i;
  if (D.8396 > maxScale) goto <D.8397>; else goto <D.8398>;
  <D.8397>:
  i = maxScale - scale;
  <D.8398>:
  if (i == 0) goto <D.7887>; else goto <D.8399>;
  <D.8399>:
  texp = texp - i;
  scale = scale + i;
  D.8400 = constantsDecadeInt32Factors[i];
  factor = D.8400 >> i;
  mult128by32 (pclo, pchi, factor, 0);
  <D.7889>:
  D.8401 = texp > 0;
  D.8402 = scale <= maxScale;
  D.8403 = D.8401 & D.8402;
  if (D.8403 != 0) goto <D.7888>; else goto <D.7887>;
  <D.7887>:
  goto <D.7891>;
  <D.7890>:
  texp = texp + -1;
  if (texp == 0) goto <D.8404>; else goto <D.8405>;
  <D.8404>:
  D.8367 = *pclo;
  D.8389 = (int) D.8367;
  roundBit = D.8389 & 1;
  <D.8405>:
  rshift128 (pclo, pchi);
  <D.7891>:
  if (texp > 0) goto <D.7890>; else goto <D.7892>;
  <D.7892>:
  <D.8358>:
  goto <D.7894>;
  <D.7893>:
  i = scale - maxScale;
  if (i > 9) goto <D.8406>; else goto <D.8407>;
  <D.8406>:
  i = 9;
  <D.8407>:
  scale = scale - i;
  D.8400 = constantsDecadeInt32Factors[i];
  roundBit = div128by32 (pclo, pchi, D.8400, 0B);
  <D.7894>:
  if (scale > maxScale) goto <D.7893>; else goto <D.7895>;
  <D.7895>:
  goto <D.7897>;
  <D.7896>:
  if (roundFlag == 0) goto <D.8408>; else goto <D.8409>;
  <D.8408>:
  roundBit = 0;
  <D.8409>:
  i = minScale - scale;
  if (i > 9) goto <D.8410>; else goto <D.8411>;
  <D.8410>:
  i = 9;
  <D.8411>:
  scale = scale + i;
  D.8400 = constantsDecadeInt32Factors[i];
  rc = mult128by32 (pclo, pchi, D.8400, roundBit);
  if (rc != 0) goto <D.8412>; else goto <D.8413>;
  <D.8412>:
  D.8414 = rc;
  return D.8414;
  <D.8413>:
  roundBit = 0;
  <D.7897>:
  if (scale < minScale) goto <D.7896>; else goto <D.7898>;
  <D.7898>:
  *pScale = scale;
  D.8414 = normalize128 (pclo, pchi, pScale, roundFlag, roundBit);
  return D.8414;
}


rshift128 (guint64 * pclo, guint64 * pchi)
{
  long long unsigned int D.8416;
  long long unsigned int D.8417;
  long long unsigned int D.8418;
  long long unsigned int D.8419;
  long long unsigned int D.8420;
  long long unsigned int D.8421;

  D.8416 = *pclo;
  D.8417 = D.8416 >> 1;
  *pclo = D.8417;
  D.8416 = *pclo;
  D.8418 = *pchi;
  D.8419 = D.8418 << 63;
  D.8420 = D.8416 | D.8419;
  *pclo = D.8420;
  D.8418 = *pchi;
  D.8421 = D.8418 >> 1;
  *pchi = D.8421;
}


pack128toDecimal (struct decimal_repr * pA, guint64 alo, guint64 ahi, int scale, int sign)
{
  unsigned int scale.18;
  long long unsigned int D.8426;
  int D.8427;
  unsigned int D.8428;
  long long unsigned int D.8429;
  unsigned int D.8430;
  unsigned int D.8431;
  unsigned char D.8432;
  <unnamed-unsigned:1> D.8433;
  unsigned char D.8434;

  scale.18 = (unsigned int) scale;
  if (scale.18 > 28) goto <D.8422>; else goto <D.8425>;
  <D.8425>:
  D.8426 = ahi >> 32;
  if (D.8426 != 0) goto <D.8422>; else goto <D.8423>;
  <D.8422>:
  D.8427 = 2;
  return D.8427;
  <D.8423>:
  D.8428 = (unsigned int) alo;
  pA->lo32 = D.8428;
  D.8429 = alo >> 32;
  D.8430 = (unsigned int) D.8429;
  pA->mid32 = D.8430;
  D.8431 = (unsigned int) ahi;
  pA->hi32 = D.8431;
  D.8432 = (unsigned char) sign;
  D.8433 = (<unnamed-unsigned:1>) D.8432;
  pA->u.signscale.sign = D.8433;
  D.8434 = (unsigned char) scale;
  pA->u.signscale.scale = D.8434;
  D.8427 = 0;
  return D.8427;
}


mono_double2decimal (struct decimal_repr * pA, double val, gint32 digits)
{
  long long unsigned int D.8436;
  signed long long D.8437;
  _Bool D.8438;
  long long unsigned int D.8439;
  short unsigned int D.8440;
  long long unsigned int D.8441;
  long long unsigned int alo.19;
  int D.8443;
  int D.8444;
  _Bool D.8445;
  _Bool D.8446;
  _Bool D.8447;
  gint32 D.8450;
  _Bool D.8451;
  _Bool D.8452;
  _Bool D.8453;
  int D.8458;
  long long unsigned int ahi.20;
  long long unsigned int alo.21;
  int D.8465;
  int D.8466;
  int scale.22;
  int scale.23;
  long long unsigned int D.8469;
  long long unsigned int D.8472;
  int scale.24;
  int D.8478;
  guint64 alo;
  guint64 ahi;
  guint64 * p;
  int sigDigits;
  int sign;
  int texp;
  int rc;
  int scale;
  guint16 k;

  try
    {
      p = &val;
      D.8436 = *p;
      D.8437 = (signed long long) D.8436;
      D.8438 = D.8437 < 0;
      sign = (int) D.8438;
      D.8436 = *p;
      D.8439 = D.8436 >> 52;
      D.8440 = (short unsigned int) D.8439;
      k = D.8440 & 2047;
      D.8436 = *p;
      D.8441 = D.8436 & 4503599627370495;
      alo.19 = D.8441 | 4503599627370496;
      alo = alo.19;
      ahi = 0;
      D.8443 = (int) k;
      D.8444 = D.8443 & 2047;
      texp = D.8444 + -1023;
      D.8445 = k == 2047;
      D.8446 = texp > 95;
      D.8447 = D.8445 | D.8446;
      if (D.8447 != 0) goto <D.8448>; else goto <D.8449>;
      <D.8448>:
      D.8450 = 2;
      return D.8450;
      <D.8449>:
      D.8451 = k == 0;
      D.8452 = texp < -93;
      D.8453 = D.8451 | D.8452;
      if (D.8453 != 0) goto <D.8454>; else goto <D.8455>;
      <D.8454>:
      memset (pA, 0, 16);
      D.8450 = 0;
      return D.8450;
      <D.8455>:
      texp = texp + -52;
      if (texp > 0) goto <D.8456>; else goto <D.8457>;
      <D.8456>:
      goto <D.7972>;
      <D.7971>:
      lshift128 (&alo, &ahi);
      texp = texp + -1;
      <D.7972>:
      if (texp > 0) goto <D.7971>; else goto <D.7973>;
      <D.7973>:
      <D.8457>:
      scale = 0;
      D.8458 = -texp;
      rc = rescale128 (&alo, &ahi, &scale, D.8458, 0, 28, 1);
      if (rc != 0) goto <D.8459>; else goto <D.8460>;
      <D.8459>:
      D.8450 = rc;
      return D.8450;
      <D.8460>:
      ahi.20 = ahi;
      alo.21 = alo;
      sigDigits = calcDigits (alo.21, ahi.20);
      if (sigDigits > digits) goto <D.8463>; else goto <D.8464>;
      <D.8463>:
      D.8465 = sigDigits - digits;
      div128DecadeFactor (&alo, &ahi, D.8465);
      D.8466 = digits - sigDigits;
      scale.22 = scale;
      scale.23 = D.8466 + scale.22;
      scale = scale.23;
      D.8469 = dec128decadeFactors[digits].hi;
      ahi.20 = ahi;
      if (D.8469 == ahi.20) goto <D.8470>; else goto <D.8471>;
      <D.8470>:
      D.8472 = dec128decadeFactors[digits].lo;
      alo.21 = alo;
      if (D.8472 == alo.21) goto <D.8473>; else goto <D.8474>;
      <D.8473>:
      div128by32 (&alo, &ahi, 10, 0B);
      scale.22 = scale;
      scale.24 = scale.22 + -1;
      scale = scale.24;
      <D.8474>:
      <D.8471>:
      scale.22 = scale;
      if (scale.22 < 0) goto <D.8476>; else goto <D.8477>;
      <D.8476>:
      scale.22 = scale;
      D.8478 = -scale.22;
      rc = mult128DecadeFactor (&alo, &ahi, D.8478);
      if (rc != 0) goto <D.8479>; else goto <D.8480>;
      <D.8479>:
      D.8450 = rc;
      return D.8450;
      <D.8480>:
      scale = 0;
      <D.8477>:
      <D.8464>:
      trimExcessScale (&alo, &ahi, &scale);
      scale.22 = scale;
      ahi.20 = ahi;
      alo.21 = alo;
      D.8450 = pack128toDecimal (pA, alo.21, ahi.20, scale.22, sign);
      return D.8450;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
      scale = {CLOBBER};
    }
}


memset (void * __dest, int __ch, size_t __len)
{
  int D.8485;
  int D.8490;
  void * D.8492;
  unsigned int D.8493;

  D.8485 = __builtin_constant_p (__len);
  if (D.8485 != 0) goto <D.8486>; else goto <D.8487>;
  <D.8486>:
  if (__len == 0) goto <D.8488>; else goto <D.8489>;
  <D.8488>:
  D.8490 = __builtin_constant_p (__ch);
  if (D.8490 == 0) goto <D.8483>; else goto <D.8491>;
  <D.8491>:
  if (__ch != 0) goto <D.8483>; else goto <D.8484>;
  <D.8483>:
  __warn_memset_zero_len ();
  D.8492 = __dest;
  return D.8492;
  <D.8484>:
  <D.8489>:
  <D.8487>:
  D.8493 = __builtin_object_size (__dest, 0);
  D.8492 = __builtin___memset_chk (__dest, __ch, __len, D.8493);
  return D.8492;
}


lshift128 (guint64 * pclo, guint64 * pchi)
{
  long long unsigned int D.8495;
  long long unsigned int D.8496;
  long long unsigned int D.8497;
  long long unsigned int D.8498;
  long long unsigned int D.8499;
  long long unsigned int D.8500;

  D.8495 = *pchi;
  D.8496 = D.8495 << 1;
  *pchi = D.8496;
  D.8495 = *pchi;
  D.8497 = *pclo;
  D.8498 = D.8497 >> 63;
  D.8499 = D.8495 | D.8498;
  *pchi = D.8499;
  D.8497 = *pclo;
  D.8500 = D.8497 << 1;
  *pclo = D.8500;
}


calcDigits (guint64 alo, guint64 ahi)
{
  int D.8505;
  int D.8507;
  int D.8508;
  long long unsigned int D.8511;
  long long unsigned int D.8514;
  int tlog2;
  int tlog10;

  tlog2 = 0;
  if (ahi == 0) goto <D.8501>; else goto <D.8502>;
  <D.8501>:
  if (alo == 0) goto <D.8503>; else goto <D.8504>;
  <D.8503>:
  D.8505 = 0;
  return D.8505;
  <D.8504>:
  tlog2 = log2_64 (alo);
  goto <D.8506>;
  <D.8502>:
  D.8507 = log2_64 (ahi);
  tlog2 = D.8507 + 64;
  <D.8506>:
  D.8508 = tlog2 * 1000;
  tlog10 = D.8508 / 3322;
  D.8511 = dec128decadeFactors[tlog10].hi;
  if (D.8511 > ahi) goto <D.8509>; else goto <D.8512>;
  <D.8512>:
  D.8511 = dec128decadeFactors[tlog10].hi;
  if (D.8511 == ahi) goto <D.8513>; else goto <D.8510>;
  <D.8513>:
  D.8514 = dec128decadeFactors[tlog10].lo;
  if (D.8514 > alo) goto <D.8509>; else goto <D.8510>;
  <D.8509>:
  tlog10 = tlog10 + -1;
  <D.8510>:
  D.8505 = tlog10 + 1;
  return D.8505;
}


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

  roundBit = 0;
  goto <D.7949>;
  <D.7948>:
  idx = MIN_EXPR <powerOfTen, 9>;
  powerOfTen = powerOfTen - idx;
  D.8516 = constantsDecadeInt32Factors[idx];
  roundBit = div128by32 (palo, pahi, D.8516, 0B);
  <D.7949>:
  if (powerOfTen > 0) goto <D.7948>; else goto <D.7950>;
  <D.7950>:
  if (roundBit != 0) goto <D.8517>; else goto <D.8518>;
  <D.8517>:
  roundUp128 (palo, pahi);
  <D.8518>:
}


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

  goto <D.7726>;
  <D.7725>:
  idx = MIN_EXPR <powerOfTen, 9>;
  powerOfTen = powerOfTen - idx;
  D.8519 = constantsDecadeInt32Factors[idx];
  rc = mult128by32 (pclo, pchi, D.8519, 0);
  if (rc != 0) goto <D.8520>; else goto <D.8521>;
  <D.8520>:
  D.8522 = rc;
  return D.8522;
  <D.8521>:
  <D.7726>:
  if (powerOfTen > 0) goto <D.7725>; else goto <D.7727>;
  <D.7727>:
  D.8522 = 0;
  return D.8522;
}


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.8531;
  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.7913>;
      <D.7912>:
      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.8527>; else goto <D.8528>;
      <D.8527>:
      i = i + -1;
      if (i == 0) goto <D.8529>; else goto <D.8530>;
      <D.8529>:
      return;
      <D.8530>:
      *pclo = lastlo;
      *pchi = lasthi;
      D.8531 = scale + 1;
      *pScale = D.8531;
      return;
      <D.8528>:
      <D.7913>:
      if (scale > 0) goto <D.7912>; else goto <D.7914>;
      <D.7914>:
    }
  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.8536;
  int D.8537;
  unsigned int n.29;
  gint32 D.8541;
  int iftmp.30;
  int D.8547;
  int D.8551;
  int D.8555;
  int D.8556;
  _Bool D.8559;
  _Bool D.8560;
  _Bool D.8561;
  int scale.31;
  unsigned int i.32;
  unsigned int D.8568;
  gushort * D.8569;
  short unsigned int D.8570;
  int D.8571;
  sizetype i.33;
  sizetype D.8580;
  sizetype D.8581;
  gushort * D.8582;
  short unsigned int D.8583;
  int D.8584;
  int D.8589;
  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.7993>;
      <D.7992>:
      len = len + 1;
      p = p + 2;
      <D.7993>:
      D.8536 = *p;
      if (D.8536 != 0) goto <D.7992>; else goto <D.7994>;
      <D.7994>:
      p = buf;
      i = 0;
      goto <D.7997>;
      <D.7996>:
      D.8536 = *p;
      D.8537 = (int) D.8536;
      n = D.8537 + -48;
      n.29 = (unsigned int) n;
      if (n.29 > 9) goto <D.8539>; else goto <D.8540>;
      <D.8539>:
      D.8541 = 2;
      return D.8541;
      <D.8540>:
      if (n != 0) goto <D.8542>; else goto <D.8543>;
      <D.8542>:
      if (sigLen < 0) goto <D.8544>; else goto <D.8545>;
      <D.8544>:
      firstNonZero = i;
      D.8547 = len - firstNonZero;
      if (D.8547 > 29) goto <D.8548>; else goto <D.8549>;
      <D.8548>:
      iftmp.30 = firstNonZero + 29;
      goto <D.8550>;
      <D.8549>:
      iftmp.30 = len;
      <D.8550>:
      sigLen = iftmp.30;
      D.8551 = sigLen + 1;
      if (D.8551 < decrDecimal) goto <D.8552>; else goto <D.8553>;
      <D.8552>:
      D.8541 = 2;
      return D.8541;
      <D.8553>:
      <D.8545>:
      if (i >= sigLen) goto <D.7995>; else goto <D.8554>;
      <D.8554>:
      D.8555 = sigLen + -1;
      D.8556 = D.8555 - i;
      rc = incMultConstant128 (&alo, &ahi, D.8556, n);
      if (rc != 0) goto <D.8557>; else goto <D.8558>;
      <D.8557>:
      D.8541 = rc;
      return D.8541;
      <D.8558>:
      <D.8543>:
      i = i + 1;
      p = p + 2;
      <D.7997>:
      D.8536 = *p;
      if (D.8536 != 0) goto <D.7996>; else goto <D.7995>;
      <D.7995>:
      D.8559 = sigLen < 0;
      D.8560 = len > decrDecimal;
      D.8561 = D.8559 & D.8560;
      if (D.8561 != 0) goto <D.8562>; else goto <D.8563>;
      <D.8562>:
      sigLen = len;
      <D.8563>:
      scale.31 = sigLen - decrDecimal;
      scale = scale.31;
      if (i < len) goto <D.8565>; else goto <D.8566>;
      <D.8565>:
      i.32 = (unsigned int) i;
      D.8568 = i.32 * 2;
      D.8569 = buf + D.8568;
      D.8570 = *D.8569;
      D.8571 = (int) D.8570;
      n = D.8571 + -48;
      n.29 = (unsigned int) n;
      if (n.29 > 9) goto <D.8572>; else goto <D.8573>;
      <D.8572>:
      D.8541 = 2;
      return D.8541;
      <D.8573>:
      if (n > 5) goto <D.8574>; else goto <D.8575>;
      <D.8574>:
      roundBit = 1;
      goto <D.8576>;
      <D.8575>:
      if (n == 5) goto <D.8577>; else goto <D.8578>;
      <D.8577>:
      i.33 = (sizetype) i;
      D.8580 = i.33 + 2147483647;
      D.8581 = D.8580 * 2;
      D.8582 = buf + D.8581;
      D.8583 = *D.8582;
      D.8584 = (int) D.8583;
      n = D.8584 + -48;
      i = i + 1;
      goto <D.8000>;
      <D.7999>:
      i.32 = (unsigned int) i;
      D.8568 = i.32 * 2;
      D.8569 = buf + D.8568;
      D.8570 = *D.8569;
      if (D.8570 != 48) goto <D.7998>; else goto <D.8585>;
      <D.8585>:
      i = i + 1;
      <D.8000>:
      if (i < len) goto <D.7999>; else goto <D.7998>;
      <D.7998>:
      if (i < len) goto <D.8586>; else goto <D.8588>;
      <D.8588>:
      D.8589 = n % 2;
      if (D.8589 == 1) goto <D.8586>; else goto <D.8587>;
      <D.8586>:
      roundBit = 1;
      <D.8587>:
      <D.8578>:
      <D.8576>:
      <D.8566>:
      ahi.28 = ahi;
      if (ahi.28 != 0) goto <D.8590>; else goto <D.8591>;
      <D.8590>:
      rc = normalize128 (&alo, &ahi, &scale, 1, roundBit);
      if (rc != 0) goto <D.8592>; else goto <D.8593>;
      <D.8592>:
      D.8541 = rc;
      return D.8541;
      <D.8593>:
      <D.8591>:
      alo.34 = alo;
      if (alo.34 == 0) goto <D.8596>; else goto <D.8594>;
      <D.8596>:
      ahi.28 = ahi;
      if (ahi.28 == 0) goto <D.8597>; else goto <D.8594>;
      <D.8597>:
      scale.35 = scale;
      if (scale.35 <= 0) goto <D.8599>; else goto <D.8594>;
      <D.8599>:
      D.8541 = 0;
      return D.8541;
      <D.8594>:
      scale.31 = sigLen - decrDecimal;
      ahi.28 = ahi;
      alo.34 = alo;
      D.8541 = pack128toDecimal (pA, alo.34, ahi.28, scale.31, sign);
      return D.8541;
    }
  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.8610;
  long long unsigned int blo.40;
  long long unsigned int D.8612;
  long long unsigned int D.8613;
  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.8604>; else goto <D.8605>;
      <D.8604>:
      factor.38 = (unsigned int) factor;
      mult128by32 (&blo, &bhi, factor.38, 0);
      bhi.39 = bhi;
      if (h > bhi.39) goto <D.8608>; else goto <D.8609>;
      <D.8608>:
      D.8610 = 2;
      return D.8610;
      <D.8609>:
      <D.8605>:
      h = *pahi;
      bhi.39 = bhi;
      blo.40 = blo;
      D.8612 = *pahi;
      D.8613 = *palo;
      add128 (D.8613, D.8612, blo.40, bhi.39, palo, pahi);
      D.8612 = *pahi;
      if (D.8612 < h) goto <D.8614>; else goto <D.8615>;
      <D.8614>:
      D.8610 = 2;
      return D.8610;
      <D.8615>:
      D.8610 = 0;
      return D.8610;
    }
  finally
    {
      blo = {CLOBBER};
      bhi = {CLOBBER};
    }
}


mono_decimal2UInt64 (struct decimal_repr * pA, guint64 * pResult)
{
  unsigned int D.8618;
  long long unsigned int D.8619;
  long long unsigned int D.8620;
  unsigned int D.8621;
  long long unsigned int D.8622;
  long long unsigned int alo.41;
  unsigned int D.8624;
  long long unsigned int ahi.42;
  unsigned char D.8626;
  long long unsigned int ahi.43;
  long long unsigned int alo.44;
  unsigned char D.8635;
  unsigned char D.8636;
  gint32 D.8637;
  guint64 alo;
  guint64 ahi;
  int scale;

  try
    {
      D.8618 = pA->mid32;
      D.8619 = (long long unsigned int) D.8618;
      D.8620 = D.8619 << 32;
      D.8621 = pA->lo32;
      D.8622 = (long long unsigned int) D.8621;
      alo.41 = D.8620 | D.8622;
      alo = alo.41;
      D.8624 = pA->hi32;
      ahi.42 = (long long unsigned int) D.8624;
      ahi = ahi.42;
      D.8626 = pA->u.signscale.scale;
      scale = (int) D.8626;
      if (scale > 0) goto <D.8627>; else goto <D.8628>;
      <D.8627>:
      div128DecadeFactor (&alo, &ahi, scale);
      <D.8628>:
      ahi.43 = ahi;
      if (ahi.43 != 0) goto <D.8629>; else goto <D.8632>;
      <D.8632>:
      alo.44 = alo;
      if (alo.44 != 0) goto <D.8634>; else goto <D.8630>;
      <D.8634>:
      D.8635 = BIT_FIELD_REF <*pA, 8, 24>;
      D.8636 = D.8635 & 128;
      if (D.8636 != 0) goto <D.8629>; else goto <D.8630>;
      <D.8629>:
      D.8637 = 2;
      return D.8637;
      <D.8630>:
      alo.44 = alo;
      *pResult = alo.44;
      D.8637 = 0;
      return D.8637;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
    }
}


mono_decimal2Int64 (struct decimal_repr * pA, gint64 * pResult)
{
  unsigned int D.8640;
  long long unsigned int D.8641;
  long long unsigned int D.8642;
  unsigned int D.8643;
  long long unsigned int D.8644;
  long long unsigned int alo.45;
  unsigned int D.8646;
  long long unsigned int ahi.46;
  unsigned char D.8648;
  long long unsigned int ahi.47;
  gint32 D.8654;
  <unnamed-unsigned:1> D.8655;
  long long unsigned int alo.48;
  long long unsigned int D.8663;
  long long int D.8664;
  signed long long alo.49;
  long long int alo.50;
  guint64 alo;
  guint64 ahi;
  int sign;
  int scale;

  try
    {
      D.8640 = pA->mid32;
      D.8641 = (long long unsigned int) D.8640;
      D.8642 = D.8641 << 32;
      D.8643 = pA->lo32;
      D.8644 = (long long unsigned int) D.8643;
      alo.45 = D.8642 | D.8644;
      alo = alo.45;
      D.8646 = pA->hi32;
      ahi.46 = (long long unsigned int) D.8646;
      ahi = ahi.46;
      D.8648 = pA->u.signscale.scale;
      scale = (int) D.8648;
      if (scale > 0) goto <D.8649>; else goto <D.8650>;
      <D.8649>:
      div128DecadeFactor (&alo, &ahi, scale);
      <D.8650>:
      ahi.47 = ahi;
      if (ahi.47 != 0) goto <D.8652>; else goto <D.8653>;
      <D.8652>:
      D.8654 = 2;
      return D.8654;
      <D.8653>:
      D.8655 = pA->u.signscale.sign;
      sign = (int) D.8655;
      if (sign != 0) goto <D.8658>; else goto <D.8656>;
      <D.8658>:
      alo.48 = alo;
      if (alo.48 != 0) goto <D.8660>; else goto <D.8656>;
      <D.8660>:
      alo.48 = alo;
      if (alo.48 > 9223372036854775808) goto <D.8661>; else goto <D.8662>;
      <D.8661>:
      D.8654 = 2;
      return D.8654;
      <D.8662>:
      alo.48 = alo;
      D.8663 = -alo.48;
      D.8664 = (long long int) D.8663;
      *pResult = D.8664;
      goto <D.8657>;
      <D.8656>:
      alo.48 = alo;
      alo.49 = (signed long long) alo.48;
      if (alo.49 < 0) goto <D.8666>; else goto <D.8667>;
      <D.8666>:
      D.8654 = 2;
      return D.8654;
      <D.8667>:
      alo.48 = alo;
      alo.50 = (long long int) alo.48;
      *pResult = alo.50;
      <D.8657>:
      D.8654 = 0;
      return D.8654;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
    }
}


mono_decimalFloorAndTrunc (struct decimal_repr * pA, gint32 floorFlag)
{
  unsigned char D.8671;
  unsigned int D.8674;
  long long unsigned int D.8675;
  long long unsigned int D.8676;
  unsigned int D.8677;
  long long unsigned int D.8678;
  long long unsigned int alo.51;
  unsigned int D.8680;
  long long unsigned int ahi.52;
  <unnamed-unsigned:1> D.8682;
  int iftmp.53;
  unsigned int rest.54;
  _Bool D.8689;
  _Bool D.8690;
  _Bool D.8691;
  long long unsigned int ahi.55;
  long long unsigned int alo.56;
  guint64 alo;
  guint64 ahi;
  guint32 factor;
  guint32 rest;
  int scale;
  int sign;
  int idx;
  int hasRest;

  try
    {
      hasRest = 0;
      D.8671 = pA->u.signscale.scale;
      scale = (int) D.8671;
      if (scale == 0) goto <D.8672>; else goto <D.8673>;
      <D.8672>:
      return;
      <D.8673>:
      D.8674 = pA->mid32;
      D.8675 = (long long unsigned int) D.8674;
      D.8676 = D.8675 << 32;
      D.8677 = pA->lo32;
      D.8678 = (long long unsigned int) D.8677;
      alo.51 = D.8676 | D.8678;
      alo = alo.51;
      D.8680 = pA->hi32;
      ahi.52 = (long long unsigned int) D.8680;
      ahi = ahi.52;
      D.8682 = pA->u.signscale.sign;
      sign = (int) D.8682;
      goto <D.8029>;
      <D.8028>:
      idx = MIN_EXPR <scale, 9>;
      factor = constantsDecadeInt32Factors[idx];
      scale = scale - idx;
      div128by32 (&alo, &ahi, factor, &rest);
      if (hasRest != 0) goto <D.8684>; else goto <D.8687>;
      <D.8687>:
      rest.54 = rest;
      if (rest.54 != 0) goto <D.8684>; else goto <D.8685>;
      <D.8684>:
      iftmp.53 = 1;
      goto <D.8686>;
      <D.8685>:
      iftmp.53 = 0;
      <D.8686>:
      hasRest = iftmp.53;
      <D.8029>:
      if (scale > 0) goto <D.8028>; else goto <D.8030>;
      <D.8030>:
      D.8689 = floorFlag != 0;
      D.8690 = hasRest != 0;
      D.8691 = D.8689 & D.8690;
      if (D.8691 != 0) goto <D.8692>; else goto <D.8693>;
      <D.8692>:
      if (sign != 0) goto <D.8694>; else goto <D.8695>;
      <D.8694>:
      roundUp128 (&alo, &ahi);
      <D.8695>:
      <D.8693>:
      ahi.55 = ahi;
      alo.56 = alo;
      pack128toDecimal (pA, alo.56, ahi.55, 0, sign);
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
      rest = {CLOBBER};
    }
}


mono_decimalRound (struct decimal_repr * pA, gint32 decimals)
{
  unsigned int D.8701;
  long long unsigned int D.8702;
  long long unsigned int D.8703;
  unsigned int D.8704;
  long long unsigned int D.8705;
  long long unsigned int alo.57;
  unsigned int D.8707;
  long long unsigned int ahi.58;
  unsigned char D.8709;
  <unnamed-unsigned:1> D.8710;
  int D.8713;
  long long unsigned int ahi.59;
  long long unsigned int alo.60;
  guint64 alo;
  guint64 ahi;
  int scale;
  int sign;

  try
    {
      D.8701 = pA->mid32;
      D.8702 = (long long unsigned int) D.8701;
      D.8703 = D.8702 << 32;
      D.8704 = pA->lo32;
      D.8705 = (long long unsigned int) D.8704;
      alo.57 = D.8703 | D.8705;
      alo = alo.57;
      D.8707 = pA->hi32;
      ahi.58 = (long long unsigned int) D.8707;
      ahi = ahi.58;
      D.8709 = pA->u.signscale.scale;
      scale = (int) D.8709;
      D.8710 = pA->u.signscale.sign;
      sign = (int) D.8710;
      if (scale > decimals) goto <D.8711>; else goto <D.8712>;
      <D.8711>:
      D.8713 = scale - decimals;
      div128DecadeFactor (&alo, &ahi, D.8713);
      scale = decimals;
      <D.8712>:
      ahi.59 = ahi;
      alo.60 = alo;
      pack128toDecimal (pA, alo.60, ahi.59, scale, sign);
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
    }
}


mono_decimalMult (struct decimal_repr * pA, struct decimal_repr * pB)
{
  unsigned int D.8716;
  unsigned int D.8717;
  unsigned int D.8718;
  unsigned int D.8719;
  unsigned int D.8720;
  unsigned int D.8721;
  unsigned char D.8722;
  int D.8723;
  unsigned char D.8724;
  int D.8725;
  int scale.61;
  <unnamed-unsigned:1> D.8727;
  int D.8728;
  <unnamed-unsigned:1> D.8729;
  int D.8730;
  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.8740;
  long long unsigned int D.8741;
  gint32 D.8744;
  long long unsigned int low.67;
  guint64 low;
  guint64 mid;
  guint64 high;
  guint32 factor;
  int scale;
  int sign;
  int rc;

  try
    {
      D.8716 = pB->hi32;
      D.8717 = pB->mid32;
      D.8718 = pB->lo32;
      D.8719 = pA->hi32;
      D.8720 = pA->mid32;
      D.8721 = pA->lo32;
      mult96by96to192 (D.8721, D.8720, D.8719, D.8718, D.8717, D.8716, &low, &mid, &high);
      D.8722 = pA->u.signscale.scale;
      D.8723 = (int) D.8722;
      D.8724 = pB->u.signscale.scale;
      D.8725 = (int) D.8724;
      scale.61 = D.8723 + D.8725;
      scale = scale.61;
      D.8727 = pA->u.signscale.sign;
      D.8728 = (int) D.8727;
      D.8729 = pB->u.signscale.sign;
      D.8730 = (int) D.8729;
      sign = D.8728 ^ D.8730;
      factor = 1000000000;
      goto <D.8051>;
      <D.8050>:
      high.62 = high;
      if (high.62 <= 99) goto <D.8732>; else goto <D.8733>;
      <D.8732>:
      factor = factor / 1000;
      scale.63 = scale;
      scale.64 = scale.63 + -6;
      scale = scale.64;
      goto <D.8736>;
      <D.8733>:
      scale.63 = scale;
      scale.65 = scale.63 + -9;
      scale = scale.65;
      <D.8736>:
      div192by32 (&low, &mid, &high, factor);
      <D.8051>:
      high.62 = high;
      if (high.62 != 0) goto <D.8050>; else goto <D.8738>;
      <D.8738>:
      mid.66 = mid;
      D.8740 = mid.66 >> 32;
      D.8741 = (long long unsigned int) factor;
      if (D.8740 >= D.8741) goto <D.8050>; else goto <D.8052>;
      <D.8052>:
      rc = rescale128 (&low, &mid, &scale, 0, 0, 28, 1);
      if (rc != 0) goto <D.8742>; else goto <D.8743>;
      <D.8742>:
      D.8744 = rc;
      return D.8744;
      <D.8743>:
      scale.63 = scale;
      mid.66 = mid;
      low.67 = low;
      D.8744 = pack128toDecimal (pA, low.67, mid.66, scale.63, sign);
      return D.8744;
    }
  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.8748;
  long long unsigned int D.8749;
  long long unsigned int D.8750;
  long long unsigned int D.8751;
  long long unsigned int D.8756;
  long long unsigned int D.8757;
  long long unsigned int D.8764;
  long long unsigned int D.8769;
  long long unsigned int D.8770;
  long long unsigned int D.8771;
  long long unsigned int D.8772;
  long long unsigned int D.8773;
  long long unsigned int D.8774;
  long long unsigned int D.8775;
  long long unsigned int D.8776;
  long long unsigned int D.8777;
  long long unsigned int D.8778;
  long long unsigned int D.8779;
  long long unsigned int D.8780;
  long long unsigned int D.8781;
  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.8748 = (long long unsigned int) alo;
  D.8749 = (long long unsigned int) blo;
  a = D.8748 * D.8749;
  h0 = (guint32) a;
  a = a >> 32;
  carry0 = 0;
  D.8748 = (long long unsigned int) alo;
  D.8750 = (long long unsigned int) bmi;
  b = D.8748 * D.8750;
  D.8751 = (long long unsigned int) ami;
  D.8749 = (long long unsigned int) blo;
  c = D.8751 * D.8749;
  a = a + b;
  if (a < b) goto <D.8752>; else goto <D.8753>;
  <D.8752>:
  carry0 = carry0 + 1;
  <D.8753>:
  a = a + c;
  if (a < c) goto <D.8754>; else goto <D.8755>;
  <D.8754>:
  carry0 = carry0 + 1;
  <D.8755>:
  h1 = (guint32) a;
  a = a >> 32;
  carry1 = 0;
  D.8748 = (long long unsigned int) alo;
  D.8756 = (long long unsigned int) bhi;
  b = D.8748 * D.8756;
  D.8751 = (long long unsigned int) ami;
  D.8750 = (long long unsigned int) bmi;
  c = D.8751 * D.8750;
  D.8757 = (long long unsigned int) ahi;
  D.8749 = (long long unsigned int) blo;
  d = D.8757 * D.8749;
  a = a + b;
  if (a < b) goto <D.8758>; else goto <D.8759>;
  <D.8758>:
  carry1 = carry1 + 1;
  <D.8759>:
  a = a + c;
  if (a < c) goto <D.8760>; else goto <D.8761>;
  <D.8760>:
  carry1 = carry1 + 1;
  <D.8761>:
  a = a + d;
  if (a < d) goto <D.8762>; else goto <D.8763>;
  <D.8762>:
  carry1 = carry1 + 1;
  <D.8763>:
  h2 = (guint32) a;
  a = a >> 32;
  D.8764 = (long long unsigned int) carry0;
  a = D.8764 + a;
  carry0 = 0;
  D.8751 = (long long unsigned int) ami;
  D.8756 = (long long unsigned int) bhi;
  b = D.8751 * D.8756;
  D.8757 = (long long unsigned int) ahi;
  D.8750 = (long long unsigned int) bmi;
  c = D.8757 * D.8750;
  a = a + b;
  if (a < b) goto <D.8765>; else goto <D.8766>;
  <D.8765>:
  carry0 = carry0 + 1;
  <D.8766>:
  a = a + c;
  if (a < c) goto <D.8767>; else goto <D.8768>;
  <D.8767>:
  carry0 = carry0 + 1;
  <D.8768>:
  h3 = (guint32) a;
  a = a >> 32;
  D.8769 = (long long unsigned int) carry1;
  a = D.8769 + a;
  D.8757 = (long long unsigned int) ahi;
  D.8756 = (long long unsigned int) bhi;
  b = D.8757 * D.8756;
  a = a + b;
  h4 = (guint32) a;
  a = a >> 32;
  D.8764 = (long long unsigned int) carry0;
  a = D.8764 + a;
  h5 = (guint32) a;
  D.8770 = (long long unsigned int) h1;
  D.8771 = D.8770 << 32;
  D.8772 = (long long unsigned int) h0;
  D.8773 = D.8771 | D.8772;
  *pclo = D.8773;
  D.8774 = (long long unsigned int) h3;
  D.8775 = D.8774 << 32;
  D.8776 = (long long unsigned int) h2;
  D.8777 = D.8775 | D.8776;
  *pcmi = D.8777;
  D.8778 = (long long unsigned int) h5;
  D.8779 = D.8778 << 32;
  D.8780 = (long long unsigned int) h4;
  D.8781 = D.8779 | D.8780;
  *pchi = D.8781;
}


div192by32 (guint64 * plo, guint64 * pmi, guint64 * phi, guint32 factor)
{
  long long unsigned int D.8782;
  unsigned int D.8783;
  long long unsigned int D.8784;
  long long unsigned int D.8785;
  unsigned int D.8786;
  long long unsigned int D.8787;
  long long unsigned int D.8788;
  long long unsigned int D.8789;
  unsigned int D.8790;
  long long unsigned int D.8791;
  long long unsigned int D.8792;
  long long unsigned int D.8793;
  guint64 a;
  guint64 b;
  guint64 c;
  guint64 h;

  h = *phi;
  D.8782 = h >> 32;
  D.8783 = (unsigned int) D.8782;
  a = (guint64) D.8783;
  D.8784 = (long long unsigned int) factor;
  b = a / D.8784;
  D.8784 = (long long unsigned int) factor;
  D.8785 = D.8784 * b;
  a = a - D.8785;
  a = a << 32;
  D.8786 = (unsigned int) h;
  D.8787 = (long long unsigned int) D.8786;
  a = D.8787 | a;
  D.8784 = (long long unsigned int) factor;
  c = a / D.8784;
  D.8784 = (long long unsigned int) factor;
  D.8788 = D.8784 * c;
  a = a - D.8788;
  a = a << 32;
  D.8789 = b << 32;
  D.8790 = (unsigned int) c;
  D.8791 = (long long unsigned int) D.8790;
  D.8792 = D.8789 | D.8791;
  *phi = D.8792;
  h = *pmi;
  D.8782 = h >> 32;
  D.8783 = (unsigned int) D.8782;
  D.8793 = (long long unsigned int) D.8783;
  a = D.8793 | a;
  D.8784 = (long long unsigned int) factor;
  b = a / D.8784;
  D.8784 = (long long unsigned int) factor;
  D.8785 = D.8784 * b;
  a = a - D.8785;
  a = a << 32;
  D.8786 = (unsigned int) h;
  D.8787 = (long long unsigned int) D.8786;
  a = D.8787 | a;
  D.8784 = (long long unsigned int) factor;
  c = a / D.8784;
  D.8784 = (long long unsigned int) factor;
  D.8788 = D.8784 * c;
  a = a - D.8788;
  a = a << 32;
  D.8789 = b << 32;
  D.8790 = (unsigned int) c;
  D.8791 = (long long unsigned int) D.8790;
  D.8792 = D.8789 | D.8791;
  *pmi = D.8792;
  h = *plo;
  D.8782 = h >> 32;
  D.8783 = (unsigned int) D.8782;
  D.8793 = (long long unsigned int) D.8783;
  a = D.8793 | a;
  D.8784 = (long long unsigned int) factor;
  b = a / D.8784;
  D.8784 = (long long unsigned int) factor;
  D.8785 = D.8784 * b;
  a = a - D.8785;
  a = a << 32;
  D.8786 = (unsigned int) h;
  D.8787 = (long long unsigned int) D.8786;
  a = D.8787 | a;
  D.8784 = (long long unsigned int) factor;
  c = a / D.8784;
  D.8784 = (long long unsigned int) factor;
  D.8788 = D.8784 * c;
  a = a - D.8788;
  a = a << 32;
  D.8789 = b << 32;
  D.8790 = (unsigned int) c;
  D.8791 = (long long unsigned int) D.8790;
  D.8792 = D.8789 | D.8791;
  *plo = D.8792;
}


mono_decimalDiv (struct decimal_repr * pC, struct decimal_repr * pA, struct decimal_repr * pB)
{
  int D.8794;
  gint32 D.8797;
  unsigned char D.8798;
  signed char D.8799;
  _Bool D.8800;
  int D.8801;
  unsigned char D.8808;
  int D.8809;
  unsigned char D.8810;
  int D.8811;
  int scale.68;
  int texp.69;
  <unnamed-unsigned:1> D.8816;
  int D.8817;
  <unnamed-unsigned:1> D.8818;
  int D.8819;
  int D.8820;
  int scale.70;
  long long unsigned int chi.71;
  long long unsigned int clo.72;
  guint64 clo;
  guint64 chi;
  int scale;
  int texp;
  int rc;

  try
    {
      D.8794 = mono_decimalCompare (pA, pB);
      if (D.8794 == 0) goto <D.8795>; else goto <D.8796>;
      <D.8795>:
      D.8797 = pack128toDecimal (pC, 1, 0, 0, 0);
      return D.8797;
      <D.8796>:
      D.8798 = BIT_FIELD_REF <*pA, 8, 24>;
      D.8799 = (signed char) D.8798;
      D.8800 = D.8799 >= 0;
      pA->u.signscale.sign = D.8800;
      D.8801 = mono_decimalCompare (pA, pB);
      if (D.8801 == 0) goto <D.8802>; else goto <D.8803>;
      <D.8802>:
      D.8797 = pack128toDecimal (pC, 1, 0, 0, 1);
      return D.8797;
      <D.8803>:
      D.8798 = BIT_FIELD_REF <*pA, 8, 24>;
      D.8799 = (signed char) D.8798;
      D.8800 = D.8799 >= 0;
      pA->u.signscale.sign = D.8800;
      rc = decimalDivSub (pA, pB, &clo, &chi, &texp);
      if (rc != 0) goto <D.8804>; else goto <D.8805>;
      <D.8804>:
      if (rc == 1) goto <D.8806>; else goto <D.8807>;
      <D.8806>:
      rc = 0;
      <D.8807>:
      D.8797 = rc;
      return D.8797;
      <D.8805>:
      D.8808 = pA->u.signscale.scale;
      D.8809 = (int) D.8808;
      D.8810 = pB->u.signscale.scale;
      D.8811 = (int) D.8810;
      scale.68 = D.8809 - D.8811;
      scale = scale.68;
      texp.69 = texp;
      rc = rescale128 (&clo, &chi, &scale, texp.69, 0, 28, 1);
      if (rc != 0) goto <D.8814>; else goto <D.8815>;
      <D.8814>:
      D.8797 = rc;
      return D.8797;
      <D.8815>:
      D.8816 = pA->u.signscale.sign;
      D.8817 = (int) D.8816;
      D.8818 = pB->u.signscale.sign;
      D.8819 = (int) D.8818;
      D.8820 = D.8817 ^ D.8819;
      scale.70 = scale;
      chi.71 = chi;
      clo.72 = clo;
      D.8797 = pack128toDecimal (pC, clo.72, chi.71, scale.70, D.8820);
      return D.8797;
    }
  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.8826;
  long long unsigned int D.8827;
  long long unsigned int D.8828;
  unsigned int D.8829;
  long long unsigned int D.8830;
  long long unsigned int ahi.73;
  unsigned int D.8832;
  long long unsigned int D.8833;
  long long unsigned int ami.74;
  unsigned int D.8835;
  unsigned int D.8836;
  int D.8839;
  long long unsigned int ami.75;
  long long unsigned int ahi.76;
  long long unsigned int D.8842;
  long long unsigned int D.8845;
  long long unsigned int ahi.77;
  signed long long ahi.78;
  int D.8855;
  int D.8856;
  int hi_shift.79;
  unsigned int D.8858;
  unsigned int D.8860;
  signed int bhi.80;
  unsigned int D.8863;
  long long unsigned int D.8864;
  long long unsigned int D.8865;
  long long unsigned int D.8866;
  long long unsigned int D.8867;
  long long unsigned int alo.81;
  int D.8874;
  long long unsigned int D.8877;
  long long unsigned int D.8879;
  long long unsigned int D.8880;
  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.8826 = pA->hi32;
      D.8827 = (long long unsigned int) D.8826;
      D.8828 = D.8827 << 32;
      D.8829 = pA->mid32;
      D.8830 = (long long unsigned int) D.8829;
      ahi.73 = D.8828 | D.8830;
      ahi = ahi.73;
      D.8832 = pA->lo32;
      D.8833 = (long long unsigned int) D.8832;
      ami.74 = D.8833 << 32;
      ami = ami.74;
      alo = 0;
      blo = pB->lo32;
      bmi = pB->mid32;
      bhi = pB->hi32;
      D.8835 = blo | bmi;
      D.8836 = D.8835 | bhi;
      if (D.8836 == 0) goto <D.8837>; else goto <D.8838>;
      <D.8837>:
      D.8839 = 5;
      return D.8839;
      <D.8838>:
      ami.75 = ami;
      ahi.76 = ahi;
      D.8842 = ami.75 | ahi.76;
      if (D.8842 == 0) goto <D.8843>; else goto <D.8844>;
      <D.8843>:
      *pchi = 0;
      D.8845 = *pchi;
      *pclo = D.8845;
      D.8839 = 1;
      return D.8839;
      <D.8844>:
      ahi.76 = ahi;
      if (ahi.76 == 0) goto <D.8846>; else goto <D.8847>;
      <D.8846>:
      ami.75 = ami;
      ahi = ami.75;
      ami = 0;
      ashift = 64;
      goto <D.8074>;
      <D.8073>:
      ahi.76 = ahi;
      ahi.77 = ahi.76 << 1;
      ahi = ahi.77;
      ashift = ashift + 1;
      <D.8074>:
      ahi.76 = ahi;
      ahi.78 = (signed long long) ahi.76;
      if (ahi.78 >= 0) goto <D.8073>; else goto <D.8075>;
      <D.8075>:
      goto <D.8850>;
      <D.8847>:
      ashift = 0;
      goto <D.8077>;
      <D.8076>:
      lshift128 (&ami, &ahi);
      ashift = ashift + 1;
      <D.8077>:
      ahi.76 = ahi;
      ahi.78 = (signed long long) ahi.76;
      if (ahi.78 >= 0) goto <D.8076>; else goto <D.8078>;
      <D.8078>:
      <D.8850>:
      if (bhi == 0) goto <D.8851>; else goto <D.8852>;
      <D.8851>:
      if (bmi == 0) goto <D.8853>; else goto <D.8854>;
      <D.8853>:
      {
        guint32 hi_shift;

        bhi = blo;
        bmi = 0;
        blo = 0;
        D.8855 = my_g_bit_nth_msf (bhi);
        D.8856 = 31 - D.8855;
        hi_shift = (guint32) D.8856;
        hi_shift.79 = (int) hi_shift;
        bhi = bhi << hi_shift.79;
        D.8858 = hi_shift + 64;
        bshift = (int) D.8858;
      }
      goto <D.8859>;
      <D.8854>:
      bhi = bmi;
      bmi = blo;
      blo = 0;
      bshift = 32;
      goto <D.8081>;
      <D.8080>:
      bhi = bhi << 1;
      D.8860 = bmi >> 31;
      bhi = D.8860 | bhi;
      bmi = bmi << 1;
      bshift = bshift + 1;
      <D.8081>:
      bhi.80 = (signed int) bhi;
      if (bhi.80 >= 0) goto <D.8080>; else goto <D.8082>;
      <D.8082>:
      <D.8859>:
      goto <D.8862>;
      <D.8852>:
      bshift = 0;
      goto <D.8084>;
      <D.8083>:
      bhi = bhi << 1;
      D.8860 = bmi >> 31;
      bhi = D.8860 | bhi;
      bmi = bmi << 1;
      D.8863 = blo >> 31;
      bmi = D.8863 | bmi;
      blo = blo << 1;
      bshift = bshift + 1;
      <D.8084>:
      bhi.80 = (signed int) bhi;
      if (bhi.80 >= 0) goto <D.8083>; else goto <D.8085>;
      <D.8085>:
      <D.8862>:
      D.8864 = (long long unsigned int) bhi;
      D.8865 = D.8864 << 32;
      D.8866 = (long long unsigned int) bmi;
      thi = D.8865 | D.8866;
      D.8867 = (long long unsigned int) blo;
      tmi = D.8867 << 32;
      tlo = 0;
      ahi.76 = ahi;
      if (ahi.76 > thi) goto <D.8868>; else goto <D.8871>;
      <D.8871>:
      ahi.76 = ahi;
      if (ahi.76 == thi) goto <D.8872>; else goto <D.8869>;
      <D.8872>:
      ami.75 = ami;
      if (ami.75 >= tmi) goto <D.8868>; else goto <D.8869>;
      <D.8868>:
      ahi.76 = ahi;
      ami.75 = ami;
      alo.81 = alo;
      sub192 (alo.81, ami.75, ahi.76, tlo, tmi, thi, &alo, &ami, &ahi);
      extraBit = 1;
      goto <D.8870>;
      <D.8869>:
      extraBit = 0;
      <D.8870>:
      ahi.76 = ahi;
      ami.75 = ami;
      alo.81 = alo;
      div192by96to128 (alo.81, ami.75, ahi.76, blo, bmi, bhi, pclo, pchi);
      D.8874 = ashift + 128;
      texp = D.8874 - bshift;
      if (extraBit != 0) goto <D.8875>; else goto <D.8876>;
      <D.8875>:
      rshift128 (pclo, pchi);
      D.8845 = *pchi;
      D.8877 = D.8845 + 9223372036854775808;
      *pchi = D.8877;
      texp = texp + -1;
      <D.8876>:
      goto <D.8087>;
      <D.8086>:
      rshift128 (pclo, pchi);
      texp = texp + -1;
      <D.8087>:
      if (texp > 0) goto <D.8878>; else goto <D.8088>;
      <D.8878>:
      D.8879 = *pclo;
      D.8880 = D.8879 & 1;
      if (D.8880 == 0) goto <D.8086>; else goto <D.8088>;
      <D.8088>:
      *pExp = texp;
      D.8839 = 0;
      return D.8839;
    }
  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.8883>; else goto <D.8884>;
  <D.8883>:
  if (cmi == 0) goto <D.8885>; else goto <D.8886>;
  <D.8885>:
  chi = chi + 18446744073709551615;
  <D.8886>:
  cmi = cmi + 18446744073709551615;
  <D.8884>:
  if (ami < bmi) goto <D.8887>; else goto <D.8888>;
  <D.8887>:
  chi = chi + 18446744073709551615;
  <D.8888>:
  *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.8892;
  long long unsigned int rhi.84;
  long long unsigned int D.8894;
  long long unsigned int rlo.85;
  long long unsigned int D.8896;
  long long unsigned int rmi.86;
  long long unsigned int rlo.87;
  long long unsigned int D.8899;
  long long unsigned int D.8900;
  unsigned int D.8901;
  long long unsigned int D.8902;
  long long unsigned int D.8903;
  long long unsigned int D.8904;
  long long unsigned int D.8908;
  long long unsigned int D.8909;
  long long unsigned int D.8910;
  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.8892 = rmi.83 >> 32;
      rhi.84 = rhi.88 | D.8892;
      rhi = rhi.84;
      rmi.83 = rmi;
      D.8894 = rmi.83 << 32;
      rlo.85 = rlo;
      D.8896 = rlo.85 >> 32;
      rmi.86 = D.8894 | D.8896;
      rmi = rmi.86;
      rlo.85 = rlo;
      rlo.87 = rlo.85 << 32;
      rlo = rlo.87;
      D.8899 = (long long unsigned int) h;
      D.8900 = D.8899 << 32;
      D.8901 = div192by96to32withRest (&rlo, &rmi, &rhi, blo, bmi, bhi);
      D.8902 = (long long unsigned int) D.8901;
      D.8903 = D.8900 | D.8902;
      *pchi = D.8903;
      rhi.82 = rhi;
      rhi.88 = rhi.82 << 32;
      rmi.83 = rmi;
      D.8892 = rmi.83 >> 32;
      rhi.84 = rhi.88 | D.8892;
      rhi = rhi.84;
      rmi.83 = rmi;
      D.8894 = rmi.83 << 32;
      rlo.85 = rlo;
      D.8896 = rlo.85 >> 32;
      rmi.86 = D.8894 | D.8896;
      rmi = rmi.86;
      rlo.85 = rlo;
      rlo.87 = rlo.85 << 32;
      rlo = rlo.87;
      h = div192by96to32withRest (&rlo, &rmi, &rhi, blo, bmi, bhi);
      D.8904 = (long long unsigned int) bhi;
      rhi.82 = rhi;
      if (D.8904 <= rhi.82) goto <D.8905>; else goto <D.8906>;
      <D.8905>:
      c = 4294967295;
      goto <D.8907>;
      <D.8906>:
      rhi.82 = rhi;
      rhi.88 = rhi.82 << 32;
      rhi = rhi.88;
      rhi.82 = rhi;
      D.8904 = (long long unsigned int) bhi;
      D.8908 = rhi.82 / D.8904;
      c = (guint32) D.8908;
      <D.8907>:
      D.8899 = (long long unsigned int) h;
      D.8900 = D.8899 << 32;
      D.8909 = (long long unsigned int) c;
      D.8910 = D.8900 | D.8909;
      *pclo = D.8910;
    }
  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.8914;
  long long unsigned int D.8915;
  long long unsigned int rhi.92;
  long long unsigned int D.8920;
  long long unsigned int D.8921;
  long long unsigned int thi.93;
  long long unsigned int tlo.94;
  long long unsigned int rmi.95;
  long long unsigned int rlo.96;
  long long unsigned int D.8926;
  long long unsigned int D.8927;
  long long unsigned int D.8928;
  long long unsigned int D.8929;
  long long int rhi.97;
  guint32 D.8931;
  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.8914 = (long long unsigned int) bhi;
      D.8915 = D.8914 << 32;
      rhi.92 = rhi;
      if (D.8915 <= rhi.92) goto <D.8917>; else goto <D.8918>;
      <D.8917>:
      c = 4294967295;
      goto <D.8919>;
      <D.8918>:
      rhi.92 = rhi;
      D.8920 = (long long unsigned int) bhi;
      D.8921 = rhi.92 / D.8920;
      c = (guint32) D.8921;
      <D.8919>:
      mult96by32to128 (blo, bmi, bhi, c, &tlo, &thi);
      thi.93 = thi;
      tlo.94 = tlo;
      rhi.92 = rhi;
      rmi.95 = rmi;
      rlo.96 = rlo;
      sub192 (rlo.96, rmi.95, rhi.92, 0, tlo.94, thi.93, &rlo, &rmi, &rhi);
      goto <D.7763>;
      <D.7762>:
      c = c + 4294967295;
      D.8920 = (long long unsigned int) bhi;
      D.8926 = (long long unsigned int) bmi;
      D.8927 = D.8926 << 32;
      D.8928 = (long long unsigned int) blo;
      D.8929 = D.8927 | D.8928;
      rhi.92 = rhi;
      rmi.95 = rmi;
      rlo.96 = rlo;
      add192 (rlo.96, rmi.95, rhi.92, 0, D.8929, D.8920, &rlo, &rmi, &rhi);
      <D.7763>:
      rhi.92 = rhi;
      rhi.97 = (long long int) rhi.92;
      if (rhi.97 < 0) goto <D.7762>; else goto <D.7764>;
      <D.7764>:
      rlo.96 = rlo;
      *palo = rlo.96;
      rmi.95 = rmi;
      *pami = rmi.95;
      rhi.92 = rhi;
      *pahi = rhi.92;
      D.8931 = c;
      return D.8931;
    }
  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.8934;
  long long unsigned int D.8935;
  long long unsigned int D.8936;
  long long unsigned int D.8937;
  long long unsigned int D.8938;
  long long unsigned int D.8939;
  long long unsigned int D.8940;
  long long unsigned int D.8941;
  long long unsigned int D.8942;
  long long unsigned int D.8943;
  guint64 a;
  guint32 h0;
  guint32 h1;

  D.8934 = (long long unsigned int) alo;
  D.8935 = (long long unsigned int) factor;
  a = D.8934 * D.8935;
  h0 = (guint32) a;
  a = a >> 32;
  D.8936 = (long long unsigned int) ami;
  D.8935 = (long long unsigned int) factor;
  D.8937 = D.8936 * D.8935;
  a = D.8937 + a;
  h1 = (guint32) a;
  a = a >> 32;
  D.8938 = (long long unsigned int) ahi;
  D.8935 = (long long unsigned int) factor;
  D.8939 = D.8938 * D.8935;
  a = D.8939 + a;
  D.8940 = (long long unsigned int) h1;
  D.8941 = D.8940 << 32;
  D.8942 = (long long unsigned int) h0;
  D.8943 = D.8941 | D.8942;
  *pclo = D.8943;
  *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.8944>; else goto <D.8945>;
  <D.8944>:
  ami = ami + 1;
  if (ami == 0) goto <D.8946>; else goto <D.8947>;
  <D.8946>:
  ahi = ahi + 1;
  <D.8947>:
  <D.8945>:
  ami = ami + bmi;
  if (ami < bmi) goto <D.8948>; else goto <D.8949>;
  <D.8948>:
  ahi = ahi + 1;
  <D.8949>:
  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.8954;
  unsigned char D.8955;
  int D.8956;
  unsigned char D.8957;
  int D.8958;
  int scale.98;
  int texp.99;
  <unnamed-unsigned:1> D.8963;
  int D.8964;
  int scale.100;
  long long unsigned int chi.101;
  long long unsigned int clo.102;
  guint64 clo;
  guint64 chi;
  int scale;
  int texp;
  int rc;

  try
    {
      rc = decimalDivSub (pA, pB, &clo, &chi, &texp);
      if (rc != 0) goto <D.8950>; else goto <D.8951>;
      <D.8950>:
      if (rc == 1) goto <D.8952>; else goto <D.8953>;
      <D.8952>:
      rc = 0;
      <D.8953>:
      D.8954 = rc;
      return D.8954;
      <D.8951>:
      D.8955 = pA->u.signscale.scale;
      D.8956 = (int) D.8955;
      D.8957 = pB->u.signscale.scale;
      D.8958 = (int) D.8957;
      scale.98 = D.8956 - D.8958;
      scale = scale.98;
      texp.99 = texp;
      rc = rescale128 (&clo, &chi, &scale, texp.99, 0, 0, 0);
      if (rc != 0) goto <D.8961>; else goto <D.8962>;
      <D.8961>:
      D.8954 = rc;
      return D.8954;
      <D.8962>:
      D.8963 = pA->u.signscale.sign;
      D.8964 = (int) D.8963;
      scale.100 = scale;
      chi.101 = chi;
      clo.102 = clo;
      D.8954 = pack128toDecimal (pC, clo.102, chi.101, scale.100, D.8964);
      return D.8954;
    }
  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.8971;
  unsigned char D.8972;
  unsigned char D.8976;
  unsigned char D.8977;
  signed char D.8978;
  gint32 D.8981;
  gint32 iftmp.104;
  int D.8986;
  int D.8988;
  <unnamed-unsigned:1> D.8993;
  unsigned char D.8994;
  unsigned char D.8995;
  <unnamed-unsigned:1> D.8996;
  int D.8997;
  gint32 iftmp.105;
  unsigned char D.9001;
  unsigned char D.9002;
  int log2a;
  int log2b;
  int delta;
  int sign;
  struct decimal_repr aa;

  try
    {
      D.8971 = BIT_FIELD_REF <*pA, 8, 24>;
      D.8972 = D.8971 & 128;
      if (D.8972 != 0) goto <D.8973>; else goto <D.8974>;
      <D.8973>:
      iftmp.103 = -1;
      goto <D.8975>;
      <D.8974>:
      iftmp.103 = 1;
      <D.8975>:
      sign = iftmp.103;
      D.8971 = BIT_FIELD_REF <*pA, 8, 24>;
      D.8976 = BIT_FIELD_REF <*pB, 8, 24>;
      D.8977 = D.8971 ^ D.8976;
      D.8978 = (signed char) D.8977;
      if (D.8978 < 0) goto <D.8979>; else goto <D.8980>;
      <D.8979>:
      D.8986 = decimalIsZero (pA);
      if (D.8986 == 0) goto <D.8983>; else goto <D.8987>;
      <D.8987>:
      D.8988 = decimalIsZero (pB);
      if (D.8988 == 0) goto <D.8983>; else goto <D.8984>;
      <D.8983>:
      iftmp.104 = sign;
      goto <D.8985>;
      <D.8984>:
      iftmp.104 = 0;
      <D.8985>:
      D.8981 = iftmp.104;
      return D.8981;
      <D.8980>:
      log2a = decimalLog2 (pA);
      log2b = decimalLog2 (pB);
      delta = log2a - log2b;
      if (delta < -1) goto <D.8989>; else goto <D.8990>;
      <D.8989>:
      D.8981 = -sign;
      return D.8981;
      <D.8990>:
      if (delta > 1) goto <D.8991>; else goto <D.8992>;
      <D.8991>:
      D.8981 = sign;
      return D.8981;
      <D.8992>:
      memcpy (&aa, pA, 16);
      D.8993 = aa.u.signscale.sign;
      D.8994 = (unsigned char) D.8993;
      D.8995 = 1 - D.8994;
      D.8996 = (<unnamed-unsigned:1>) D.8995;
      aa.u.signscale.sign = D.8996;
      mono_decimalIncr (&aa, pB);
      D.8997 = decimalIsZero (&aa);
      if (D.8997 != 0) goto <D.8998>; else goto <D.8999>;
      <D.8998>:
      D.8981 = 0;
      return D.8981;
      <D.8999>:
      D.9001 = BIT_FIELD_REF <aa, 8, 24>;
      D.9002 = D.9001 & 128;
      if (D.9002 != 0) goto <D.9003>; else goto <D.9004>;
      <D.9003>:
      iftmp.105 = 1;
      goto <D.9005>;
      <D.9004>:
      iftmp.105 = -1;
      <D.9005>:
      D.8981 = iftmp.105;
      return D.8981;
    }
  finally
    {
      aa = {CLOBBER};
    }
}


decimalLog2 (struct decimal_repr * pA)
{
  unsigned char D.9008;
  unsigned int D.9009;
  int D.9012;
  unsigned int D.9014;
  int D.9017;
  unsigned int D.9019;
  int D.9022;
  int D.9023;
  int D.9024;
  int tlog2;
  int scale;

  D.9008 = pA->u.signscale.scale;
  scale = (int) D.9008;
  D.9009 = pA->hi32;
  if (D.9009 != 0) goto <D.9010>; else goto <D.9011>;
  <D.9010>:
  D.9009 = pA->hi32;
  D.9012 = log2_32 (D.9009);
  tlog2 = D.9012 + 64;
  goto <D.9013>;
  <D.9011>:
  D.9014 = pA->mid32;
  if (D.9014 != 0) goto <D.9015>; else goto <D.9016>;
  <D.9015>:
  D.9014 = pA->mid32;
  D.9017 = log2_32 (D.9014);
  tlog2 = D.9017 + 32;
  goto <D.9018>;
  <D.9016>:
  D.9019 = pA->lo32;
  tlog2 = log2_32 (D.9019);
  <D.9018>:
  <D.9013>:
  if (tlog2 != -1000) goto <D.9020>; else goto <D.9021>;
  <D.9020>:
  D.9022 = scale * 33219;
  D.9023 = D.9022 / -10000;
  tlog2 = D.9023 + tlog2;
  <D.9021>:
  D.9024 = tlog2;
  return D.9024;
}


log2_32 (guint32 a)
{
  int D.9028;
  int D.9029;

  if (a == 0) goto <D.9026>; else goto <D.9027>;
  <D.9026>:
  D.9028 = -1000;
  return D.9028;
  <D.9027>:
  D.9029 = my_g_bit_nth_msf (a);
  D.9028 = D.9029 + 1;
  return D.9028;
}


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

  D.9032 = __builtin_object_size (__dest, 0);
  D.9031 = __builtin___memcpy_chk (__dest, __src, __len, D.9032);
  return D.9031;
}


decimalIsZero (struct decimal_repr * pA)
{
  int D.9034;
  int iftmp.106;
  unsigned int D.9038;
  unsigned int D.9040;
  unsigned int D.9042;

  D.9038 = pA->lo32;
  if (D.9038 == 0) goto <D.9039>; else goto <D.9036>;
  <D.9039>:
  D.9040 = pA->mid32;
  if (D.9040 == 0) goto <D.9041>; else goto <D.9036>;
  <D.9041>:
  D.9042 = pA->hi32;
  if (D.9042 == 0) goto <D.9043>; else goto <D.9036>;
  <D.9043>:
  iftmp.106 = 1;
  goto <D.9037>;
  <D.9036>:
  iftmp.106 = 0;
  <D.9037>:
  D.9034 = iftmp.106;
  return D.9034;
}


mono_decimal2double (struct decimal_repr * pA)
{
  unsigned int D.9045;
  long long unsigned int D.9046;
  long long unsigned int D.9047;
  unsigned int D.9048;
  long long unsigned int D.9049;
  long long unsigned int ahi.107;
  unsigned int D.9051;
  long long unsigned int D.9052;
  long long unsigned int alo.108;
  long long unsigned int ahi.109;
  long long unsigned int alo.110;
  long long unsigned int D.9056;
  double D.9059;
  unsigned char D.9060;
  signed long long ahi.111;
  long long unsigned int D.9062;
  int D.9065;
  int D.9066;
  unsigned int D.9069;
  unsigned int D.9070;
  unsigned int log5.112;
  unsigned int D.9072;
  unsigned int D.9076;
  unsigned int D.9077;
  long long unsigned int ahi.113;
  long long unsigned int ahi.114;
  unsigned int D.9083;
  long long unsigned int ahi.115;
  long long unsigned int D.9087;
  int D.9088;
  <unnamed-unsigned:1> D.9089;
  int D.9090;
  double d;
  guint64 alo;
  guint64 ahi;
  guint64 mantisse;
  guint32 overhang;
  guint32 factor;
  guint32 roundBits;
  int scale;
  int texp;
  int log5;
  int i;

  try
    {
      D.9045 = pA->hi32;
      D.9046 = (long long unsigned int) D.9045;
      D.9047 = D.9046 << 32;
      D.9048 = pA->mid32;
      D.9049 = (long long unsigned int) D.9048;
      ahi.107 = D.9047 | D.9049;
      ahi = ahi.107;
      D.9051 = pA->lo32;
      D.9052 = (long long unsigned int) D.9051;
      alo.108 = D.9052 << 32;
      alo = alo.108;
      ahi.109 = ahi;
      alo.110 = alo;
      D.9056 = ahi.109 | alo.110;
      if (D.9056 == 0) goto <D.9057>; else goto <D.9058>;
      <D.9057>:
      D.9059 = 0.0;
      return D.9059;
      <D.9058>:
      texp = 0;
      D.9060 = pA->u.signscale.scale;
      scale = (int) D.9060;
      goto <D.8151>;
      <D.8150>:
      goto <D.8148>;
      <D.8147>:
      lshift128 (&alo, &ahi);
      texp = texp + 1;
      <D.8148>:
      ahi.109 = ahi;
      ahi.111 = (signed long long) ahi.109;
      if (ahi.111 >= 0) goto <D.8147>; else goto <D.8149>;
      <D.8149>:
      ahi.109 = ahi;
      D.9062 = ahi.109 >> 32;
      overhang = (guint32) D.9062;
      if (overhang > 4) goto <D.9063>; else goto <D.9064>;
      <D.9063>:
      D.9065 = log2_32 (overhang);
      D.9066 = D.9065 * 1000;
      log5 = D.9066 / 2322;
      if (log5 <= 8) goto <D.9067>; else goto <D.9068>;
      <D.9067>:
      D.9069 = constantsDecadeInt32Factors[log5];
      factor = D.9069 >> log5;
      D.9070 = overhang / factor;
      log5.112 = (unsigned int) log5;
      D.9072 = D.9070 + log5.112;
      i = (int) D.9072;
      goto <D.9073>;
      <D.9068>:
      i = 9;
      <D.9073>:
      if (i > scale) goto <D.9074>; else goto <D.9075>;
      <D.9074>:
      i = scale;
      <D.9075>:
      D.9076 = constantsDecadeInt32Factors[i];
      factor = D.9076 >> i;
      div128by32 (&alo, &ahi, factor, 0B);
      scale = scale - i;
      texp = texp + i;
      <D.9064>:
      <D.8151>:
      if (scale > 0) goto <D.8150>; else goto <D.8152>;
      <D.8152>:
      goto <D.8154>;
      <D.8153>:
      lshift128 (&alo, &ahi);
      texp = texp + 1;
      <D.8154>:
      ahi.109 = ahi;
      ahi.111 = (signed long long) ahi.109;
      if (ahi.111 >= 0) goto <D.8153>; else goto <D.8155>;
      <D.8155>:
      ahi.109 = ahi;
      D.9077 = (unsigned int) ahi.109;
      roundBits = D.9077 & 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.9079>; else goto <D.9080>;
      <D.9079>:
      ahi.109 = ahi;
      ahi.114 = ahi.109 >> 1;
      ahi = ahi.114;
      texp = texp + -1;
      goto <D.9082>;
      <D.9080>:
      D.9083 = roundBits & 1024;
      if (D.9083 == 0) goto <D.9084>; else goto <D.9085>;
      <D.9084>:
      ahi.109 = ahi;
      ahi.115 = ahi.109 & 18446744073709551614;
      ahi = ahi.115;
      <D.9085>:
      <D.9082>:
      ahi.109 = ahi;
      D.9087 = ahi.109 & 9223372036854775807;
      mantisse = D.9087 >> 11;
      D.9088 = 95 - texp;
      D.9089 = pA->u.signscale.sign;
      D.9090 = (int) D.9089;
      buildIEEE754Double (&d, D.9090, D.9088, mantisse);
      D.9059 = d;
      return D.9059;
    }
  finally
    {
      d = {CLOBBER};
      alo = {CLOBBER};
      ahi = {CLOBBER};
    }
}


buildIEEE754Double (double * pd, int sign, int texp, guint64 mantisse)
{
  long long unsigned int D.9093;
  long long unsigned int D.9094;
  int D.9095;
  long long unsigned int D.9096;
  long long unsigned int D.9097;
  long long unsigned int D.9098;
  long long unsigned int D.9099;
  long long unsigned int D.9100;
  guint64 * p;

  p = pd;
  D.9093 = (long long unsigned int) sign;
  D.9094 = D.9093 << 63;
  D.9095 = texp + 1023;
  D.9096 = (long long unsigned int) D.9095;
  D.9097 = D.9096 & 2047;
  D.9098 = D.9097 << 52;
  D.9099 = D.9094 | D.9098;
  D.9100 = D.9099 | mantisse;
  *p = D.9100;
}


mono_decimalSetExponent (struct decimal_repr * pA, gint32 texp)
{
  unsigned char D.9101;
  int scale.116;
  int scale.117;
  int scale.118;
  unsigned int scale.119;
  unsigned int D.9108;
  long long unsigned int D.9109;
  long long unsigned int D.9110;
  unsigned int D.9111;
  long long unsigned int D.9112;
  long long unsigned int alo.120;
  unsigned int D.9114;
  long long unsigned int ahi.121;
  gint32 D.9118;
  <unnamed-unsigned:1> D.9119;
  int D.9120;
  long long unsigned int ahi.122;
  long long unsigned int alo.123;
  unsigned char D.9123;
  guint64 alo;
  guint64 ahi;
  int rc;
  int scale;

  try
    {
      D.9101 = pA->u.signscale.scale;
      scale.116 = (int) D.9101;
      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.9106>; else goto <D.9107>;
      <D.9106>:
      D.9108 = pA->mid32;
      D.9109 = (long long unsigned int) D.9108;
      D.9110 = D.9109 << 32;
      D.9111 = pA->lo32;
      D.9112 = (long long unsigned int) D.9111;
      alo.120 = D.9110 | D.9112;
      alo = alo.120;
      D.9114 = pA->hi32;
      ahi.121 = (long long unsigned int) D.9114;
      ahi = ahi.121;
      rc = rescale128 (&alo, &ahi, &scale, 0, 0, 28, 1);
      if (rc != 0) goto <D.9116>; else goto <D.9117>;
      <D.9116>:
      D.9118 = rc;
      return D.9118;
      <D.9117>:
      D.9119 = pA->u.signscale.sign;
      D.9120 = (int) D.9119;
      scale.117 = scale;
      ahi.122 = ahi;
      alo.123 = alo;
      D.9118 = pack128toDecimal (pA, alo.123, ahi.122, scale.117, D.9120);
      return D.9118;
      <D.9107>:
      scale.117 = scale;
      D.9123 = (unsigned char) scale.117;
      pA->u.signscale.scale = D.9123;
      D.9118 = 0;
      return D.9118;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
      scale = {CLOBBER};
    }
}


