mono_decimalIncr (struct decimal_repr * pA, struct decimal_repr * pB)
{
  unsigned int D.8411;
  long unsigned int D.8412;
  long unsigned int D.8413;
  unsigned int D.8414;
  long unsigned int D.8415;
  long unsigned int alo.0;
  unsigned int D.8417;
  long unsigned int ahi.1;
  unsigned int D.8419;
  long unsigned int D.8420;
  long unsigned int D.8421;
  unsigned int D.8422;
  long unsigned int D.8423;
  long unsigned int blo.2;
  unsigned int D.8425;
  long unsigned int bhi.3;
  <unnamed-unsigned:1> D.8427;
  <unnamed-unsigned:1> D.8428;
  int D.8429;
  unsigned char D.8430;
  int scaleA.4;
  unsigned char D.8432;
  int scaleA.5;
  long unsigned int bhi.6;
  long unsigned int blo.7;
  long unsigned int ahi.8;
  long unsigned int alo.9;
  signed long ahi.10;
  long unsigned int alo.11;
  long unsigned int alo.12;
  long unsigned int ahi.13;
  long unsigned int ahi.14;
  _Bool D.8451;
  int D.8456;
  int D.8457;
  int D.8460;
  int scaleA.15;
  int D.8464;
  gint32 D.8467;
  int D.8468;
  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.8411 = pA->mid32;
      D.8412 = (long unsigned int) D.8411;
      D.8413 = D.8412 << 32;
      D.8414 = pA->lo32;
      D.8415 = (long unsigned int) D.8414;
      alo.0 = D.8413 | D.8415;
      alo = alo.0;
      D.8417 = pA->hi32;
      ahi.1 = (long unsigned int) D.8417;
      ahi = ahi.1;
      D.8419 = pB->mid32;
      D.8420 = (long unsigned int) D.8419;
      D.8421 = D.8420 << 32;
      D.8422 = pB->lo32;
      D.8423 = (long unsigned int) D.8422;
      blo.2 = D.8421 | D.8423;
      blo = blo.2;
      D.8425 = pB->hi32;
      bhi.3 = (long unsigned int) D.8425;
      bhi = bhi.3;
      D.8427 = pA->u.signscale.sign;
      sign = (int) D.8427;
      D.8428 = pB->u.signscale.sign;
      D.8429 = (int) D.8428;
      subFlag = sign - D.8429;
      D.8430 = pA->u.signscale.scale;
      scaleA.4 = (int) D.8430;
      scaleA = scaleA.4;
      D.8432 = pB->u.signscale.scale;
      scaleB = (int) D.8432;
      scaleA.5 = scaleA;
      if (scaleA.5 == scaleB) goto <D.8434>; else goto <D.8435>;
      <D.8434>:
      if (subFlag != 0) goto <D.8436>; else goto <D.8437>;
      <D.8436>:
      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) ahi.8;
      if (ahi.10 < 0) goto <D.8443>; else goto <D.8444>;
      <D.8443>:
      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.8447>; else goto <D.8448>;
      <D.8447>:
      ahi.8 = ahi;
      ahi.13 = ahi.8 + 18446744073709551615;
      ahi = ahi.13;
      <D.8448>:
      ahi.8 = ahi;
      ahi.14 = ~ahi.8;
      ahi = ahi.14;
      D.8451 = sign == 0;
      sign = (int) D.8451;
      <D.8444>:
      goto <D.8452>;
      <D.8437>:
      bhi.6 = bhi;
      blo.7 = blo;
      ahi.8 = ahi;
      alo.9 = alo;
      add128 (alo.9, ahi.8, blo.7, bhi.6, &alo, &ahi);
      <D.8452>:
      rc = normalize128 (&alo, &ahi, &scaleA, 1, 0);
      goto <D.8453>;
      <D.8435>:
      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.8454>; else goto <D.8455>;
      <D.8454>:
      log2Result = log2Result + 1;
      <D.8455>:
      D.8456 = log2Result * 1000;
      D.8457 = D.8456 / 3322;
      log10Result = D.8457 + 1;
      scaleA.5 = scaleA;
      if (scaleB > scaleA.5) goto <D.8458>; else goto <D.8459>;
      <D.8458>:
      scaleA = scaleB;
      <D.8459>:
      scaleA.5 = scaleA;
      D.8460 = scaleA.5 + log10Result;
      if (D.8460 > 35) goto <D.8461>; else goto <D.8462>;
      <D.8461>:
      scaleA.15 = 35 - log10Result;
      scaleA = scaleA.15;
      <D.8462>:
      scaleA.5 = scaleA;
      D.8430 = pA->u.signscale.scale;
      scaleA.4 = (int) D.8430;
      D.8464 = scaleA.5 - scaleA.4;
      rc = adjustScale128 (&alo, &ahi, D.8464);
      if (rc != 0) goto <D.8465>; else goto <D.8466>;
      <D.8465>:
      D.8467 = rc;
      return D.8467;
      <D.8466>:
      scaleA.5 = scaleA;
      D.8468 = scaleA.5 - scaleB;
      rc = adjustScale128 (&blo, &bhi, D.8468);
      if (rc != 0) goto <D.8469>; else goto <D.8470>;
      <D.8469>:
      D.8467 = rc;
      return D.8467;
      <D.8470>:
      if (subFlag != 0) goto <D.8471>; else goto <D.8472>;
      <D.8471>:
      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) ahi.8;
      if (ahi.10 < 0) goto <D.8473>; else goto <D.8474>;
      <D.8473>:
      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.8475>; else goto <D.8476>;
      <D.8475>:
      ahi.8 = ahi;
      ahi.13 = ahi.8 + 18446744073709551615;
      ahi = ahi.13;
      <D.8476>:
      ahi.8 = ahi;
      ahi.14 = ~ahi.8;
      ahi = ahi.14;
      D.8451 = sign == 0;
      sign = (int) D.8451;
      <D.8474>:
      goto <D.8477>;
      <D.8472>:
      bhi.6 = bhi;
      blo.7 = blo;
      ahi.8 = ahi;
      alo.9 = alo;
      add128 (alo.9, ahi.8, blo.7, bhi.6, &alo, &ahi);
      <D.8477>:
      rc = rescale128 (&alo, &ahi, &scaleA, 0, 0, 28, 1);
      <D.8453>:
      if (rc != 0) goto <D.8478>; else goto <D.8479>;
      <D.8478>:
      D.8467 = rc;
      return D.8467;
      <D.8479>:
      scaleA.5 = scaleA;
      ahi.8 = ahi;
      alo.9 = alo;
      D.8467 = pack128toDecimal (pA, alo.9, ahi.8, scaleA.5, sign);
      return D.8467;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
      blo = {CLOBBER};
      bhi = {CLOBBER};
      scaleA = {CLOBBER};
    }
}


normalize128 (guint64 * pclo, guint64 * pchi, int * pScale, int roundFlag, int roundBit)
{
  long unsigned int D.8482;
  long unsigned int D.8483;
  unsigned int D.8484;
  int D.8488;
  _Bool D.8489;
  _Bool D.8490;
  _Bool D.8491;
  long unsigned int D.8494;
  int D.8497;
  guint32 overhang;
  int scale;
  int deltaScale;

  D.8482 = *pchi;
  D.8483 = D.8482 >> 32;
  overhang = (guint32) D.8483;
  scale = *pScale;
  goto <D.8044>;
  <D.8043>:
  deltaScale = 1;
  goto <D.8042>;
  <D.8041>:
  D.8484 = constantsDecadeInt32Factors[deltaScale];
  if (D.8484 > overhang) goto <D.8040>; else goto <D.8485>;
  <D.8485>:
  deltaScale = deltaScale + 1;
  <D.8042>:
  if (deltaScale <= 8) goto <D.8041>; else goto <D.8040>;
  <D.8040>:
  scale = scale - deltaScale;
  if (scale < 0) goto <D.8486>; else goto <D.8487>;
  <D.8486>:
  D.8488 = 2;
  return D.8488;
  <D.8487>:
  D.8484 = constantsDecadeInt32Factors[deltaScale];
  roundBit = div128by32 (pclo, pchi, D.8484, 0B);
  D.8482 = *pchi;
  D.8483 = D.8482 >> 32;
  overhang = (guint32) D.8483;
  D.8489 = roundFlag != 0;
  D.8490 = roundBit != 0;
  D.8491 = D.8489 & D.8490;
  if (D.8491 != 0) goto <D.8492>; else goto <D.8493>;
  <D.8492>:
  D.8494 = *pclo;
  if (D.8494 == 18446744073709551615) goto <D.8495>; else goto <D.8496>;
  <D.8495>:
  D.8482 = *pchi;
  D.8497 = (int) D.8482;
  if (D.8497 == -1) goto <D.8498>; else goto <D.8499>;
  <D.8498>:
  overhang = 1;
  <D.8499>:
  <D.8496>:
  <D.8493>:
  <D.8044>:
  if (overhang != 0) goto <D.8043>; else goto <D.8045>;
  <D.8045>:
  *pScale = scale;
  D.8489 = roundFlag != 0;
  D.8490 = roundBit != 0;
  D.8491 = D.8489 & D.8490;
  if (D.8491 != 0) goto <D.8500>; else goto <D.8501>;
  <D.8500>:
  roundUp128 (pclo, pchi);
  <D.8501>:
  D.8488 = 0;
  return D.8488;
}


div128by32 (guint64 * plo, guint64 * phi, guint32 factor, guint32 * pRest)
{
  long unsigned int D.8503;
  unsigned int D.8504;
  long unsigned int D.8505;
  long unsigned int D.8506;
  unsigned int D.8507;
  long unsigned int D.8508;
  long unsigned int D.8509;
  long unsigned int D.8510;
  unsigned int D.8511;
  long unsigned int D.8512;
  long unsigned int D.8513;
  long unsigned int D.8514;
  unsigned int D.8517;
  int D.8518;
  int iftmp.16;
  long unsigned int D.8525;
  guint64 a;
  guint64 b;
  guint64 c;
  guint64 h;

  h = *phi;
  D.8503 = h >> 32;
  D.8504 = (unsigned int) D.8503;
  a = (guint64) D.8504;
  D.8505 = (long unsigned int) factor;
  b = a / D.8505;
  D.8505 = (long unsigned int) factor;
  D.8506 = D.8505 * b;
  a = a - D.8506;
  a = a << 32;
  D.8507 = (unsigned int) h;
  D.8508 = (long unsigned int) D.8507;
  a = D.8508 | a;
  D.8505 = (long unsigned int) factor;
  c = a / D.8505;
  D.8505 = (long unsigned int) factor;
  D.8509 = D.8505 * c;
  a = a - D.8509;
  a = a << 32;
  D.8510 = b << 32;
  D.8511 = (unsigned int) c;
  D.8512 = (long unsigned int) D.8511;
  D.8513 = D.8510 | D.8512;
  *phi = D.8513;
  h = *plo;
  D.8503 = h >> 32;
  D.8504 = (unsigned int) D.8503;
  D.8514 = (long unsigned int) D.8504;
  a = D.8514 | a;
  D.8505 = (long unsigned int) factor;
  b = a / D.8505;
  D.8505 = (long unsigned int) factor;
  D.8506 = D.8505 * b;
  a = a - D.8506;
  a = a << 32;
  D.8507 = (unsigned int) h;
  D.8508 = (long unsigned int) D.8507;
  a = D.8508 | a;
  D.8505 = (long unsigned int) factor;
  c = a / D.8505;
  D.8505 = (long unsigned int) factor;
  D.8509 = D.8505 * c;
  a = a - D.8509;
  D.8510 = b << 32;
  D.8511 = (unsigned int) c;
  D.8512 = (long unsigned int) D.8511;
  D.8513 = D.8510 | D.8512;
  *plo = D.8513;
  if (pRest != 0B) goto <D.8515>; else goto <D.8516>;
  <D.8515>:
  D.8517 = (unsigned int) a;
  *pRest = D.8517;
  <D.8516>:
  a = a << 1;
  D.8505 = (long unsigned int) factor;
  if (D.8505 <= a) goto <D.8520>; else goto <D.8523>;
  <D.8523>:
  D.8505 = (long unsigned int) factor;
  if (D.8505 == a) goto <D.8524>; else goto <D.8521>;
  <D.8524>:
  D.8525 = c & 1;
  if (D.8525 != 0) goto <D.8520>; else goto <D.8521>;
  <D.8520>:
  iftmp.16 = 1;
  goto <D.8522>;
  <D.8521>:
  iftmp.16 = 0;
  <D.8522>:
  D.8518 = iftmp.16;
  return D.8518;
}


