mono_decimalIncr (struct decimal_repr * pA, struct decimal_repr * pB)
{
  unsigned int D.8936;
  long unsigned int D.8937;
  long unsigned int D.8938;
  unsigned int D.8939;
  long unsigned int D.8940;
  long unsigned int alo.0;
  unsigned int D.8942;
  long unsigned int ahi.1;
  unsigned int D.8944;
  long unsigned int D.8945;
  long unsigned int D.8946;
  unsigned int D.8947;
  long unsigned int D.8948;
  long unsigned int blo.2;
  unsigned int D.8950;
  long unsigned int bhi.3;
  <unnamed-unsigned:1> D.8952;
  <unnamed-unsigned:1> D.8953;
  int D.8954;
  unsigned char D.8955;
  int scaleA.4;
  unsigned char D.8957;
  int scaleA.5;
  long unsigned int alo.6;
  long unsigned int ahi.7;
  long unsigned int blo.8;
  long unsigned int bhi.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.8976;
  int D.8981;
  int D.8982;
  int D.8985;
  int scaleA.15;
  int D.8989;
  gint32 D.8992;
  int D.8993;
  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.8936 = pA->mid32;
      D.8937 = (long unsigned int) D.8936;
      D.8938 = D.8937 << 32;
      D.8939 = pA->lo32;
      D.8940 = (long unsigned int) D.8939;
      alo.0 = D.8938 | D.8940;
      alo = alo.0;
      D.8942 = pA->hi32;
      ahi.1 = (long unsigned int) D.8942;
      ahi = ahi.1;
      D.8944 = pB->mid32;
      D.8945 = (long unsigned int) D.8944;
      D.8946 = D.8945 << 32;
      D.8947 = pB->lo32;
      D.8948 = (long unsigned int) D.8947;
      blo.2 = D.8946 | D.8948;
      blo = blo.2;
      D.8950 = pB->hi32;
      bhi.3 = (long unsigned int) D.8950;
      bhi = bhi.3;
      D.8952 = pA->u.signscale.sign;
      sign = (int) D.8952;
      D.8953 = pB->u.signscale.sign;
      D.8954 = (int) D.8953;
      subFlag = sign - D.8954;
      D.8955 = pA->u.signscale.scale;
      scaleA.4 = (int) D.8955;
      scaleA = scaleA.4;
      D.8957 = pB->u.signscale.scale;
      scaleB = (int) D.8957;
      scaleA.5 = scaleA;
      if (scaleA.5 == scaleB) goto <D.8959>; else goto <D.8960>;
      <D.8959>:
      if (subFlag != 0) goto <D.8961>; else goto <D.8962>;
      <D.8961>:
      alo.6 = alo;
      ahi.7 = ahi;
      blo.8 = blo;
      bhi.9 = bhi;
      sub128 (alo.6, ahi.7, blo.8, bhi.9, &alo, &ahi);
      ahi.7 = ahi;
      ahi.10 = (signed long) ahi.7;
      if (ahi.10 < 0) goto <D.8968>; else goto <D.8969>;
      <D.8968>:
      alo.6 = alo;
      alo.11 = alo.6 + 18446744073709551615;
      alo = alo.11;
      alo.6 = alo;
      alo.12 = ~alo.6;
      alo = alo.12;
      alo.6 = alo;
      if (alo.6 == 0) goto <D.8972>; else goto <D.8973>;
      <D.8972>:
      ahi.7 = ahi;
      ahi.13 = ahi.7 + 18446744073709551615;
      ahi = ahi.13;
      <D.8973>:
      ahi.7 = ahi;
      ahi.14 = ~ahi.7;
      ahi = ahi.14;
      D.8976 = sign == 0;
      sign = (int) D.8976;
      <D.8969>:
      goto <D.8977>;
      <D.8962>:
      alo.6 = alo;
      ahi.7 = ahi;
      blo.8 = blo;
      bhi.9 = bhi;
      add128 (alo.6, ahi.7, blo.8, bhi.9, &alo, &ahi);
      <D.8977>:
      rc = normalize128 (&alo, &ahi, &scaleA, 1, 0);
      goto <D.8978>;
      <D.8960>:
      alo.6 = alo;
      ahi.7 = ahi;
      scaleA.5 = scaleA;
      log2A = log2withScale_128 (alo.6, ahi.7, scaleA.5);
      blo.8 = blo;
      bhi.9 = bhi;
      log2B = log2withScale_128 (blo.8, bhi.9, scaleB);
      log2Result = MAX_EXPR <log2B, log2A>;
      if (subFlag == 0) goto <D.8979>; else goto <D.8980>;
      <D.8979>:
      log2Result = log2Result + 1;
      <D.8980>:
      D.8981 = log2Result * 1000;
      D.8982 = D.8981 / 3322;
      log10Result = D.8982 + 1;
      scaleA.5 = scaleA;
      if (scaleB > scaleA.5) goto <D.8983>; else goto <D.8984>;
      <D.8983>:
      scaleA = scaleB;
      <D.8984>:
      scaleA.5 = scaleA;
      D.8985 = scaleA.5 + log10Result;
      if (D.8985 > 35) goto <D.8986>; else goto <D.8987>;
      <D.8986>:
      scaleA.15 = 35 - log10Result;
      scaleA = scaleA.15;
      <D.8987>:
      scaleA.5 = scaleA;
      D.8955 = pA->u.signscale.scale;
      scaleA.4 = (int) D.8955;
      D.8989 = scaleA.5 - scaleA.4;
      rc = adjustScale128 (&alo, &ahi, D.8989);
      if (rc != 0) goto <D.8990>; else goto <D.8991>;
      <D.8990>:
      D.8992 = rc;
      return D.8992;
      <D.8991>:
      scaleA.5 = scaleA;
      D.8993 = scaleA.5 - scaleB;
      rc = adjustScale128 (&blo, &bhi, D.8993);
      if (rc != 0) goto <D.8994>; else goto <D.8995>;
      <D.8994>:
      D.8992 = rc;
      return D.8992;
      <D.8995>:
      if (subFlag != 0) goto <D.8996>; else goto <D.8997>;
      <D.8996>:
      alo.6 = alo;
      ahi.7 = ahi;
      blo.8 = blo;
      bhi.9 = bhi;
      sub128 (alo.6, ahi.7, blo.8, bhi.9, &alo, &ahi);
      ahi.7 = ahi;
      ahi.10 = (signed long) ahi.7;
      if (ahi.10 < 0) goto <D.8998>; else goto <D.8999>;
      <D.8998>:
      alo.6 = alo;
      alo.11 = alo.6 + 18446744073709551615;
      alo = alo.11;
      alo.6 = alo;
      alo.12 = ~alo.6;
      alo = alo.12;
      alo.6 = alo;
      if (alo.6 == 0) goto <D.9000>; else goto <D.9001>;
      <D.9000>:
      ahi.7 = ahi;
      ahi.13 = ahi.7 + 18446744073709551615;
      ahi = ahi.13;
      <D.9001>:
      ahi.7 = ahi;
      ahi.14 = ~ahi.7;
      ahi = ahi.14;
      D.8976 = sign == 0;
      sign = (int) D.8976;
      <D.8999>:
      goto <D.9002>;
      <D.8997>:
      alo.6 = alo;
      ahi.7 = ahi;
      blo.8 = blo;
      bhi.9 = bhi;
      add128 (alo.6, ahi.7, blo.8, bhi.9, &alo, &ahi);
      <D.9002>:
      rc = rescale128 (&alo, &ahi, &scaleA, 0, 0, 28, 1);
      <D.8978>:
      if (rc != 0) goto <D.9003>; else goto <D.9004>;
      <D.9003>:
      D.8992 = rc;
      return D.8992;
      <D.9004>:
      alo.6 = alo;
      ahi.7 = ahi;
      scaleA.5 = scaleA;
      D.8992 = pack128toDecimal (pA, alo.6, ahi.7, scaleA.5, sign);
      return D.8992;
    }
  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.9007;
  long unsigned int D.9008;
  unsigned int D.9009;
  int D.9013;
  long unsigned int D.9018;
  int D.9021;
  guint32 overhang;
  int scale;
  int deltaScale;

  D.9007 = *pchi;
  D.9008 = D.9007 >> 32;
  overhang = (guint32) D.9008;
  scale = *pScale;
  goto <D.8566>;
  <D.8565>:
  deltaScale = 1;
  goto <D.8564>;
  <D.8563>:
  D.9009 = constantsDecadeInt32Factors[deltaScale];
  if (D.9009 > overhang) goto <D.8562>; else goto <D.9010>;
  <D.9010>:
  deltaScale = deltaScale + 1;
  <D.8564>:
  if (deltaScale <= 8) goto <D.8563>; else goto <D.8562>;
  <D.8562>:
  scale = scale - deltaScale;
  if (scale < 0) goto <D.9011>; else goto <D.9012>;
  <D.9011>:
  D.9013 = 2;
  return D.9013;
  <D.9012>:
  D.9009 = constantsDecadeInt32Factors[deltaScale];
  roundBit = div128by32 (pclo, pchi, D.9009, 0B);
  D.9007 = *pchi;
  D.9008 = D.9007 >> 32;
  overhang = (guint32) D.9008;
  if (roundFlag != 0) goto <D.9014>; else goto <D.9015>;
  <D.9014>:
  if (roundBit != 0) goto <D.9016>; else goto <D.9017>;
  <D.9016>:
  D.9018 = *pclo;
  if (D.9018 == 18446744073709551615) goto <D.9019>; else goto <D.9020>;
  <D.9019>:
  D.9007 = *pchi;
  D.9021 = (int) D.9007;
  if (D.9021 == -1) goto <D.9022>; else goto <D.9023>;
  <D.9022>:
  overhang = 1;
  <D.9023>:
  <D.9020>:
  <D.9017>:
  <D.9015>:
  <D.8566>:
  if (overhang != 0) goto <D.8565>; else goto <D.8567>;
  <D.8567>:
  *pScale = scale;
  if (roundFlag != 0) goto <D.9024>; else goto <D.9025>;
  <D.9024>:
  if (roundBit != 0) goto <D.9026>; else goto <D.9027>;
  <D.9026>:
  roundUp128 (pclo, pchi);
  <D.9027>:
  <D.9025>:
  D.9013 = 0;
  return D.9013;
}


div128by32 (guint64 * plo, guint64 * phi, guint32 factor, guint32 * pRest)
{
  long unsigned int D.9029;
  unsigned int D.9030;
  long unsigned int D.9031;
  long unsigned int D.9032;
  unsigned int D.9033;
  long unsigned int D.9034;
  long unsigned int D.9035;
  long unsigned int D.9036;
  unsigned int D.9037;
  long unsigned int D.9038;
  long unsigned int D.9039;
  long unsigned int D.9040;
  unsigned int D.9043;
  int D.9044;
  int iftmp.16;
  long unsigned int D.9051;
  guint64 a;
  guint64 b;
  guint64 c;
  guint64 h;

  h = *phi;
  D.9029 = h >> 32;
  D.9030 = (unsigned int) D.9029;
  a = (guint64) D.9030;
  D.9031 = (long unsigned int) factor;
  b = a / D.9031;
  D.9031 = (long unsigned int) factor;
  D.9032 = D.9031 * b;
  a = a - D.9032;
  a = a << 32;
  D.9033 = (unsigned int) h;
  D.9034 = (long unsigned int) D.9033;
  a = D.9034 | a;
  D.9031 = (long unsigned int) factor;
  c = a / D.9031;
  D.9031 = (long unsigned int) factor;
  D.9035 = D.9031 * c;
  a = a - D.9035;
  a = a << 32;
  D.9036 = b << 32;
  D.9037 = (unsigned int) c;
  D.9038 = (long unsigned int) D.9037;
  D.9039 = D.9036 | D.9038;
  *phi = D.9039;
  h = *plo;
  D.9029 = h >> 32;
  D.9030 = (unsigned int) D.9029;
  D.9040 = (long unsigned int) D.9030;
  a = D.9040 | a;
  D.9031 = (long unsigned int) factor;
  b = a / D.9031;
  D.9031 = (long unsigned int) factor;
  D.9032 = D.9031 * b;
  a = a - D.9032;
  a = a << 32;
  D.9033 = (unsigned int) h;
  D.9034 = (long unsigned int) D.9033;
  a = D.9034 | a;
  D.9031 = (long unsigned int) factor;
  c = a / D.9031;
  D.9031 = (long unsigned int) factor;
  D.9035 = D.9031 * c;
  a = a - D.9035;
  D.9036 = b << 32;
  D.9037 = (unsigned int) c;
  D.9038 = (long unsigned int) D.9037;
  D.9039 = D.9036 | D.9038;
  *plo = D.9039;
  if (pRest != 0B) goto <D.9041>; else goto <D.9042>;
  <D.9041>:
  D.9043 = (unsigned int) a;
  *pRest = D.9043;
  <D.9042>:
  a = a << 1;
  D.9031 = (long unsigned int) factor;
  if (D.9031 <= a) goto <D.9046>; else goto <D.9049>;
  <D.9049>:
  D.9031 = (long unsigned int) factor;
  if (D.9031 == a) goto <D.9050>; else goto <D.9047>;
  <D.9050>:
  D.9051 = c & 1;
  if (D.9051 != 0) goto <D.9046>; else goto <D.9047>;
  <D.9046>:
  iftmp.16 = 1;
  goto <D.9048>;
  <D.9047>:
  iftmp.16 = 0;
  <D.9048>:
  D.9044 = iftmp.16;
  return D.9044;
}


