void __amd_remainder_piby2(double x, double *r, double *rr, int *region) {
  static const double piby2_lead = 1.57079632679489655800e+00,
                      piby2_part1 = 1.57079631090164184570e+00,
                      piby2_part2 = 1.58932547122958567343e-08,
                      piby2_part3 = 6.12323399573676480327e-17;
  const int bitsper = 10;
  unsigned long long res[500];
  unsigned long long ux, u, carry, mask, mant, highbitsrr;
  int first, last, i, rexp, xexp, resexp, ltb, determ;
  double xx, t;
  static unsigned long long pibits[] = {
      0,   0,   0,   0,   0,   0,    162, 998,  54,  915,  580, 84,  671, 777,
      855, 839, 851, 311, 448, 877,  553, 358,  316, 270,  260, 127, 593, 398,
      701, 942, 965, 390, 882, 283,  570, 265,  221, 184,  6,   292, 750, 642,
      465, 584, 463, 903, 491, 114,  786, 617,  830, 930,  35,  381, 302, 749,
      72,  314, 412, 448, 619, 279,  894, 260,  921, 117,  569, 525, 307, 637,
      156, 529, 504, 751, 505, 160,  945, 1022, 151, 1023, 480, 358, 15,  956,
      753, 98,  858, 41,  721, 987,  310, 507,  242, 498,  777, 733, 244, 399,
      870, 633, 510, 651, 373, 158,  940, 506,  997, 965,  947, 833, 825, 990,
      165, 164, 746, 431, 949, 1004, 287, 565,  464, 533,  515, 193, 111, 798};
  {
    volatile union {
      double d;
      unsigned long long i;
    } _bitsy;
    _bitsy.d = (x);
    ux = _bitsy.i;
  };
  xexp = (int)(((ux & 0x7ff0000000000000) >> 52) - 1023);
  ux = (ux & 0x000fffffffffffff) | 0x0010000000000000;
  carry = 0;
  mask = 1;
  mask = (mask << bitsper) - 1;
  first = xexp / bitsper;
  resexp = xexp - first * bitsper;
  last = first + 180 / bitsper;
  res[19] = 0;
  u = pibits[last] * ux;
  res[18] = u & mask;
  carry = u >> bitsper;
  u = pibits[last - 1] * ux + carry;
  res[17] = u & mask;
  carry = u >> bitsper;
  u = pibits[last - 2] * ux + carry;
  res[16] = u & mask;
  carry = u >> bitsper;
  u = pibits[last - 3] * ux + carry;
  res[15] = u & mask;
  carry = u >> bitsper;
  u = pibits[last - 4] * ux + carry;
  res[14] = u & mask;
  carry = u >> bitsper;
  u = pibits[last - 5] * ux + carry;
  res[13] = u & mask;
  carry = u >> bitsper;
  u = pibits[last - 6] * ux + carry;
  res[12] = u & mask;
  carry = u >> bitsper;
  u = pibits[last - 7] * ux + carry;
  res[11] = u & mask;
  carry = u >> bitsper;
  u = pibits[last - 8] * ux + carry;
  res[10] = u & mask;
  carry = u >> bitsper;
  u = pibits[last - 9] * ux + carry;
  res[9] = u & mask;
  carry = u >> bitsper;
  u = pibits[last - 10] * ux + carry;
  res[8] = u & mask;
  carry = u >> bitsper;
  u = pibits[last - 11] * ux + carry;
  res[7] = u & mask;
  carry = u >> bitsper;
  u = pibits[last - 12] * ux + carry;
  res[6] = u & mask;
  carry = u >> bitsper;
  u = pibits[last - 13] * ux + carry;
  res[5] = u & mask;
  carry = u >> bitsper;
  u = pibits[last - 14] * ux + carry;
  res[4] = u & mask;
  carry = u >> bitsper;
  u = pibits[last - 15] * ux + carry;
  res[3] = u & mask;
  carry = u >> bitsper;
  u = pibits[last - 16] * ux + carry;
  res[2] = u & mask;
  carry = u >> bitsper;
  u = pibits[last - 17] * ux + carry;
  res[1] = u & mask;
  carry = u >> bitsper;
  u = pibits[last - 18] * ux + carry;
  res[0] = u & mask;
  ltb = (int)((((res[0] << bitsper) | res[1]) >> (bitsper - 1 - resexp)) & 7);
  determ = ltb & 1;
  i = 1;
  if (determ) {
    *region = ((ltb >> 1) + 1) & 3;
    mant = 1;
    mant = ~(res[1]) & ((mant << (bitsper - resexp)) - 1);
    while (mant < 0x0020000000000000) {
      i++;
      mant = (mant << bitsper) | (~(res[i]) & mask);
    }
    highbitsrr = ~(res[i + 1]) << (64 - bitsper);
  } else {
    *region = (ltb >> 1);
    mant = 1;
    mant = res[1] & ((mant << (bitsper - resexp)) - 1);
    while (mant < 0x0020000000000000) {
      i++;
      mant = (mant << bitsper) | res[i];
    }
    highbitsrr = res[i + 1] << (64 - bitsper);
  }
  rexp = 52 + resexp - i * bitsper;
  while (mant >= 0x0020000000000000) {
    rexp++;
    highbitsrr = (highbitsrr >> 1) | ((mant & 1) << 63);
    mant >>= 1;
  }
  u = ((unsigned long long)rexp + 1023) << 52;
  ux = (mant & 0x000fffffffffffff) | u;
  if (determ)
    ux |= 0x8000000000000000;
  {
    volatile union {
      double d;
      unsigned long long i;
    } _bitsy;
    _bitsy.i = (ux);
    x = _bitsy.d;
  };
  highbitsrr >>= 12;
  u = ((unsigned long long)rexp + 1023 - 53) << 52;
  {
    volatile union {
      double d;
      unsigned long long i;
    } _bitsy;
    _bitsy.i = (u);
    t = _bitsy.d;
  };
  u |= highbitsrr;
  {
    volatile union {
      double d;
      unsigned long long i;
    } _bitsy;
    _bitsy.i = (u);
    xx = _bitsy.d;
  };
  xx -= t;
  if (determ)
    xx *= -2.0;
  else
    xx *= 2.0;
  {
    double hx, tx, c, cc;
    {
      volatile union {
        double d;
        unsigned long long i;
      } _bitsy;
      _bitsy.d = (x);
      ux = _bitsy.i;
    };
    ux &= 0xfffffffff8000000;
    {
      volatile union {
        double d;
        unsigned long long i;
      } _bitsy;
      _bitsy.i = (ux);
      hx = _bitsy.d;
    };
    tx = x - hx;
    c = piby2_lead * x;
    cc = ((((piby2_part1 * hx - c) + piby2_part1 * tx) + piby2_part2 * hx) +
          piby2_part2 * tx) +
         (piby2_lead * xx + piby2_part3 * x);
    *r = c + cc;
    *rr = (c - *r) + cc;
  }
  return;
}