roundUp128 (guint64 * pclo, guint64 * pchi)
{
  long unsigned int D.8527;
  long unsigned int D.8528;
  long unsigned int D.8531;
  long unsigned int D.8532;

  D.8527 = *pclo;
  D.8528 = D.8527 + 1;
  *pclo = D.8528;
  D.8527 = *pclo;
  if (D.8527 == 0) goto <D.8529>; else goto <D.8530>;
  <D.8529>:
  D.8531 = *pchi;
  D.8532 = D.8531 + 1;
  *pchi = D.8532;
  <D.8530>:
}


log2withScale_128 (guint64 alo, guint64 ahi, int scale)
{
  int D.8535;
  int D.8536;
  int D.8537;
  int tlog2;

  tlog2 = log2_128 (alo, ahi);
  if (tlog2 < 0) goto <D.8533>; else goto <D.8534>;
  <D.8533>:
  tlog2 = 0;
  <D.8534>:
  D.8536 = scale * 33219;
  D.8537 = D.8536 / -10000;
  D.8535 = D.8537 + tlog2;
  return D.8535;
}


log2_128 (guint64 alo, guint64 ahi)
{
  int D.8541;
  int D.8542;

  if (ahi == 0) goto <D.8539>; else goto <D.8540>;
  <D.8539>:
  D.8541 = log2_64 (alo);
  return D.8541;
  <D.8540>:
  D.8542 = log2_64 (ahi);
  D.8541 = D.8542 + 64;
  return D.8541;
}


log2_64 (guint64 a)
{
  int D.8546;
  int D.8547;

  if (a == 0) goto <D.8544>; else goto <D.8545>;
  <D.8544>:
  D.8546 = -1000;
  return D.8546;
  <D.8545>:
  D.8547 = my_g_bit_nth_msf (a);
  D.8546 = D.8547 + 1;
  return D.8546;
}


my_g_bit_nth_msf (gsize mask)
{
  gint D.8549;
  guint64 r;

  __asm__("bsrq %1,%0
	" : "=r" r : "rm" mask);
  D.8549 = (gint) r;
  return D.8549;
}


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

  if (deltaScale < 0) goto <D.8551>; else goto <D.8552>;
  <D.8551>:
  deltaScale = -deltaScale;
  if (deltaScale > 28) goto <D.8553>; else goto <D.8554>;
  <D.8553>:
  D.8555 = 3;
  return D.8555;
  <D.8554>:
  goto <D.8108>;
  <D.8107>:
  idx = MIN_EXPR <deltaScale, 9>;
  deltaScale = deltaScale - idx;
  D.8556 = constantsDecadeInt32Factors[idx];
  div128by32 (palo, pahi, D.8556, 0B);
  <D.8108>:
  if (deltaScale > 0) goto <D.8107>; else goto <D.8109>;
  <D.8109>:
  goto <D.8557>;
  <D.8552>:
  if (deltaScale > 0) goto <D.8558>; else goto <D.8559>;
  <D.8558>:
  if (deltaScale > 28) goto <D.8560>; else goto <D.8561>;
  <D.8560>:
  D.8555 = 3;
  return D.8555;
  <D.8561>:
  goto <D.8111>;
  <D.8110>:
  idx = MIN_EXPR <deltaScale, 9>;
  deltaScale = deltaScale - idx;
  D.8556 = constantsDecadeInt32Factors[idx];
  rc = mult128by32 (palo, pahi, D.8556, 0);
  if (rc != 0) goto <D.8562>; else goto <D.8563>;
  <D.8562>:
  D.8555 = rc;
  return D.8555;
  <D.8563>:
  <D.8111>:
  if (deltaScale > 0) goto <D.8110>; else goto <D.8112>;
  <D.8112>:
  <D.8559>:
  <D.8557>:
  D.8555 = 0;
  return D.8555;
}


mult128by32 (guint64 * pclo, guint64 * pchi, guint32 factor, int roundBit)
{
  long unsigned int D.8565;
  unsigned int D.8566;
  long unsigned int D.8567;
  long unsigned int D.8568;
  unsigned int D.8571;
  long unsigned int D.8572;
  long unsigned int D.8573;
  long unsigned int D.8574;
  long unsigned int D.8575;
  long unsigned int D.8576;
  long unsigned int D.8577;
  long unsigned int D.8578;
  long unsigned int D.8579;
  long unsigned int D.8580;
  unsigned int D.8581;
  long unsigned int D.8582;
  long unsigned int D.8583;
  long unsigned int D.8584;
  long unsigned int D.8585;
  int D.8586;
  int iftmp.17;
  long unsigned int D.8588;
  guint64 a;
  guint32 h0;
  guint32 h1;

  D.8565 = *pclo;
  D.8566 = (unsigned int) D.8565;
  D.8567 = (long unsigned int) D.8566;
  D.8568 = (long unsigned int) factor;
  a = D.8567 * D.8568;
  if (roundBit != 0) goto <D.8569>; else goto <D.8570>;
  <D.8569>:
  D.8571 = factor / 2;
  D.8572 = (long unsigned int) D.8571;
  a = D.8572 + a;
  <D.8570>:
  h0 = (guint32) a;
  a = a >> 32;
  D.8565 = *pclo;
  D.8573 = D.8565 >> 32;
  D.8574 = (long unsigned int) factor;
  D.8575 = D.8573 * D.8574;
  a = D.8575 + a;
  h1 = (guint32) a;
  D.8576 = (long unsigned int) h1;
  D.8577 = D.8576 << 32;
  D.8578 = (long unsigned int) h0;
  D.8579 = D.8577 | D.8578;
  *pclo = D.8579;
  a = a >> 32;
  D.8580 = *pchi;
  D.8581 = (unsigned int) D.8580;
  D.8582 = (long unsigned int) D.8581;
  D.8568 = (long unsigned int) factor;
  D.8583 = D.8582 * D.8568;
  a = D.8583 + a;
  h0 = (guint32) a;
  a = a >> 32;
  D.8580 = *pchi;
  D.8584 = D.8580 >> 32;
  D.8574 = (long unsigned int) factor;
  D.8585 = D.8584 * D.8574;
  a = D.8585 + a;
  h1 = (guint32) a;
  D.8576 = (long unsigned int) h1;
  D.8577 = D.8576 << 32;
  D.8578 = (long unsigned int) h0;
  D.8579 = D.8577 | D.8578;
  *pchi = D.8579;
  D.8588 = a >> 32;
  if (D.8588 == 0) goto <D.8589>; else goto <D.8590>;
  <D.8589>:
  iftmp.17 = 0;
  goto <D.8591>;
  <D.8590>:
  iftmp.17 = 2;
  <D.8591>:
  D.8586 = iftmp.17;
  return D.8586;
}


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.8593>; else goto <D.8594>;
  <D.8593>:
  chi = chi + 18446744073709551615;
  <D.8594>:
  *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.8595>; else goto <D.8596>;
  <D.8595>:
  ahi = ahi + 1;
  <D.8596>:
  ahi = ahi + bhi;
  *pclo = alo;
  *pchi = ahi;
}


rescale128 (guint64 * pclo, guint64 * pchi, int * pScale, int texp, int minScale, int maxScale, int roundFlag)
{
  long unsigned int D.8599;
  long unsigned int D.8600;
  long unsigned int D.8603;
  long unsigned int D.8608;
  long unsigned int D.8609;
  int D.8610;
  int D.8611;
  long unsigned int D.8612;
  long unsigned int D.8613;
  int D.8614;
  long unsigned int D.8615;
  long unsigned int D.8616;
  long unsigned int D.8617;
  _Bool D.8618;
  long int D.8619;
  long int D.8620;
  _Bool D.8623;
  long int D.8624;
  long int D.8625;
  int D.8630;
  long unsigned int D.8633;
  int D.8637;
  unsigned int D.8641;
  _Bool D.8642;
  _Bool D.8643;
  _Bool D.8644;
  int D.8655;
  guint32 factor;
  guint32 overhang;
  int scale;
  int i;
  int rc;
  int roundBit;

  roundBit = 0;
  scale = *pScale;
  if (texp > 0) goto <D.8597>; else goto <D.8598>;
  <D.8597>:
  goto <D.8135>;
  <D.8134>:
  D.8599 = *pchi;
  D.8600 = D.8599 >> 32;
  overhang = (guint32) D.8600;
  if (overhang != 0) goto <D.8601>; else goto <D.8602>;
  <D.8601>:
  {
    int msf;
    int shift;

    D.8603 = (long unsigned int) overhang;
    msf = my_g_bit_nth_msf (D.8603);
    shift = msf + -11;
    if (shift >= texp) goto <D.8604>; else goto <D.8605>;
    <D.8604>:
    shift = texp + -1;
    <D.8605>:
    if (shift > 0) goto <D.8606>; else goto <D.8607>;
    <D.8606>:
    texp = texp - shift;
    D.8608 = *pclo;
    D.8609 = D.8608 >> shift;
    D.8599 = *pchi;
    D.8610 = 1 << shift;
    D.8611 = D.8610 + -1;
    D.8612 = (long unsigned int) D.8611;
    D.8613 = D.8599 & D.8612;
    D.8614 = 64 - shift;
    D.8615 = D.8613 << D.8614;
    D.8616 = D.8609 | D.8615;
    *pclo = D.8616;
    D.8599 = *pchi;
    D.8617 = D.8599 >> shift;
    *pchi = D.8617;
    overhang = overhang >> shift;
    D.8618 = texp <= 0;
    D.8619 = (long int) D.8618;
    D.8620 = __builtin_expect (D.8619, 0);
    if (D.8620 != 0) goto <D.8621>; else goto <D.8622>;
    <D.8621>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "decimal.c", 730, "texp > 0");
    <D.8622>:
    D.8623 = overhang <= 1024;
    D.8624 = (long int) D.8623;
    D.8625 = __builtin_expect (D.8624, 0);
    if (D.8625 != 0) goto <D.8626>; else goto <D.8627>;
    <D.8626>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "decimal.c", 731, "overhang > (2 << DECIMAL_MAX_INTFACTORS)");
    <D.8627>:
    <D.8607>:
  }
  <D.8602>:
  goto <D.8131>;
  <D.8130>:
  texp = texp + -1;
  if (texp == 0) goto <D.8628>; else goto <D.8629>;
  <D.8628>:
  D.8608 = *pclo;
  D.8630 = (int) D.8608;
  roundBit = D.8630 & 1;
  <D.8629>:
  rshift128 (pclo, pchi);
  overhang = overhang >> 1;
  <D.8131>:
  if (texp > 0) goto <D.8631>; else goto <D.8132>;
  <D.8631>:
  if (overhang > 1024) goto <D.8130>; else goto <D.8632>;
  <D.8632>:
  D.8608 = *pclo;
  D.8633 = D.8608 & 1;
  if (D.8633 == 0) goto <D.8130>; else goto <D.8132>;
  <D.8132>:
  if (texp > 9) goto <D.8634>; else goto <D.8635>;
  <D.8634>:
  i = 9;
  goto <D.8636>;
  <D.8635>:
  i = texp;
  <D.8636>:
  D.8637 = scale + i;
  if (D.8637 > maxScale) goto <D.8638>; else goto <D.8639>;
  <D.8638>:
  i = maxScale - scale;
  <D.8639>:
  if (i == 0) goto <D.8133>; else goto <D.8640>;
  <D.8640>:
  texp = texp - i;
  scale = scale + i;
  D.8641 = constantsDecadeInt32Factors[i];
  factor = D.8641 >> i;
  mult128by32 (pclo, pchi, factor, 0);
  <D.8135>:
  D.8642 = texp > 0;
  D.8643 = scale <= maxScale;
  D.8644 = D.8642 & D.8643;
  if (D.8644 != 0) goto <D.8134>; else goto <D.8133>;
  <D.8133>:
  goto <D.8137>;
  <D.8136>:
  texp = texp + -1;
  if (texp == 0) goto <D.8645>; else goto <D.8646>;
  <D.8645>:
  D.8608 = *pclo;
  D.8630 = (int) D.8608;
  roundBit = D.8630 & 1;
  <D.8646>:
  rshift128 (pclo, pchi);
  <D.8137>:
  if (texp > 0) goto <D.8136>; else goto <D.8138>;
  <D.8138>:
  <D.8598>:
  goto <D.8140>;
  <D.8139>:
  i = scale - maxScale;
  if (i > 9) goto <D.8647>; else goto <D.8648>;
  <D.8647>:
  i = 9;
  <D.8648>:
  scale = scale - i;
  D.8641 = constantsDecadeInt32Factors[i];
  roundBit = div128by32 (pclo, pchi, D.8641, 0B);
  <D.8140>:
  if (scale > maxScale) goto <D.8139>; else goto <D.8141>;
  <D.8141>:
  goto <D.8143>;
  <D.8142>:
  if (roundFlag == 0) goto <D.8649>; else goto <D.8650>;
  <D.8649>:
  roundBit = 0;
  <D.8650>:
  i = minScale - scale;
  if (i > 9) goto <D.8651>; else goto <D.8652>;
  <D.8651>:
  i = 9;
  <D.8652>:
  scale = scale + i;
  D.8641 = constantsDecadeInt32Factors[i];
  rc = mult128by32 (pclo, pchi, D.8641, roundBit);
  if (rc != 0) goto <D.8653>; else goto <D.8654>;
  <D.8653>:
  D.8655 = rc;
  return D.8655;
  <D.8654>:
  roundBit = 0;
  <D.8143>:
  if (scale < minScale) goto <D.8142>; else goto <D.8144>;
  <D.8144>:
  *pScale = scale;
  D.8655 = normalize128 (pclo, pchi, pScale, roundFlag, roundBit);
  return D.8655;
}