roundUp128 (guint64 * pclo, guint64 * pchi)
{
  long unsigned int D.9053;
  long unsigned int D.9054;
  long unsigned int D.9057;
  long unsigned int D.9058;

  D.9053 = *pclo;
  D.9054 = D.9053 + 1;
  *pclo = D.9054;
  D.9053 = *pclo;
  if (D.9053 == 0) goto <D.9055>; else goto <D.9056>;
  <D.9055>:
  D.9057 = *pchi;
  D.9058 = D.9057 + 1;
  *pchi = D.9058;
  <D.9056>:
}


log2withScale_128 (guint64 alo, guint64 ahi, int scale)
{
  int D.9061;
  int D.9062;
  int D.9063;
  int tlog2;

  tlog2 = log2_128 (alo, ahi);
  if (tlog2 < 0) goto <D.9059>; else goto <D.9060>;
  <D.9059>:
  tlog2 = 0;
  <D.9060>:
  D.9062 = scale * 33219;
  D.9063 = D.9062 / -10000;
  D.9061 = D.9063 + tlog2;
  return D.9061;
}


log2_128 (guint64 alo, guint64 ahi)
{
  int D.9067;
  int D.9068;

  if (ahi == 0) goto <D.9065>; else goto <D.9066>;
  <D.9065>:
  D.9067 = log2_64 (alo);
  return D.9067;
  <D.9066>:
  D.9068 = log2_64 (ahi);
  D.9067 = D.9068 + 64;
  return D.9067;
}


log2_64 (guint64 a)
{
  int D.9072;
  int D.9073;

  if (a == 0) goto <D.9070>; else goto <D.9071>;
  <D.9070>:
  D.9072 = -1000;
  return D.9072;
  <D.9071>:
  D.9073 = my_g_bit_nth_msf (a);
  D.9072 = D.9073 + 1;
  return D.9072;
}


my_g_bit_nth_msf (gsize mask)
{
  long unsigned int D.9075;
  long unsigned int D.9076;
  gint D.9079;
  int i;

  i = 64;
  goto <D.8600>;
  <D.8599>:
  i = i + -1;
  D.9075 = mask >> i;
  D.9076 = D.9075 & 1;
  if (D.9076 != 0) goto <D.9077>; else goto <D.9078>;
  <D.9077>:
  D.9079 = i;
  return D.9079;
  <D.9078>:
  <D.8600>:
  if (i > 0) goto <D.8599>; else goto <D.8601>;
  <D.8601>:
  D.9079 = -1;
  return D.9079;
}


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

  if (deltaScale < 0) goto <D.9081>; else goto <D.9082>;
  <D.9081>:
  deltaScale = -deltaScale;
  if (deltaScale > 28) goto <D.9083>; else goto <D.9084>;
  <D.9083>:
  D.9085 = 3;
  return D.9085;
  <D.9084>:
  goto <D.8633>;
  <D.8632>:
  idx = MIN_EXPR <deltaScale, 9>;
  deltaScale = deltaScale - idx;
  D.9086 = constantsDecadeInt32Factors[idx];
  div128by32 (palo, pahi, D.9086, 0B);
  <D.8633>:
  if (deltaScale > 0) goto <D.8632>; else goto <D.8634>;
  <D.8634>:
  goto <D.9087>;
  <D.9082>:
  if (deltaScale > 0) goto <D.9088>; else goto <D.9089>;
  <D.9088>:
  if (deltaScale > 28) goto <D.9090>; else goto <D.9091>;
  <D.9090>:
  D.9085 = 3;
  return D.9085;
  <D.9091>:
  goto <D.8636>;
  <D.8635>:
  idx = MIN_EXPR <deltaScale, 9>;
  deltaScale = deltaScale - idx;
  D.9086 = constantsDecadeInt32Factors[idx];
  rc = mult128by32 (palo, pahi, D.9086, 0);
  if (rc != 0) goto <D.9092>; else goto <D.9093>;
  <D.9092>:
  D.9085 = rc;
  return D.9085;
  <D.9093>:
  <D.8636>:
  if (deltaScale > 0) goto <D.8635>; else goto <D.8637>;
  <D.8637>:
  <D.9089>:
  <D.9087>:
  D.9085 = 0;
  return D.9085;
}


mult128by32 (guint64 * pclo, guint64 * pchi, guint32 factor, int roundBit)
{
  long unsigned int D.9095;
  unsigned int D.9096;
  long unsigned int D.9097;
  long unsigned int D.9098;
  unsigned int D.9101;
  long unsigned int D.9102;
  long 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 D.9108;
  long unsigned int D.9109;
  long unsigned int D.9110;
  unsigned int D.9111;
  long unsigned int D.9112;
  long unsigned int D.9113;
  long unsigned int D.9114;
  long unsigned int D.9115;
  int D.9116;
  int iftmp.17;
  long unsigned int D.9118;
  guint64 a;
  guint32 h0;
  guint32 h1;

  D.9095 = *pclo;
  D.9096 = (unsigned int) D.9095;
  D.9097 = (long unsigned int) D.9096;
  D.9098 = (long unsigned int) factor;
  a = D.9097 * D.9098;
  if (roundBit != 0) goto <D.9099>; else goto <D.9100>;
  <D.9099>:
  D.9101 = factor / 2;
  D.9102 = (long unsigned int) D.9101;
  a = D.9102 + a;
  <D.9100>:
  h0 = (guint32) a;
  a = a >> 32;
  D.9095 = *pclo;
  D.9103 = D.9095 >> 32;
  D.9104 = (long unsigned int) factor;
  D.9105 = D.9103 * D.9104;
  a = D.9105 + a;
  h1 = (guint32) a;
  D.9106 = (long unsigned int) h1;
  D.9107 = D.9106 << 32;
  D.9108 = (long unsigned int) h0;
  D.9109 = D.9107 | D.9108;
  *pclo = D.9109;
  a = a >> 32;
  D.9110 = *pchi;
  D.9111 = (unsigned int) D.9110;
  D.9112 = (long unsigned int) D.9111;
  D.9098 = (long unsigned int) factor;
  D.9113 = D.9112 * D.9098;
  a = D.9113 + a;
  h0 = (guint32) a;
  a = a >> 32;
  D.9110 = *pchi;
  D.9114 = D.9110 >> 32;
  D.9104 = (long unsigned int) factor;
  D.9115 = D.9114 * D.9104;
  a = D.9115 + a;
  h1 = (guint32) a;
  D.9106 = (long unsigned int) h1;
  D.9107 = D.9106 << 32;
  D.9108 = (long unsigned int) h0;
  D.9109 = D.9107 | D.9108;
  *pchi = D.9109;
  D.9118 = a >> 32;
  if (D.9118 == 0) goto <D.9119>; else goto <D.9120>;
  <D.9119>:
  iftmp.17 = 0;
  goto <D.9121>;
  <D.9120>:
  iftmp.17 = 2;
  <D.9121>:
  D.9116 = iftmp.17;
  return D.9116;
}


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.9123>; else goto <D.9124>;
  <D.9123>:
  chi = chi + 18446744073709551615;
  <D.9124>:
  *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.9125>; else goto <D.9126>;
  <D.9125>:
  ahi = ahi + 1;
  <D.9126>:
  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.9129;
  long unsigned int D.9130;
  long unsigned int D.9133;
  long unsigned int D.9138;
  long unsigned int D.9139;
  int D.9140;
  int D.9141;
  long unsigned int D.9142;
  long unsigned int D.9143;
  int D.9144;
  long unsigned int D.9145;
  long unsigned int D.9146;
  long unsigned int D.9147;
  _Bool D.9148;
  long int D.9149;
  long int D.9150;
  _Bool D.9153;
  long int D.9154;
  long int D.9155;
  int D.9160;
  long unsigned int D.9163;
  int D.9167;
  unsigned int D.9171;
  int D.9183;
  guint32 factor;
  guint32 overhang;
  int scale;
  int i;
  int rc;
  int roundBit;

  roundBit = 0;
  scale = *pScale;
  if (texp > 0) goto <D.9127>; else goto <D.9128>;
  <D.9127>:
  goto <D.8660>;
  <D.8659>:
  D.9129 = *pchi;
  D.9130 = D.9129 >> 32;
  overhang = (guint32) D.9130;
  if (overhang != 0) goto <D.9131>; else goto <D.9132>;
  <D.9131>:
  {
    int msf;
    int shift;

    D.9133 = (long unsigned int) overhang;
    msf = my_g_bit_nth_msf (D.9133);
    shift = msf + -11;
    if (shift >= texp) goto <D.9134>; else goto <D.9135>;
    <D.9134>:
    shift = texp + -1;
    <D.9135>:
    if (shift > 0) goto <D.9136>; else goto <D.9137>;
    <D.9136>:
    texp = texp - shift;
    D.9138 = *pclo;
    D.9139 = D.9138 >> shift;
    D.9129 = *pchi;
    D.9140 = 1 << shift;
    D.9141 = D.9140 + -1;
    D.9142 = (long unsigned int) D.9141;
    D.9143 = D.9129 & D.9142;
    D.9144 = 64 - shift;
    D.9145 = D.9143 << D.9144;
    D.9146 = D.9139 | D.9145;
    *pclo = D.9146;
    D.9129 = *pchi;
    D.9147 = D.9129 >> shift;
    *pchi = D.9147;
    overhang = overhang >> shift;
    D.9148 = texp <= 0;
    D.9149 = (long int) D.9148;
    D.9150 = __builtin_expect (D.9149, 0);
    if (D.9150 != 0) goto <D.9151>; else goto <D.9152>;
    <D.9151>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "decimal.c", 730, "texp > 0");
    <D.9152>:
    D.9153 = overhang <= 1024;
    D.9154 = (long int) D.9153;
    D.9155 = __builtin_expect (D.9154, 0);
    if (D.9155 != 0) goto <D.9156>; else goto <D.9157>;
    <D.9156>:
    monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "decimal.c", 731, "overhang > (2 << DECIMAL_MAX_INTFACTORS)");
    <D.9157>:
    <D.9137>:
  }
  <D.9132>:
  goto <D.8656>;
  <D.8655>:
  texp = texp + -1;
  if (texp == 0) goto <D.9158>; else goto <D.9159>;
  <D.9158>:
  D.9138 = *pclo;
  D.9160 = (int) D.9138;
  roundBit = D.9160 & 1;
  <D.9159>:
  rshift128 (pclo, pchi);
  overhang = overhang >> 1;
  <D.8656>:
  if (texp > 0) goto <D.9161>; else goto <D.8657>;
  <D.9161>:
  if (overhang > 1024) goto <D.8655>; else goto <D.9162>;
  <D.9162>:
  D.9138 = *pclo;
  D.9163 = D.9138 & 1;
  if (D.9163 == 0) goto <D.8655>; else goto <D.8657>;
  <D.8657>:
  if (texp > 9) goto <D.9164>; else goto <D.9165>;
  <D.9164>:
  i = 9;
  goto <D.9166>;
  <D.9165>:
  i = texp;
  <D.9166>:
  D.9167 = scale + i;
  if (D.9167 > maxScale) goto <D.9168>; else goto <D.9169>;
  <D.9168>:
  i = maxScale - scale;
  <D.9169>:
  if (i == 0) goto <D.8658>; else goto <D.9170>;
  <D.9170>:
  texp = texp - i;
  scale = scale + i;
  D.9171 = constantsDecadeInt32Factors[i];
  factor = D.9171 >> i;
  mult128by32 (pclo, pchi, factor, 0);
  <D.8660>:
  if (texp > 0) goto <D.9172>; else goto <D.8658>;
  <D.9172>:
  if (scale <= maxScale) goto <D.8659>; else goto <D.8658>;
  <D.8658>:
  goto <D.8662>;
  <D.8661>:
  texp = texp + -1;
  if (texp == 0) goto <D.9173>; else goto <D.9174>;
  <D.9173>:
  D.9138 = *pclo;
  D.9160 = (int) D.9138;
  roundBit = D.9160 & 1;
  <D.9174>:
  rshift128 (pclo, pchi);
  <D.8662>:
  if (texp > 0) goto <D.8661>; else goto <D.8663>;
  <D.8663>:
  <D.9128>:
  goto <D.8665>;
  <D.8664>:
  i = scale - maxScale;
  if (i > 9) goto <D.9175>; else goto <D.9176>;
  <D.9175>:
  i = 9;
  <D.9176>:
  scale = scale - i;
  D.9171 = constantsDecadeInt32Factors[i];
  roundBit = div128by32 (pclo, pchi, D.9171, 0B);
  <D.8665>:
  if (scale > maxScale) goto <D.8664>; else goto <D.8666>;
  <D.8666>:
  goto <D.8668>;
  <D.8667>:
  if (roundFlag == 0) goto <D.9177>; else goto <D.9178>;
  <D.9177>:
  roundBit = 0;
  <D.9178>:
  i = minScale - scale;
  if (i > 9) goto <D.9179>; else goto <D.9180>;
  <D.9179>:
  i = 9;
  <D.9180>:
  scale = scale + i;
  D.9171 = constantsDecadeInt32Factors[i];
  rc = mult128by32 (pclo, pchi, D.9171, roundBit);
  if (rc != 0) goto <D.9181>; else goto <D.9182>;
  <D.9181>:
  D.9183 = rc;
  return D.9183;
  <D.9182>:
  roundBit = 0;
  <D.8668>:
  if (scale < minScale) goto <D.8667>; else goto <D.8669>;
  <D.8669>:
  *pScale = scale;
  D.9183 = normalize128 (pclo, pchi, pScale, roundFlag, roundBit);
  return D.9183;
}