x86 assembly (clang, -O0):
<__amd_remainder_piby2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1000,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movl   $0xa,-0x24(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x1038(%rbp)
ff
mov    -0x1038(%rbp),%rax
mov    %rax,-0xfd8(%rbp)
movabs $0x7ff0000000000000,%rax
and    -0xfd8(%rbp),%rax
shr    $0x34,%rax
sub    $0x3ff,%rax
mov    %eax,-0x1014(%rbp)
movabs $0xfffffffffffff,%rax
and    -0xfd8(%rbp),%rax
movabs $0x10000000000000,%rcx
or     %rcx,%rax
mov    %rax,-0xfd8(%rbp)
movq   $0x0,-0xfe8(%rbp)
movq   $0x1,-0xff0(%rbp)
mov    -0xff0(%rbp),%rax
shl    $0xa,%rax
sub    $0x1,%rax
mov    %rax,-0xff0(%rbp)
mov    -0x1014(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1004(%rbp)
mov    -0x1014(%rbp),%eax
imul   $0xa,-0x1004(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x1018(%rbp)
mov    -0x1004(%rbp),%eax
add    $0x12,%eax
mov    %eax,-0x1008(%rbp)
movq   $0x0,-0xf38(%rbp)
movslq -0x1008(%rbp),%rcx
lea    0x2e2f(%rip),%rax
mov    (%rax,%rcx,8),%rax
imul   -0xfd8(%rbp),%rax
ff
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
and    -0xff0(%rbp),%rax
mov    %rax,-0xf40(%rbp)
mov    -0xfe0(%rbp),%rax
shr    $0xa,%rax
mov    %rax,-0xfe8(%rbp)
mov    -0x1008(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2de2(%rip),%rax
mov    (%rax,%rcx,8),%rax
imul   -0xfd8(%rbp),%rax
ff
add    -0xfe8(%rbp),%rax
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
and    -0xff0(%rbp),%rax
mov    %rax,-0xf48(%rbp)
mov    -0xfe0(%rbp),%rax
shr    $0xa,%rax
mov    %rax,-0xfe8(%rbp)
mov    -0x1008(%rbp),%eax
sub    $0x2,%eax
movslq %eax,%rcx
lea    0x2d8e(%rip),%rax
mov    (%rax,%rcx,8),%rax
imul   -0xfd8(%rbp),%rax
ff
add    -0xfe8(%rbp),%rax
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
and    -0xff0(%rbp),%rax
mov    %rax,-0xf50(%rbp)
mov    -0xfe0(%rbp),%rax
shr    $0xa,%rax
mov    %rax,-0xfe8(%rbp)
mov    -0x1008(%rbp),%eax
sub    $0x3,%eax
movslq %eax,%rcx
lea    0x2d3a(%rip),%rax
mov    (%rax,%rcx,8),%rax
imul   -0xfd8(%rbp),%rax
ff
add    -0xfe8(%rbp),%rax
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
and    -0xff0(%rbp),%rax
mov    %rax,-0xf58(%rbp)
mov    -0xfe0(%rbp),%rax
shr    $0xa,%rax
mov    %rax,-0xfe8(%rbp)
mov    -0x1008(%rbp),%eax
sub    $0x4,%eax
movslq %eax,%rcx
lea    0x2ce6(%rip),%rax
mov    (%rax,%rcx,8),%rax
imul   -0xfd8(%rbp),%rax
ff
add    -0xfe8(%rbp),%rax
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
and    -0xff0(%rbp),%rax
mov    %rax,-0xf60(%rbp)
mov    -0xfe0(%rbp),%rax
shr    $0xa,%rax
mov    %rax,-0xfe8(%rbp)
mov    -0x1008(%rbp),%eax
sub    $0x5,%eax
movslq %eax,%rcx
lea    0x2c92(%rip),%rax
mov    (%rax,%rcx,8),%rax
imul   -0xfd8(%rbp),%rax
ff
add    -0xfe8(%rbp),%rax
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
and    -0xff0(%rbp),%rax
mov    %rax,-0xf68(%rbp)
mov    -0xfe0(%rbp),%rax
shr    $0xa,%rax
mov    %rax,-0xfe8(%rbp)
mov    -0x1008(%rbp),%eax
sub    $0x6,%eax
movslq %eax,%rcx
lea    0x2c3e(%rip),%rax
mov    (%rax,%rcx,8),%rax
imul   -0xfd8(%rbp),%rax
ff
add    -0xfe8(%rbp),%rax
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
and    -0xff0(%rbp),%rax
mov    %rax,-0xf70(%rbp)
mov    -0xfe0(%rbp),%rax
shr    $0xa,%rax
mov    %rax,-0xfe8(%rbp)
mov    -0x1008(%rbp),%eax
sub    $0x7,%eax
movslq %eax,%rcx
lea    0x2bea(%rip),%rax
mov    (%rax,%rcx,8),%rax
imul   -0xfd8(%rbp),%rax
ff
add    -0xfe8(%rbp),%rax
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
and    -0xff0(%rbp),%rax
mov    %rax,-0xf78(%rbp)
mov    -0xfe0(%rbp),%rax
shr    $0xa,%rax
mov    %rax,-0xfe8(%rbp)
mov    -0x1008(%rbp),%eax
sub    $0x8,%eax
movslq %eax,%rcx
lea    0x2b96(%rip),%rax
mov    (%rax,%rcx,8),%rax
imul   -0xfd8(%rbp),%rax
ff
add    -0xfe8(%rbp),%rax
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
and    -0xff0(%rbp),%rax
mov    %rax,-0xf80(%rbp)
mov    -0xfe0(%rbp),%rax
shr    $0xa,%rax
mov    %rax,-0xfe8(%rbp)
mov    -0x1008(%rbp),%eax
sub    $0x9,%eax
movslq %eax,%rcx
lea    0x2b42(%rip),%rax
mov    (%rax,%rcx,8),%rax
imul   -0xfd8(%rbp),%rax
ff
add    -0xfe8(%rbp),%rax
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
and    -0xff0(%rbp),%rax
mov    %rax,-0xf88(%rbp)
mov    -0xfe0(%rbp),%rax
shr    $0xa,%rax
mov    %rax,-0xfe8(%rbp)
mov    -0x1008(%rbp),%eax
sub    $0xa,%eax
movslq %eax,%rcx
lea    0x2aee(%rip),%rax
mov    (%rax,%rcx,8),%rax
imul   -0xfd8(%rbp),%rax
ff
add    -0xfe8(%rbp),%rax
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
and    -0xff0(%rbp),%rax
mov    %rax,-0xf90(%rbp)
mov    -0xfe0(%rbp),%rax
shr    $0xa,%rax
mov    %rax,-0xfe8(%rbp)
mov    -0x1008(%rbp),%eax
sub    $0xb,%eax
movslq %eax,%rcx
lea    0x2a9a(%rip),%rax
mov    (%rax,%rcx,8),%rax
imul   -0xfd8(%rbp),%rax
ff
add    -0xfe8(%rbp),%rax
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
and    -0xff0(%rbp),%rax
mov    %rax,-0xf98(%rbp)
mov    -0xfe0(%rbp),%rax
shr    $0xa,%rax
mov    %rax,-0xfe8(%rbp)
mov    -0x1008(%rbp),%eax
sub    $0xc,%eax
movslq %eax,%rcx
lea    0x2a46(%rip),%rax
mov    (%rax,%rcx,8),%rax
imul   -0xfd8(%rbp),%rax
ff
add    -0xfe8(%rbp),%rax
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
and    -0xff0(%rbp),%rax
mov    %rax,-0xfa0(%rbp)
mov    -0xfe0(%rbp),%rax
shr    $0xa,%rax
mov    %rax,-0xfe8(%rbp)
mov    -0x1008(%rbp),%eax
sub    $0xd,%eax
movslq %eax,%rcx
lea    0x29f2(%rip),%rax
mov    (%rax,%rcx,8),%rax
imul   -0xfd8(%rbp),%rax
ff
add    -0xfe8(%rbp),%rax
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
and    -0xff0(%rbp),%rax
mov    %rax,-0xfa8(%rbp)
mov    -0xfe0(%rbp),%rax
shr    $0xa,%rax
mov    %rax,-0xfe8(%rbp)
mov    -0x1008(%rbp),%eax
sub    $0xe,%eax
movslq %eax,%rcx
lea    0x299e(%rip),%rax
mov    (%rax,%rcx,8),%rax
imul   -0xfd8(%rbp),%rax
ff
add    -0xfe8(%rbp),%rax
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
and    -0xff0(%rbp),%rax
mov    %rax,-0xfb0(%rbp)
mov    -0xfe0(%rbp),%rax
shr    $0xa,%rax
mov    %rax,-0xfe8(%rbp)
mov    -0x1008(%rbp),%eax
sub    $0xf,%eax
movslq %eax,%rcx
lea    0x294a(%rip),%rax
mov    (%rax,%rcx,8),%rax
imul   -0xfd8(%rbp),%rax
ff
add    -0xfe8(%rbp),%rax
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
and    -0xff0(%rbp),%rax
mov    %rax,-0xfb8(%rbp)
mov    -0xfe0(%rbp),%rax
shr    $0xa,%rax
mov    %rax,-0xfe8(%rbp)
mov    -0x1008(%rbp),%eax
sub    $0x10,%eax
movslq %eax,%rcx
lea    0x28f6(%rip),%rax
mov    (%rax,%rcx,8),%rax
imul   -0xfd8(%rbp),%rax
ff
add    -0xfe8(%rbp),%rax
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
and    -0xff0(%rbp),%rax
mov    %rax,-0xfc0(%rbp)
mov    -0xfe0(%rbp),%rax
shr    $0xa,%rax
mov    %rax,-0xfe8(%rbp)
mov    -0x1008(%rbp),%eax
sub    $0x11,%eax
movslq %eax,%rcx
lea    0x28a2(%rip),%rax
mov    (%rax,%rcx,8),%rax
imul   -0xfd8(%rbp),%rax
ff
add    -0xfe8(%rbp),%rax
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
and    -0xff0(%rbp),%rax
mov    %rax,-0xfc8(%rbp)
mov    -0xfe0(%rbp),%rax
shr    $0xa,%rax
mov    %rax,-0xfe8(%rbp)
mov    -0x1008(%rbp),%eax
sub    $0x12,%eax
movslq %eax,%rcx
lea    0x284e(%rip),%rax
mov    (%rax,%rcx,8),%rax
imul   -0xfd8(%rbp),%rax
ff
add    -0xfe8(%rbp),%rax
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
and    -0xff0(%rbp),%rax
mov    %rax,-0xfd0(%rbp)
mov    -0xfd0(%rbp),%rax
shl    $0xa,%rax
or     -0xfc8(%rbp),%rax
mov    $0x9,%ecx
sub    -0x1018(%rbp),%ecx
mov    %ecx,%ecx
shr    %cl,%rax
and    $0x7,%rax
mov    %eax,-0x101c(%rbp)
mov    -0x101c(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0x1020(%rbp)
movl   $0x1,-0x100c(%rbp)
cmpl   $0x0,-0x1020(%rbp)
je     1937 <__amd_remainder_piby2+0x837>
mov    -0x101c(%rbp),%ecx
sar    $0x1,%ecx
add    $0x1,%ecx
and    $0x3,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
movq   $0x1,-0xff8(%rbp)
mov    -0xfc8(%rbp),%rax
xor    $0xffffffffffffffff,%rax
mov    -0xff8(%rbp),%rdx
mov    $0xa,%ecx
sub    -0x1018(%rbp),%ecx
mov    %ecx,%ecx
shl    %cl,%rdx
mov    %rdx,%rcx
sub    $0x1,%rcx
and    %rcx,%rax
mov    %rax,-0xff8(%rbp)
movabs $0x20000000000000,%rax
cmp    %rax,-0xff8(%rbp)
jae    1910 <__amd_remainder_piby2+0x810>
mov    -0x100c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100c(%rbp)
mov    -0xff8(%rbp),%rax
shl    $0xa,%rax
movslq -0x100c(%rbp),%rcx
mov    -0xfd0(%rbp,%rcx,8),%rcx
ff
xor    $0xffffffffffffffff,%rcx
and    -0xff0(%rbp),%rcx
or     %rcx,%rax
mov    %rax,-0xff8(%rbp)
jmp    18b6 <__amd_remainder_piby2+0x7b6>
mov    -0x100c(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0xfd0(%rbp,%rax,8),%rax
ff
xor    $0xffffffffffffffff,%rax
shl    $0x36,%rax
mov    %rax,-0x1000(%rbp)
jmp    19ea <__amd_remainder_piby2+0x8ea>
mov    -0x101c(%rbp),%ecx
sar    $0x1,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
movq   $0x1,-0xff8(%rbp)
mov    -0xfc8(%rbp),%rax
mov    -0xff8(%rbp),%rdx
mov    $0xa,%ecx
sub    -0x1018(%rbp),%ecx
mov    %ecx,%ecx
shl    %cl,%rdx
mov    %rdx,%rcx
sub    $0x1,%rcx
and    %rcx,%rax
mov    %rax,-0xff8(%rbp)
movabs $0x20000000000000,%rax
cmp    %rax,-0xff8(%rbp)
jae    19cc <__amd_remainder_piby2+0x8cc>
mov    -0x100c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100c(%rbp)
mov    -0xff8(%rbp),%rax
shl    $0xa,%rax
movslq -0x100c(%rbp),%rcx
or     -0xfd0(%rbp,%rcx,8),%rax
ff
mov    %rax,-0xff8(%rbp)
jmp    1980 <__amd_remainder_piby2+0x880>
mov    -0x100c(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0xfd0(%rbp,%rax,8),%rax
ff
shl    $0x36,%rax
mov    %rax,-0x1000(%rbp)
mov    -0x1018(%rbp),%eax
add    $0x34,%eax
imul   $0xa,-0x100c(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x1010(%rbp)
movabs $0x20000000000000,%rax
cmp    %rax,-0xff8(%rbp)
jb     1a63 <__amd_remainder_piby2+0x963>
mov    -0x1010(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1010(%rbp)
mov    -0x1000(%rbp),%rax
shr    $0x1,%rax
mov    -0xff8(%rbp),%rcx
and    $0x1,%rcx
shl    $0x3f,%rcx
or     %rcx,%rax
mov    %rax,-0x1000(%rbp)
mov    -0xff8(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0xff8(%rbp)
jmp    1a02 <__amd_remainder_piby2+0x902>
movslq -0x1010(%rbp),%rax
add    $0x3ff,%rax
shl    $0x34,%rax
mov    %rax,-0xfe0(%rbp)
movabs $0xfffffffffffff,%rax
and    -0xff8(%rbp),%rax
or     -0xfe0(%rbp),%rax
mov    %rax,-0xfd8(%rbp)
cmpl   $0x0,-0x1020(%rbp)
je     1abf <__amd_remainder_piby2+0x9bf>
movabs $0x8000000000000000,%rax
or     -0xfd8(%rbp),%rax
mov    %rax,-0xfd8(%rbp)
mov    -0xfd8(%rbp),%rax
mov    %rax,-0x1040(%rbp)
movsd  -0x1040(%rbp),%xmm0
ff
movsd  %xmm0,-0x8(%rbp)
mov    -0x1000(%rbp),%rax
shr    $0xc,%rax
mov    %rax,-0x1000(%rbp)
movslq -0x1010(%rbp),%rax
add    $0x3ff,%rax
sub    $0x35,%rax
shl    $0x34,%rax
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
mov    %rax,-0x1048(%rbp)
movsd  -0x1048(%rbp),%xmm0
ff
movsd  %xmm0,-0x1030(%rbp)
ff
mov    -0x1000(%rbp),%rax
or     -0xfe0(%rbp),%rax
mov    %rax,-0xfe0(%rbp)
mov    -0xfe0(%rbp),%rax
mov    %rax,-0x1050(%rbp)
movsd  -0x1050(%rbp),%xmm0
ff
movsd  %xmm0,-0x1028(%rbp)
ff
movsd  -0x1030(%rbp),%xmm1
ff
movsd  -0x1028(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x1028(%rbp)
ff
cmpl   $0x0,-0x1020(%rbp)
je     1b9f <__amd_remainder_piby2+0xa9f>
movsd  0x47e(%rip),%xmm0
mulsd  -0x1028(%rbp),%xmm0
ff
movsd  %xmm0,-0x1028(%rbp)
ff
jmp    1bb7 <__amd_remainder_piby2+0xab7>
movsd  0x459(%rip),%xmm0
mulsd  -0x1028(%rbp),%xmm0
ff
movsd  %xmm0,-0x1028(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x1078(%rbp)
ff
mov    -0x1078(%rbp),%rax
mov    %rax,-0xfd8(%rbp)
mov    -0xfd8(%rbp),%rax
and    $0xfffffffff8000000,%rax
mov    %rax,-0xfd8(%rbp)
mov    -0xfd8(%rbp),%rax
mov    %rax,-0x1080(%rbp)
movsd  -0x1080(%rbp),%xmm0
ff
movsd  %xmm0,-0x1058(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
subsd  -0x1058(%rbp),%xmm0
ff
movsd  %xmm0,-0x1060(%rbp)
ff
movsd  0x3ef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x1068(%rbp)
ff
movsd  -0x1058(%rbp),%xmm1
ff
movsd  -0x1068(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0x3cb(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x1060(%rbp),%xmm0
ff
movsd  0x3b3(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x1058(%rbp),%xmm1
ff
movsd  0x393(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x1060(%rbp),%xmm0
ff
movsd  0x37b(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x1028(%rbp),%xmm1
ff
movsd  0x35b(%rip),%xmm2
mulsd  -0x8(%rbp),%xmm2
movsd  0x346(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x1070(%rbp)
ff
movsd  -0x1068(%rbp),%xmm0
ff
addsd  -0x1070(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x1068(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
addsd  -0x1070(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x1000,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__amd_remainder_piby2>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xf30,%rsp
movabs $0xfffffffffffff,%r8
movsd  %xmm0,-0x70(%rsp)
mov    -0x70(%rsp),%r14
mov    %r14,%r9
shr    $0x34,%r9
and    $0x7ff,%r9d
lea    -0x3ff(%r9),%eax
mov    %r14,%rcx
and    %r8,%rcx
lea    (%rcx,%r8,1),%r11
add    $0x1,%r11
imul   $0x6667,%eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
sar    $0x12,%ecx
add    %eax,%ecx
movswl %cx,%r10d
add    %r10d,%r10d
lea    (%r10,%r10,4),%eax
neg    %eax
add    %r9d,%eax
add    $0xfffffc01,%eax
movq   $0x0,0x28(%rsp)
lea    0xeb4(%rip),%r15
movswq %cx,%r12
mov    0x90(%r15,%r12,8),%rbp
imul   %r11,%rbp
mov    %ebp,%ebx
and    $0x3ff,%ebx
mov    %rbx,0x20(%rsp)
shr    $0xa,%rbp
mov    0x88(%r15,%r12,8),%rcx
imul   %r11,%rcx
add    %rbp,%rcx
mov    %ecx,%ebx
and    $0x3ff,%ebx
mov    %rbx,0x18(%rsp)
shr    $0xa,%rcx
mov    0x80(%r15,%r12,8),%rbx
imul   %r11,%rbx
add    %rcx,%rbx
mov    %ebx,%ecx
and    $0x3ff,%ecx
mov    %rcx,0x10(%rsp)
shr    $0xa,%rbx
mov    0x78(%r15,%r12,8),%rcx
imul   %r11,%rcx
add    %rbx,%rcx
mov    %ecx,%ebx
and    $0x3ff,%ebx
mov    %rbx,0x8(%rsp)
shr    $0xa,%rcx
mov    0x70(%r15,%r12,8),%rbx
imul   %r11,%rbx
add    %rcx,%rbx
mov    %ebx,%ecx
and    $0x3ff,%ecx
mov    %rcx,(%rsp)
shr    $0xa,%rbx
mov    0x68(%r15,%r12,8),%rcx
imul   %r11,%rcx
add    %rbx,%rcx
mov    %ecx,%ebx
and    $0x3ff,%ebx
mov    %rbx,-0x8(%rsp)
shr    $0xa,%rcx
mov    0x60(%r15,%r12,8),%rbx
imul   %r11,%rbx
add    %rcx,%rbx
mov    %ebx,%ecx
and    $0x3ff,%ecx
mov    %rcx,-0x10(%rsp)
shr    $0xa,%rbx
mov    0x58(%r15,%r12,8),%rcx
imul   %r11,%rcx
add    %rbx,%rcx
mov    %ecx,%ebx
and    $0x3ff,%ebx
mov    %rbx,-0x18(%rsp)
shr    $0xa,%rcx
mov    0x50(%r15,%r12,8),%rbx
imul   %r11,%rbx
add    %rcx,%rbx
mov    %ebx,%ecx
and    $0x3ff,%ecx
mov    %rcx,-0x20(%rsp)
shr    $0xa,%rbx
mov    0x48(%r15,%r12,8),%rcx
imul   %r11,%rcx
add    %rbx,%rcx
mov    %ecx,%ebx
and    $0x3ff,%ebx
mov    %rbx,-0x28(%rsp)
shr    $0xa,%rcx
mov    0x40(%r15,%r12,8),%rbx
imul   %r11,%rbx
add    %rcx,%rbx
mov    %ebx,%ecx
and    $0x3ff,%ecx
mov    %rcx,-0x30(%rsp)
shr    $0xa,%rbx
mov    0x38(%r15,%r12,8),%rcx
imul   %r11,%rcx
add    %rbx,%rcx
mov    %ecx,%ebx
and    $0x3ff,%ebx
mov    %rbx,-0x38(%rsp)
shr    $0xa,%rcx
mov    0x30(%r15,%r12,8),%rbx
imul   %r11,%rbx
add    %rcx,%rbx
mov    %ebx,%ecx
and    $0x3ff,%ecx
mov    %rcx,-0x40(%rsp)
shr    $0xa,%rbx
mov    0x28(%r15,%r12,8),%rcx
imul   %r11,%rcx
add    %rbx,%rcx
mov    %ecx,%ebx
and    $0x3ff,%ebx
mov    %rbx,-0x48(%rsp)
shr    $0xa,%rcx
mov    0x20(%r15,%r12,8),%rbx
imul   %r11,%rbx
add    %rcx,%rbx
mov    %ebx,%ecx
and    $0x3ff,%ecx
mov    %rcx,-0x50(%rsp)
shr    $0xa,%rbx
mov    0x18(%r15,%r12,8),%rcx
imul   %r11,%rcx
add    %rbx,%rcx
mov    %ecx,%ebx
and    $0x3ff,%ebx
mov    %rbx,-0x58(%rsp)
shr    $0xa,%rcx
mov    0x10(%r15,%r12,8),%rbx
imul   %r11,%rbx
add    %rcx,%rbx
mov    %ebx,%ecx
and    $0x3ff,%ecx
mov    %rcx,-0x60(%rsp)
shr    $0xa,%rbx
imul   0x8(%r15,%r12,8),%r11
add    %rbx,%r11
mov    %r11d,%ebx
and    $0x3ff,%ebx
imul   (%r15,%r12,8),%r14d
mov    %rbx,-0x68(%rsp)
shr    $0xa,%r11d
add    %r14d,%r11d
and    $0x3ff,%r11d
mov    %r11,-0x70(%rsp)
shl    $0xa,%r11
or     %rbx,%r11
mov    $0x9,%cl
sub    %al,%cl
mov    %r11,%r14
shr    %cl,%r14
movabs $0x20000000000000,%r15
movzbl %cl,%ecx
mov    %r14d,%ebp
shr    %ebp
bt     %rcx,%r11
jb     1425 <__amd_remainder_piby2+0x325>
mov    $0xa,%cl
sub    %al,%cl
mov    $0xffffffffffffffff,%rax
shl    %cl,%rax
and    $0x3,%ebp
mov    %ebp,(%rdx)
not    %eax
and    %eax,%ebx
lea    (%r10,%r10,4),%eax
sub    %eax,%r9d
add    $0xfffffc2b,%r9d
mov    $0x2,%ecx
mov    %r9d,%eax
nopw   0x0(%rax,%rax,1)
shl    $0xa,%rbx
or     -0x70(%rsp,%rcx,8),%rbx
add    $0x1,%rcx
add    $0xfffffff6,%eax
cmp    %r15,%rbx
jb     1400 <__amd_remainder_piby2+0x300>
mov    %ecx,%ecx
mov    -0x70(%rsp,%rcx,8),%rcx
shl    $0x36,%rcx
jmp    14a4 <__amd_remainder_piby2+0x3a4>
add    $0x1,%ebp
and    $0x3,%ebp
mov    %ebp,(%rdx)
mov    $0xa,%cl
sub    %al,%cl
mov    $0xffffffffffffffff,%rbp
shl    %cl,%rbp
or     %rbp,%rbx
not    %rbx
shr    $0x35,%rbp
mov    $0x1,%edx
cmp    $0x7ff,%ebp
jb     1485 <__amd_remainder_piby2+0x385>
mov    $0x2,%edx
nopw   0x0(%rax,%rax,1)
shl    $0xa,%rbx
mov    -0x70(%rsp,%rdx,8),%rcx
and    $0x3ff,%ecx
or     %rcx,%rbx
xor    $0x3ff,%rbx
add    $0x1,%rdx
cmp    %r15,%rbx
jb     1460 <__amd_remainder_piby2+0x360>
add    $0xffffffff,%edx
mov    %edx,%ecx
mov    -0x68(%rsp,%rcx,8),%ecx
not    %ecx
shl    $0x36,%rcx
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%eax
add    $0x34,%eax
add    $0xffffffffffffffff,%r15
cmp    %r15,%rbx
jbe    14c4 <__amd_remainder_piby2+0x3c4>
mov    %rbx,%rdx
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
shrd   $0x1,%rdx,%rcx
shr    %rbx
shr    $0x36,%rdx
mov    %rbx,%rdx
jne    14b0 <__amd_remainder_piby2+0x3b0>
shl    $0x34,%rax
and    %r8,%rbx
or     %rax,%rbx
movabs $0x3ff0000000000000,%rdx
add    %rbx,%rdx
movabs $0x8000000000000000,%rbp
or     %rdx,%rbp
xor    %ebx,%ebx
test   $0x1,%r14b
cmove  %rdx,%rbp
sete   %bl
mov    %rbp,-0x78(%rsp)
movsd  -0x78(%rsp),%xmm0
shr    $0xc,%rcx
movabs $0x3ca0000000000000,%rdx
add    %rax,%rdx
mov    %rdx,-0x78(%rsp)
movsd  -0x78(%rsp),%xmm2
or     %rcx,%rdx
mov    %rdx,-0x78(%rsp)
movsd  -0x78(%rsp),%xmm1
subsd  %xmm2,%xmm1
lea    0xacb(%rip),%rax
mulsd  (%rax,%rbx,8),%xmm1
movsd  %xmm0,-0x78(%rsp)
mov    $0xfffffffff8000000,%rax
and    -0x78(%rsp),%rax
mov    %rax,-0x78(%rsp)
movsd  -0x78(%rsp),%xmm3
movapd %xmm0,%xmm4
subsd  %xmm3,%xmm4
movsd  0xaa9(%rip),%xmm5
movapd %xmm0,%xmm2
mulsd  %xmm5,%xmm2
movsd  0xaa1(%rip),%xmm6
movapd %xmm3,%xmm7
mulsd  %xmm6,%xmm7
subsd  %xmm2,%xmm7
mulsd  %xmm4,%xmm6
addsd  %xmm7,%xmm6
movsd  0xa8d(%rip),%xmm7
mulsd  %xmm7,%xmm3
addsd  %xmm6,%xmm3
mulsd  %xmm7,%xmm4
addsd  %xmm3,%xmm4
mulsd  0xa7d(%rip),%xmm0
mulsd  %xmm5,%xmm1
addsd  %xmm0,%xmm1
addsd  %xmm4,%xmm1
movapd %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rdi)
subsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,(%rsi)
add    $0xf30,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%union.anon = type { double }
%union.anon.0 = type { double }
%union.anon.1 = type { double }
%union.anon.2 = type { double }
%union.anon.3 = type { double }
%union.anon.4 = type { double }
@__amd_remainder_piby2.piby2_lead = internal constant double 0x3FF921FB54442D18
@__amd_remainder_piby2.piby2_part1 = internal constant double 0x3FF921FB50000000
@__amd_remainder_piby2.piby2_part2 = internal constant double 0x3E5110B460000000
@__amd_remainder_piby2.piby2_part3 = internal constant double 0x3C91A62633145C06
@__amd_remainder_piby2.pibits = internal global [126 x i64] [i64 0, i64 0, i64 0, i64 0, i64 0, i64 0, i64 162, i64 998, i64 54, i64 915, i64 580, i64 84, i64 671, i64 777, i64 855, i64 839, i64 851, i64 311, i64 448, i64 877, i64 553, i64 358, i64 316, i64 270, i64 260, i64 127, i64 593, i64 398, i64 701, i64 942, i64 965, i64 390, i64 882, i64 283, i64 570, i64 265, i64 221, i64 184, i64 6, i64 292, i64 750, i64 642, i64 465, i64 584, i64 463, i64 903, i64 491, i64 114, i64 786, i64 617, i64 830, i64 930, i64 35, i64 381, i64 302, i64 749, i64 72, i64 314, i64 412, i64 448, i64 619, i64 279, i64 894, i64 260, i64 921, i64 117, i64 569, i64 525, i64 307, i64 637, i64 156, i64 529, i64 504, i64 751, i64 505, i64 160, i64 945, i64 1022, i64 151, i64 1023, i64 480, i64 358, i64 15, i64 956, i64 753, i64 98, i64 858, i64 41, i64 721, i64 987, i64 310, i64 507, i64 242, i64 498, i64 777, i64 733, i64 244, i64 399, i64 870, i64 633, i64 510, i64 651, i64 373, i64 158, i64 940, i64 506, i64 997, i64 965, i64 947, i64 833, i64 825, i64 990, i64 165, i64 164, i64 746, i64 431, i64 949, i64 1004, i64 287, i64 565, i64 464, i64 533, i64 515, i64 193, i64 111, i64 798]
define void @__amd_remainder_piby2(double %0, double* %1, double* %2, i32* %3) {
%5 = alloca double
%6 = alloca double*
%7 = alloca double*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca [500 x i64]
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca double
%26 = alloca double
%27 = alloca %union.anon
%28 = alloca %union.anon.0
%29 = alloca %union.anon.1
%30 = alloca %union.anon.2
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca double
%35 = alloca %union.anon.3
%36 = alloca %union.anon.4
store double %0, double* %5
store double* %1, double** %6
store double* %2, double** %7
store i32* %3, i32** %8
store i32 10, i32* %9
%37 = load double, double* %5
%38 = bitcast %union.anon* %27 to double*
store volatile double %37, double* %38
%39 = bitcast %union.anon* %27 to i64*
%40 = load volatile i64, i64* %39
store i64 %40, i64* %11
%41 = load i64, i64* %11
%42 = and i64 %41, 9218868437227405312
%43 = lshr i64 %42, 52
%44 = sub i64 %43, 1023
%45 = trunc i64 %44 to i32
store i32 %45, i32* %21
%46 = load i64, i64* %11
%47 = and i64 %46, 4503599627370495
%48 = or i64 %47, 4503599627370496
store i64 %48, i64* %11
store i64 0, i64* %13
store i64 1, i64* %14
%49 = load i64, i64* %14
%50 = shl i64 %49, 10
%51 = sub i64 %50, 1
store i64 %51, i64* %14
%52 = load i32, i32* %21
%53 = sdiv i32 %52, 10
store i32 %53, i32* %17
%54 = load i32, i32* %21
%55 = load i32, i32* %17
%56 = mul nsw i32 %55, 10
%57 = sub nsw i32 %54, %56
store i32 %57, i32* %22
%58 = load i32, i32* %17
%59 = add nsw i32 %58, 18
store i32 %59, i32* %18
%60 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 19
store i64 0, i64* %60
%61 = load i32, i32* %18
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %62
%64 = load i64, i64* %63
%65 = load i64, i64* %11
%66 = mul i64 %64, %65
store i64 %66, i64* %12
%67 = load i64, i64* %12
%68 = load i64, i64* %14
%69 = and i64 %67, %68
%70 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 18
store i64 %69, i64* %70
%71 = load i64, i64* %12
%72 = lshr i64 %71, 10
store i64 %72, i64* %13
%73 = load i32, i32* %18
%74 = sub nsw i32 %73, 1
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %75
%77 = load i64, i64* %76
%78 = load i64, i64* %11
%79 = mul i64 %77, %78
%80 = load i64, i64* %13
%81 = add i64 %79, %80
store i64 %81, i64* %12
%82 = load i64, i64* %12
%83 = load i64, i64* %14
%84 = and i64 %82, %83
%85 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 17
store i64 %84, i64* %85
%86 = load i64, i64* %12
%87 = lshr i64 %86, 10
store i64 %87, i64* %13
%88 = load i32, i32* %18
%89 = sub nsw i32 %88, 2
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %90
%92 = load i64, i64* %91
%93 = load i64, i64* %11
%94 = mul i64 %92, %93
%95 = load i64, i64* %13
%96 = add i64 %94, %95
store i64 %96, i64* %12
%97 = load i64, i64* %12
%98 = load i64, i64* %14
%99 = and i64 %97, %98
%100 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 16
store i64 %99, i64* %100
%101 = load i64, i64* %12
%102 = lshr i64 %101, 10
store i64 %102, i64* %13
%103 = load i32, i32* %18
%104 = sub nsw i32 %103, 3
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %105
%107 = load i64, i64* %106
%108 = load i64, i64* %11
%109 = mul i64 %107, %108
%110 = load i64, i64* %13
%111 = add i64 %109, %110
store i64 %111, i64* %12
%112 = load i64, i64* %12
%113 = load i64, i64* %14
%114 = and i64 %112, %113
%115 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 15
store i64 %114, i64* %115
%116 = load i64, i64* %12
%117 = lshr i64 %116, 10
store i64 %117, i64* %13
%118 = load i32, i32* %18
%119 = sub nsw i32 %118, 4
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %120
%122 = load i64, i64* %121
%123 = load i64, i64* %11
%124 = mul i64 %122, %123
%125 = load i64, i64* %13
%126 = add i64 %124, %125
store i64 %126, i64* %12
%127 = load i64, i64* %12
%128 = load i64, i64* %14
%129 = and i64 %127, %128
%130 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 14
store i64 %129, i64* %130
%131 = load i64, i64* %12
%132 = lshr i64 %131, 10
store i64 %132, i64* %13
%133 = load i32, i32* %18
%134 = sub nsw i32 %133, 5
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %135
%137 = load i64, i64* %136
%138 = load i64, i64* %11
%139 = mul i64 %137, %138
%140 = load i64, i64* %13
%141 = add i64 %139, %140
store i64 %141, i64* %12
%142 = load i64, i64* %12
%143 = load i64, i64* %14
%144 = and i64 %142, %143
%145 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 13
store i64 %144, i64* %145
%146 = load i64, i64* %12
%147 = lshr i64 %146, 10
store i64 %147, i64* %13
%148 = load i32, i32* %18
%149 = sub nsw i32 %148, 6
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %150
%152 = load i64, i64* %151
%153 = load i64, i64* %11
%154 = mul i64 %152, %153
%155 = load i64, i64* %13
%156 = add i64 %154, %155
store i64 %156, i64* %12
%157 = load i64, i64* %12
%158 = load i64, i64* %14
%159 = and i64 %157, %158
%160 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 12
store i64 %159, i64* %160
%161 = load i64, i64* %12
%162 = lshr i64 %161, 10
store i64 %162, i64* %13
%163 = load i32, i32* %18
%164 = sub nsw i32 %163, 7
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %165
%167 = load i64, i64* %166
%168 = load i64, i64* %11
%169 = mul i64 %167, %168
%170 = load i64, i64* %13
%171 = add i64 %169, %170
store i64 %171, i64* %12
%172 = load i64, i64* %12
%173 = load i64, i64* %14
%174 = and i64 %172, %173
%175 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 11
store i64 %174, i64* %175
%176 = load i64, i64* %12
%177 = lshr i64 %176, 10
store i64 %177, i64* %13
%178 = load i32, i32* %18
%179 = sub nsw i32 %178, 8
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %180
%182 = load i64, i64* %181
%183 = load i64, i64* %11
%184 = mul i64 %182, %183
%185 = load i64, i64* %13
%186 = add i64 %184, %185
store i64 %186, i64* %12
%187 = load i64, i64* %12
%188 = load i64, i64* %14
%189 = and i64 %187, %188
%190 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 10
store i64 %189, i64* %190
%191 = load i64, i64* %12
%192 = lshr i64 %191, 10
store i64 %192, i64* %13
%193 = load i32, i32* %18
%194 = sub nsw i32 %193, 9
%195 = sext i32 %194 to i64
%196 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %195
%197 = load i64, i64* %196
%198 = load i64, i64* %11
%199 = mul i64 %197, %198
%200 = load i64, i64* %13
%201 = add i64 %199, %200
store i64 %201, i64* %12
%202 = load i64, i64* %12
%203 = load i64, i64* %14
%204 = and i64 %202, %203
%205 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 9
store i64 %204, i64* %205
%206 = load i64, i64* %12
%207 = lshr i64 %206, 10
store i64 %207, i64* %13
%208 = load i32, i32* %18
%209 = sub nsw i32 %208, 10
%210 = sext i32 %209 to i64
%211 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %210
%212 = load i64, i64* %211
%213 = load i64, i64* %11
%214 = mul i64 %212, %213
%215 = load i64, i64* %13
%216 = add i64 %214, %215
store i64 %216, i64* %12
%217 = load i64, i64* %12
%218 = load i64, i64* %14
%219 = and i64 %217, %218
%220 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 8
store i64 %219, i64* %220
%221 = load i64, i64* %12
%222 = lshr i64 %221, 10
store i64 %222, i64* %13
%223 = load i32, i32* %18
%224 = sub nsw i32 %223, 11
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %225
%227 = load i64, i64* %226
%228 = load i64, i64* %11
%229 = mul i64 %227, %228
%230 = load i64, i64* %13
%231 = add i64 %229, %230
store i64 %231, i64* %12
%232 = load i64, i64* %12
%233 = load i64, i64* %14
%234 = and i64 %232, %233
%235 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 7
store i64 %234, i64* %235
%236 = load i64, i64* %12
%237 = lshr i64 %236, 10
store i64 %237, i64* %13
%238 = load i32, i32* %18
%239 = sub nsw i32 %238, 12
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %240
%242 = load i64, i64* %241
%243 = load i64, i64* %11
%244 = mul i64 %242, %243
%245 = load i64, i64* %13
%246 = add i64 %244, %245
store i64 %246, i64* %12
%247 = load i64, i64* %12
%248 = load i64, i64* %14
%249 = and i64 %247, %248
%250 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 6
store i64 %249, i64* %250
%251 = load i64, i64* %12
%252 = lshr i64 %251, 10
store i64 %252, i64* %13
%253 = load i32, i32* %18
%254 = sub nsw i32 %253, 13
%255 = sext i32 %254 to i64
%256 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %255
%257 = load i64, i64* %256
%258 = load i64, i64* %11
%259 = mul i64 %257, %258
%260 = load i64, i64* %13
%261 = add i64 %259, %260
store i64 %261, i64* %12
%262 = load i64, i64* %12
%263 = load i64, i64* %14
%264 = and i64 %262, %263
%265 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 5
store i64 %264, i64* %265
%266 = load i64, i64* %12
%267 = lshr i64 %266, 10
store i64 %267, i64* %13
%268 = load i32, i32* %18
%269 = sub nsw i32 %268, 14
%270 = sext i32 %269 to i64
%271 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %270
%272 = load i64, i64* %271
%273 = load i64, i64* %11
%274 = mul i64 %272, %273
%275 = load i64, i64* %13
%276 = add i64 %274, %275
store i64 %276, i64* %12
%277 = load i64, i64* %12
%278 = load i64, i64* %14
%279 = and i64 %277, %278
%280 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 4
store i64 %279, i64* %280
%281 = load i64, i64* %12
%282 = lshr i64 %281, 10
store i64 %282, i64* %13
%283 = load i32, i32* %18
%284 = sub nsw i32 %283, 15
%285 = sext i32 %284 to i64
%286 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %285
%287 = load i64, i64* %286
%288 = load i64, i64* %11
%289 = mul i64 %287, %288
%290 = load i64, i64* %13
%291 = add i64 %289, %290
store i64 %291, i64* %12
%292 = load i64, i64* %12
%293 = load i64, i64* %14
%294 = and i64 %292, %293
%295 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 3
store i64 %294, i64* %295
%296 = load i64, i64* %12
%297 = lshr i64 %296, 10
store i64 %297, i64* %13
%298 = load i32, i32* %18
%299 = sub nsw i32 %298, 16
%300 = sext i32 %299 to i64
%301 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %300
%302 = load i64, i64* %301
%303 = load i64, i64* %11
%304 = mul i64 %302, %303
%305 = load i64, i64* %13
%306 = add i64 %304, %305
store i64 %306, i64* %12
%307 = load i64, i64* %12
%308 = load i64, i64* %14
%309 = and i64 %307, %308
%310 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 2
store i64 %309, i64* %310
%311 = load i64, i64* %12
%312 = lshr i64 %311, 10
store i64 %312, i64* %13
%313 = load i32, i32* %18
%314 = sub nsw i32 %313, 17
%315 = sext i32 %314 to i64
%316 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %315
%317 = load i64, i64* %316
%318 = load i64, i64* %11
%319 = mul i64 %317, %318
%320 = load i64, i64* %13
%321 = add i64 %319, %320
store i64 %321, i64* %12
%322 = load i64, i64* %12
%323 = load i64, i64* %14
%324 = and i64 %322, %323
%325 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 1
store i64 %324, i64* %325
%326 = load i64, i64* %12
%327 = lshr i64 %326, 10
store i64 %327, i64* %13
%328 = load i32, i32* %18
%329 = sub nsw i32 %328, 18
%330 = sext i32 %329 to i64
%331 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %330
%332 = load i64, i64* %331
%333 = load i64, i64* %11
%334 = mul i64 %332, %333
%335 = load i64, i64* %13
%336 = add i64 %334, %335
store i64 %336, i64* %12
%337 = load i64, i64* %12
%338 = load i64, i64* %14
%339 = and i64 %337, %338
%340 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 0
store i64 %339, i64* %340
%341 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 0
%342 = load i64, i64* %341
%343 = shl i64 %342, 10
%344 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 1
%345 = load i64, i64* %344
%346 = or i64 %343, %345
%347 = load i32, i32* %22
%348 = sub nsw i32 9, %347
%349 = zext i32 %348 to i64
%350 = lshr i64 %346, %349
%351 = and i64 %350, 7
%352 = trunc i64 %351 to i32
store i32 %352, i32* %23
%353 = load i32, i32* %23
%354 = and i32 %353, 1
store i32 %354, i32* %24
store i32 1, i32* %19
%355 = load i32, i32* %24
%356 = icmp ne i32 %355, 0
br i1 %356, label %357, label %397
357: ; preds = %4
%358 = load i32, i32* %23
%359 = ashr i32 %358, 1
%360 = add nsw i32 %359, 1
%361 = and i32 %360, 3
%362 = load i32*, i32** %8
store i32 %361, i32* %362
store i64 1, i64* %15
%363 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 1
%364 = load i64, i64* %363
%365 = xor i64 %364, -1
%366 = load i64, i64* %15
%367 = load i32, i32* %22
%368 = sub nsw i32 10, %367
%369 = zext i32 %368 to i64
%370 = shl i64 %366, %369
%371 = sub i64 %370, 1
%372 = and i64 %365, %371
store i64 %372, i64* %15
br label %373
373: ; preds = %376, %357
%374 = load i64, i64* %15
%375 = icmp ult i64 %374, 9007199254740992
br i1 %375, label %376, label %389
376: ; preds = %373
%377 = load i32, i32* %19
%378 = add nsw i32 %377, 1
store i32 %378, i32* %19
%379 = load i64, i64* %15
%380 = shl i64 %379, 10
%381 = load i32, i32* %19
%382 = sext i32 %381 to i64
%383 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 %382
%384 = load i64, i64* %383
%385 = xor i64 %384, -1
%386 = load i64, i64* %14
%387 = and i64 %385, %386
%388 = or i64 %380, %387
store i64 %388, i64* %15
br label %373
389: ; preds = %373
%390 = load i32, i32* %19
%391 = add nsw i32 %390, 1
%392 = sext i32 %391 to i64
%393 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 %392
%394 = load i64, i64* %393
%395 = xor i64 %394, -1
%396 = shl i64 %395, 54
store i64 %396, i64* %16
br label %430
397: ; preds = %4
%398 = load i32, i32* %23
%399 = ashr i32 %398, 1
%400 = load i32*, i32** %8
store i32 %399, i32* %400
store i64 1, i64* %15
%401 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 1
%402 = load i64, i64* %401
%403 = load i64, i64* %15
%404 = load i32, i32* %22
%405 = sub nsw i32 10, %404
%406 = zext i32 %405 to i64
%407 = shl i64 %403, %406
%408 = sub i64 %407, 1
%409 = and i64 %402, %408
store i64 %409, i64* %15
br label %410
410: ; preds = %413, %397
%411 = load i64, i64* %15
%412 = icmp ult i64 %411, 9007199254740992
br i1 %412, label %413, label %423
413: ; preds = %410
%414 = load i32, i32* %19
%415 = add nsw i32 %414, 1
store i32 %415, i32* %19
%416 = load i64, i64* %15
%417 = shl i64 %416, 10
%418 = load i32, i32* %19
%419 = sext i32 %418 to i64
%420 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 %419
%421 = load i64, i64* %420
%422 = or i64 %417, %421
store i64 %422, i64* %15
br label %410
423: ; preds = %410
%424 = load i32, i32* %19
%425 = add nsw i32 %424, 1
%426 = sext i32 %425 to i64
%427 = getelementptr inbounds [500 x i64], [500 x i64]* %10, i64 0, i64 %426
%428 = load i64, i64* %427
%429 = shl i64 %428, 54
store i64 %429, i64* %16
br label %430
430: ; preds = %423, %389
%431 = load i32, i32* %22
%432 = add nsw i32 52, %431
%433 = load i32, i32* %19
%434 = mul nsw i32 %433, 10
%435 = sub nsw i32 %432, %434
store i32 %435, i32* %20
br label %436
436: ; preds = %439, %430
%437 = load i64, i64* %15
%438 = icmp uge i64 %437, 9007199254740992
br i1 %438, label %439, label %450
439: ; preds = %436
%440 = load i32, i32* %20
%441 = add nsw i32 %440, 1
store i32 %441, i32* %20
%442 = load i64, i64* %16
%443 = lshr i64 %442, 1
%444 = load i64, i64* %15
%445 = and i64 %444, 1
%446 = shl i64 %445, 63
%447 = or i64 %443, %446
store i64 %447, i64* %16
%448 = load i64, i64* %15
%449 = lshr i64 %448, 1
store i64 %449, i64* %15
br label %436
450: ; preds = %436
%451 = load i32, i32* %20
%452 = sext i32 %451 to i64
%453 = add i64 %452, 1023
%454 = shl i64 %453, 52
store i64 %454, i64* %12
%455 = load i64, i64* %15
%456 = and i64 %455, 4503599627370495
%457 = load i64, i64* %12
%458 = or i64 %456, %457
store i64 %458, i64* %11
%459 = load i32, i32* %24
%460 = icmp ne i32 %459, 0
br i1 %460, label %461, label %464
461: ; preds = %450
%462 = load i64, i64* %11
%463 = or i64 %462, -9223372036854775808
store i64 %463, i64* %11
br label %464
464: ; preds = %461, %450
%465 = load i64, i64* %11
%466 = bitcast %union.anon.0* %28 to i64*
store volatile i64 %465, i64* %466
%467 = bitcast %union.anon.0* %28 to double*
%468 = load volatile double, double* %467
store double %468, double* %5
%469 = load i64, i64* %16
%470 = lshr i64 %469, 12
store i64 %470, i64* %16
%471 = load i32, i32* %20
%472 = sext i32 %471 to i64
%473 = add i64 %472, 1023
%474 = sub i64 %473, 53
%475 = shl i64 %474, 52
store i64 %475, i64* %12
%476 = load i64, i64* %12
%477 = bitcast %union.anon.1* %29 to i64*
store volatile i64 %476, i64* %477
%478 = bitcast %union.anon.1* %29 to double*
%479 = load volatile double, double* %478
store double %479, double* %26
%480 = load i64, i64* %16
%481 = load i64, i64* %12
%482 = or i64 %481, %480
store i64 %482, i64* %12
%483 = load i64, i64* %12
%484 = bitcast %union.anon.2* %30 to i64*
store volatile i64 %483, i64* %484
%485 = bitcast %union.anon.2* %30 to double*
%486 = load volatile double, double* %485
store double %486, double* %25
%487 = load double, double* %26
%488 = load double, double* %25
%489 = fsub double %488, %487
store double %489, double* %25
%490 = load i32, i32* %24
%491 = icmp ne i32 %490, 0
br i1 %491, label %492, label %495
492: ; preds = %464
%493 = load double, double* %25
%494 = fmul double %493, -2.000000e+00
store double %494, double* %25
br label %498
495: ; preds = %464
%496 = load double, double* %25
%497 = fmul double %496, 2.000000e+00
store double %497, double* %25
br label %498
498: ; preds = %495, %492
%499 = load double, double* %5
%500 = bitcast %union.anon.3* %35 to double*
store volatile double %499, double* %500
%501 = bitcast %union.anon.3* %35 to i64*
%502 = load volatile i64, i64* %501
store i64 %502, i64* %11
%503 = load i64, i64* %11
%504 = and i64 %503, -134217728
store i64 %504, i64* %11
%505 = load i64, i64* %11
%506 = bitcast %union.anon.4* %36 to i64*
store volatile i64 %505, i64* %506
%507 = bitcast %union.anon.4* %36 to double*
%508 = load volatile double, double* %507
store double %508, double* %31
%509 = load double, double* %5
%510 = load double, double* %31
%511 = fsub double %509, %510
store double %511, double* %32
%512 = load double, double* %5
%513 = fmul double 0x3FF921FB54442D18, %512
store double %513, double* %33
%514 = load double, double* %31
%515 = load double, double* %33
%516 = fneg double %515
%517 = call double @llvm.fmuladd.f64(double 0x3FF921FB50000000, double %514, double %516)
%518 = load double, double* %32
%519 = call double @llvm.fmuladd.f64(double 0x3FF921FB50000000, double %518, double %517)
%520 = load double, double* %31
%521 = call double @llvm.fmuladd.f64(double 0x3E5110B460000000, double %520, double %519)
%522 = load double, double* %32
%523 = call double @llvm.fmuladd.f64(double 0x3E5110B460000000, double %522, double %521)
%524 = load double, double* %25
%525 = load double, double* %5
%526 = fmul double 0x3C91A62633145C06, %525
%527 = call double @llvm.fmuladd.f64(double 0x3FF921FB54442D18, double %524, double %526)
%528 = fadd double %523, %527
store double %528, double* %34
%529 = load double, double* %33
%530 = load double, double* %34
%531 = fadd double %529, %530
%532 = load double*, double** %6
store double %531, double* %532
%533 = load double, double* %33
%534 = load double*, double** %6
%535 = load double, double* %534
%536 = fsub double %533, %535
%537 = load double, double* %34
%538 = fadd double %536, %537
%539 = load double*, double** %7
store double %538, double* %539
ret void
}

LLVM IR (-O2):
@__amd_remainder_piby2.pibits = internal unnamed_addr constant [126 x i64] [i64 0, i64 0, i64 0, i64 0, i64 0, i64 0, i64 162, i64 998, i64 54, i64 915, i64 580, i64 84, i64 671, i64 777, i64 855, i64 839, i64 851, i64 311, i64 448, i64 877, i64 553, i64 358, i64 316, i64 270, i64 260, i64 127, i64 593, i64 398, i64 701, i64 942, i64 965, i64 390, i64 882, i64 283, i64 570, i64 265, i64 221, i64 184, i64 6, i64 292, i64 750, i64 642, i64 465, i64 584, i64 463, i64 903, i64 491, i64 114, i64 786, i64 617, i64 830, i64 930, i64 35, i64 381, i64 302, i64 749, i64 72, i64 314, i64 412, i64 448, i64 619, i64 279, i64 894, i64 260, i64 921, i64 117, i64 569, i64 525, i64 307, i64 637, i64 156, i64 529, i64 504, i64 751, i64 505, i64 160, i64 945, i64 1022, i64 151, i64 1023, i64 480, i64 358, i64 15, i64 956, i64 753, i64 98, i64 858, i64 41, i64 721, i64 987, i64 310, i64 507, i64 242, i64 498, i64 777, i64 733, i64 244, i64 399, i64 870, i64 633, i64 510, i64 651, i64 373, i64 158, i64 940, i64 506, i64 997, i64 965, i64 947, i64 833, i64 825, i64 990, i64 165, i64 164, i64 746, i64 431, i64 949, i64 1004, i64 287, i64 565, i64 464, i64 533, i64 515, i64 193, i64 111, i64 798]
define void @__amd_remainder_piby2(double %0, double* nocapture writeonly %1, double* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = alloca [500 x i64]
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = bitcast [500 x i64]* %5 to i8*
%13 = bitcast double* %6 to i8*
store volatile double %0, double* %6
%14 = load volatile double, double* %6
%15 = bitcast double %14 to i64
%16 = lshr i64 %15, 52
%17 = trunc i64 %16 to i32
%18 = and i32 %17, 2047
%19 = add nsw i32 %18, -1023
%20 = and i64 %15, 4503599627370495
%21 = or i64 %20, 4503599627370496
%22 = trunc i32 %19 to i16
%23 = sdiv i16 %22, 10
%24 = sext i16 %23 to i32
%25 = mul nsw i32 %24, -10
%26 = add nsw i32 %25, %19
%27 = add nsw i32 %24, 18
%28 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 19
store i64 0, i64* %28
%29 = sext i32 %27 to i64
%30 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %29
%31 = load i64, i64* %30
%32 = mul i64 %31, %21
%33 = and i64 %32, 1023
%34 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 18
store i64 %33, i64* %34
%35 = lshr i64 %32, 10
%36 = add nsw i32 %24, 17
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %37
%39 = load i64, i64* %38
%40 = mul i64 %39, %21
%41 = add i64 %40, %35
%42 = and i64 %41, 1023
%43 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 17
store i64 %42, i64* %43
%44 = lshr i64 %41, 10
%45 = add nsw i32 %24, 16
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %46
%48 = load i64, i64* %47
%49 = mul i64 %48, %21
%50 = add i64 %49, %44
%51 = and i64 %50, 1023
%52 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 16
store i64 %51, i64* %52
%53 = lshr i64 %50, 10
%54 = add nsw i32 %24, 15
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %55
%57 = load i64, i64* %56
%58 = mul i64 %57, %21
%59 = add i64 %58, %53
%60 = and i64 %59, 1023
%61 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 15
store i64 %60, i64* %61
%62 = lshr i64 %59, 10
%63 = add nsw i32 %24, 14
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %64
%66 = load i64, i64* %65
%67 = mul i64 %66, %21
%68 = add i64 %67, %62
%69 = and i64 %68, 1023
%70 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 14
store i64 %69, i64* %70
%71 = lshr i64 %68, 10
%72 = add nsw i32 %24, 13
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %73
%75 = load i64, i64* %74
%76 = mul i64 %75, %21
%77 = add i64 %76, %71
%78 = and i64 %77, 1023
%79 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 13
store i64 %78, i64* %79
%80 = lshr i64 %77, 10
%81 = add nsw i32 %24, 12
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %82
%84 = load i64, i64* %83
%85 = mul i64 %84, %21
%86 = add i64 %85, %80
%87 = and i64 %86, 1023
%88 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 12
store i64 %87, i64* %88
%89 = lshr i64 %86, 10
%90 = add nsw i32 %24, 11
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %91
%93 = load i64, i64* %92
%94 = mul i64 %93, %21
%95 = add i64 %94, %89
%96 = and i64 %95, 1023
%97 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 11
store i64 %96, i64* %97
%98 = lshr i64 %95, 10
%99 = add nsw i32 %24, 10
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %100
%102 = load i64, i64* %101
%103 = mul i64 %102, %21
%104 = add i64 %103, %98
%105 = and i64 %104, 1023
%106 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 10
store i64 %105, i64* %106
%107 = lshr i64 %104, 10
%108 = add nsw i32 %24, 9
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %109
%111 = load i64, i64* %110
%112 = mul i64 %111, %21
%113 = add i64 %112, %107
%114 = and i64 %113, 1023
%115 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 9
store i64 %114, i64* %115
%116 = lshr i64 %113, 10
%117 = add nsw i32 %24, 8
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %118
%120 = load i64, i64* %119
%121 = mul i64 %120, %21
%122 = add i64 %121, %116
%123 = and i64 %122, 1023
%124 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 8
store i64 %123, i64* %124
%125 = lshr i64 %122, 10
%126 = add nsw i32 %24, 7
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %127
%129 = load i64, i64* %128
%130 = mul i64 %129, %21
%131 = add i64 %130, %125
%132 = and i64 %131, 1023
%133 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 7
store i64 %132, i64* %133
%134 = lshr i64 %131, 10
%135 = add nsw i32 %24, 6
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %136
%138 = load i64, i64* %137
%139 = mul i64 %138, %21
%140 = add i64 %139, %134
%141 = and i64 %140, 1023
%142 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 6
store i64 %141, i64* %142
%143 = lshr i64 %140, 10
%144 = add nsw i32 %24, 5
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %145
%147 = load i64, i64* %146
%148 = mul i64 %147, %21
%149 = add i64 %148, %143
%150 = and i64 %149, 1023
%151 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 5
store i64 %150, i64* %151
%152 = lshr i64 %149, 10
%153 = add nsw i32 %24, 4
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %154
%156 = load i64, i64* %155
%157 = mul i64 %156, %21
%158 = add i64 %157, %152
%159 = and i64 %158, 1023
%160 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 4
store i64 %159, i64* %160
%161 = lshr i64 %158, 10
%162 = add nsw i32 %24, 3
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %163
%165 = load i64, i64* %164
%166 = mul i64 %165, %21
%167 = add i64 %166, %161
%168 = and i64 %167, 1023
%169 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 3
store i64 %168, i64* %169
%170 = lshr i64 %167, 10
%171 = add nsw i32 %24, 2
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %172
%174 = load i64, i64* %173
%175 = mul i64 %174, %21
%176 = add i64 %175, %170
%177 = and i64 %176, 1023
%178 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 2
store i64 %177, i64* %178
%179 = lshr i64 %176, 10
%180 = add nsw i32 %24, 1
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %181
%183 = load i64, i64* %182
%184 = mul i64 %183, %21
%185 = add i64 %184, %179
%186 = and i64 %185, 1023
%187 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 1
store i64 %186, i64* %187
%188 = lshr i64 %185, 10
%189 = sext i16 %23 to i64
%190 = getelementptr inbounds [126 x i64], [126 x i64]* @__amd_remainder_piby2.pibits, i64 0, i64 %189
%191 = load i64, i64* %190
%192 = mul i64 %191, %21
%193 = add i64 %192, %188
%194 = and i64 %193, 1023
%195 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 0
store i64 %194, i64* %195
%196 = shl nuw nsw i64 %194, 10
%197 = or i64 %196, %186
%198 = sub nsw i32 9, %26
%199 = zext i32 %198 to i64
%200 = lshr i64 %197, %199
%201 = trunc i64 %200 to i32
%202 = and i32 %201, 1
%203 = icmp eq i32 %202, 0
%204 = lshr i32 %201, 1
br i1 %203, label %227, label %205
205: ; preds = %4
%206 = add nuw i32 %204, 1
%207 = and i32 %206, 3
store i32 %207, i32* %3
%208 = sub nsw i32 10, %26
%209 = zext i32 %208 to i64
%210 = shl nsw i64 -1, %209
%211 = or i64 %186, %210
%212 = xor i64 %211, -1
%213 = icmp ugt i64 %211, -9007199254740993
br i1 %213, label %214, label %253
214: ; preds = %205, %214
%215 = phi i64 [ %217, %214 ], [ 1, %205 ]
%216 = phi i64 [ %223, %214 ], [ %212, %205 ]
%217 = add nuw nsw i64 %215, 1
%218 = shl nuw nsw i64 %216, 10
%219 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 %217
%220 = load i64, i64* %219
%221 = and i64 %220, 1023
%222 = or i64 %221, %218
%223 = xor i64 %222, 1023
%224 = icmp ult i64 %223, 9007199254740992
br i1 %224, label %214, label %225
225: ; preds = %214
%226 = trunc i64 %217 to i32
br label %253
227: ; preds = %4
%228 = and i32 %204, 3
store i32 %228, i32* %3
%229 = sub nsw i32 10, %26
%230 = zext i32 %229 to i64
%231 = shl nsw i64 -1, %230
%232 = xor i64 %231, -1
%233 = and i64 %186, %232
br label %234
234: ; preds = %234, %227
%235 = phi i64 [ 1, %227 ], [ %237, %234 ]
%236 = phi i64 [ %233, %227 ], [ %241, %234 ]
%237 = add nuw nsw i64 %235, 1
%238 = shl nuw nsw i64 %236, 10
%239 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 %237
%240 = load i64, i64* %239
%241 = or i64 %240, %238
%242 = icmp ult i64 %241, 9007199254740992
br i1 %242, label %234, label %243
243: ; preds = %234
%244 = trunc i64 %237 to i32
%245 = add nuw i64 %235, 2
%246 = and i64 %245, 4294967295
%247 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 %246
%248 = load i64, i64* %247
%249 = shl i64 %248, 54
%250 = add nsw i32 %26, 52
%251 = mul i32 %244, -10
%252 = add i32 %250, %251
br label %266
253: ; preds = %205, %225
%254 = phi i32 [ 1, %205 ], [ %226, %225 ]
%255 = phi i64 [ %212, %205 ], [ %223, %225 ]
%256 = add nuw nsw i32 %254, 1
%257 = zext i32 %256 to i64
%258 = getelementptr inbounds [500 x i64], [500 x i64]* %5, i64 0, i64 %257
%259 = load i64, i64* %258
%260 = xor i64 %259, -1
%261 = shl i64 %260, 54
%262 = add nsw i32 %26, 52
%263 = mul i32 %254, -10
%264 = add i32 %262, %263
%265 = icmp ugt i64 %255, 9007199254740991
br i1 %265, label %266, label %278
266: ; preds = %243, %253
%267 = phi i64 [ %255, %253 ], [ %241, %243 ]
%268 = phi i64 [ %261, %253 ], [ %249, %243 ]
%269 = phi i32 [ %264, %253 ], [ %252, %243 ]
br label %270
270: ; preds = %266, %270
%271 = phi i64 [ %276, %270 ], [ %267, %266 ]
%272 = phi i64 [ %275, %270 ], [ %268, %266 ]
%273 = phi i32 [ %274, %270 ], [ %269, %266 ]
%274 = add nsw i32 %273, 1
%275 = tail call i64 @llvm.fshl.i64(i64 %271, i64 %272, i64 63)
%276 = lshr i64 %271, 1
%277 = icmp ugt i64 %271, 18014398509481983
br i1 %277, label %270, label %278
278: ; preds = %270, %253
%279 = phi i32 [ %264, %253 ], [ %274, %270 ]
%280 = phi i64 [ %261, %253 ], [ %275, %270 ]
%281 = phi i64 [ %255, %253 ], [ %276, %270 ]
%282 = zext i32 %279 to i64
%283 = shl i64 %282, 52
%284 = add i64 %283, 4607182418800017408
%285 = and i64 %281, 4503599627370495
%286 = or i64 %285, %284
%287 = or i64 %286, -9223372036854775808
%288 = select i1 %203, i64 %286, i64 %287
%289 = bitcast double* %7 to i8*
%290 = bitcast i64 %288 to double
store volatile double %290, double* %7
%291 = load volatile double, double* %7
%292 = lshr i64 %280, 12
%293 = add i64 %283, 4368491638549381120
%294 = bitcast double* %8 to i8*
%295 = bitcast i64 %293 to double
store volatile double %295, double* %8
%296 = load volatile double, double* %8
%297 = or i64 %293, %292
%298 = bitcast double* %9 to i8*
%299 = bitcast i64 %297 to double
store volatile double %299, double* %9
%300 = load volatile double, double* %9
%301 = fsub double %300, %296
%302 = select i1 %203, double 2.000000e+00, double -2.000000e+00
%303 = fmul double %302, %301
%304 = bitcast double* %10 to i8*
store volatile double %291, double* %10
%305 = load volatile double, double* %10
%306 = bitcast double %305 to i64
%307 = and i64 %306, -134217728
%308 = bitcast double* %11 to i8*
%309 = bitcast i64 %307 to double
store volatile double %309, double* %11
%310 = load volatile double, double* %11
%311 = fsub double %291, %310
%312 = fmul double %291, 0x3FF921FB54442D18
%313 = fneg double %312
%314 = tail call double @llvm.fmuladd.f64(double %310, double 0x3FF921FB50000000, double %313)
%315 = tail call double @llvm.fmuladd.f64(double %311, double 0x3FF921FB50000000, double %314)
%316 = tail call double @llvm.fmuladd.f64(double %310, double 0x3E5110B460000000, double %315)
%317 = tail call double @llvm.fmuladd.f64(double %311, double 0x3E5110B460000000, double %316)
%318 = fmul double %291, 0x3C91A62633145C06
%319 = tail call double @llvm.fmuladd.f64(double %303, double 0x3FF921FB54442D18, double %318)
%320 = fadd double %319, %317
%321 = fadd double %312, %320
store double %321, double* %1
%322 = fsub double %312, %321
%323 = fadd double %320, %322
store double %323, double* %2
ret void
}