rshift128 (guint64 * pclo, guint64 * pchi)
{
  long unsigned int D.8657;
  long unsigned int D.8658;
  long unsigned int D.8659;
  long unsigned int D.8660;
  long unsigned int D.8661;
  long unsigned int D.8662;

  D.8657 = *pclo;
  D.8658 = D.8657 >> 1;
  *pclo = D.8658;
  D.8657 = *pclo;
  D.8659 = *pchi;
  D.8660 = D.8659 << 63;
  D.8661 = D.8657 | D.8660;
  *pclo = D.8661;
  D.8659 = *pchi;
  D.8662 = D.8659 >> 1;
  *pchi = D.8662;
}


pack128toDecimal (struct decimal_repr * pA, guint64 alo, guint64 ahi, int scale, int sign)
{
  unsigned int scale.18;
  long unsigned int D.8667;
  int D.8668;
  unsigned int D.8669;
  long unsigned int D.8670;
  unsigned int D.8671;
  unsigned int D.8672;
  unsigned char D.8673;
  <unnamed-unsigned:1> D.8674;
  unsigned char D.8675;

  scale.18 = (unsigned int) scale;
  if (scale.18 > 28) goto <D.8663>; else goto <D.8666>;
  <D.8666>:
  D.8667 = ahi >> 32;
  if (D.8667 != 0) goto <D.8663>; else goto <D.8664>;
  <D.8663>:
  D.8668 = 2;
  return D.8668;
  <D.8664>:
  D.8669 = (unsigned int) alo;
  pA->lo32 = D.8669;
  D.8670 = alo >> 32;
  D.8671 = (unsigned int) D.8670;
  pA->mid32 = D.8671;
  D.8672 = (unsigned int) ahi;
  pA->hi32 = D.8672;
  D.8673 = (unsigned char) sign;
  D.8674 = (<unnamed-unsigned:1>) D.8673;
  pA->u.signscale.sign = D.8674;
  D.8675 = (unsigned char) scale;
  pA->u.signscale.scale = D.8675;
  D.8668 = 0;
  return D.8668;
}


mono_double2decimal (struct decimal_repr * pA, double val, gint32 digits)
{
  long unsigned int D.8677;
  signed long D.8678;
  _Bool D.8679;
  long unsigned int D.8680;
  short unsigned int D.8681;
  long long unsigned int D.8682;
  long long unsigned int alo.19;
  int D.8684;
  int D.8685;
  _Bool D.8686;
  _Bool D.8687;
  _Bool D.8688;
  gint32 D.8691;
  _Bool D.8692;
  _Bool D.8693;
  _Bool D.8694;
  int D.8699;
  long unsigned int ahi.20;
  long unsigned int alo.21;
  int D.8706;
  int D.8707;
  int scale.22;
  int scale.23;
  long unsigned int D.8710;
  long unsigned int D.8713;
  int scale.24;
  int D.8719;
  guint64 alo;
  guint64 ahi;
  guint64 * p;
  int sigDigits;
  int sign;
  int texp;
  int rc;
  int scale;
  guint16 k;

  try
    {
      p = &val;
      D.8677 = *p;
      D.8678 = (signed long) D.8677;
      D.8679 = D.8678 < 0;
      sign = (int) D.8679;
      D.8677 = *p;
      D.8680 = D.8677 >> 52;
      D.8681 = (short unsigned int) D.8680;
      k = D.8681 & 2047;
      D.8677 = *p;
      D.8682 = D.8677 & 4503599627370495;
      alo.19 = D.8682 | 4503599627370496;
      alo = alo.19;
      ahi = 0;
      D.8684 = (int) k;
      D.8685 = D.8684 & 2047;
      texp = D.8685 + -1023;
      D.8686 = k == 2047;
      D.8687 = texp > 95;
      D.8688 = D.8686 | D.8687;
      if (D.8688 != 0) goto <D.8689>; else goto <D.8690>;
      <D.8689>:
      D.8691 = 2;
      return D.8691;
      <D.8690>:
      D.8692 = k == 0;
      D.8693 = texp < -93;
      D.8694 = D.8692 | D.8693;
      if (D.8694 != 0) goto <D.8695>; else goto <D.8696>;
      <D.8695>:
      memset (pA, 0, 16);
      D.8691 = 0;
      return D.8691;
      <D.8696>:
      texp = texp + -52;
      if (texp > 0) goto <D.8697>; else goto <D.8698>;
      <D.8697>:
      goto <D.8218>;
      <D.8217>:
      lshift128 (&alo, &ahi);
      texp = texp + -1;
      <D.8218>:
      if (texp > 0) goto <D.8217>; else goto <D.8219>;
      <D.8219>:
      <D.8698>:
      scale = 0;
      D.8699 = -texp;
      rc = rescale128 (&alo, &ahi, &scale, D.8699, 0, 28, 1);
      if (rc != 0) goto <D.8700>; else goto <D.8701>;
      <D.8700>:
      D.8691 = rc;
      return D.8691;
      <D.8701>:
      ahi.20 = ahi;
      alo.21 = alo;
      sigDigits = calcDigits (alo.21, ahi.20);
      if (sigDigits > digits) goto <D.8704>; else goto <D.8705>;
      <D.8704>:
      D.8706 = sigDigits - digits;
      div128DecadeFactor (&alo, &ahi, D.8706);
      D.8707 = digits - sigDigits;
      scale.22 = scale;
      scale.23 = D.8707 + scale.22;
      scale = scale.23;
      D.8710 = dec128decadeFactors[digits].hi;
      ahi.20 = ahi;
      if (D.8710 == ahi.20) goto <D.8711>; else goto <D.8712>;
      <D.8711>:
      D.8713 = dec128decadeFactors[digits].lo;
      alo.21 = alo;
      if (D.8713 == alo.21) goto <D.8714>; else goto <D.8715>;
      <D.8714>:
      div128by32 (&alo, &ahi, 10, 0B);
      scale.22 = scale;
      scale.24 = scale.22 + -1;
      scale = scale.24;
      <D.8715>:
      <D.8712>:
      scale.22 = scale;
      if (scale.22 < 0) goto <D.8717>; else goto <D.8718>;
      <D.8717>:
      scale.22 = scale;
      D.8719 = -scale.22;
      rc = mult128DecadeFactor (&alo, &ahi, D.8719);
      if (rc != 0) goto <D.8720>; else goto <D.8721>;
      <D.8720>:
      D.8691 = rc;
      return D.8691;
      <D.8721>:
      scale = 0;
      <D.8718>:
      <D.8705>:
      trimExcessScale (&alo, &ahi, &scale);
      scale.22 = scale;
      ahi.20 = ahi;
      alo.21 = alo;
      D.8691 = pack128toDecimal (pA, alo.21, ahi.20, scale.22, sign);
      return D.8691;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
      scale = {CLOBBER};
    }
}


memset (void * __dest, int __ch, size_t __len)
{
  int D.8726;
  int D.8731;
  void * D.8733;
  long unsigned int D.8734;

  D.8726 = __builtin_constant_p (__len);
  if (D.8726 != 0) goto <D.8727>; else goto <D.8728>;
  <D.8727>:
  if (__len == 0) goto <D.8729>; else goto <D.8730>;
  <D.8729>:
  D.8731 = __builtin_constant_p (__ch);
  if (D.8731 == 0) goto <D.8724>; else goto <D.8732>;
  <D.8732>:
  if (__ch != 0) goto <D.8724>; else goto <D.8725>;
  <D.8724>:
  __warn_memset_zero_len ();
  D.8733 = __dest;
  return D.8733;
  <D.8725>:
  <D.8730>:
  <D.8728>:
  D.8734 = __builtin_object_size (__dest, 0);
  D.8733 = __builtin___memset_chk (__dest, __ch, __len, D.8734);
  return D.8733;
}


lshift128 (guint64 * pclo, guint64 * pchi)
{
  long unsigned int D.8736;
  long unsigned int D.8737;
  long unsigned int D.8738;
  long long unsigned int D.8739;
  long long unsigned int D.8740;
  long unsigned int D.8741;

  D.8736 = *pchi;
  D.8737 = D.8736 << 1;
  *pchi = D.8737;
  D.8736 = *pchi;
  D.8738 = *pclo;
  D.8739 = D.8738 >> 63;
  D.8740 = D.8736 | D.8739;
  *pchi = D.8740;
  D.8738 = *pclo;
  D.8741 = D.8738 << 1;
  *pclo = D.8741;
}


calcDigits (guint64 alo, guint64 ahi)
{
  int D.8746;
  int D.8748;
  int D.8749;
  long unsigned int D.8752;
  long unsigned int D.8755;
  int tlog2;
  int tlog10;

  tlog2 = 0;
  if (ahi == 0) goto <D.8742>; else goto <D.8743>;
  <D.8742>:
  if (alo == 0) goto <D.8744>; else goto <D.8745>;
  <D.8744>:
  D.8746 = 0;
  return D.8746;
  <D.8745>:
  tlog2 = log2_64 (alo);
  goto <D.8747>;
  <D.8743>:
  D.8748 = log2_64 (ahi);
  tlog2 = D.8748 + 64;
  <D.8747>:
  D.8749 = tlog2 * 1000;
  tlog10 = D.8749 / 3322;
  D.8752 = dec128decadeFactors[tlog10].hi;
  if (D.8752 > ahi) goto <D.8750>; else goto <D.8753>;
  <D.8753>:
  D.8752 = dec128decadeFactors[tlog10].hi;
  if (D.8752 == ahi) goto <D.8754>; else goto <D.8751>;
  <D.8754>:
  D.8755 = dec128decadeFactors[tlog10].lo;
  if (D.8755 > alo) goto <D.8750>; else goto <D.8751>;
  <D.8750>:
  tlog10 = tlog10 + -1;
  <D.8751>:
  D.8746 = tlog10 + 1;
  return D.8746;
}


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

  roundBit = 0;
  goto <D.8195>;
  <D.8194>:
  idx = MIN_EXPR <powerOfTen, 9>;
  powerOfTen = powerOfTen - idx;
  D.8757 = constantsDecadeInt32Factors[idx];
  roundBit = div128by32 (palo, pahi, D.8757, 0B);
  <D.8195>:
  if (powerOfTen > 0) goto <D.8194>; else goto <D.8196>;
  <D.8196>:
  if (roundBit != 0) goto <D.8758>; else goto <D.8759>;
  <D.8758>:
  roundUp128 (palo, pahi);
  <D.8759>:
}


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

  goto <D.7972>;
  <D.7971>:
  idx = MIN_EXPR <powerOfTen, 9>;
  powerOfTen = powerOfTen - idx;
  D.8760 = constantsDecadeInt32Factors[idx];
  rc = mult128by32 (pclo, pchi, D.8760, 0);
  if (rc != 0) goto <D.8761>; else goto <D.8762>;
  <D.8761>:
  D.8763 = rc;
  return D.8763;
  <D.8762>:
  <D.7972>:
  if (powerOfTen > 0) goto <D.7971>; else goto <D.7973>;
  <D.7973>:
  D.8763 = 0;
  return D.8763;
}


trimExcessScale (guint64 * pclo, guint64 * pchi, int * pScale)
{
  long unsigned int ilo.25;
  long unsigned int ihi.26;
  unsigned int rest.27;
  int D.8772;
  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.8159>;
      <D.8158>:
      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.8768>; else goto <D.8769>;
      <D.8768>:
      i = i + -1;
      if (i == 0) goto <D.8770>; else goto <D.8771>;
      <D.8770>:
      return;
      <D.8771>:
      *pclo = lastlo;
      *pchi = lasthi;
      D.8772 = scale + 1;
      *pScale = D.8772;
      return;
      <D.8769>:
      <D.8159>:
      if (scale > 0) goto <D.8158>; else goto <D.8160>;
      <D.8160>:
    }
  finally
    {
      ilo = {CLOBBER};
      ihi = {CLOBBER};
    }
}