rshift128 (guint64 * pclo, guint64 * pchi)
{
  long unsigned int D.9185;
  long unsigned int D.9186;
  long unsigned int D.9187;
  long unsigned int D.9188;
  long unsigned int D.9189;
  long unsigned int D.9190;

  D.9185 = *pclo;
  D.9186 = D.9185 >> 1;
  *pclo = D.9186;
  D.9185 = *pclo;
  D.9187 = *pchi;
  D.9188 = D.9187 << 63;
  D.9189 = D.9185 | D.9188;
  *pclo = D.9189;
  D.9187 = *pchi;
  D.9190 = D.9187 >> 1;
  *pchi = D.9190;
}


pack128toDecimal (struct decimal_repr * pA, guint64 alo, guint64 ahi, int scale, int sign)
{
  unsigned int scale.18;
  long unsigned int D.9195;
  int D.9196;
  unsigned int D.9197;
  long unsigned int D.9198;
  unsigned int D.9199;
  unsigned int D.9200;
  unsigned char D.9201;
  <unnamed-unsigned:1> D.9202;
  unsigned char D.9203;

  scale.18 = (unsigned int) scale;
  if (scale.18 > 28) goto <D.9191>; else goto <D.9194>;
  <D.9194>:
  D.9195 = ahi >> 32;
  if (D.9195 != 0) goto <D.9191>; else goto <D.9192>;
  <D.9191>:
  D.9196 = 2;
  return D.9196;
  <D.9192>:
  D.9197 = (unsigned int) alo;
  pA->lo32 = D.9197;
  D.9198 = alo >> 32;
  D.9199 = (unsigned int) D.9198;
  pA->mid32 = D.9199;
  D.9200 = (unsigned int) ahi;
  pA->hi32 = D.9200;
  D.9201 = (unsigned char) sign;
  D.9202 = (<unnamed-unsigned:1>) D.9201;
  pA->u.signscale.sign = D.9202;
  D.9203 = (unsigned char) scale;
  pA->u.signscale.scale = D.9203;
  D.9196 = 0;
  return D.9196;
}


mono_double2decimal (struct decimal_repr * pA, double val, gint32 digits)
{
  long unsigned int D.9205;
  signed long D.9206;
  _Bool D.9207;
  long unsigned int D.9208;
  short unsigned int D.9209;
  long long unsigned int D.9210;
  long long unsigned int alo.19;
  int D.9212;
  int D.9213;
  gint32 D.9217;
  int D.9223;
  long unsigned int alo.20;
  long unsigned int ahi.21;
  int D.9230;
  int D.9231;
  int scale.22;
  int scale.23;
  long unsigned int D.9234;
  long unsigned int D.9237;
  int scale.24;
  int D.9243;
  guint64 alo;
  guint64 ahi;
  guint64 * p;
  int sigDigits;
  int sign;
  int texp;
  int rc;
  int scale;
  guint16 k;

  try
    {
      p = &val;
      D.9205 = *p;
      D.9206 = (signed long) D.9205;
      D.9207 = D.9206 < 0;
      sign = (int) D.9207;
      D.9205 = *p;
      D.9208 = D.9205 >> 52;
      D.9209 = (short unsigned int) D.9208;
      k = D.9209 & 2047;
      D.9205 = *p;
      D.9210 = D.9205 & 4503599627370495;
      alo.19 = D.9210 | 4503599627370496;
      alo = alo.19;
      ahi = 0;
      D.9212 = (int) k;
      D.9213 = D.9212 & 2047;
      texp = D.9213 + -1023;
      if (k == 2047) goto <D.9214>; else goto <D.9216>;
      <D.9216>:
      if (texp > 95) goto <D.9214>; else goto <D.9215>;
      <D.9214>:
      D.9217 = 2;
      return D.9217;
      <D.9215>:
      if (k == 0) goto <D.9218>; else goto <D.9220>;
      <D.9220>:
      if (texp < -93) goto <D.9218>; else goto <D.9219>;
      <D.9218>:
      memset (pA, 0, 16);
      D.9217 = 0;
      return D.9217;
      <D.9219>:
      texp = texp + -52;
      if (texp > 0) goto <D.9221>; else goto <D.9222>;
      <D.9221>:
      goto <D.8743>;
      <D.8742>:
      lshift128 (&alo, &ahi);
      texp = texp + -1;
      <D.8743>:
      if (texp > 0) goto <D.8742>; else goto <D.8744>;
      <D.8744>:
      <D.9222>:
      scale = 0;
      D.9223 = -texp;
      rc = rescale128 (&alo, &ahi, &scale, D.9223, 0, 28, 1);
      if (rc != 0) goto <D.9224>; else goto <D.9225>;
      <D.9224>:
      D.9217 = rc;
      return D.9217;
      <D.9225>:
      alo.20 = alo;
      ahi.21 = ahi;
      sigDigits = calcDigits (alo.20, ahi.21);
      if (sigDigits > digits) goto <D.9228>; else goto <D.9229>;
      <D.9228>:
      D.9230 = sigDigits - digits;
      div128DecadeFactor (&alo, &ahi, D.9230);
      D.9231 = digits - sigDigits;
      scale.22 = scale;
      scale.23 = D.9231 + scale.22;
      scale = scale.23;
      D.9234 = dec128decadeFactors[digits].hi;
      ahi.21 = ahi;
      if (D.9234 == ahi.21) goto <D.9235>; else goto <D.9236>;
      <D.9235>:
      D.9237 = dec128decadeFactors[digits].lo;
      alo.20 = alo;
      if (D.9237 == alo.20) goto <D.9238>; else goto <D.9239>;
      <D.9238>:
      div128by32 (&alo, &ahi, 10, 0B);
      scale.22 = scale;
      scale.24 = scale.22 + -1;
      scale = scale.24;
      <D.9239>:
      <D.9236>:
      scale.22 = scale;
      if (scale.22 < 0) goto <D.9241>; else goto <D.9242>;
      <D.9241>:
      scale.22 = scale;
      D.9243 = -scale.22;
      rc = mult128DecadeFactor (&alo, &ahi, D.9243);
      if (rc != 0) goto <D.9244>; else goto <D.9245>;
      <D.9244>:
      D.9217 = rc;
      return D.9217;
      <D.9245>:
      scale = 0;
      <D.9242>:
      <D.9229>:
      trimExcessScale (&alo, &ahi, &scale);
      alo.20 = alo;
      ahi.21 = ahi;
      scale.22 = scale;
      D.9217 = pack128toDecimal (pA, alo.20, ahi.21, scale.22, sign);
      return D.9217;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
      scale = {CLOBBER};
    }
}


memset (void * __dest, int __ch, size_t __len)
{
  int D.9250;
  int D.9255;
  void * D.9257;
  long unsigned int D.9258;

  D.9250 = __builtin_constant_p (__len);
  if (D.9250 != 0) goto <D.9251>; else goto <D.9252>;
  <D.9251>:
  if (__len == 0) goto <D.9253>; else goto <D.9254>;
  <D.9253>:
  D.9255 = __builtin_constant_p (__ch);
  if (D.9255 == 0) goto <D.9248>; else goto <D.9256>;
  <D.9256>:
  if (__ch != 0) goto <D.9248>; else goto <D.9249>;
  <D.9248>:
  __warn_memset_zero_len ();
  D.9257 = __dest;
  return D.9257;
  <D.9249>:
  <D.9254>:
  <D.9252>:
  D.9258 = __builtin_object_size (__dest, 0);
  D.9257 = __builtin___memset_chk (__dest, __ch, __len, D.9258);
  return D.9257;
}


lshift128 (guint64 * pclo, guint64 * pchi)
{
  long unsigned int D.9260;
  long unsigned int D.9261;
  long unsigned int D.9262;
  long long unsigned int D.9263;
  long long unsigned int D.9264;
  long unsigned int D.9265;

  D.9260 = *pchi;
  D.9261 = D.9260 << 1;
  *pchi = D.9261;
  D.9260 = *pchi;
  D.9262 = *pclo;
  D.9263 = D.9262 >> 63;
  D.9264 = D.9260 | D.9263;
  *pchi = D.9264;
  D.9262 = *pclo;
  D.9265 = D.9262 << 1;
  *pclo = D.9265;
}


calcDigits (guint64 alo, guint64 ahi)
{
  int D.9270;
  int D.9272;
  int D.9273;
  long unsigned int D.9276;
  long unsigned int D.9279;
  int tlog2;
  int tlog10;

  tlog2 = 0;
  if (ahi == 0) goto <D.9266>; else goto <D.9267>;
  <D.9266>:
  if (alo == 0) goto <D.9268>; else goto <D.9269>;
  <D.9268>:
  D.9270 = 0;
  return D.9270;
  <D.9269>:
  tlog2 = log2_64 (alo);
  goto <D.9271>;
  <D.9267>:
  D.9272 = log2_64 (ahi);
  tlog2 = D.9272 + 64;
  <D.9271>:
  D.9273 = tlog2 * 1000;
  tlog10 = D.9273 / 3322;
  D.9276 = dec128decadeFactors[tlog10].hi;
  if (D.9276 > ahi) goto <D.9274>; else goto <D.9277>;
  <D.9277>:
  D.9276 = dec128decadeFactors[tlog10].hi;
  if (D.9276 == ahi) goto <D.9278>; else goto <D.9275>;
  <D.9278>:
  D.9279 = dec128decadeFactors[tlog10].lo;
  if (D.9279 > alo) goto <D.9274>; else goto <D.9275>;
  <D.9274>:
  tlog10 = tlog10 + -1;
  <D.9275>:
  D.9270 = tlog10 + 1;
  return D.9270;
}


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

  roundBit = 0;
  goto <D.8720>;
  <D.8719>:
  idx = MIN_EXPR <powerOfTen, 9>;
  powerOfTen = powerOfTen - idx;
  D.9281 = constantsDecadeInt32Factors[idx];
  roundBit = div128by32 (palo, pahi, D.9281, 0B);
  <D.8720>:
  if (powerOfTen > 0) goto <D.8719>; else goto <D.8721>;
  <D.8721>:
  if (roundBit != 0) goto <D.9282>; else goto <D.9283>;
  <D.9282>:
  roundUp128 (palo, pahi);
  <D.9283>:
}


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

  goto <D.8494>;
  <D.8493>:
  idx = MIN_EXPR <powerOfTen, 9>;
  powerOfTen = powerOfTen - idx;
  D.9284 = constantsDecadeInt32Factors[idx];
  rc = mult128by32 (pclo, pchi, D.9284, 0);
  if (rc != 0) goto <D.9285>; else goto <D.9286>;
  <D.9285>:
  D.9287 = rc;
  return D.9287;
  <D.9286>:
  <D.8494>:
  if (powerOfTen > 0) goto <D.8493>; else goto <D.8495>;
  <D.8495>:
  D.9287 = 0;
  return D.9287;
}