mono_string2decimal (struct decimal_repr * pA, struct MonoString * str, gint32 decrDecimal, gint32 sign)
{
  long unsigned int ahi.28;
  short unsigned int D.8777;
  int D.8778;
  unsigned int n.29;
  gint32 D.8782;
  int iftmp.30;
  int D.8788;
  int D.8792;
  int D.8796;
  int D.8797;
  _Bool D.8800;
  _Bool D.8801;
  _Bool D.8802;
  int scale.31;
  long unsigned int D.8808;
  long unsigned int D.8809;
  gushort * D.8810;
  short unsigned int D.8811;
  int D.8812;
  sizetype D.8820;
  gushort * D.8821;
  short unsigned int D.8822;
  int D.8823;
  int D.8828;
  long unsigned int alo.32;
  int scale.33;
  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.8239>;
      <D.8238>:
      len = len + 1;
      p = p + 2;
      <D.8239>:
      D.8777 = *p;
      if (D.8777 != 0) goto <D.8238>; else goto <D.8240>;
      <D.8240>:
      p = buf;
      i = 0;
      goto <D.8243>;
      <D.8242>:
      D.8777 = *p;
      D.8778 = (int) D.8777;
      n = D.8778 + -48;
      n.29 = (unsigned int) n;
      if (n.29 > 9) goto <D.8780>; else goto <D.8781>;
      <D.8780>:
      D.8782 = 2;
      return D.8782;
      <D.8781>:
      if (n != 0) goto <D.8783>; else goto <D.8784>;
      <D.8783>:
      if (sigLen < 0) goto <D.8785>; else goto <D.8786>;
      <D.8785>:
      firstNonZero = i;
      D.8788 = len - firstNonZero;
      if (D.8788 > 29) goto <D.8789>; else goto <D.8790>;
      <D.8789>:
      iftmp.30 = firstNonZero + 29;
      goto <D.8791>;
      <D.8790>:
      iftmp.30 = len;
      <D.8791>:
      sigLen = iftmp.30;
      D.8792 = sigLen + 1;
      if (D.8792 < decrDecimal) goto <D.8793>; else goto <D.8794>;
      <D.8793>:
      D.8782 = 2;
      return D.8782;
      <D.8794>:
      <D.8786>:
      if (i >= sigLen) goto <D.8241>; else goto <D.8795>;
      <D.8795>:
      D.8796 = sigLen + -1;
      D.8797 = D.8796 - i;
      rc = incMultConstant128 (&alo, &ahi, D.8797, n);
      if (rc != 0) goto <D.8798>; else goto <D.8799>;
      <D.8798>:
      D.8782 = rc;
      return D.8782;
      <D.8799>:
      <D.8784>:
      i = i + 1;
      p = p + 2;
      <D.8243>:
      D.8777 = *p;
      if (D.8777 != 0) goto <D.8242>; else goto <D.8241>;
      <D.8241>:
      D.8800 = sigLen < 0;
      D.8801 = len > decrDecimal;
      D.8802 = D.8800 & D.8801;
      if (D.8802 != 0) goto <D.8803>; else goto <D.8804>;
      <D.8803>:
      sigLen = len;
      <D.8804>:
      scale.31 = sigLen - decrDecimal;
      scale = scale.31;
      if (i < len) goto <D.8806>; else goto <D.8807>;
      <D.8806>:
      D.8808 = (long unsigned int) i;
      D.8809 = D.8808 * 2;
      D.8810 = buf + D.8809;
      D.8811 = *D.8810;
      D.8812 = (int) D.8811;
      n = D.8812 + -48;
      n.29 = (unsigned int) n;
      if (n.29 > 9) goto <D.8813>; else goto <D.8814>;
      <D.8813>:
      D.8782 = 2;
      return D.8782;
      <D.8814>:
      if (n > 5) goto <D.8815>; else goto <D.8816>;
      <D.8815>:
      roundBit = 1;
      goto <D.8817>;
      <D.8816>:
      if (n == 5) goto <D.8818>; else goto <D.8819>;
      <D.8818>:
      D.8808 = (long unsigned int) i;
      D.8809 = D.8808 * 2;
      D.8820 = D.8809 + 18446744073709551614;
      D.8821 = buf + D.8820;
      D.8822 = *D.8821;
      D.8823 = (int) D.8822;
      n = D.8823 + -48;
      i = i + 1;
      goto <D.8246>;
      <D.8245>:
      D.8808 = (long unsigned int) i;
      D.8809 = D.8808 * 2;
      D.8810 = buf + D.8809;
      D.8811 = *D.8810;
      if (D.8811 != 48) goto <D.8244>; else goto <D.8824>;
      <D.8824>:
      i = i + 1;
      <D.8246>:
      if (i < len) goto <D.8245>; else goto <D.8244>;
      <D.8244>:
      if (i < len) goto <D.8825>; else goto <D.8827>;
      <D.8827>:
      D.8828 = n % 2;
      if (D.8828 == 1) goto <D.8825>; else goto <D.8826>;
      <D.8825>:
      roundBit = 1;
      <D.8826>:
      <D.8819>:
      <D.8817>:
      <D.8807>:
      ahi.28 = ahi;
      if (ahi.28 != 0) goto <D.8829>; else goto <D.8830>;
      <D.8829>:
      rc = normalize128 (&alo, &ahi, &scale, 1, roundBit);
      if (rc != 0) goto <D.8831>; else goto <D.8832>;
      <D.8831>:
      D.8782 = rc;
      return D.8782;
      <D.8832>:
      <D.8830>:
      alo.32 = alo;
      if (alo.32 == 0) goto <D.8835>; else goto <D.8833>;
      <D.8835>:
      ahi.28 = ahi;
      if (ahi.28 == 0) goto <D.8836>; else goto <D.8833>;
      <D.8836>:
      scale.33 = scale;
      if (scale.33 <= 0) goto <D.8838>; else goto <D.8833>;
      <D.8838>:
      D.8782 = 0;
      return D.8782;
      <D.8833>:
      scale.31 = sigLen - decrDecimal;
      ahi.28 = ahi;
      alo.32 = alo;
      D.8782 = pack128toDecimal (pA, alo.32, ahi.28, scale.31, sign);
      return D.8782;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
      scale = {CLOBBER};
    }
}


incMultConstant128 (guint64 * palo, guint64 * pahi, int idx, int factor)
{
  long unsigned int blo.34;
  long unsigned int bhi.35;
  unsigned int factor.36;
  long unsigned int bhi.37;
  int D.8849;
  long unsigned int blo.38;
  long unsigned int D.8851;
  long unsigned int D.8852;
  guint64 blo;
  guint64 bhi;
  guint64 h;

  try
    {
      blo.34 = dec128decadeFactors[idx].lo;
      blo = blo.34;
      bhi.35 = dec128decadeFactors[idx].hi;
      bhi = bhi.35;
      h = bhi;
      if (factor != 1) goto <D.8843>; else goto <D.8844>;
      <D.8843>:
      factor.36 = (unsigned int) factor;
      mult128by32 (&blo, &bhi, factor.36, 0);
      bhi.37 = bhi;
      if (h > bhi.37) goto <D.8847>; else goto <D.8848>;
      <D.8847>:
      D.8849 = 2;
      return D.8849;
      <D.8848>:
      <D.8844>:
      h = *pahi;
      bhi.37 = bhi;
      blo.38 = blo;
      D.8851 = *pahi;
      D.8852 = *palo;
      add128 (D.8852, D.8851, blo.38, bhi.37, palo, pahi);
      D.8851 = *pahi;
      if (D.8851 < h) goto <D.8853>; else goto <D.8854>;
      <D.8853>:
      D.8849 = 2;
      return D.8849;
      <D.8854>:
      D.8849 = 0;
      return D.8849;
    }
  finally
    {
      blo = {CLOBBER};
      bhi = {CLOBBER};
    }
}


mono_decimal2UInt64 (struct decimal_repr * pA, guint64 * pResult)
{
  unsigned int D.8857;
  long unsigned int D.8858;
  long unsigned int D.8859;
  unsigned int D.8860;
  long unsigned int D.8861;
  long unsigned int alo.39;
  unsigned int D.8863;
  long unsigned int ahi.40;
  unsigned char D.8865;
  long unsigned int ahi.41;
  long unsigned int alo.42;
  unsigned char D.8874;
  unsigned char D.8875;
  gint32 D.8876;
  guint64 alo;
  guint64 ahi;
  int scale;

  try
    {
      D.8857 = pA->mid32;
      D.8858 = (long unsigned int) D.8857;
      D.8859 = D.8858 << 32;
      D.8860 = pA->lo32;
      D.8861 = (long unsigned int) D.8860;
      alo.39 = D.8859 | D.8861;
      alo = alo.39;
      D.8863 = pA->hi32;
      ahi.40 = (long unsigned int) D.8863;
      ahi = ahi.40;
      D.8865 = pA->u.signscale.scale;
      scale = (int) D.8865;
      if (scale > 0) goto <D.8866>; else goto <D.8867>;
      <D.8866>:
      div128DecadeFactor (&alo, &ahi, scale);
      <D.8867>:
      ahi.41 = ahi;
      if (ahi.41 != 0) goto <D.8868>; else goto <D.8871>;
      <D.8871>:
      alo.42 = alo;
      if (alo.42 != 0) goto <D.8873>; else goto <D.8869>;
      <D.8873>:
      D.8874 = BIT_FIELD_REF <*pA, 8, 24>;
      D.8875 = D.8874 & 128;
      if (D.8875 != 0) goto <D.8868>; else goto <D.8869>;
      <D.8868>:
      D.8876 = 2;
      return D.8876;
      <D.8869>:
      alo.42 = alo;
      *pResult = alo.42;
      D.8876 = 0;
      return D.8876;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
    }
}


mono_decimal2Int64 (struct decimal_repr * pA, gint64 * pResult)
{
  unsigned int D.8879;
  long unsigned int D.8880;
  long unsigned int D.8881;
  unsigned int D.8882;
  long unsigned int D.8883;
  long unsigned int alo.43;
  unsigned int D.8885;
  long unsigned int ahi.44;
  unsigned char D.8887;
  long unsigned int ahi.45;
  gint32 D.8893;
  <unnamed-unsigned:1> D.8894;
  long unsigned int alo.46;
  long unsigned int D.8902;
  long int D.8903;
  signed long alo.47;
  long int alo.48;
  guint64 alo;
  guint64 ahi;
  int sign;
  int scale;

  try
    {
      D.8879 = pA->mid32;
      D.8880 = (long unsigned int) D.8879;
      D.8881 = D.8880 << 32;
      D.8882 = pA->lo32;
      D.8883 = (long unsigned int) D.8882;
      alo.43 = D.8881 | D.8883;
      alo = alo.43;
      D.8885 = pA->hi32;
      ahi.44 = (long unsigned int) D.8885;
      ahi = ahi.44;
      D.8887 = pA->u.signscale.scale;
      scale = (int) D.8887;
      if (scale > 0) goto <D.8888>; else goto <D.8889>;
      <D.8888>:
      div128DecadeFactor (&alo, &ahi, scale);
      <D.8889>:
      ahi.45 = ahi;
      if (ahi.45 != 0) goto <D.8891>; else goto <D.8892>;
      <D.8891>:
      D.8893 = 2;
      return D.8893;
      <D.8892>:
      D.8894 = pA->u.signscale.sign;
      sign = (int) D.8894;
      if (sign != 0) goto <D.8897>; else goto <D.8895>;
      <D.8897>:
      alo.46 = alo;
      if (alo.46 != 0) goto <D.8899>; else goto <D.8895>;
      <D.8899>:
      alo.46 = alo;
      if (alo.46 > 9223372036854775808) goto <D.8900>; else goto <D.8901>;
      <D.8900>:
      D.8893 = 2;
      return D.8893;
      <D.8901>:
      alo.46 = alo;
      D.8902 = -alo.46;
      D.8903 = (long int) D.8902;
      *pResult = D.8903;
      goto <D.8896>;
      <D.8895>:
      alo.46 = alo;
      alo.47 = (signed long) alo.46;
      if (alo.47 < 0) goto <D.8905>; else goto <D.8906>;
      <D.8905>:
      D.8893 = 2;
      return D.8893;
      <D.8906>:
      alo.46 = alo;
      alo.48 = (long int) alo.46;
      *pResult = alo.48;
      <D.8896>:
      D.8893 = 0;
      return D.8893;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
    }
}


mono_decimalFloorAndTrunc (struct decimal_repr * pA, gint32 floorFlag)
{
  unsigned char D.8910;
  unsigned int D.8913;
  long unsigned int D.8914;
  long unsigned int D.8915;
  unsigned int D.8916;
  long unsigned int D.8917;
  long unsigned int alo.49;
  unsigned int D.8919;
  long unsigned int ahi.50;
  <unnamed-unsigned:1> D.8921;
  int iftmp.51;
  unsigned int rest.52;
  _Bool D.8928;
  _Bool D.8929;
  _Bool D.8930;
  long unsigned int ahi.53;
  long unsigned int alo.54;
  guint64 alo;
  guint64 ahi;
  guint32 factor;
  guint32 rest;
  int scale;
  int sign;
  int idx;
  int hasRest;

  try
    {
      hasRest = 0;
      D.8910 = pA->u.signscale.scale;
      scale = (int) D.8910;
      if (scale == 0) goto <D.8911>; else goto <D.8912>;
      <D.8911>:
      return;
      <D.8912>:
      D.8913 = pA->mid32;
      D.8914 = (long unsigned int) D.8913;
      D.8915 = D.8914 << 32;
      D.8916 = pA->lo32;
      D.8917 = (long unsigned int) D.8916;
      alo.49 = D.8915 | D.8917;
      alo = alo.49;
      D.8919 = pA->hi32;
      ahi.50 = (long unsigned int) D.8919;
      ahi = ahi.50;
      D.8921 = pA->u.signscale.sign;
      sign = (int) D.8921;
      goto <D.8275>;
      <D.8274>:
      idx = MIN_EXPR <scale, 9>;
      factor = constantsDecadeInt32Factors[idx];
      scale = scale - idx;
      div128by32 (&alo, &ahi, factor, &rest);
      if (hasRest != 0) goto <D.8923>; else goto <D.8926>;
      <D.8926>:
      rest.52 = rest;
      if (rest.52 != 0) goto <D.8923>; else goto <D.8924>;
      <D.8923>:
      iftmp.51 = 1;
      goto <D.8925>;
      <D.8924>:
      iftmp.51 = 0;
      <D.8925>:
      hasRest = iftmp.51;
      <D.8275>:
      if (scale > 0) goto <D.8274>; else goto <D.8276>;
      <D.8276>:
      D.8928 = floorFlag != 0;
      D.8929 = hasRest != 0;
      D.8930 = D.8928 & D.8929;
      if (D.8930 != 0) goto <D.8931>; else goto <D.8932>;
      <D.8931>:
      if (sign != 0) goto <D.8933>; else goto <D.8934>;
      <D.8933>:
      roundUp128 (&alo, &ahi);
      <D.8934>:
      <D.8932>:
      ahi.53 = ahi;
      alo.54 = alo;
      pack128toDecimal (pA, alo.54, ahi.53, 0, sign);
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
      rest = {CLOBBER};
    }
}


mono_decimalRound (struct decimal_repr * pA, gint32 decimals)
{
  unsigned int D.8940;
  long unsigned int D.8941;
  long unsigned int D.8942;
  unsigned int D.8943;
  long unsigned int D.8944;
  long unsigned int alo.55;
  unsigned int D.8946;
  long unsigned int ahi.56;
  unsigned char D.8948;
  <unnamed-unsigned:1> D.8949;
  int D.8952;
  long unsigned int ahi.57;
  long unsigned int alo.58;
  guint64 alo;
  guint64 ahi;
  int scale;
  int sign;

  try
    {
      D.8940 = pA->mid32;
      D.8941 = (long unsigned int) D.8940;
      D.8942 = D.8941 << 32;
      D.8943 = pA->lo32;
      D.8944 = (long unsigned int) D.8943;
      alo.55 = D.8942 | D.8944;
      alo = alo.55;
      D.8946 = pA->hi32;
      ahi.56 = (long unsigned int) D.8946;
      ahi = ahi.56;
      D.8948 = pA->u.signscale.scale;
      scale = (int) D.8948;
      D.8949 = pA->u.signscale.sign;
      sign = (int) D.8949;
      if (scale > decimals) goto <D.8950>; else goto <D.8951>;
      <D.8950>:
      D.8952 = scale - decimals;
      div128DecadeFactor (&alo, &ahi, D.8952);
      scale = decimals;
      <D.8951>:
      ahi.57 = ahi;
      alo.58 = alo;
      pack128toDecimal (pA, alo.58, ahi.57, scale, sign);
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
    }
}


mono_decimalMult (struct decimal_repr * pA, struct decimal_repr * pB)
{
  unsigned int D.8955;
  unsigned int D.8956;
  unsigned int D.8957;
  unsigned int D.8958;
  unsigned int D.8959;
  unsigned int D.8960;
  unsigned char D.8961;
  int D.8962;
  unsigned char D.8963;
  int D.8964;
  int scale.59;
  <unnamed-unsigned:1> D.8966;
  int D.8967;
  <unnamed-unsigned:1> D.8968;
  int D.8969;
  long unsigned int high.60;
  int scale.61;
  int scale.62;
  int scale.63;
  long unsigned int mid.64;
  long unsigned int D.8979;
  long unsigned int D.8980;
  gint32 D.8983;
  long unsigned int low.65;
  guint64 low;
  guint64 mid;
  guint64 high;
  guint32 factor;
  int scale;
  int sign;
  int rc;

  try
    {
      D.8955 = pB->hi32;
      D.8956 = pB->mid32;
      D.8957 = pB->lo32;
      D.8958 = pA->hi32;
      D.8959 = pA->mid32;
      D.8960 = pA->lo32;
      mult96by96to192 (D.8960, D.8959, D.8958, D.8957, D.8956, D.8955, &low, &mid, &high);
      D.8961 = pA->u.signscale.scale;
      D.8962 = (int) D.8961;
      D.8963 = pB->u.signscale.scale;
      D.8964 = (int) D.8963;
      scale.59 = D.8962 + D.8964;
      scale = scale.59;
      D.8966 = pA->u.signscale.sign;
      D.8967 = (int) D.8966;
      D.8968 = pB->u.signscale.sign;
      D.8969 = (int) D.8968;
      sign = D.8967 ^ D.8969;
      factor = 1000000000;
      goto <D.8297>;
      <D.8296>:
      high.60 = high;
      if (high.60 <= 99) goto <D.8971>; else goto <D.8972>;
      <D.8971>:
      factor = factor / 1000;
      scale.61 = scale;
      scale.62 = scale.61 + -6;
      scale = scale.62;
      goto <D.8975>;
      <D.8972>:
      scale.61 = scale;
      scale.63 = scale.61 + -9;
      scale = scale.63;
      <D.8975>:
      div192by32 (&low, &mid, &high, factor);
      <D.8297>:
      high.60 = high;
      if (high.60 != 0) goto <D.8296>; else goto <D.8977>;
      <D.8977>:
      mid.64 = mid;
      D.8979 = mid.64 >> 32;
      D.8980 = (long unsigned int) factor;
      if (D.8979 >= D.8980) goto <D.8296>; else goto <D.8298>;
      <D.8298>:
      rc = rescale128 (&low, &mid, &scale, 0, 0, 28, 1);
      if (rc != 0) goto <D.8981>; else goto <D.8982>;
      <D.8981>:
      D.8983 = rc;
      return D.8983;
      <D.8982>:
      scale.61 = scale;
      mid.64 = mid;
      low.65 = low;
      D.8983 = pack128toDecimal (pA, low.65, mid.64, scale.61, sign);
      return D.8983;
    }
  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 unsigned int D.8987;
  long unsigned int D.8988;
  long unsigned int D.8989;
  long unsigned int D.8990;
  long unsigned int D.8995;
  long unsigned int D.8996;
  long unsigned int D.9003;
  long unsigned int D.9008;
  long unsigned int D.9009;
  long unsigned int D.9010;
  long unsigned int D.9011;
  long unsigned int D.9012;
  long unsigned int D.9013;
  long unsigned int D.9014;
  long unsigned int D.9015;
  long unsigned int D.9016;
  long unsigned int D.9017;
  long unsigned int D.9018;
  long unsigned int D.9019;
  long unsigned int D.9020;
  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.8987 = (long unsigned int) alo;
  D.8988 = (long unsigned int) blo;
  a = D.8987 * D.8988;
  h0 = (guint32) a;
  a = a >> 32;
  carry0 = 0;
  D.8987 = (long unsigned int) alo;
  D.8989 = (long unsigned int) bmi;
  b = D.8987 * D.8989;
  D.8990 = (long unsigned int) ami;
  D.8988 = (long unsigned int) blo;
  c = D.8990 * D.8988;
  a = a + b;
  if (a < b) goto <D.8991>; else goto <D.8992>;
  <D.8991>:
  carry0 = carry0 + 1;
  <D.8992>:
  a = a + c;
  if (a < c) goto <D.8993>; else goto <D.8994>;
  <D.8993>:
  carry0 = carry0 + 1;
  <D.8994>:
  h1 = (guint32) a;
  a = a >> 32;
  carry1 = 0;
  D.8987 = (long unsigned int) alo;
  D.8995 = (long unsigned int) bhi;
  b = D.8987 * D.8995;
  D.8990 = (long unsigned int) ami;
  D.8989 = (long unsigned int) bmi;
  c = D.8990 * D.8989;
  D.8996 = (long unsigned int) ahi;
  D.8988 = (long unsigned int) blo;
  d = D.8996 * D.8988;
  a = a + b;
  if (a < b) goto <D.8997>; else goto <D.8998>;
  <D.8997>:
  carry1 = carry1 + 1;
  <D.8998>:
  a = a + c;
  if (a < c) goto <D.8999>; else goto <D.9000>;
  <D.8999>:
  carry1 = carry1 + 1;
  <D.9000>:
  a = a + d;
  if (a < d) goto <D.9001>; else goto <D.9002>;
  <D.9001>:
  carry1 = carry1 + 1;
  <D.9002>:
  h2 = (guint32) a;
  a = a >> 32;
  D.9003 = (long unsigned int) carry0;
  a = D.9003 + a;
  carry0 = 0;
  D.8990 = (long unsigned int) ami;
  D.8995 = (long unsigned int) bhi;
  b = D.8990 * D.8995;
  D.8996 = (long unsigned int) ahi;
  D.8989 = (long unsigned int) bmi;
  c = D.8996 * D.8989;
  a = a + b;
  if (a < b) goto <D.9004>; else goto <D.9005>;
  <D.9004>:
  carry0 = carry0 + 1;
  <D.9005>:
  a = a + c;
  if (a < c) goto <D.9006>; else goto <D.9007>;
  <D.9006>:
  carry0 = carry0 + 1;
  <D.9007>:
  h3 = (guint32) a;
  a = a >> 32;
  D.9008 = (long unsigned int) carry1;
  a = D.9008 + a;
  D.8996 = (long unsigned int) ahi;
  D.8995 = (long unsigned int) bhi;
  b = D.8996 * D.8995;
  a = a + b;
  h4 = (guint32) a;
  a = a >> 32;
  D.9003 = (long unsigned int) carry0;
  a = D.9003 + a;
  h5 = (guint32) a;
  D.9009 = (long unsigned int) h1;
  D.9010 = D.9009 << 32;
  D.9011 = (long unsigned int) h0;
  D.9012 = D.9010 | D.9011;
  *pclo = D.9012;
  D.9013 = (long unsigned int) h3;
  D.9014 = D.9013 << 32;
  D.9015 = (long unsigned int) h2;
  D.9016 = D.9014 | D.9015;
  *pcmi = D.9016;
  D.9017 = (long unsigned int) h5;
  D.9018 = D.9017 << 32;
  D.9019 = (long unsigned int) h4;
  D.9020 = D.9018 | D.9019;
  *pchi = D.9020;
}