trimExcessScale (guint64 * pclo, guint64 * pchi, int * pScale)
{
  long unsigned int ilo.25;
  long unsigned int ihi.26;
  unsigned int rest.27;
  int D.9296;
  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.8684>;
      <D.8683>:
      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.9292>; else goto <D.9293>;
      <D.9292>:
      i = i + -1;
      if (i == 0) goto <D.9294>; else goto <D.9295>;
      <D.9294>:
      return;
      <D.9295>:
      *pclo = lastlo;
      *pchi = lasthi;
      D.9296 = scale + 1;
      *pScale = D.9296;
      return;
      <D.9293>:
      <D.8684>:
      if (scale > 0) goto <D.8683>; else goto <D.8685>;
      <D.8685>:
    }
  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.9301;
  int D.9302;
  unsigned int n.29;
  gint32 D.9306;
  int iftmp.30;
  int D.9312;
  int D.9316;
  int D.9320;
  int D.9321;
  int scale.31;
  long unsigned int D.9331;
  long unsigned int D.9332;
  gushort * D.9333;
  short unsigned int D.9334;
  int D.9335;
  sizetype D.9343;
  gushort * D.9344;
  short unsigned int D.9345;
  int D.9346;
  int D.9351;
  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.8764>;
      <D.8763>:
      len = len + 1;
      p = p + 2;
      <D.8764>:
      D.9301 = *p;
      if (D.9301 != 0) goto <D.8763>; else goto <D.8765>;
      <D.8765>:
      p = buf;
      i = 0;
      goto <D.8768>;
      <D.8767>:
      D.9301 = *p;
      D.9302 = (int) D.9301;
      n = D.9302 + -48;
      n.29 = (unsigned int) n;
      if (n.29 > 9) goto <D.9304>; else goto <D.9305>;
      <D.9304>:
      D.9306 = 2;
      return D.9306;
      <D.9305>:
      if (n != 0) goto <D.9307>; else goto <D.9308>;
      <D.9307>:
      if (sigLen < 0) goto <D.9309>; else goto <D.9310>;
      <D.9309>:
      firstNonZero = i;
      D.9312 = len - firstNonZero;
      if (D.9312 > 29) goto <D.9313>; else goto <D.9314>;
      <D.9313>:
      iftmp.30 = firstNonZero + 29;
      goto <D.9315>;
      <D.9314>:
      iftmp.30 = len;
      <D.9315>:
      sigLen = iftmp.30;
      D.9316 = sigLen + 1;
      if (D.9316 < decrDecimal) goto <D.9317>; else goto <D.9318>;
      <D.9317>:
      D.9306 = 2;
      return D.9306;
      <D.9318>:
      <D.9310>:
      if (i >= sigLen) goto <D.8766>; else goto <D.9319>;
      <D.9319>:
      D.9320 = sigLen + -1;
      D.9321 = D.9320 - i;
      rc = incMultConstant128 (&alo, &ahi, D.9321, n);
      if (rc != 0) goto <D.9322>; else goto <D.9323>;
      <D.9322>:
      D.9306 = rc;
      return D.9306;
      <D.9323>:
      <D.9308>:
      i = i + 1;
      p = p + 2;
      <D.8768>:
      D.9301 = *p;
      if (D.9301 != 0) goto <D.8767>; else goto <D.8766>;
      <D.8766>:
      if (sigLen < 0) goto <D.9324>; else goto <D.9325>;
      <D.9324>:
      if (len > decrDecimal) goto <D.9326>; else goto <D.9327>;
      <D.9326>:
      sigLen = len;
      <D.9327>:
      <D.9325>:
      scale.31 = sigLen - decrDecimal;
      scale = scale.31;
      if (i < len) goto <D.9329>; else goto <D.9330>;
      <D.9329>:
      D.9331 = (long unsigned int) i;
      D.9332 = D.9331 * 2;
      D.9333 = buf + D.9332;
      D.9334 = *D.9333;
      D.9335 = (int) D.9334;
      n = D.9335 + -48;
      n.29 = (unsigned int) n;
      if (n.29 > 9) goto <D.9336>; else goto <D.9337>;
      <D.9336>:
      D.9306 = 2;
      return D.9306;
      <D.9337>:
      if (n > 5) goto <D.9338>; else goto <D.9339>;
      <D.9338>:
      roundBit = 1;
      goto <D.9340>;
      <D.9339>:
      if (n == 5) goto <D.9341>; else goto <D.9342>;
      <D.9341>:
      D.9331 = (long unsigned int) i;
      D.9332 = D.9331 * 2;
      D.9343 = D.9332 + 18446744073709551614;
      D.9344 = buf + D.9343;
      D.9345 = *D.9344;
      D.9346 = (int) D.9345;
      n = D.9346 + -48;
      i = i + 1;
      goto <D.8771>;
      <D.8770>:
      D.9331 = (long unsigned int) i;
      D.9332 = D.9331 * 2;
      D.9333 = buf + D.9332;
      D.9334 = *D.9333;
      if (D.9334 != 48) goto <D.8769>; else goto <D.9347>;
      <D.9347>:
      i = i + 1;
      <D.8771>:
      if (i < len) goto <D.8770>; else goto <D.8769>;
      <D.8769>:
      if (i < len) goto <D.9348>; else goto <D.9350>;
      <D.9350>:
      D.9351 = n % 2;
      if (D.9351 == 1) goto <D.9348>; else goto <D.9349>;
      <D.9348>:
      roundBit = 1;
      <D.9349>:
      <D.9342>:
      <D.9340>:
      <D.9330>:
      ahi.28 = ahi;
      if (ahi.28 != 0) goto <D.9352>; else goto <D.9353>;
      <D.9352>:
      rc = normalize128 (&alo, &ahi, &scale, 1, roundBit);
      if (rc != 0) goto <D.9354>; else goto <D.9355>;
      <D.9354>:
      D.9306 = rc;
      return D.9306;
      <D.9355>:
      <D.9353>:
      alo.32 = alo;
      if (alo.32 == 0) goto <D.9358>; else goto <D.9356>;
      <D.9358>:
      ahi.28 = ahi;
      if (ahi.28 == 0) goto <D.9359>; else goto <D.9356>;
      <D.9359>:
      scale.33 = scale;
      if (scale.33 <= 0) goto <D.9361>; else goto <D.9356>;
      <D.9361>:
      D.9306 = 0;
      return D.9306;
      <D.9356>:
      alo.32 = alo;
      ahi.28 = ahi;
      scale.31 = sigLen - decrDecimal;
      D.9306 = pack128toDecimal (pA, alo.32, ahi.28, scale.31, sign);
      return D.9306;
    }
  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.9372;
  long unsigned int D.9373;
  long unsigned int D.9374;
  long unsigned int blo.38;
  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.9366>; else goto <D.9367>;
      <D.9366>:
      factor.36 = (unsigned int) factor;
      mult128by32 (&blo, &bhi, factor.36, 0);
      bhi.37 = bhi;
      if (h > bhi.37) goto <D.9370>; else goto <D.9371>;
      <D.9370>:
      D.9372 = 2;
      return D.9372;
      <D.9371>:
      <D.9367>:
      h = *pahi;
      D.9373 = *palo;
      D.9374 = *pahi;
      blo.38 = blo;
      bhi.37 = bhi;
      add128 (D.9373, D.9374, blo.38, bhi.37, palo, pahi);
      D.9374 = *pahi;
      if (D.9374 < h) goto <D.9376>; else goto <D.9377>;
      <D.9376>:
      D.9372 = 2;
      return D.9372;
      <D.9377>:
      D.9372 = 0;
      return D.9372;
    }
  finally
    {
      blo = {CLOBBER};
      bhi = {CLOBBER};
    }
}


mono_decimal2UInt64 (struct decimal_repr * pA, guint64 * pResult)
{
  unsigned int D.9380;
  long unsigned int D.9381;
  long unsigned int D.9382;
  unsigned int D.9383;
  long unsigned int D.9384;
  long unsigned int alo.39;
  unsigned int D.9386;
  long unsigned int ahi.40;
  unsigned char D.9388;
  long unsigned int ahi.41;
  long unsigned int alo.42;
  unsigned int D.9397;
  unsigned int D.9398;
  gint32 D.9399;
  guint64 alo;
  guint64 ahi;
  int scale;

  try
    {
      D.9380 = pA->mid32;
      D.9381 = (long unsigned int) D.9380;
      D.9382 = D.9381 << 32;
      D.9383 = pA->lo32;
      D.9384 = (long unsigned int) D.9383;
      alo.39 = D.9382 | D.9384;
      alo = alo.39;
      D.9386 = pA->hi32;
      ahi.40 = (long unsigned int) D.9386;
      ahi = ahi.40;
      D.9388 = pA->u.signscale.scale;
      scale = (int) D.9388;
      if (scale > 0) goto <D.9389>; else goto <D.9390>;
      <D.9389>:
      div128DecadeFactor (&alo, &ahi, scale);
      <D.9390>:
      ahi.41 = ahi;
      if (ahi.41 != 0) goto <D.9391>; else goto <D.9394>;
      <D.9394>:
      alo.42 = alo;
      if (alo.42 != 0) goto <D.9396>; else goto <D.9392>;
      <D.9396>:
      D.9397 = BIT_FIELD_REF <*pA, 32, 0>;
      D.9398 = D.9397 & 2147483648;
      if (D.9398 != 0) goto <D.9391>; else goto <D.9392>;
      <D.9391>:
      D.9399 = 2;
      return D.9399;
      <D.9392>:
      alo.42 = alo;
      *pResult = alo.42;
      D.9399 = 0;
      return D.9399;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
    }
}


mono_decimal2Int64 (struct decimal_repr * pA, gint64 * pResult)
{
  unsigned int D.9402;
  long unsigned int D.9403;
  long unsigned int D.9404;
  unsigned int D.9405;
  long unsigned int D.9406;
  long unsigned int alo.43;
  unsigned int D.9408;
  long unsigned int ahi.44;
  unsigned char D.9410;
  long unsigned int ahi.45;
  gint32 D.9416;
  <unnamed-unsigned:1> D.9417;
  long unsigned int alo.46;
  long unsigned int D.9425;
  long int D.9426;
  signed long alo.47;
  long int alo.48;
  guint64 alo;
  guint64 ahi;
  int sign;
  int scale;

  try
    {
      D.9402 = pA->mid32;
      D.9403 = (long unsigned int) D.9402;
      D.9404 = D.9403 << 32;
      D.9405 = pA->lo32;
      D.9406 = (long unsigned int) D.9405;
      alo.43 = D.9404 | D.9406;
      alo = alo.43;
      D.9408 = pA->hi32;
      ahi.44 = (long unsigned int) D.9408;
      ahi = ahi.44;
      D.9410 = pA->u.signscale.scale;
      scale = (int) D.9410;
      if (scale > 0) goto <D.9411>; else goto <D.9412>;
      <D.9411>:
      div128DecadeFactor (&alo, &ahi, scale);
      <D.9412>:
      ahi.45 = ahi;
      if (ahi.45 != 0) goto <D.9414>; else goto <D.9415>;
      <D.9414>:
      D.9416 = 2;
      return D.9416;
      <D.9415>:
      D.9417 = pA->u.signscale.sign;
      sign = (int) D.9417;
      if (sign != 0) goto <D.9420>; else goto <D.9418>;
      <D.9420>:
      alo.46 = alo;
      if (alo.46 != 0) goto <D.9422>; else goto <D.9418>;
      <D.9422>:
      alo.46 = alo;
      if (alo.46 > 9223372036854775808) goto <D.9423>; else goto <D.9424>;
      <D.9423>:
      D.9416 = 2;
      return D.9416;
      <D.9424>:
      alo.46 = alo;
      D.9425 = -alo.46;
      D.9426 = (long int) D.9425;
      *pResult = D.9426;
      goto <D.9419>;
      <D.9418>:
      alo.46 = alo;
      alo.47 = (signed long) alo.46;
      if (alo.47 < 0) goto <D.9428>; else goto <D.9429>;
      <D.9428>:
      D.9416 = 2;
      return D.9416;
      <D.9429>:
      alo.46 = alo;
      alo.48 = (long int) alo.46;
      *pResult = alo.48;
      <D.9419>:
      D.9416 = 0;
      return D.9416;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
    }
}