div192by32 (guint64 * plo, guint64 * pmi, guint64 * phi, guint32 factor)
{
  long unsigned int D.9021;
  unsigned int D.9022;
  long unsigned int D.9023;
  long unsigned int D.9024;
  unsigned int D.9025;
  long unsigned int D.9026;
  long unsigned int D.9027;
  long unsigned int D.9028;
  unsigned int D.9029;
  long unsigned int D.9030;
  long unsigned int D.9031;
  long unsigned int D.9032;
  guint64 a;
  guint64 b;
  guint64 c;
  guint64 h;

  h = *phi;
  D.9021 = h >> 32;
  D.9022 = (unsigned int) D.9021;
  a = (guint64) D.9022;
  D.9023 = (long unsigned int) factor;
  b = a / D.9023;
  D.9023 = (long unsigned int) factor;
  D.9024 = D.9023 * b;
  a = a - D.9024;
  a = a << 32;
  D.9025 = (unsigned int) h;
  D.9026 = (long unsigned int) D.9025;
  a = D.9026 | a;
  D.9023 = (long unsigned int) factor;
  c = a / D.9023;
  D.9023 = (long unsigned int) factor;
  D.9027 = D.9023 * c;
  a = a - D.9027;
  a = a << 32;
  D.9028 = b << 32;
  D.9029 = (unsigned int) c;
  D.9030 = (long unsigned int) D.9029;
  D.9031 = D.9028 | D.9030;
  *phi = D.9031;
  h = *pmi;
  D.9021 = h >> 32;
  D.9022 = (unsigned int) D.9021;
  D.9032 = (long unsigned int) D.9022;
  a = D.9032 | a;
  D.9023 = (long unsigned int) factor;
  b = a / D.9023;
  D.9023 = (long unsigned int) factor;
  D.9024 = D.9023 * b;
  a = a - D.9024;
  a = a << 32;
  D.9025 = (unsigned int) h;
  D.9026 = (long unsigned int) D.9025;
  a = D.9026 | a;
  D.9023 = (long unsigned int) factor;
  c = a / D.9023;
  D.9023 = (long unsigned int) factor;
  D.9027 = D.9023 * c;
  a = a - D.9027;
  a = a << 32;
  D.9028 = b << 32;
  D.9029 = (unsigned int) c;
  D.9030 = (long unsigned int) D.9029;
  D.9031 = D.9028 | D.9030;
  *pmi = D.9031;
  h = *plo;
  D.9021 = h >> 32;
  D.9022 = (unsigned int) D.9021;
  D.9032 = (long unsigned int) D.9022;
  a = D.9032 | a;
  D.9023 = (long unsigned int) factor;
  b = a / D.9023;
  D.9023 = (long unsigned int) factor;
  D.9024 = D.9023 * b;
  a = a - D.9024;
  a = a << 32;
  D.9025 = (unsigned int) h;
  D.9026 = (long unsigned int) D.9025;
  a = D.9026 | a;
  D.9023 = (long unsigned int) factor;
  c = a / D.9023;
  D.9023 = (long unsigned int) factor;
  D.9027 = D.9023 * c;
  a = a - D.9027;
  a = a << 32;
  D.9028 = b << 32;
  D.9029 = (unsigned int) c;
  D.9030 = (long unsigned int) D.9029;
  D.9031 = D.9028 | D.9030;
  *plo = D.9031;
}


mono_decimalDiv (struct decimal_repr * pC, struct decimal_repr * pA, struct decimal_repr * pB)
{
  int D.9033;
  gint32 D.9036;
  unsigned char D.9037;
  signed char D.9038;
  _Bool D.9039;
  int D.9040;
  unsigned char D.9047;
  int D.9048;
  unsigned char D.9049;
  int D.9050;
  int scale.66;
  int texp.67;
  <unnamed-unsigned:1> D.9055;
  int D.9056;
  <unnamed-unsigned:1> D.9057;
  int D.9058;
  int D.9059;
  int scale.68;
  long unsigned int chi.69;
  long unsigned int clo.70;
  guint64 clo;
  guint64 chi;
  int scale;
  int texp;
  int rc;

  try
    {
      D.9033 = mono_decimalCompare (pA, pB);
      if (D.9033 == 0) goto <D.9034>; else goto <D.9035>;
      <D.9034>:
      D.9036 = pack128toDecimal (pC, 1, 0, 0, 0);
      return D.9036;
      <D.9035>:
      D.9037 = BIT_FIELD_REF <*pA, 8, 24>;
      D.9038 = (signed char) D.9037;
      D.9039 = D.9038 >= 0;
      pA->u.signscale.sign = D.9039;
      D.9040 = mono_decimalCompare (pA, pB);
      if (D.9040 == 0) goto <D.9041>; else goto <D.9042>;
      <D.9041>:
      D.9036 = pack128toDecimal (pC, 1, 0, 0, 1);
      return D.9036;
      <D.9042>:
      D.9037 = BIT_FIELD_REF <*pA, 8, 24>;
      D.9038 = (signed char) D.9037;
      D.9039 = D.9038 >= 0;
      pA->u.signscale.sign = D.9039;
      rc = decimalDivSub (pA, pB, &clo, &chi, &texp);
      if (rc != 0) goto <D.9043>; else goto <D.9044>;
      <D.9043>:
      if (rc == 1) goto <D.9045>; else goto <D.9046>;
      <D.9045>:
      rc = 0;
      <D.9046>:
      D.9036 = rc;
      return D.9036;
      <D.9044>:
      D.9047 = pA->u.signscale.scale;
      D.9048 = (int) D.9047;
      D.9049 = pB->u.signscale.scale;
      D.9050 = (int) D.9049;
      scale.66 = D.9048 - D.9050;
      scale = scale.66;
      texp.67 = texp;
      rc = rescale128 (&clo, &chi, &scale, texp.67, 0, 28, 1);
      if (rc != 0) goto <D.9053>; else goto <D.9054>;
      <D.9053>:
      D.9036 = rc;
      return D.9036;
      <D.9054>:
      D.9055 = pA->u.signscale.sign;
      D.9056 = (int) D.9055;
      D.9057 = pB->u.signscale.sign;
      D.9058 = (int) D.9057;
      D.9059 = D.9056 ^ D.9058;
      scale.68 = scale;
      chi.69 = chi;
      clo.70 = clo;
      D.9036 = pack128toDecimal (pC, clo.70, chi.69, scale.68, D.9059);
      return D.9036;
    }
  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.9065;
  long unsigned int D.9066;
  long unsigned int D.9067;
  unsigned int D.9068;
  long unsigned int D.9069;
  long unsigned int ahi.71;
  unsigned int D.9071;
  long unsigned int D.9072;
  long unsigned int ami.72;
  unsigned int D.9074;
  unsigned int D.9075;
  int D.9078;
  long unsigned int ami.73;
  long unsigned int ahi.74;
  long unsigned int D.9081;
  long unsigned int D.9084;
  long unsigned int ahi.75;
  signed long ahi.76;
  long unsigned int D.9094;
  int D.9095;
  int D.9096;
  int hi_shift.77;
  unsigned int D.9098;
  unsigned int D.9100;
  signed int bhi.78;
  unsigned int D.9103;
  long unsigned int D.9104;
  long unsigned int D.9105;
  long unsigned int D.9106;
  long unsigned int D.9107;
  long unsigned int alo.79;
  int D.9114;
  long long unsigned int D.9117;
  long unsigned int D.9119;
  long unsigned int D.9120;
  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.9065 = pA->hi32;
      D.9066 = (long unsigned int) D.9065;
      D.9067 = D.9066 << 32;
      D.9068 = pA->mid32;
      D.9069 = (long unsigned int) D.9068;
      ahi.71 = D.9067 | D.9069;
      ahi = ahi.71;
      D.9071 = pA->lo32;
      D.9072 = (long unsigned int) D.9071;
      ami.72 = D.9072 << 32;
      ami = ami.72;
      alo = 0;
      blo = pB->lo32;
      bmi = pB->mid32;
      bhi = pB->hi32;
      D.9074 = blo | bmi;
      D.9075 = D.9074 | bhi;
      if (D.9075 == 0) goto <D.9076>; else goto <D.9077>;
      <D.9076>:
      D.9078 = 5;
      return D.9078;
      <D.9077>:
      ami.73 = ami;
      ahi.74 = ahi;
      D.9081 = ami.73 | ahi.74;
      if (D.9081 == 0) goto <D.9082>; else goto <D.9083>;
      <D.9082>:
      *pchi = 0;
      D.9084 = *pchi;
      *pclo = D.9084;
      D.9078 = 1;
      return D.9078;
      <D.9083>:
      ahi.74 = ahi;
      if (ahi.74 == 0) goto <D.9085>; else goto <D.9086>;
      <D.9085>:
      ami.73 = ami;
      ahi = ami.73;
      ami = 0;
      ashift = 64;
      goto <D.8320>;
      <D.8319>:
      ahi.74 = ahi;
      ahi.75 = ahi.74 << 1;
      ahi = ahi.75;
      ashift = ashift + 1;
      <D.8320>:
      ahi.74 = ahi;
      ahi.76 = (signed long) ahi.74;
      if (ahi.76 >= 0) goto <D.8319>; else goto <D.8321>;
      <D.8321>:
      goto <D.9089>;
      <D.9086>:
      ashift = 0;
      goto <D.8323>;
      <D.8322>:
      lshift128 (&ami, &ahi);
      ashift = ashift + 1;
      <D.8323>:
      ahi.74 = ahi;
      ahi.76 = (signed long) ahi.74;
      if (ahi.76 >= 0) goto <D.8322>; else goto <D.8324>;
      <D.8324>:
      <D.9089>:
      if (bhi == 0) goto <D.9090>; else goto <D.9091>;
      <D.9090>:
      if (bmi == 0) goto <D.9092>; else goto <D.9093>;
      <D.9092>:
      {
        guint32 hi_shift;

        bhi = blo;
        bmi = 0;
        blo = 0;
        D.9094 = (long unsigned int) bhi;
        D.9095 = my_g_bit_nth_msf (D.9094);
        D.9096 = 31 - D.9095;
        hi_shift = (guint32) D.9096;
        hi_shift.77 = (int) hi_shift;
        bhi = bhi << hi_shift.77;
        D.9098 = hi_shift + 64;
        bshift = (int) D.9098;
      }
      goto <D.9099>;
      <D.9093>:
      bhi = bmi;
      bmi = blo;
      blo = 0;
      bshift = 32;
      goto <D.8327>;
      <D.8326>:
      bhi = bhi << 1;
      D.9100 = bmi >> 31;
      bhi = D.9100 | bhi;
      bmi = bmi << 1;
      bshift = bshift + 1;
      <D.8327>:
      bhi.78 = (signed int) bhi;
      if (bhi.78 >= 0) goto <D.8326>; else goto <D.8328>;
      <D.8328>:
      <D.9099>:
      goto <D.9102>;
      <D.9091>:
      bshift = 0;
      goto <D.8330>;
      <D.8329>:
      bhi = bhi << 1;
      D.9100 = bmi >> 31;
      bhi = D.9100 | bhi;
      bmi = bmi << 1;
      D.9103 = blo >> 31;
      bmi = D.9103 | bmi;
      blo = blo << 1;
      bshift = bshift + 1;
      <D.8330>:
      bhi.78 = (signed int) bhi;
      if (bhi.78 >= 0) goto <D.8329>; else goto <D.8331>;
      <D.8331>:
      <D.9102>:
      D.9104 = (long unsigned int) bhi;
      D.9105 = D.9104 << 32;
      D.9106 = (long unsigned int) bmi;
      thi = D.9105 | D.9106;
      D.9107 = (long unsigned int) blo;
      tmi = D.9107 << 32;
      tlo = 0;
      ahi.74 = ahi;
      if (ahi.74 > thi) goto <D.9108>; else goto <D.9111>;
      <D.9111>:
      ahi.74 = ahi;
      if (ahi.74 == thi) goto <D.9112>; else goto <D.9109>;
      <D.9112>:
      ami.73 = ami;
      if (ami.73 >= tmi) goto <D.9108>; else goto <D.9109>;
      <D.9108>:
      ahi.74 = ahi;
      ami.73 = ami;
      alo.79 = alo;
      sub192 (alo.79, ami.73, ahi.74, tlo, tmi, thi, &alo, &ami, &ahi);
      extraBit = 1;
      goto <D.9110>;
      <D.9109>:
      extraBit = 0;
      <D.9110>:
      ahi.74 = ahi;
      ami.73 = ami;
      alo.79 = alo;
      div192by96to128 (alo.79, ami.73, ahi.74, blo, bmi, bhi, pclo, pchi);
      D.9114 = ashift + 128;
      texp = D.9114 - bshift;
      if (extraBit != 0) goto <D.9115>; else goto <D.9116>;
      <D.9115>:
      rshift128 (pclo, pchi);
      D.9084 = *pchi;
      D.9117 = D.9084 + 9223372036854775808;
      *pchi = D.9117;
      texp = texp + -1;
      <D.9116>:
      goto <D.8333>;
      <D.8332>:
      rshift128 (pclo, pchi);
      texp = texp + -1;
      <D.8333>:
      if (texp > 0) goto <D.9118>; else goto <D.8334>;
      <D.9118>:
      D.9119 = *pclo;
      D.9120 = D.9119 & 1;
      if (D.9120 == 0) goto <D.8332>; else goto <D.8334>;
      <D.8334>:
      *pExp = texp;
      D.9078 = 0;
      return D.9078;
    }
  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.9123>; else goto <D.9124>;
  <D.9123>:
  if (cmi == 0) goto <D.9125>; else goto <D.9126>;
  <D.9125>:
  chi = chi + 18446744073709551615;
  <D.9126>:
  cmi = cmi + 18446744073709551615;
  <D.9124>:
  if (ami < bmi) goto <D.9127>; else goto <D.9128>;
  <D.9127>:
  chi = chi + 18446744073709551615;
  <D.9128>:
  *pclo = clo;
  *pcmi = cmi;
  *pchi = chi;
}


div192by96to128 (guint64 alo, guint64 ami, guint64 ahi, guint32 blo, guint32 bmi, guint32 bhi, guint64 * pclo, guint64 * pchi)
{
  long unsigned int rhi.80;
  long unsigned int rhi.86;
  long unsigned int rmi.81;
  long unsigned int D.9132;
  long unsigned int rhi.82;
  long unsigned int D.9134;
  long unsigned int rlo.83;
  long unsigned int D.9136;
  long unsigned int rmi.84;
  long unsigned int rlo.85;
  long unsigned int D.9139;
  long unsigned int D.9140;
  unsigned int D.9141;
  long unsigned int D.9142;
  long unsigned int D.9143;
  long unsigned int D.9144;
  long unsigned int D.9148;
  long unsigned int D.9149;
  long unsigned int D.9150;
  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.80 = rhi;
      rhi.86 = rhi.80 << 32;
      rmi.81 = rmi;
      D.9132 = rmi.81 >> 32;
      rhi.82 = rhi.86 | D.9132;
      rhi = rhi.82;
      rmi.81 = rmi;
      D.9134 = rmi.81 << 32;
      rlo.83 = rlo;
      D.9136 = rlo.83 >> 32;
      rmi.84 = D.9134 | D.9136;
      rmi = rmi.84;
      rlo.83 = rlo;
      rlo.85 = rlo.83 << 32;
      rlo = rlo.85;
      D.9139 = (long unsigned int) h;
      D.9140 = D.9139 << 32;
      D.9141 = div192by96to32withRest (&rlo, &rmi, &rhi, blo, bmi, bhi);
      D.9142 = (long unsigned int) D.9141;
      D.9143 = D.9140 | D.9142;
      *pchi = D.9143;
      rhi.80 = rhi;
      rhi.86 = rhi.80 << 32;
      rmi.81 = rmi;
      D.9132 = rmi.81 >> 32;
      rhi.82 = rhi.86 | D.9132;
      rhi = rhi.82;
      rmi.81 = rmi;
      D.9134 = rmi.81 << 32;
      rlo.83 = rlo;
      D.9136 = rlo.83 >> 32;
      rmi.84 = D.9134 | D.9136;
      rmi = rmi.84;
      rlo.83 = rlo;
      rlo.85 = rlo.83 << 32;
      rlo = rlo.85;
      h = div192by96to32withRest (&rlo, &rmi, &rhi, blo, bmi, bhi);
      D.9144 = (long unsigned int) bhi;
      rhi.80 = rhi;
      if (D.9144 <= rhi.80) goto <D.9145>; else goto <D.9146>;
      <D.9145>:
      c = 4294967295;
      goto <D.9147>;
      <D.9146>:
      rhi.80 = rhi;
      rhi.86 = rhi.80 << 32;
      rhi = rhi.86;
      rhi.80 = rhi;
      D.9144 = (long unsigned int) bhi;
      D.9148 = rhi.80 / D.9144;
      c = (guint32) D.9148;
      <D.9147>:
      D.9139 = (long unsigned int) h;
      D.9140 = D.9139 << 32;
      D.9149 = (long unsigned int) c;
      D.9150 = D.9140 | D.9149;
      *pclo = D.9150;
    }
  finally
    {
      rlo = {CLOBBER};
      rmi = {CLOBBER};
      rhi = {CLOBBER};
    }
}


div192by96to32withRest (guint64 * palo, guint64 * pami, guint64 * pahi, guint32 blo, guint32 bmi, guint32 bhi)
{
  long unsigned int rlo.87;
  long unsigned int rmi.88;
  long unsigned int rhi.89;
  long unsigned int D.9154;
  long unsigned int D.9155;
  long unsigned int rhi.90;
  long unsigned int D.9160;
  long unsigned int D.9161;
  long unsigned int thi.91;
  long unsigned int tlo.92;
  long unsigned int rmi.93;
  long unsigned int rlo.94;
  long unsigned int D.9166;
  long unsigned int D.9167;
  long unsigned int D.9168;
  long unsigned int D.9169;
  long int rhi.95;
  guint32 D.9171;
  guint64 rlo;
  guint64 rmi;
  guint64 rhi;
  guint64 tlo;
  guint64 thi;
  guint32 c;

  try
    {
      rlo.87 = *palo;
      rlo = rlo.87;
      rmi.88 = *pami;
      rmi = rmi.88;
      rhi.89 = *pahi;
      rhi = rhi.89;
      D.9154 = (long unsigned int) bhi;
      D.9155 = D.9154 << 32;
      rhi.90 = rhi;
      if (D.9155 <= rhi.90) goto <D.9157>; else goto <D.9158>;
      <D.9157>:
      c = 4294967295;
      goto <D.9159>;
      <D.9158>:
      rhi.90 = rhi;
      D.9160 = (long unsigned int) bhi;
      D.9161 = rhi.90 / D.9160;
      c = (guint32) D.9161;
      <D.9159>:
      mult96by32to128 (blo, bmi, bhi, c, &tlo, &thi);
      thi.91 = thi;
      tlo.92 = tlo;
      rhi.90 = rhi;
      rmi.93 = rmi;
      rlo.94 = rlo;
      sub192 (rlo.94, rmi.93, rhi.90, 0, tlo.92, thi.91, &rlo, &rmi, &rhi);
      goto <D.8009>;
      <D.8008>:
      c = c + 4294967295;
      D.9160 = (long unsigned int) bhi;
      D.9166 = (long unsigned int) bmi;
      D.9167 = D.9166 << 32;
      D.9168 = (long unsigned int) blo;
      D.9169 = D.9167 | D.9168;
      rhi.90 = rhi;
      rmi.93 = rmi;
      rlo.94 = rlo;
      add192 (rlo.94, rmi.93, rhi.90, 0, D.9169, D.9160, &rlo, &rmi, &rhi);
      <D.8009>:
      rhi.90 = rhi;
      rhi.95 = (long int) rhi.90;
      if (rhi.95 < 0) goto <D.8008>; else goto <D.8010>;
      <D.8010>:
      rlo.94 = rlo;
      *palo = rlo.94;
      rmi.93 = rmi;
      *pami = rmi.93;
      rhi.90 = rhi;
      *pahi = rhi.90;
      D.9171 = c;
      return D.9171;
    }
  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 unsigned int D.9174;
  long unsigned int D.9175;
  long unsigned int D.9176;
  long unsigned int D.9177;
  long unsigned int D.9178;
  long unsigned int D.9179;
  long unsigned int D.9180;
  long unsigned int D.9181;
  long unsigned int D.9182;
  long unsigned int D.9183;
  guint64 a;
  guint32 h0;
  guint32 h1;

  D.9174 = (long unsigned int) alo;
  D.9175 = (long unsigned int) factor;
  a = D.9174 * D.9175;
  h0 = (guint32) a;
  a = a >> 32;
  D.9176 = (long unsigned int) ami;
  D.9175 = (long unsigned int) factor;
  D.9177 = D.9176 * D.9175;
  a = D.9177 + a;
  h1 = (guint32) a;
  a = a >> 32;
  D.9178 = (long unsigned int) ahi;
  D.9175 = (long unsigned int) factor;
  D.9179 = D.9178 * D.9175;
  a = D.9179 + a;
  D.9180 = (long unsigned int) h1;
  D.9181 = D.9180 << 32;
  D.9182 = (long unsigned int) h0;
  D.9183 = D.9181 | D.9182;
  *pclo = D.9183;
  *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.9184>; else goto <D.9185>;
  <D.9184>:
  ami = ami + 1;
  if (ami == 0) goto <D.9186>; else goto <D.9187>;
  <D.9186>:
  ahi = ahi + 1;
  <D.9187>:
  <D.9185>:
  ami = ami + bmi;
  if (ami < bmi) goto <D.9188>; else goto <D.9189>;
  <D.9188>:
  ahi = ahi + 1;
  <D.9189>:
  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.9194;
  unsigned char D.9195;
  int D.9196;
  unsigned char D.9197;
  int D.9198;
  int scale.96;
  int texp.97;
  <unnamed-unsigned:1> D.9203;
  int D.9204;
  int scale.98;
  long unsigned int chi.99;
  long unsigned int clo.100;
  guint64 clo;
  guint64 chi;
  int scale;
  int texp;
  int rc;

  try
    {
      rc = decimalDivSub (pA, pB, &clo, &chi, &texp);
      if (rc != 0) goto <D.9190>; else goto <D.9191>;
      <D.9190>:
      if (rc == 1) goto <D.9192>; else goto <D.9193>;
      <D.9192>:
      rc = 0;
      <D.9193>:
      D.9194 = rc;
      return D.9194;
      <D.9191>:
      D.9195 = pA->u.signscale.scale;
      D.9196 = (int) D.9195;
      D.9197 = pB->u.signscale.scale;
      D.9198 = (int) D.9197;
      scale.96 = D.9196 - D.9198;
      scale = scale.96;
      texp.97 = texp;
      rc = rescale128 (&clo, &chi, &scale, texp.97, 0, 0, 0);
      if (rc != 0) goto <D.9201>; else goto <D.9202>;
      <D.9201>:
      D.9194 = rc;
      return D.9194;
      <D.9202>:
      D.9203 = pA->u.signscale.sign;
      D.9204 = (int) D.9203;
      scale.98 = scale;
      chi.99 = chi;
      clo.100 = clo;
      D.9194 = pack128toDecimal (pC, clo.100, chi.99, scale.98, D.9204);
      return D.9194;
    }
  finally
    {
      clo = {CLOBBER};
      chi = {CLOBBER};
      scale = {CLOBBER};
      texp = {CLOBBER};
    }
}


mono_decimalCompare (struct decimal_repr * pA, struct decimal_repr * pB)
{
  int iftmp.101;
  unsigned char D.9211;
  unsigned char D.9212;
  unsigned char D.9216;
  unsigned char D.9217;
  signed char D.9218;
  gint32 D.9221;
  gint32 iftmp.102;
  int D.9226;
  int D.9228;
  <unnamed-unsigned:1> D.9233;
  unsigned char D.9234;
  unsigned char D.9235;
  <unnamed-unsigned:1> D.9236;
  int D.9237;
  gint32 iftmp.103;
  unsigned char D.9241;
  unsigned char D.9242;
  int log2a;
  int log2b;
  int delta;
  int sign;
  struct decimal_repr aa;

  try
    {
      D.9211 = BIT_FIELD_REF <*pA, 8, 24>;
      D.9212 = D.9211 & 128;
      if (D.9212 != 0) goto <D.9213>; else goto <D.9214>;
      <D.9213>:
      iftmp.101 = -1;
      goto <D.9215>;
      <D.9214>:
      iftmp.101 = 1;
      <D.9215>:
      sign = iftmp.101;
      D.9211 = BIT_FIELD_REF <*pA, 8, 24>;
      D.9216 = BIT_FIELD_REF <*pB, 8, 24>;
      D.9217 = D.9211 ^ D.9216;
      D.9218 = (signed char) D.9217;
      if (D.9218 < 0) goto <D.9219>; else goto <D.9220>;
      <D.9219>:
      D.9226 = decimalIsZero (pA);
      if (D.9226 == 0) goto <D.9223>; else goto <D.9227>;
      <D.9227>:
      D.9228 = decimalIsZero (pB);
      if (D.9228 == 0) goto <D.9223>; else goto <D.9224>;
      <D.9223>:
      iftmp.102 = sign;
      goto <D.9225>;
      <D.9224>:
      iftmp.102 = 0;
      <D.9225>:
      D.9221 = iftmp.102;
      return D.9221;
      <D.9220>:
      log2a = decimalLog2 (pA);
      log2b = decimalLog2 (pB);
      delta = log2a - log2b;
      if (delta < -1) goto <D.9229>; else goto <D.9230>;
      <D.9229>:
      D.9221 = -sign;
      return D.9221;
      <D.9230>:
      if (delta > 1) goto <D.9231>; else goto <D.9232>;
      <D.9231>:
      D.9221 = sign;
      return D.9221;
      <D.9232>:
      memcpy (&aa, pA, 16);
      D.9233 = aa.u.signscale.sign;
      D.9234 = (unsigned char) D.9233;
      D.9235 = 1 - D.9234;
      D.9236 = (<unnamed-unsigned:1>) D.9235;
      aa.u.signscale.sign = D.9236;
      mono_decimalIncr (&aa, pB);
      D.9237 = decimalIsZero (&aa);
      if (D.9237 != 0) goto <D.9238>; else goto <D.9239>;
      <D.9238>:
      D.9221 = 0;
      return D.9221;
      <D.9239>:
      D.9241 = BIT_FIELD_REF <aa, 8, 24>;
      D.9242 = D.9241 & 128;
      if (D.9242 != 0) goto <D.9243>; else goto <D.9244>;
      <D.9243>:
      iftmp.103 = 1;
      goto <D.9245>;
      <D.9244>:
      iftmp.103 = -1;
      <D.9245>:
      D.9221 = iftmp.103;
      return D.9221;
    }
  finally
    {
      aa = {CLOBBER};
    }
}