mono_decimalFloorAndTrunc (struct decimal_repr * pA, gint32 floorFlag)
{
  unsigned char D.9433;
  unsigned int D.9436;
  long unsigned int D.9437;
  long unsigned int D.9438;
  unsigned int D.9439;
  long unsigned int D.9440;
  long unsigned int alo.49;
  unsigned int D.9442;
  long unsigned int ahi.50;
  <unnamed-unsigned:1> D.9444;
  int iftmp.51;
  unsigned int rest.52;
  long unsigned int alo.53;
  long unsigned int ahi.54;
  guint64 alo;
  guint64 ahi;
  guint32 factor;
  guint32 rest;
  int scale;
  int sign;
  int idx;
  int hasRest;

  try
    {
      hasRest = 0;
      D.9433 = pA->u.signscale.scale;
      scale = (int) D.9433;
      if (scale == 0) goto <D.9434>; else goto <D.9435>;
      <D.9434>:
      return;
      <D.9435>:
      D.9436 = pA->mid32;
      D.9437 = (long unsigned int) D.9436;
      D.9438 = D.9437 << 32;
      D.9439 = pA->lo32;
      D.9440 = (long unsigned int) D.9439;
      alo.49 = D.9438 | D.9440;
      alo = alo.49;
      D.9442 = pA->hi32;
      ahi.50 = (long unsigned int) D.9442;
      ahi = ahi.50;
      D.9444 = pA->u.signscale.sign;
      sign = (int) D.9444;
      goto <D.8800>;
      <D.8799>:
      idx = MIN_EXPR <scale, 9>;
      factor = constantsDecadeInt32Factors[idx];
      scale = scale - idx;
      div128by32 (&alo, &ahi, factor, &rest);
      if (hasRest != 0) goto <D.9446>; else goto <D.9449>;
      <D.9449>:
      rest.52 = rest;
      if (rest.52 != 0) goto <D.9446>; else goto <D.9447>;
      <D.9446>:
      iftmp.51 = 1;
      goto <D.9448>;
      <D.9447>:
      iftmp.51 = 0;
      <D.9448>:
      hasRest = iftmp.51;
      <D.8800>:
      if (scale > 0) goto <D.8799>; else goto <D.8801>;
      <D.8801>:
      if (floorFlag != 0) goto <D.9451>; else goto <D.9452>;
      <D.9451>:
      if (hasRest != 0) goto <D.9453>; else goto <D.9454>;
      <D.9453>:
      if (sign != 0) goto <D.9455>; else goto <D.9456>;
      <D.9455>:
      roundUp128 (&alo, &ahi);
      <D.9456>:
      <D.9454>:
      <D.9452>:
      alo.53 = alo;
      ahi.54 = ahi;
      pack128toDecimal (pA, alo.53, ahi.54, 0, sign);
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
      rest = {CLOBBER};
    }
}


mono_decimalRound (struct decimal_repr * pA, gint32 decimals)
{
  unsigned int D.9462;
  long unsigned int D.9463;
  long unsigned int D.9464;
  unsigned int D.9465;
  long unsigned int D.9466;
  long unsigned int alo.55;
  unsigned int D.9468;
  long unsigned int ahi.56;
  unsigned char D.9470;
  <unnamed-unsigned:1> D.9471;
  int D.9474;
  long unsigned int alo.57;
  long unsigned int ahi.58;
  guint64 alo;
  guint64 ahi;
  int scale;
  int sign;

  try
    {
      D.9462 = pA->mid32;
      D.9463 = (long unsigned int) D.9462;
      D.9464 = D.9463 << 32;
      D.9465 = pA->lo32;
      D.9466 = (long unsigned int) D.9465;
      alo.55 = D.9464 | D.9466;
      alo = alo.55;
      D.9468 = pA->hi32;
      ahi.56 = (long unsigned int) D.9468;
      ahi = ahi.56;
      D.9470 = pA->u.signscale.scale;
      scale = (int) D.9470;
      D.9471 = pA->u.signscale.sign;
      sign = (int) D.9471;
      if (scale > decimals) goto <D.9472>; else goto <D.9473>;
      <D.9472>:
      D.9474 = scale - decimals;
      div128DecadeFactor (&alo, &ahi, D.9474);
      scale = decimals;
      <D.9473>:
      alo.57 = alo;
      ahi.58 = ahi;
      pack128toDecimal (pA, alo.57, ahi.58, scale, sign);
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
    }
}


mono_decimalMult (struct decimal_repr * pA, struct decimal_repr * pB)
{
  unsigned int D.9477;
  unsigned int D.9478;
  unsigned int D.9479;
  unsigned int D.9480;
  unsigned int D.9481;
  unsigned int D.9482;
  unsigned char D.9483;
  int D.9484;
  unsigned char D.9485;
  int D.9486;
  int scale.59;
  <unnamed-unsigned:1> D.9488;
  int D.9489;
  <unnamed-unsigned:1> D.9490;
  int D.9491;
  long unsigned int high.60;
  int scale.61;
  int scale.62;
  int scale.63;
  long unsigned int mid.64;
  long unsigned int D.9501;
  long unsigned int D.9502;
  gint32 D.9505;
  long unsigned int low.65;
  guint64 low;
  guint64 mid;
  guint64 high;
  guint32 factor;
  int scale;
  int sign;
  int rc;

  try
    {
      D.9477 = pA->lo32;
      D.9478 = pA->mid32;
      D.9479 = pA->hi32;
      D.9480 = pB->lo32;
      D.9481 = pB->mid32;
      D.9482 = pB->hi32;
      mult96by96to192 (D.9477, D.9478, D.9479, D.9480, D.9481, D.9482, &low, &mid, &high);
      D.9483 = pA->u.signscale.scale;
      D.9484 = (int) D.9483;
      D.9485 = pB->u.signscale.scale;
      D.9486 = (int) D.9485;
      scale.59 = D.9484 + D.9486;
      scale = scale.59;
      D.9488 = pA->u.signscale.sign;
      D.9489 = (int) D.9488;
      D.9490 = pB->u.signscale.sign;
      D.9491 = (int) D.9490;
      sign = D.9489 ^ D.9491;
      factor = 1000000000;
      goto <D.8822>;
      <D.8821>:
      high.60 = high;
      if (high.60 <= 99) goto <D.9493>; else goto <D.9494>;
      <D.9493>:
      factor = factor / 1000;
      scale.61 = scale;
      scale.62 = scale.61 + -6;
      scale = scale.62;
      goto <D.9497>;
      <D.9494>:
      scale.61 = scale;
      scale.63 = scale.61 + -9;
      scale = scale.63;
      <D.9497>:
      div192by32 (&low, &mid, &high, factor);
      <D.8822>:
      high.60 = high;
      if (high.60 != 0) goto <D.8821>; else goto <D.9499>;
      <D.9499>:
      mid.64 = mid;
      D.9501 = mid.64 >> 32;
      D.9502 = (long unsigned int) factor;
      if (D.9501 >= D.9502) goto <D.8821>; else goto <D.8823>;
      <D.8823>:
      rc = rescale128 (&low, &mid, &scale, 0, 0, 28, 1);
      if (rc != 0) goto <D.9503>; else goto <D.9504>;
      <D.9503>:
      D.9505 = rc;
      return D.9505;
      <D.9504>:
      low.65 = low;
      mid.64 = mid;
      scale.61 = scale;
      D.9505 = pack128toDecimal (pA, low.65, mid.64, scale.61, sign);
      return D.9505;
    }
  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.9509;
  long unsigned int D.9510;
  long unsigned int D.9511;
  long unsigned int D.9512;
  long unsigned int D.9517;
  long unsigned int D.9518;
  long unsigned int D.9525;
  long unsigned int D.9530;
  long unsigned int D.9531;
  long unsigned int D.9532;
  long unsigned int D.9533;
  long unsigned int D.9534;
  long unsigned int D.9535;
  long unsigned int D.9536;
  long unsigned int D.9537;
  long unsigned int D.9538;
  long unsigned int D.9539;
  long unsigned int D.9540;
  long unsigned int D.9541;
  long unsigned int D.9542;
  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.9509 = (long unsigned int) alo;
  D.9510 = (long unsigned int) blo;
  a = D.9509 * D.9510;
  h0 = (guint32) a;
  a = a >> 32;
  carry0 = 0;
  D.9509 = (long unsigned int) alo;
  D.9511 = (long unsigned int) bmi;
  b = D.9509 * D.9511;
  D.9512 = (long unsigned int) ami;
  D.9510 = (long unsigned int) blo;
  c = D.9512 * D.9510;
  a = a + b;
  if (a < b) goto <D.9513>; else goto <D.9514>;
  <D.9513>:
  carry0 = carry0 + 1;
  <D.9514>:
  a = a + c;
  if (a < c) goto <D.9515>; else goto <D.9516>;
  <D.9515>:
  carry0 = carry0 + 1;
  <D.9516>:
  h1 = (guint32) a;
  a = a >> 32;
  carry1 = 0;
  D.9509 = (long unsigned int) alo;
  D.9517 = (long unsigned int) bhi;
  b = D.9509 * D.9517;
  D.9512 = (long unsigned int) ami;
  D.9511 = (long unsigned int) bmi;
  c = D.9512 * D.9511;
  D.9518 = (long unsigned int) ahi;
  D.9510 = (long unsigned int) blo;
  d = D.9518 * D.9510;
  a = a + b;
  if (a < b) goto <D.9519>; else goto <D.9520>;
  <D.9519>:
  carry1 = carry1 + 1;
  <D.9520>:
  a = a + c;
  if (a < c) goto <D.9521>; else goto <D.9522>;
  <D.9521>:
  carry1 = carry1 + 1;
  <D.9522>:
  a = a + d;
  if (a < d) goto <D.9523>; else goto <D.9524>;
  <D.9523>:
  carry1 = carry1 + 1;
  <D.9524>:
  h2 = (guint32) a;
  a = a >> 32;
  D.9525 = (long unsigned int) carry0;
  a = D.9525 + a;
  carry0 = 0;
  D.9512 = (long unsigned int) ami;
  D.9517 = (long unsigned int) bhi;
  b = D.9512 * D.9517;
  D.9518 = (long unsigned int) ahi;
  D.9511 = (long unsigned int) bmi;
  c = D.9518 * D.9511;
  a = a + b;
  if (a < b) goto <D.9526>; else goto <D.9527>;
  <D.9526>:
  carry0 = carry0 + 1;
  <D.9527>:
  a = a + c;
  if (a < c) goto <D.9528>; else goto <D.9529>;
  <D.9528>:
  carry0 = carry0 + 1;
  <D.9529>:
  h3 = (guint32) a;
  a = a >> 32;
  D.9530 = (long unsigned int) carry1;
  a = D.9530 + a;
  D.9518 = (long unsigned int) ahi;
  D.9517 = (long unsigned int) bhi;
  b = D.9518 * D.9517;
  a = a + b;
  h4 = (guint32) a;
  a = a >> 32;
  D.9525 = (long unsigned int) carry0;
  a = D.9525 + a;
  h5 = (guint32) a;
  D.9531 = (long unsigned int) h1;
  D.9532 = D.9531 << 32;
  D.9533 = (long unsigned int) h0;
  D.9534 = D.9532 | D.9533;
  *pclo = D.9534;
  D.9535 = (long unsigned int) h3;
  D.9536 = D.9535 << 32;
  D.9537 = (long unsigned int) h2;
  D.9538 = D.9536 | D.9537;
  *pcmi = D.9538;
  D.9539 = (long unsigned int) h5;
  D.9540 = D.9539 << 32;
  D.9541 = (long unsigned int) h4;
  D.9542 = D.9540 | D.9541;
  *pchi = D.9542;
}