decimalLog2 (struct decimal_repr * pA)
{
  unsigned char D.9248;
  unsigned int D.9249;
  int D.9252;
  unsigned int D.9254;
  int D.9257;
  unsigned int D.9259;
  int D.9262;
  int D.9263;
  int D.9264;
  int tlog2;
  int scale;

  D.9248 = pA->u.signscale.scale;
  scale = (int) D.9248;
  D.9249 = pA->hi32;
  if (D.9249 != 0) goto <D.9250>; else goto <D.9251>;
  <D.9250>:
  D.9249 = pA->hi32;
  D.9252 = log2_32 (D.9249);
  tlog2 = D.9252 + 64;
  goto <D.9253>;
  <D.9251>:
  D.9254 = pA->mid32;
  if (D.9254 != 0) goto <D.9255>; else goto <D.9256>;
  <D.9255>:
  D.9254 = pA->mid32;
  D.9257 = log2_32 (D.9254);
  tlog2 = D.9257 + 32;
  goto <D.9258>;
  <D.9256>:
  D.9259 = pA->lo32;
  tlog2 = log2_32 (D.9259);
  <D.9258>:
  <D.9253>:
  if (tlog2 != -1000) goto <D.9260>; else goto <D.9261>;
  <D.9260>:
  D.9262 = scale * 33219;
  D.9263 = D.9262 / -10000;
  tlog2 = D.9263 + tlog2;
  <D.9261>:
  D.9264 = tlog2;
  return D.9264;
}


log2_32 (guint32 a)
{
  int D.9268;
  long unsigned int D.9269;
  int D.9270;

  if (a == 0) goto <D.9266>; else goto <D.9267>;
  <D.9266>:
  D.9268 = -1000;
  return D.9268;
  <D.9267>:
  D.9269 = (long unsigned int) a;
  D.9270 = my_g_bit_nth_msf (D.9269);
  D.9268 = D.9270 + 1;
  return D.9268;
}


memcpy (void * restrict __dest, const void * restrict __src, size_t __len)
{
  void * D.9272;
  long unsigned int D.9273;

  D.9273 = __builtin_object_size (__dest, 0);
  D.9272 = __builtin___memcpy_chk (__dest, __src, __len, D.9273);
  return D.9272;
}


decimalIsZero (struct decimal_repr * pA)
{
  int D.9275;
  int iftmp.104;
  unsigned int D.9279;
  unsigned int D.9281;
  unsigned int D.9283;

  D.9279 = pA->lo32;
  if (D.9279 == 0) goto <D.9280>; else goto <D.9277>;
  <D.9280>:
  D.9281 = pA->mid32;
  if (D.9281 == 0) goto <D.9282>; else goto <D.9277>;
  <D.9282>:
  D.9283 = pA->hi32;
  if (D.9283 == 0) goto <D.9284>; else goto <D.9277>;
  <D.9284>:
  iftmp.104 = 1;
  goto <D.9278>;
  <D.9277>:
  iftmp.104 = 0;
  <D.9278>:
  D.9275 = iftmp.104;
  return D.9275;
}


mono_decimal2double (struct decimal_repr * pA)
{
  unsigned int D.9286;
  long unsigned int D.9287;
  long unsigned int D.9288;
  unsigned int D.9289;
  long unsigned int D.9290;
  long unsigned int ahi.105;
  unsigned int D.9292;
  long unsigned int D.9293;
  long unsigned int alo.106;
  long unsigned int ahi.107;
  long unsigned int alo.108;
  long unsigned int D.9297;
  double D.9300;
  unsigned char D.9301;
  signed long ahi.109;
  long unsigned int D.9303;
  int D.9306;
  int D.9307;
  unsigned int D.9310;
  unsigned int D.9311;
  unsigned int log5.110;
  unsigned int D.9313;
  unsigned int D.9317;
  unsigned int D.9318;
  long unsigned int ahi.111;
  long unsigned int ahi.112;
  unsigned int D.9324;
  long unsigned int ahi.113;
  long long unsigned int D.9328;
  int D.9329;
  <unnamed-unsigned:1> D.9330;
  int D.9331;
  double d;
  guint64 alo;
  guint64 ahi;
  guint64 mantisse;
  guint32 overhang;
  guint32 factor;
  guint32 roundBits;
  int scale;
  int texp;
  int log5;
  int i;

  try
    {
      D.9286 = pA->hi32;
      D.9287 = (long unsigned int) D.9286;
      D.9288 = D.9287 << 32;
      D.9289 = pA->mid32;
      D.9290 = (long unsigned int) D.9289;
      ahi.105 = D.9288 | D.9290;
      ahi = ahi.105;
      D.9292 = pA->lo32;
      D.9293 = (long unsigned int) D.9292;
      alo.106 = D.9293 << 32;
      alo = alo.106;
      ahi.107 = ahi;
      alo.108 = alo;
      D.9297 = ahi.107 | alo.108;
      if (D.9297 == 0) goto <D.9298>; else goto <D.9299>;
      <D.9298>:
      D.9300 = 0.0;
      return D.9300;
      <D.9299>:
      texp = 0;
      D.9301 = pA->u.signscale.scale;
      scale = (int) D.9301;
      goto <D.8397>;
      <D.8396>:
      goto <D.8394>;
      <D.8393>:
      lshift128 (&alo, &ahi);
      texp = texp + 1;
      <D.8394>:
      ahi.107 = ahi;
      ahi.109 = (signed long) ahi.107;
      if (ahi.109 >= 0) goto <D.8393>; else goto <D.8395>;
      <D.8395>:
      ahi.107 = ahi;
      D.9303 = ahi.107 >> 32;
      overhang = (guint32) D.9303;
      if (overhang > 4) goto <D.9304>; else goto <D.9305>;
      <D.9304>:
      D.9306 = log2_32 (overhang);
      D.9307 = D.9306 * 1000;
      log5 = D.9307 / 2322;
      if (log5 <= 8) goto <D.9308>; else goto <D.9309>;
      <D.9308>:
      D.9310 = constantsDecadeInt32Factors[log5];
      factor = D.9310 >> log5;
      D.9311 = overhang / factor;
      log5.110 = (unsigned int) log5;
      D.9313 = D.9311 + log5.110;
      i = (int) D.9313;
      goto <D.9314>;
      <D.9309>:
      i = 9;
      <D.9314>:
      if (i > scale) goto <D.9315>; else goto <D.9316>;
      <D.9315>:
      i = scale;
      <D.9316>:
      D.9317 = constantsDecadeInt32Factors[i];
      factor = D.9317 >> i;
      div128by32 (&alo, &ahi, factor, 0B);
      scale = scale - i;
      texp = texp + i;
      <D.9305>:
      <D.8397>:
      if (scale > 0) goto <D.8396>; else goto <D.8398>;
      <D.8398>:
      goto <D.8400>;
      <D.8399>:
      lshift128 (&alo, &ahi);
      texp = texp + 1;
      <D.8400>:
      ahi.107 = ahi;
      ahi.109 = (signed long) ahi.107;
      if (ahi.109 >= 0) goto <D.8399>; else goto <D.8401>;
      <D.8401>:
      ahi.107 = ahi;
      D.9318 = (unsigned int) ahi.107;
      roundBits = D.9318 & 2047;
      ahi.107 = ahi;
      ahi.111 = ahi.107 + 1024;
      ahi = ahi.111;
      ahi.107 = ahi;
      ahi.109 = (signed long) ahi.107;
      if (ahi.109 >= 0) goto <D.9320>; else goto <D.9321>;
      <D.9320>:
      ahi.107 = ahi;
      ahi.112 = ahi.107 >> 1;
      ahi = ahi.112;
      texp = texp + -1;
      goto <D.9323>;
      <D.9321>:
      D.9324 = roundBits & 1024;
      if (D.9324 == 0) goto <D.9325>; else goto <D.9326>;
      <D.9325>:
      ahi.107 = ahi;
      ahi.113 = ahi.107 & 18446744073709551614;
      ahi = ahi.113;
      <D.9326>:
      <D.9323>:
      ahi.107 = ahi;
      D.9328 = ahi.107 & 9223372036854775807;
      mantisse = D.9328 >> 11;
      D.9329 = 95 - texp;
      D.9330 = pA->u.signscale.sign;
      D.9331 = (int) D.9330;
      buildIEEE754Double (&d, D.9331, D.9329, mantisse);
      D.9300 = d;
      return D.9300;
    }
  finally
    {
      d = {CLOBBER};
      alo = {CLOBBER};
      ahi = {CLOBBER};
    }
}


buildIEEE754Double (double * pd, int sign, int texp, guint64 mantisse)
{
  long unsigned int D.9334;
  long unsigned int D.9335;
  int D.9336;
  long unsigned int D.9337;
  long unsigned int D.9338;
  long unsigned int D.9339;
  long unsigned int D.9340;
  long unsigned int D.9341;
  guint64 * p;

  p = pd;
  D.9334 = (long unsigned int) sign;
  D.9335 = D.9334 << 63;
  D.9336 = texp + 1023;
  D.9337 = (long unsigned int) D.9336;
  D.9338 = D.9337 & 2047;
  D.9339 = D.9338 << 52;
  D.9340 = D.9335 | D.9339;
  D.9341 = D.9340 | mantisse;
  *p = D.9341;
}


mono_decimalSetExponent (struct decimal_repr * pA, gint32 texp)
{
  unsigned char D.9342;
  int scale.114;
  int scale.115;
  int scale.116;
  unsigned int scale.117;
  unsigned int D.9349;
  long unsigned int D.9350;
  long unsigned int D.9351;
  unsigned int D.9352;
  long unsigned int D.9353;
  long unsigned int alo.118;
  unsigned int D.9355;
  long unsigned int ahi.119;
  gint32 D.9359;
  <unnamed-unsigned:1> D.9360;
  int D.9361;
  long unsigned int ahi.120;
  long unsigned int alo.121;
  unsigned char D.9364;
  guint64 alo;
  guint64 ahi;
  int rc;
  int scale;

  try
    {
      D.9342 = pA->u.signscale.scale;
      scale.114 = (int) D.9342;
      scale = scale.114;
      scale.115 = scale;
      scale.116 = scale.115 - texp;
      scale = scale.116;
      scale.115 = scale;
      scale.117 = (unsigned int) scale.115;
      if (scale.117 > 28) goto <D.9347>; else goto <D.9348>;
      <D.9347>:
      D.9349 = pA->mid32;
      D.9350 = (long unsigned int) D.9349;
      D.9351 = D.9350 << 32;
      D.9352 = pA->lo32;
      D.9353 = (long unsigned int) D.9352;
      alo.118 = D.9351 | D.9353;
      alo = alo.118;
      D.9355 = pA->hi32;
      ahi.119 = (long unsigned int) D.9355;
      ahi = ahi.119;
      rc = rescale128 (&alo, &ahi, &scale, 0, 0, 28, 1);
      if (rc != 0) goto <D.9357>; else goto <D.9358>;
      <D.9357>:
      D.9359 = rc;
      return D.9359;
      <D.9358>:
      D.9360 = pA->u.signscale.sign;
      D.9361 = (int) D.9360;
      scale.115 = scale;
      ahi.120 = ahi;
      alo.121 = alo;
      D.9359 = pack128toDecimal (pA, alo.121, ahi.120, scale.115, D.9361);
      return D.9359;
      <D.9348>:
      scale.115 = scale;
      D.9364 = (unsigned char) scale.115;
      pA->u.signscale.scale = D.9364;
      D.9359 = 0;
      return D.9359;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
      scale = {CLOBBER};
    }
}