div192by32 (guint64 * plo, guint64 * pmi, guint64 * phi, guint32 factor)
{
  long unsigned int D.9543;
  unsigned int D.9544;
  long unsigned int D.9545;
  long unsigned int D.9546;
  unsigned int D.9547;
  long unsigned int D.9548;
  long unsigned int D.9549;
  long unsigned int D.9550;
  unsigned int D.9551;
  long unsigned int D.9552;
  long unsigned int D.9553;
  long unsigned int D.9554;
  guint64 a;
  guint64 b;
  guint64 c;
  guint64 h;

  h = *phi;
  D.9543 = h >> 32;
  D.9544 = (unsigned int) D.9543;
  a = (guint64) D.9544;
  D.9545 = (long unsigned int) factor;
  b = a / D.9545;
  D.9545 = (long unsigned int) factor;
  D.9546 = D.9545 * b;
  a = a - D.9546;
  a = a << 32;
  D.9547 = (unsigned int) h;
  D.9548 = (long unsigned int) D.9547;
  a = D.9548 | a;
  D.9545 = (long unsigned int) factor;
  c = a / D.9545;
  D.9545 = (long unsigned int) factor;
  D.9549 = D.9545 * c;
  a = a - D.9549;
  a = a << 32;
  D.9550 = b << 32;
  D.9551 = (unsigned int) c;
  D.9552 = (long unsigned int) D.9551;
  D.9553 = D.9550 | D.9552;
  *phi = D.9553;
  h = *pmi;
  D.9543 = h >> 32;
  D.9544 = (unsigned int) D.9543;
  D.9554 = (long unsigned int) D.9544;
  a = D.9554 | a;
  D.9545 = (long unsigned int) factor;
  b = a / D.9545;
  D.9545 = (long unsigned int) factor;
  D.9546 = D.9545 * b;
  a = a - D.9546;
  a = a << 32;
  D.9547 = (unsigned int) h;
  D.9548 = (long unsigned int) D.9547;
  a = D.9548 | a;
  D.9545 = (long unsigned int) factor;
  c = a / D.9545;
  D.9545 = (long unsigned int) factor;
  D.9549 = D.9545 * c;
  a = a - D.9549;
  a = a << 32;
  D.9550 = b << 32;
  D.9551 = (unsigned int) c;
  D.9552 = (long unsigned int) D.9551;
  D.9553 = D.9550 | D.9552;
  *pmi = D.9553;
  h = *plo;
  D.9543 = h >> 32;
  D.9544 = (unsigned int) D.9543;
  D.9554 = (long unsigned int) D.9544;
  a = D.9554 | a;
  D.9545 = (long unsigned int) factor;
  b = a / D.9545;
  D.9545 = (long unsigned int) factor;
  D.9546 = D.9545 * b;
  a = a - D.9546;
  a = a << 32;
  D.9547 = (unsigned int) h;
  D.9548 = (long unsigned int) D.9547;
  a = D.9548 | a;
  D.9545 = (long unsigned int) factor;
  c = a / D.9545;
  D.9545 = (long unsigned int) factor;
  D.9549 = D.9545 * c;
  a = a - D.9549;
  a = a << 32;
  D.9550 = b << 32;
  D.9551 = (unsigned int) c;
  D.9552 = (long unsigned int) D.9551;
  D.9553 = D.9550 | D.9552;
  *plo = D.9553;
}


mono_decimalDiv (struct decimal_repr * pC, struct decimal_repr * pA, struct decimal_repr * pB)
{
  int D.9555;
  gint32 D.9558;
  unsigned int D.9559;
  signed int D.9560;
  _Bool D.9561;
  int D.9562;
  unsigned char D.9569;
  int D.9570;
  unsigned char D.9571;
  int D.9572;
  int scale.66;
  int texp.67;
  long unsigned int clo.68;
  long unsigned int chi.69;
  int scale.70;
  <unnamed-unsigned:1> D.9580;
  int D.9581;
  <unnamed-unsigned:1> D.9582;
  int D.9583;
  int D.9584;
  guint64 clo;
  guint64 chi;
  int scale;
  int texp;
  int rc;

  try
    {
      D.9555 = mono_decimalCompare (pA, pB);
      if (D.9555 == 0) goto <D.9556>; else goto <D.9557>;
      <D.9556>:
      D.9558 = pack128toDecimal (pC, 1, 0, 0, 0);
      return D.9558;
      <D.9557>:
      D.9559 = BIT_FIELD_REF <*pA, 32, 0>;
      D.9560 = (signed int) D.9559;
      D.9561 = D.9560 >= 0;
      pA->u.signscale.sign = D.9561;
      D.9562 = mono_decimalCompare (pA, pB);
      if (D.9562 == 0) goto <D.9563>; else goto <D.9564>;
      <D.9563>:
      D.9558 = pack128toDecimal (pC, 1, 0, 0, 1);
      return D.9558;
      <D.9564>:
      D.9559 = BIT_FIELD_REF <*pA, 32, 0>;
      D.9560 = (signed int) D.9559;
      D.9561 = D.9560 >= 0;
      pA->u.signscale.sign = D.9561;
      rc = decimalDivSub (pA, pB, &clo, &chi, &texp);
      if (rc != 0) goto <D.9565>; else goto <D.9566>;
      <D.9565>:
      if (rc == 1) goto <D.9567>; else goto <D.9568>;
      <D.9567>:
      rc = 0;
      <D.9568>:
      D.9558 = rc;
      return D.9558;
      <D.9566>:
      D.9569 = pA->u.signscale.scale;
      D.9570 = (int) D.9569;
      D.9571 = pB->u.signscale.scale;
      D.9572 = (int) D.9571;
      scale.66 = D.9570 - D.9572;
      scale = scale.66;
      texp.67 = texp;
      rc = rescale128 (&clo, &chi, &scale, texp.67, 0, 28, 1);
      if (rc != 0) goto <D.9575>; else goto <D.9576>;
      <D.9575>:
      D.9558 = rc;
      return D.9558;
      <D.9576>:
      clo.68 = clo;
      chi.69 = chi;
      scale.70 = scale;
      D.9580 = pA->u.signscale.sign;
      D.9581 = (int) D.9580;
      D.9582 = pB->u.signscale.sign;
      D.9583 = (int) D.9582;
      D.9584 = D.9581 ^ D.9583;
      D.9558 = pack128toDecimal (pC, clo.68, chi.69, scale.70, D.9584);
      return D.9558;
    }
  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.9587;
  long unsigned int D.9588;
  long unsigned int D.9589;
  unsigned int D.9590;
  long unsigned int D.9591;
  long unsigned int ahi.71;
  unsigned int D.9593;
  long unsigned int D.9594;
  long unsigned int ami.72;
  unsigned int D.9596;
  unsigned int D.9597;
  int D.9600;
  long unsigned int ami.73;
  long unsigned int ahi.74;
  long unsigned int D.9603;
  long unsigned int D.9606;
  long unsigned int ahi.75;
  signed long ahi.76;
  long unsigned int D.9616;
  int D.9617;
  int D.9618;
  int hi_shift.77;
  unsigned int D.9620;
  unsigned int D.9622;
  signed int bhi.78;
  unsigned int D.9625;
  long unsigned int D.9626;
  long unsigned int D.9627;
  long unsigned int D.9628;
  long unsigned int D.9629;
  long unsigned int alo.79;
  int D.9636;
  long long unsigned int D.9639;
  long unsigned int D.9641;
  long unsigned int D.9642;
  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.9587 = pA->hi32;
      D.9588 = (long unsigned int) D.9587;
      D.9589 = D.9588 << 32;
      D.9590 = pA->mid32;
      D.9591 = (long unsigned int) D.9590;
      ahi.71 = D.9589 | D.9591;
      ahi = ahi.71;
      D.9593 = pA->lo32;
      D.9594 = (long unsigned int) D.9593;
      ami.72 = D.9594 << 32;
      ami = ami.72;
      alo = 0;
      blo = pB->lo32;
      bmi = pB->mid32;
      bhi = pB->hi32;
      D.9596 = blo | bmi;
      D.9597 = D.9596 | bhi;
      if (D.9597 == 0) goto <D.9598>; else goto <D.9599>;
      <D.9598>:
      D.9600 = 5;
      return D.9600;
      <D.9599>:
      ami.73 = ami;
      ahi.74 = ahi;
      D.9603 = ami.73 | ahi.74;
      if (D.9603 == 0) goto <D.9604>; else goto <D.9605>;
      <D.9604>:
      *pchi = 0;
      D.9606 = *pchi;
      *pclo = D.9606;
      D.9600 = 1;
      return D.9600;
      <D.9605>:
      ahi.74 = ahi;
      if (ahi.74 == 0) goto <D.9607>; else goto <D.9608>;
      <D.9607>:
      ami.73 = ami;
      ahi = ami.73;
      ami = 0;
      ashift = 64;
      goto <D.8845>;
      <D.8844>:
      ahi.74 = ahi;
      ahi.75 = ahi.74 << 1;
      ahi = ahi.75;
      ashift = ashift + 1;
      <D.8845>:
      ahi.74 = ahi;
      ahi.76 = (signed long) ahi.74;
      if (ahi.76 >= 0) goto <D.8844>; else goto <D.8846>;
      <D.8846>:
      goto <D.9611>;
      <D.9608>:
      ashift = 0;
      goto <D.8848>;
      <D.8847>:
      lshift128 (&ami, &ahi);
      ashift = ashift + 1;
      <D.8848>:
      ahi.74 = ahi;
      ahi.76 = (signed long) ahi.74;
      if (ahi.76 >= 0) goto <D.8847>; else goto <D.8849>;
      <D.8849>:
      <D.9611>:
      if (bhi == 0) goto <D.9612>; else goto <D.9613>;
      <D.9612>:
      if (bmi == 0) goto <D.9614>; else goto <D.9615>;
      <D.9614>:
      {
        guint32 hi_shift;

        bhi = blo;
        bmi = 0;
        blo = 0;
        D.9616 = (long unsigned int) bhi;
        D.9617 = my_g_bit_nth_msf (D.9616);
        D.9618 = 31 - D.9617;
        hi_shift = (guint32) D.9618;
        hi_shift.77 = (int) hi_shift;
        bhi = bhi << hi_shift.77;
        D.9620 = hi_shift + 64;
        bshift = (int) D.9620;
      }
      goto <D.9621>;
      <D.9615>:
      bhi = bmi;
      bmi = blo;
      blo = 0;
      bshift = 32;
      goto <D.8852>;
      <D.8851>:
      bhi = bhi << 1;
      D.9622 = bmi >> 31;
      bhi = D.9622 | bhi;
      bmi = bmi << 1;
      bshift = bshift + 1;
      <D.8852>:
      bhi.78 = (signed int) bhi;
      if (bhi.78 >= 0) goto <D.8851>; else goto <D.8853>;
      <D.8853>:
      <D.9621>:
      goto <D.9624>;
      <D.9613>:
      bshift = 0;
      goto <D.8855>;
      <D.8854>:
      bhi = bhi << 1;
      D.9622 = bmi >> 31;
      bhi = D.9622 | bhi;
      bmi = bmi << 1;
      D.9625 = blo >> 31;
      bmi = D.9625 | bmi;
      blo = blo << 1;
      bshift = bshift + 1;
      <D.8855>:
      bhi.78 = (signed int) bhi;
      if (bhi.78 >= 0) goto <D.8854>; else goto <D.8856>;
      <D.8856>:
      <D.9624>:
      D.9626 = (long unsigned int) bhi;
      D.9627 = D.9626 << 32;
      D.9628 = (long unsigned int) bmi;
      thi = D.9627 | D.9628;
      D.9629 = (long unsigned int) blo;
      tmi = D.9629 << 32;
      tlo = 0;
      ahi.74 = ahi;
      if (ahi.74 > thi) goto <D.9630>; else goto <D.9633>;
      <D.9633>:
      ahi.74 = ahi;
      if (ahi.74 == thi) goto <D.9634>; else goto <D.9631>;
      <D.9634>:
      ami.73 = ami;
      if (ami.73 >= tmi) goto <D.9630>; else goto <D.9631>;
      <D.9630>:
      alo.79 = alo;
      ami.73 = ami;
      ahi.74 = ahi;
      sub192 (alo.79, ami.73, ahi.74, tlo, tmi, thi, &alo, &ami, &ahi);
      extraBit = 1;
      goto <D.9632>;
      <D.9631>:
      extraBit = 0;
      <D.9632>:
      alo.79 = alo;
      ami.73 = ami;
      ahi.74 = ahi;
      div192by96to128 (alo.79, ami.73, ahi.74, blo, bmi, bhi, pclo, pchi);
      D.9636 = ashift + 128;
      texp = D.9636 - bshift;
      if (extraBit != 0) goto <D.9637>; else goto <D.9638>;
      <D.9637>:
      rshift128 (pclo, pchi);
      D.9606 = *pchi;
      D.9639 = D.9606 + 9223372036854775808;
      *pchi = D.9639;
      texp = texp + -1;
      <D.9638>:
      goto <D.8858>;
      <D.8857>:
      rshift128 (pclo, pchi);
      texp = texp + -1;
      <D.8858>:
      if (texp > 0) goto <D.9640>; else goto <D.8859>;
      <D.9640>:
      D.9641 = *pclo;
      D.9642 = D.9641 & 1;
      if (D.9642 == 0) goto <D.8857>; else goto <D.8859>;
      <D.8859>:
      *pExp = texp;
      D.9600 = 0;
      return D.9600;
    }
  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.9645>; else goto <D.9646>;
  <D.9645>:
  if (cmi == 0) goto <D.9647>; else goto <D.9648>;
  <D.9647>:
  chi = chi + 18446744073709551615;
  <D.9648>:
  cmi = cmi + 18446744073709551615;
  <D.9646>:
  if (ami < bmi) goto <D.9649>; else goto <D.9650>;
  <D.9649>:
  chi = chi + 18446744073709551615;
  <D.9650>:
  *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.9654;
  long unsigned int rhi.82;
  long unsigned int D.9656;
  long unsigned int rlo.83;
  long unsigned int D.9658;
  long unsigned int rmi.84;
  long unsigned int rlo.85;
  long unsigned int D.9661;
  long unsigned int D.9662;
  unsigned int D.9663;
  long unsigned int D.9664;
  long unsigned int D.9665;
  long unsigned int D.9666;
  long unsigned int D.9670;
  long unsigned int D.9671;
  long unsigned int D.9672;
  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.9654 = rmi.81 >> 32;
      rhi.82 = rhi.86 | D.9654;
      rhi = rhi.82;
      rmi.81 = rmi;
      D.9656 = rmi.81 << 32;
      rlo.83 = rlo;
      D.9658 = rlo.83 >> 32;
      rmi.84 = D.9656 | D.9658;
      rmi = rmi.84;
      rlo.83 = rlo;
      rlo.85 = rlo.83 << 32;
      rlo = rlo.85;
      D.9661 = (long unsigned int) h;
      D.9662 = D.9661 << 32;
      D.9663 = div192by96to32withRest (&rlo, &rmi, &rhi, blo, bmi, bhi);
      D.9664 = (long unsigned int) D.9663;
      D.9665 = D.9662 | D.9664;
      *pchi = D.9665;
      rhi.80 = rhi;
      rhi.86 = rhi.80 << 32;
      rmi.81 = rmi;
      D.9654 = rmi.81 >> 32;
      rhi.82 = rhi.86 | D.9654;
      rhi = rhi.82;
      rmi.81 = rmi;
      D.9656 = rmi.81 << 32;
      rlo.83 = rlo;
      D.9658 = rlo.83 >> 32;
      rmi.84 = D.9656 | D.9658;
      rmi = rmi.84;
      rlo.83 = rlo;
      rlo.85 = rlo.83 << 32;
      rlo = rlo.85;
      h = div192by96to32withRest (&rlo, &rmi, &rhi, blo, bmi, bhi);
      D.9666 = (long unsigned int) bhi;
      rhi.80 = rhi;
      if (D.9666 <= rhi.80) goto <D.9667>; else goto <D.9668>;
      <D.9667>:
      c = 4294967295;
      goto <D.9669>;
      <D.9668>:
      rhi.80 = rhi;
      rhi.86 = rhi.80 << 32;
      rhi = rhi.86;
      rhi.80 = rhi;
      D.9666 = (long unsigned int) bhi;
      D.9670 = rhi.80 / D.9666;
      c = (guint32) D.9670;
      <D.9669>:
      D.9661 = (long unsigned int) h;
      D.9662 = D.9661 << 32;
      D.9671 = (long unsigned int) c;
      D.9672 = D.9662 | D.9671;
      *pclo = D.9672;
    }
  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.9676;
  long unsigned int D.9677;
  long unsigned int rhi.90;
  long unsigned int D.9682;
  long unsigned int D.9683;
  long unsigned int rlo.91;
  long unsigned int rmi.92;
  long unsigned int tlo.93;
  long unsigned int thi.94;
  long unsigned int D.9688;
  long unsigned int D.9689;
  long unsigned int D.9690;
  long unsigned int D.9691;
  long int rhi.95;
  guint32 D.9693;
  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.9676 = (long unsigned int) bhi;
      D.9677 = D.9676 << 32;
      rhi.90 = rhi;
      if (D.9677 <= rhi.90) goto <D.9679>; else goto <D.9680>;
      <D.9679>:
      c = 4294967295;
      goto <D.9681>;
      <D.9680>:
      rhi.90 = rhi;
      D.9682 = (long unsigned int) bhi;
      D.9683 = rhi.90 / D.9682;
      c = (guint32) D.9683;
      <D.9681>:
      mult96by32to128 (blo, bmi, bhi, c, &tlo, &thi);
      rlo.91 = rlo;
      rmi.92 = rmi;
      rhi.90 = rhi;
      tlo.93 = tlo;
      thi.94 = thi;
      sub192 (rlo.91, rmi.92, rhi.90, 0, tlo.93, thi.94, &rlo, &rmi, &rhi);
      goto <D.8531>;
      <D.8530>:
      c = c + 4294967295;
      rlo.91 = rlo;
      rmi.92 = rmi;
      rhi.90 = rhi;
      D.9688 = (long unsigned int) bmi;
      D.9689 = D.9688 << 32;
      D.9690 = (long unsigned int) blo;
      D.9691 = D.9689 | D.9690;
      D.9682 = (long unsigned int) bhi;
      add192 (rlo.91, rmi.92, rhi.90, 0, D.9691, D.9682, &rlo, &rmi, &rhi);
      <D.8531>:
      rhi.90 = rhi;
      rhi.95 = (long int) rhi.90;
      if (rhi.95 < 0) goto <D.8530>; else goto <D.8532>;
      <D.8532>:
      rlo.91 = rlo;
      *palo = rlo.91;
      rmi.92 = rmi;
      *pami = rmi.92;
      rhi.90 = rhi;
      *pahi = rhi.90;
      D.9693 = c;
      return D.9693;
    }
  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.9696;
  long unsigned int D.9697;
  long unsigned int D.9698;
  long unsigned int D.9699;
  long unsigned int D.9700;
  long unsigned int D.9701;
  long unsigned int D.9702;
  long unsigned int D.9703;
  long unsigned int D.9704;
  long unsigned int D.9705;
  guint64 a;
  guint32 h0;
  guint32 h1;

  D.9696 = (long unsigned int) alo;
  D.9697 = (long unsigned int) factor;
  a = D.9696 * D.9697;
  h0 = (guint32) a;
  a = a >> 32;
  D.9698 = (long unsigned int) ami;
  D.9697 = (long unsigned int) factor;
  D.9699 = D.9698 * D.9697;
  a = D.9699 + a;
  h1 = (guint32) a;
  a = a >> 32;
  D.9700 = (long unsigned int) ahi;
  D.9697 = (long unsigned int) factor;
  D.9701 = D.9700 * D.9697;
  a = D.9701 + a;
  D.9702 = (long unsigned int) h1;
  D.9703 = D.9702 << 32;
  D.9704 = (long unsigned int) h0;
  D.9705 = D.9703 | D.9704;
  *pclo = D.9705;
  *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.9706>; else goto <D.9707>;
  <D.9706>:
  ami = ami + 1;
  if (ami == 0) goto <D.9708>; else goto <D.9709>;
  <D.9708>:
  ahi = ahi + 1;
  <D.9709>:
  <D.9707>:
  ami = ami + bmi;
  if (ami < bmi) goto <D.9710>; else goto <D.9711>;
  <D.9710>:
  ahi = ahi + 1;
  <D.9711>:
  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.9716;
  unsigned char D.9717;
  int D.9718;
  unsigned char D.9719;
  int D.9720;
  int scale.96;
  int texp.97;
  long unsigned int clo.98;
  long unsigned int chi.99;
  int scale.100;
  <unnamed-unsigned:1> D.9728;
  int D.9729;
  guint64 clo;
  guint64 chi;
  int scale;
  int texp;
  int rc;

  try
    {
      rc = decimalDivSub (pA, pB, &clo, &chi, &texp);
      if (rc != 0) goto <D.9712>; else goto <D.9713>;
      <D.9712>:
      if (rc == 1) goto <D.9714>; else goto <D.9715>;
      <D.9714>:
      rc = 0;
      <D.9715>:
      D.9716 = rc;
      return D.9716;
      <D.9713>:
      D.9717 = pA->u.signscale.scale;
      D.9718 = (int) D.9717;
      D.9719 = pB->u.signscale.scale;
      D.9720 = (int) D.9719;
      scale.96 = D.9718 - D.9720;
      scale = scale.96;
      texp.97 = texp;
      rc = rescale128 (&clo, &chi, &scale, texp.97, 0, 0, 0);
      if (rc != 0) goto <D.9723>; else goto <D.9724>;
      <D.9723>:
      D.9716 = rc;
      return D.9716;
      <D.9724>:
      clo.98 = clo;
      chi.99 = chi;
      scale.100 = scale;
      D.9728 = pA->u.signscale.sign;
      D.9729 = (int) D.9728;
      D.9716 = pack128toDecimal (pC, clo.98, chi.99, scale.100, D.9729);
      return D.9716;
    }
  finally
    {
      clo = {CLOBBER};
      chi = {CLOBBER};
      scale = {CLOBBER};
      texp = {CLOBBER};
    }
}


mono_decimalCompare (struct decimal_repr * pA, struct decimal_repr * pB)
{
  int iftmp.101;
  unsigned int D.9733;
  unsigned int D.9734;
  unsigned int D.9738;
  unsigned int D.9739;
  signed int D.9740;
  gint32 D.9743;
  gint32 iftmp.102;
  int D.9748;
  int D.9750;
  <unnamed-unsigned:1> D.9755;
  unsigned char D.9756;
  unsigned char D.9757;
  <unnamed-unsigned:1> D.9758;
  int D.9759;
  gint32 iftmp.103;
  unsigned int D.9763;
  unsigned int D.9764;
  int log2a;
  int log2b;
  int delta;
  int sign;
  struct decimal_repr aa;

  try
    {
      D.9733 = BIT_FIELD_REF <*pA, 32, 0>;
      D.9734 = D.9733 & 2147483648;
      if (D.9734 != 0) goto <D.9735>; else goto <D.9736>;
      <D.9735>:
      iftmp.101 = -1;
      goto <D.9737>;
      <D.9736>:
      iftmp.101 = 1;
      <D.9737>:
      sign = iftmp.101;
      D.9733 = BIT_FIELD_REF <*pA, 32, 0>;
      D.9738 = BIT_FIELD_REF <*pB, 32, 0>;
      D.9739 = D.9733 ^ D.9738;
      D.9740 = (signed int) D.9739;
      if (D.9740 < 0) goto <D.9741>; else goto <D.9742>;
      <D.9741>:
      D.9748 = decimalIsZero (pA);
      if (D.9748 == 0) goto <D.9745>; else goto <D.9749>;
      <D.9749>:
      D.9750 = decimalIsZero (pB);
      if (D.9750 == 0) goto <D.9745>; else goto <D.9746>;
      <D.9745>:
      iftmp.102 = sign;
      goto <D.9747>;
      <D.9746>:
      iftmp.102 = 0;
      <D.9747>:
      D.9743 = iftmp.102;
      return D.9743;
      <D.9742>:
      log2a = decimalLog2 (pA);
      log2b = decimalLog2 (pB);
      delta = log2a - log2b;
      if (delta < -1) goto <D.9751>; else goto <D.9752>;
      <D.9751>:
      D.9743 = -sign;
      return D.9743;
      <D.9752>:
      if (delta > 1) goto <D.9753>; else goto <D.9754>;
      <D.9753>:
      D.9743 = sign;
      return D.9743;
      <D.9754>:
      memcpy (&aa, pA, 16);
      D.9755 = aa.u.signscale.sign;
      D.9756 = (unsigned char) D.9755;
      D.9757 = 1 - D.9756;
      D.9758 = (<unnamed-unsigned:1>) D.9757;
      aa.u.signscale.sign = D.9758;
      mono_decimalIncr (&aa, pB);
      D.9759 = decimalIsZero (&aa);
      if (D.9759 != 0) goto <D.9760>; else goto <D.9761>;
      <D.9760>:
      D.9743 = 0;
      return D.9743;
      <D.9761>:
      D.9763 = BIT_FIELD_REF <aa, 32, 0>;
      D.9764 = D.9763 & 2147483648;
      if (D.9764 != 0) goto <D.9765>; else goto <D.9766>;
      <D.9765>:
      iftmp.103 = 1;
      goto <D.9767>;
      <D.9766>:
      iftmp.103 = -1;
      <D.9767>:
      D.9743 = iftmp.103;
      return D.9743;
    }
  finally
    {
      aa = {CLOBBER};
    }
}


decimalLog2 (struct decimal_repr * pA)
{
  unsigned char D.9770;
  unsigned int D.9771;
  int D.9774;
  unsigned int D.9776;
  int D.9779;
  unsigned int D.9781;
  int D.9784;
  int D.9785;
  int D.9786;
  int tlog2;
  int scale;

  D.9770 = pA->u.signscale.scale;
  scale = (int) D.9770;
  D.9771 = pA->hi32;
  if (D.9771 != 0) goto <D.9772>; else goto <D.9773>;
  <D.9772>:
  D.9771 = pA->hi32;
  D.9774 = log2_32 (D.9771);
  tlog2 = D.9774 + 64;
  goto <D.9775>;
  <D.9773>:
  D.9776 = pA->mid32;
  if (D.9776 != 0) goto <D.9777>; else goto <D.9778>;
  <D.9777>:
  D.9776 = pA->mid32;
  D.9779 = log2_32 (D.9776);
  tlog2 = D.9779 + 32;
  goto <D.9780>;
  <D.9778>:
  D.9781 = pA->lo32;
  tlog2 = log2_32 (D.9781);
  <D.9780>:
  <D.9775>:
  if (tlog2 != -1000) goto <D.9782>; else goto <D.9783>;
  <D.9782>:
  D.9784 = scale * 33219;
  D.9785 = D.9784 / -10000;
  tlog2 = D.9785 + tlog2;
  <D.9783>:
  D.9786 = tlog2;
  return D.9786;
}


log2_32 (guint32 a)
{
  int D.9790;
  long unsigned int D.9791;
  int D.9792;

  if (a == 0) goto <D.9788>; else goto <D.9789>;
  <D.9788>:
  D.9790 = -1000;
  return D.9790;
  <D.9789>:
  D.9791 = (long unsigned int) a;
  D.9792 = my_g_bit_nth_msf (D.9791);
  D.9790 = D.9792 + 1;
  return D.9790;
}


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

  D.9795 = __builtin_object_size (__dest, 0);
  D.9794 = __builtin___memcpy_chk (__dest, __src, __len, D.9795);
  return D.9794;
}


decimalIsZero (struct decimal_repr * pA)
{
  int D.9797;
  int iftmp.104;
  unsigned int D.9801;
  unsigned int D.9803;
  unsigned int D.9805;

  D.9801 = pA->lo32;
  if (D.9801 == 0) goto <D.9802>; else goto <D.9799>;
  <D.9802>:
  D.9803 = pA->mid32;
  if (D.9803 == 0) goto <D.9804>; else goto <D.9799>;
  <D.9804>:
  D.9805 = pA->hi32;
  if (D.9805 == 0) goto <D.9806>; else goto <D.9799>;
  <D.9806>:
  iftmp.104 = 1;
  goto <D.9800>;
  <D.9799>:
  iftmp.104 = 0;
  <D.9800>:
  D.9797 = iftmp.104;
  return D.9797;
}


mono_decimal2double (struct decimal_repr * pA)
{
  unsigned int D.9808;
  long unsigned int D.9809;
  long unsigned int D.9810;
  unsigned int D.9811;
  long unsigned int D.9812;
  long unsigned int ahi.105;
  unsigned int D.9814;
  long unsigned int D.9815;
  long unsigned int alo.106;
  long unsigned int ahi.107;
  long unsigned int alo.108;
  long unsigned int D.9819;
  double D.9822;
  unsigned char D.9823;
  signed long ahi.109;
  long unsigned int D.9825;
  int D.9828;
  int D.9829;
  unsigned int D.9832;
  unsigned int D.9833;
  unsigned int log5.110;
  unsigned int D.9835;
  unsigned int D.9839;
  unsigned int D.9840;
  long unsigned int ahi.111;
  long unsigned int ahi.112;
  unsigned int D.9846;
  long unsigned int ahi.113;
  long long unsigned int D.9850;
  <unnamed-unsigned:1> D.9851;
  int D.9852;
  int D.9853;
  double d;
  guint64 alo;
  guint64 ahi;
  guint64 mantisse;
  guint32 overhang;
  guint32 factor;
  guint32 roundBits;
  int scale;
  int texp;
  int log5;
  int i;

  try
    {
      D.9808 = pA->hi32;
      D.9809 = (long unsigned int) D.9808;
      D.9810 = D.9809 << 32;
      D.9811 = pA->mid32;
      D.9812 = (long unsigned int) D.9811;
      ahi.105 = D.9810 | D.9812;
      ahi = ahi.105;
      D.9814 = pA->lo32;
      D.9815 = (long unsigned int) D.9814;
      alo.106 = D.9815 << 32;
      alo = alo.106;
      ahi.107 = ahi;
      alo.108 = alo;
      D.9819 = ahi.107 | alo.108;
      if (D.9819 == 0) goto <D.9820>; else goto <D.9821>;
      <D.9820>:
      D.9822 = 0.0;
      return D.9822;
      <D.9821>:
      texp = 0;
      D.9823 = pA->u.signscale.scale;
      scale = (int) D.9823;
      goto <D.8922>;
      <D.8921>:
      goto <D.8919>;
      <D.8918>:
      lshift128 (&alo, &ahi);
      texp = texp + 1;
      <D.8919>:
      ahi.107 = ahi;
      ahi.109 = (signed long) ahi.107;
      if (ahi.109 >= 0) goto <D.8918>; else goto <D.8920>;
      <D.8920>:
      ahi.107 = ahi;
      D.9825 = ahi.107 >> 32;
      overhang = (guint32) D.9825;
      if (overhang > 4) goto <D.9826>; else goto <D.9827>;
      <D.9826>:
      D.9828 = log2_32 (overhang);
      D.9829 = D.9828 * 1000;
      log5 = D.9829 / 2322;
      if (log5 <= 8) goto <D.9830>; else goto <D.9831>;
      <D.9830>:
      D.9832 = constantsDecadeInt32Factors[log5];
      factor = D.9832 >> log5;
      D.9833 = overhang / factor;
      log5.110 = (unsigned int) log5;
      D.9835 = D.9833 + log5.110;
      i = (int) D.9835;
      goto <D.9836>;
      <D.9831>:
      i = 9;
      <D.9836>:
      if (i > scale) goto <D.9837>; else goto <D.9838>;
      <D.9837>:
      i = scale;
      <D.9838>:
      D.9839 = constantsDecadeInt32Factors[i];
      factor = D.9839 >> i;
      div128by32 (&alo, &ahi, factor, 0B);
      scale = scale - i;
      texp = texp + i;
      <D.9827>:
      <D.8922>:
      if (scale > 0) goto <D.8921>; else goto <D.8923>;
      <D.8923>:
      goto <D.8925>;
      <D.8924>:
      lshift128 (&alo, &ahi);
      texp = texp + 1;
      <D.8925>:
      ahi.107 = ahi;
      ahi.109 = (signed long) ahi.107;
      if (ahi.109 >= 0) goto <D.8924>; else goto <D.8926>;
      <D.8926>:
      ahi.107 = ahi;
      D.9840 = (unsigned int) ahi.107;
      roundBits = D.9840 & 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.9842>; else goto <D.9843>;
      <D.9842>:
      ahi.107 = ahi;
      ahi.112 = ahi.107 >> 1;
      ahi = ahi.112;
      texp = texp + -1;
      goto <D.9845>;
      <D.9843>:
      D.9846 = roundBits & 1024;
      if (D.9846 == 0) goto <D.9847>; else goto <D.9848>;
      <D.9847>:
      ahi.107 = ahi;
      ahi.113 = ahi.107 & 18446744073709551614;
      ahi = ahi.113;
      <D.9848>:
      <D.9845>:
      ahi.107 = ahi;
      D.9850 = ahi.107 & 9223372036854775807;
      mantisse = D.9850 >> 11;
      D.9851 = pA->u.signscale.sign;
      D.9852 = (int) D.9851;
      D.9853 = 95 - texp;
      buildIEEE754Double (&d, D.9852, D.9853, mantisse);
      D.9822 = d;
      return D.9822;
    }
  finally
    {
      d = {CLOBBER};
      alo = {CLOBBER};
      ahi = {CLOBBER};
    }
}


buildIEEE754Double (double * pd, int sign, int texp, guint64 mantisse)
{
  long unsigned int D.9856;
  long unsigned int D.9857;
  int D.9858;
  unsigned int D.9859;
  long unsigned int D.9860;
  long unsigned int D.9861;
  long unsigned int D.9862;
  long unsigned int D.9863;
  long unsigned int D.9864;
  guint64 * p;

  p = pd;
  D.9856 = (long unsigned int) sign;
  D.9857 = D.9856 << 63;
  D.9858 = texp + 1023;
  D.9859 = (unsigned int) D.9858;
  D.9860 = (long unsigned int) D.9859;
  D.9861 = D.9860 & 2047;
  D.9862 = D.9861 << 52;
  D.9863 = D.9857 | D.9862;
  D.9864 = D.9863 | mantisse;
  *p = D.9864;
}


mono_decimalSetExponent (struct decimal_repr * pA, gint32 texp)
{
  unsigned char D.9865;
  int scale.114;
  int scale.115;
  int scale.116;
  unsigned int scale.117;
  unsigned int D.9872;
  long unsigned int D.9873;
  long unsigned int D.9874;
  unsigned int D.9875;
  long unsigned int D.9876;
  long unsigned int alo.118;
  unsigned int D.9878;
  long unsigned int ahi.119;
  gint32 D.9882;
  long unsigned int alo.120;
  long unsigned int ahi.121;
  <unnamed-unsigned:1> D.9885;
  int D.9886;
  unsigned char D.9887;
  guint64 alo;
  guint64 ahi;
  int rc;
  int scale;

  try
    {
      D.9865 = pA->u.signscale.scale;
      scale.114 = (int) D.9865;
      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.9870>; else goto <D.9871>;
      <D.9870>:
      D.9872 = pA->mid32;
      D.9873 = (long unsigned int) D.9872;
      D.9874 = D.9873 << 32;
      D.9875 = pA->lo32;
      D.9876 = (long unsigned int) D.9875;
      alo.118 = D.9874 | D.9876;
      alo = alo.118;
      D.9878 = pA->hi32;
      ahi.119 = (long unsigned int) D.9878;
      ahi = ahi.119;
      rc = rescale128 (&alo, &ahi, &scale, 0, 0, 28, 1);
      if (rc != 0) goto <D.9880>; else goto <D.9881>;
      <D.9880>:
      D.9882 = rc;
      return D.9882;
      <D.9881>:
      alo.120 = alo;
      ahi.121 = ahi;
      scale.115 = scale;
      D.9885 = pA->u.signscale.sign;
      D.9886 = (int) D.9885;
      D.9882 = pack128toDecimal (pA, alo.120, ahi.121, scale.115, D.9886);
      return D.9882;
      <D.9871>:
      scale.115 = scale;
      D.9887 = (unsigned char) scale.115;
      pA->u.signscale.scale = D.9887;
      D.9882 = 0;
      return D.9882;
    }
  finally
    {
      alo = {CLOBBER};
      ahi = {CLOBBER};
      scale = {CLOBBER};
    }
}


