int ereflect(filt, x_dim, y_dim, x_pos, y_pos, result, f_or_e)
register double *filt, *result;
register int x_dim;
int y_dim, x_pos, y_pos, f_or_e;
{
  register int y_filt, x_filt, y_edge, x_edge;
  register int x_base = (x_pos > 0) ? (x_dim - 1) : 0;
  register int y_base = x_dim * ((y_pos > 0) ? (y_dim - 1) : 0);
  int filt_sz = x_dim * y_dim;
  int x_edge_dist =
      (x_pos > 1) ? (x_pos - x_dim) : ((x_pos < -1) ? (x_pos + 1) : 0);
  int y_edge_dist = x_dim * ((y_pos > 1) ? (y_pos - y_dim)
                                         : ((y_pos < -1) ? (y_pos + 1) : 0));
  int i;
  double norm, onorm;
  for (i = 0; i < filt_sz; i++)
    result[i] = 0.0;
  for (y_filt = 0, y_edge = y_edge_dist; y_filt < filt_sz;
       y_filt += x_dim, y_edge += x_dim)
    for (x_filt = y_filt, x_edge = x_edge_dist; x_filt < y_filt + x_dim;
         x_filt++, x_edge++)
      result[(((y_base - (((y_edge) >= 0) ? (y_edge) : (-(y_edge)))) >= 0)
                  ? (y_base - (((y_edge) >= 0) ? (y_edge) : (-(y_edge))))
                  : (-(y_base - (((y_edge) >= 0) ? (y_edge) : (-(y_edge)))))) +
             (((x_base - (((x_edge) >= 0) ? (x_edge) : (-(x_edge)))) >= 0)
                  ? (x_base - (((x_edge) >= 0) ? (x_edge) : (-(x_edge))))
                  : (-(x_base -
                       (((x_edge) >= 0) ? (x_edge) : (-(x_edge))))))] +=
          filt[x_filt];
  if (x_pos != 0)
    for (y_filt = x_base; y_filt < filt_sz; y_filt += x_dim)
      result[y_filt] *= 1.4142135623730951;
  if (y_pos != 0)
    for (x_filt = y_base; x_filt < y_base + x_dim; x_filt++)
      result[x_filt] *= 1.4142135623730951;
  for (norm = 0.0, i = 0; i < filt_sz; i++)
    norm += (result[i] * result[i]);
  norm = sqrt(norm);
  for (onorm = 0.0, i = 0; i < filt_sz; i++)
    onorm += (filt[i] * filt[i]);
  onorm = sqrt(onorm);
  norm = norm / onorm;
  for (i = 0; i < filt_sz; i++)
    result[i] /= norm;
  return (0);
}


x86 assembly (clang, -O0):
<ereflect>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    114b <ereflect+0x3b>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1155 <ereflect+0x45>
xor    %eax,%eax
mov    %eax,-0x5c(%rbp)
jmp    1155 <ereflect+0x45>
mov    -0x5c(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x60(%rbp)
cmpl   $0x0,-0x18(%rbp)
jle    1179 <ereflect+0x69>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1183 <ereflect+0x73>
xor    %eax,%eax
mov    %eax,-0x64(%rbp)
jmp    1183 <ereflect+0x73>
mov    -0x60(%rbp),%eax
mov    -0x64(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0x38(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x3c(%rbp)
cmpl   $0x1,-0x14(%rbp)
jle    11b1 <ereflect+0xa1>
mov    -0x14(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x68(%rbp)
jmp    11d9 <ereflect+0xc9>
cmpl   $0xffffffff,-0x14(%rbp)
jge    11c9 <ereflect+0xb9>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    11d3 <ereflect+0xc3>
xor    %eax,%eax
mov    %eax,-0x6c(%rbp)
jmp    11d3 <ereflect+0xc3>
mov    -0x6c(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x70(%rbp)
cmpl   $0x1,-0x18(%rbp)
jle    11fd <ereflect+0xed>
mov    -0x18(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x74(%rbp)
jmp    1225 <ereflect+0x115>
cmpl   $0xffffffff,-0x18(%rbp)
jge    1215 <ereflect+0x105>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    121f <ereflect+0x10f>
xor    %eax,%eax
mov    %eax,-0x78(%rbp)
jmp    121f <ereflect+0x10f>
mov    -0x78(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x70(%rbp),%eax
mov    -0x74(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1262 <ereflect+0x152>
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1238 <ereflect+0x128>
movl   $0x0,-0x24(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    14b3 <ereflect+0x3a3>
mov    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x40(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x24(%rbp),%ecx
add    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    1497 <ereflect+0x387>
mov    -0x8(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x20(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0x7c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jl     12d6 <ereflect+0x1c6>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x94(%rbp)
jmp    12e1 <ereflect+0x1d1>
xor    %eax,%eax
sub    -0x2c(%rbp),%eax
mov    %eax,-0x94(%rbp)
mov    -0x7c(%rbp),%eax
mov    -0x94(%rbp),%ecx
sub    %ecx,%eax
cmp    $0x0,%eax
jl     133a <ereflect+0x22a>
mov    -0x38(%rbp),%eax
mov    %eax,-0x98(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jl     1316 <ereflect+0x206>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x9c(%rbp)
jmp    1321 <ereflect+0x211>
xor    %eax,%eax
sub    -0x2c(%rbp),%eax
mov    %eax,-0x9c(%rbp)
mov    -0x98(%rbp),%eax
mov    -0x9c(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0xa0(%rbp)
jmp    137e <ereflect+0x26e>
mov    -0x38(%rbp),%eax
mov    %eax,-0xa4(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jl     135b <ereflect+0x24b>
mov    -0x2c(%rbp),%eax
mov    %eax,-0xa8(%rbp)
jmp    1366 <ereflect+0x256>
xor    %eax,%eax
sub    -0x2c(%rbp),%eax
mov    %eax,-0xa8(%rbp)
mov    -0xa4(%rbp),%ecx
mov    -0xa8(%rbp),%eax
sub    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0xa0(%rbp)
mov    -0xa0(%rbp),%eax
mov    %eax,-0xb0(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0xac(%rbp)
cmpl   $0x0,-0x30(%rbp)
jl     13ab <ereflect+0x29b>
mov    -0x30(%rbp),%eax
mov    %eax,-0xb4(%rbp)
jmp    13b6 <ereflect+0x2a6>
xor    %eax,%eax
sub    -0x30(%rbp),%eax
mov    %eax,-0xb4(%rbp)
mov    -0xac(%rbp),%eax
mov    -0xb4(%rbp),%ecx
sub    %ecx,%eax
cmp    $0x0,%eax
jl     1412 <ereflect+0x302>
mov    -0x34(%rbp),%eax
mov    %eax,-0xb8(%rbp)
cmpl   $0x0,-0x30(%rbp)
jl     13ee <ereflect+0x2de>
mov    -0x30(%rbp),%eax
mov    %eax,-0xbc(%rbp)
jmp    13f9 <ereflect+0x2e9>
xor    %eax,%eax
sub    -0x30(%rbp),%eax
mov    %eax,-0xbc(%rbp)
mov    -0xb8(%rbp),%eax
mov    -0xbc(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0xc0(%rbp)
jmp    1456 <ereflect+0x346>
mov    -0x34(%rbp),%eax
mov    %eax,-0xc4(%rbp)
cmpl   $0x0,-0x30(%rbp)
jl     1433 <ereflect+0x323>
mov    -0x30(%rbp),%eax
mov    %eax,-0xc8(%rbp)
jmp    143e <ereflect+0x32e>
xor    %eax,%eax
sub    -0x30(%rbp),%eax
mov    %eax,-0xc8(%rbp)
mov    -0xc4(%rbp),%ecx
mov    -0xc8(%rbp),%eax
sub    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0xc0(%rbp)
mov    -0x88(%rbp),%rax
movsd  -0x90(%rbp),%xmm0
ff
mov    -0xb0(%rbp),%ecx
mov    -0xc0(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1287 <ereflect+0x177>
jmp    149c <ereflect+0x38c>
mov    -0xc(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0xc(%rbp),%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    126f <ereflect+0x15f>
cmpl   $0x0,-0x14(%rbp)
je     14fc <ereflect+0x3ec>
mov    -0x34(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    14f7 <ereflect+0x3e7>
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  0xb21(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    14c3 <ereflect+0x3b3>
jmp    14fc <ereflect+0x3ec>
cmpl   $0x0,-0x18(%rbp)
je     154a <ereflect+0x43a>
mov    -0x38(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x38(%rbp),%ecx
add    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    1545 <ereflect+0x435>
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  0xad3(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    150c <ereflect+0x3fc>
jmp    154a <ereflect+0x43a>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    159f <ereflect+0x48f>
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1559 <ereflect+0x449>
movsd  -0x50(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1603 <ereflect+0x4f3>
mov    -0x8(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    15bd <ereflect+0x4ad>
movsd  -0x58(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm0
divsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    165d <ereflect+0x54d>
movsd  -0x50(%rbp),%xmm1
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1628 <ereflect+0x518>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ereflect>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %esi,%r11d
lea    -0x1(%r11),%r13d
xor    %r12d,%r12d
test   %ecx,%ecx
cmovle %r12d,%r13d
lea    -0x1(%rdx),%eax
test   %r8d,%r8d
cmovle %r12d,%eax
imul   %esi,%eax
mov    %eax,0x10(%rsp)
mov    %edx,%esi
imul   %r11d,%esi
mov    %ecx,%eax
sub    %r11d,%eax
lea    0x1(%rcx),%ebp
cmp    $0xffffffff,%ecx
cmovge %r12d,%ebp
mov    %rcx,0x40(%rsp)
cmp    $0x2,%ecx
cmovge %eax,%ebp
mov    %ebp,0xc(%rsp)
mov    %r9,%rbx
mov    %rdi,%r14
mov    %esi,%r10d
movslq %r11d,%rbp
mov    %esi,0x8(%rsp)
test   %esi,%esi
jle    1241 <ereflect+0x121>
mov    %r8d,%eax
sub    %edx,%eax
lea    0x1(%r8),%r15d
cmp    $0xffffffff,%r8d
cmovge %r12d,%r15d
cmp    $0x2,%r8d
cmovge %eax,%r15d
imul   %r11d,%r15d
lea    0x0(,%r10,8),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r10,0x38(%rsp)
mov    %r11,0x30(%rsp)
mov    %r8,0x28(%rsp)
call   1030 <memset@plt>
mov    0x28(%rsp),%r8
mov    0x30(%rsp),%r11
mov    0x38(%rsp),%r10
jmp    11eb <ereflect+0xcb>
nopw   0x0(%rax,%rax,1)
add    %r11d,%r15d
mov    %rax,%r12
cmp    %r10,%rax
jge    1241 <ereflect+0x121>
lea    (%r12,%rbp,1),%rax
test   %ebp,%ebp
jle    11e0 <ereflect+0xc0>
mov    %r15d,%edx
neg    %edx
cmovns %r15d,%edx
add    0x10(%rsp),%edx
mov    %edx,%ecx
neg    %ecx
cmovs  %edx,%ecx
mov    0xc(%rsp),%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%esi
neg    %esi
cmovns %edx,%esi
add    %r13d,%esi
mov    %esi,%edi
neg    %edi
cmovs  %esi,%edi
movsd  (%r14,%r12,8),%xmm0
add    %ecx,%edi
addsd  (%rbx,%rdi,8),%xmm0
movsd  %xmm0,(%rbx,%rdi,8)
add    $0x1,%r12
add    $0x1,%edx
cmp    %rax,%r12
jl     1210 <ereflect+0xf0>
jmp    11e0 <ereflect+0xc0>
cmpl   $0x0,0x40(%rsp)
mov    0x8(%rsp),%r12d
je     1276 <ereflect+0x156>
cmp    %r12d,%r13d
jge    1276 <ereflect+0x156>
movslq %r13d,%rax
movslq %r12d,%rcx
movsd  0xda0(%rip),%xmm0
movsd  (%rbx,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rax,8)
add    %rbp,%rax
cmp    %rcx,%rax
jl     1260 <ereflect+0x140>
test   %r8d,%r8d
je     1397 <ereflect+0x277>
test   %r11d,%r11d
jle    1397 <ereflect+0x277>
mov    0x10(%rsp),%eax
add    %eax,%r11d
cltq
movslq %r11d,%rcx
lea    0x1(%rax),%rdx
cmp    %rcx,%rdx
cmovle %rcx,%rdx
sub    %rax,%rdx
cmp    $0x4,%rdx
jb     136f <ereflect+0x24f>
mov    %rdx,%r8
and    $0xfffffffffffffffc,%r8
lea    -0x4(%r8),%rsi
mov    %rsi,%r9
shr    $0x2,%r9
add    $0x1,%r9
test   %rsi,%rsi
je     15d8 <ereflect+0x4b8>
mov    %r9,%rbp
and    $0xfffffffffffffffe,%rbp
lea    (%rbx,%rax,8),%rsi
add    $0x30,%rsi
xor    %edi,%edi
movapd 0xd2c(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movupd -0x30(%rsi,%rdi,8),%xmm1
movupd -0x20(%rsi,%rdi,8),%xmm2
movupd -0x10(%rsi,%rdi,8),%xmm3
movupd (%rsi,%rdi,8),%xmm4
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,-0x30(%rsi,%rdi,8)
movupd %xmm2,-0x20(%rsi,%rdi,8)
mulpd  %xmm0,%xmm3
mulpd  %xmm0,%xmm4
movupd %xmm3,-0x10(%rsi,%rdi,8)
movupd %xmm4,(%rsi,%rdi,8)
add    $0x8,%rdi
add    $0xfffffffffffffffe,%rbp
jne    12f0 <ereflect+0x1d0>
test   $0x1,%r9b
je     1367 <ereflect+0x247>
add    %rax,%rdi
movupd (%rbx,%rdi,8),%xmm0
movupd 0x10(%rbx,%rdi,8),%xmm1
movapd 0xcbc(%rip),%xmm2
mulpd  %xmm2,%xmm0
mulpd  %xmm2,%xmm1
movupd %xmm0,(%rbx,%rdi,8)
movupd %xmm1,0x10(%rbx,%rdi,8)
cmp    %r8,%rdx
je     1397 <ereflect+0x277>
add    %r8,%rax
movsd  0xc89(%rip),%xmm0
nopw   0x0(%rax,%rax,1)
movsd  (%rbx,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rax,8)
add    $0x1,%rax
cmp    %rcx,%rax
jl     1380 <ereflect+0x260>
test   %r12d,%r12d
jle    15c7 <ereflect+0x4a7>
lea    -0x1(%r10),%r15
mov    %r10d,%eax
and    $0x3,%eax
cmp    $0x3,%r15
jae    13b8 <ereflect+0x298>
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
jmp    1410 <ereflect+0x2f0>
mov    %r10d,%edx
and    $0xfffffffc,%edx
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rbx,%rcx,8),%xmm1
movsd  0x8(%rbx,%rcx,8),%xmm2
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm2
addsd  %xmm1,%xmm2
movsd  0x10(%rbx,%rcx,8),%xmm1
mulsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
movsd  0x18(%rbx,%rcx,8),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
add    $0x4,%rcx
cmp    %rcx,%rdx
jne    13d0 <ereflect+0x2b0>
test   %rax,%rax
je     1436 <ereflect+0x316>
lea    (%rbx,%rcx,8),%rcx
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movsd  (%rcx,%rdx,8),%xmm1
mulsd  %xmm1,%xmm1
addsd  %xmm1,%xmm0
add    $0x1,%rdx
cmp    %rdx,%rax
jne    1420 <ereflect+0x300>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1451 <ereflect+0x331>
xorps  %xmm3,%xmm3
sqrtsd %xmm0,%xmm3
test   %r12d,%r12d
jg     1469 <ereflect+0x349>
jmp    15c7 <ereflect+0x4a7>
mov    %r10,%rbp
call   1040 <sqrt@plt>
mov    %rbp,%r10
movapd %xmm0,%xmm3
test   %r12d,%r12d
jle    15c7 <ereflect+0x4a7>
mov    %r10d,%eax
and    $0x3,%eax
cmp    $0x3,%r15
jae    147d <ereflect+0x35d>
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
jmp    14d4 <ereflect+0x3b4>
mov    %r10d,%edx
and    $0xfffffffc,%edx
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
nopl   0x0(%rax)
movsd  (%r14,%rcx,8),%xmm1
movsd  0x8(%r14,%rcx,8),%xmm2
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm2
addsd  %xmm1,%xmm2
movsd  0x10(%r14,%rcx,8),%xmm1
mulsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
movsd  0x18(%r14,%rcx,8),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
add    $0x4,%rcx
cmp    %rcx,%rdx
jne    1490 <ereflect+0x370>
test   %rax,%rax
je     14f6 <ereflect+0x3d6>
lea    (%r14,%rcx,8),%rcx
xor    %edx,%edx
nop
movsd  (%rcx,%rdx,8),%xmm1
mulsd  %xmm1,%xmm1
addsd  %xmm1,%xmm0
add    $0x1,%rdx
cmp    %rdx,%rax
jne    14e0 <ereflect+0x3c0>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     150e <ereflect+0x3ee>
sqrtsd %xmm0,%xmm0
test   %r12d,%r12d
jg     152e <ereflect+0x40e>
jmp    15c7 <ereflect+0x4a7>
mov    %r10,%rbp
movapd %xmm3,0x10(%rsp)
call   1040 <sqrt@plt>
movapd 0x10(%rsp),%xmm3
mov    %rbp,%r10
test   %r12d,%r12d
jle    15c7 <ereflect+0x4a7>
divsd  %xmm0,%xmm3
cmp    $0x1,%r12d
jne    153c <ereflect+0x41c>
xor    %eax,%eax
jmp    15b0 <ereflect+0x490>
mov    %r10d,%eax
and    $0xfffffffe,%eax
movapd %xmm3,%xmm0
unpcklpd %xmm3,%xmm0
lea    -0x2(%rax),%rdx
mov    %rdx,%rcx
shr    %rcx
add    $0x1,%rcx
test   %rdx,%rdx
je     15e9 <ereflect+0x4c9>
mov    %rcx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
movupd (%rbx,%rdx,8),%xmm1
movupd 0x10(%rbx,%rdx,8),%xmm2
divpd  %xmm0,%xmm1
movupd %xmm1,(%rbx,%rdx,8)
divpd  %xmm0,%xmm2
movupd %xmm2,0x10(%rbx,%rdx,8)
add    $0x4,%rdx
add    $0xfffffffffffffffe,%rsi
jne    1570 <ereflect+0x450>
test   $0x1,%cl
je     15ab <ereflect+0x48b>
movupd (%rbx,%rdx,8),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,(%rbx,%rdx,8)
cmp    %r10,%rax
je     15c7 <ereflect+0x4a7>
movsd  (%rbx,%rax,8),%xmm0
divsd  %xmm3,%xmm0
movsd  %xmm0,(%rbx,%rax,8)
add    $0x1,%rax
cmp    %rax,%r10
jne    15b0 <ereflect+0x490>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edi,%edi
test   $0x1,%r9b
jne    133e <ereflect+0x21e>
jmp    1367 <ereflect+0x247>
xor    %edx,%edx
test   $0x1,%cl
jne    159d <ereflect+0x47d>
jmp    15ab <ereflect+0x48b>

LLVM IR (-O0):
define i32 @ereflect(double* %0, i32 %1, i32 %2, i32 %3, i32 %4, double* %5, i32 %6) {
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca double*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%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
store double* %0, double** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store double* %5, double** %13
store i32 %6, i32* %14
%27 = load i32, i32* %11
%28 = icmp sgt i32 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %7
%30 = load i32, i32* %9
%31 = sub nsw i32 %30, 1
br label %33
32: ; preds = %7
br label %33
33: ; preds = %32, %29
%34 = phi i32 [ %31, %29 ], [ 0, %32 ]
store i32 %34, i32* %19
%35 = load i32, i32* %9
%36 = load i32, i32* %12
%37 = icmp sgt i32 %36, 0
br i1 %37, label %38, label %41
38: ; preds = %33
%39 = load i32, i32* %10
%40 = sub nsw i32 %39, 1
br label %42
41: ; preds = %33
br label %42
42: ; preds = %41, %38
%43 = phi i32 [ %40, %38 ], [ 0, %41 ]
%44 = mul nsw i32 %35, %43
store i32 %44, i32* %20
%45 = load i32, i32* %9
%46 = load i32, i32* %10
%47 = mul nsw i32 %45, %46
store i32 %47, i32* %21
%48 = load i32, i32* %11
%49 = icmp sgt i32 %48, 1
br i1 %49, label %50, label %54
50: ; preds = %42
%51 = load i32, i32* %11
%52 = load i32, i32* %9
%53 = sub nsw i32 %51, %52
br label %63
54: ; preds = %42
%55 = load i32, i32* %11
%56 = icmp slt i32 %55, -1
br i1 %56, label %57, label %60
57: ; preds = %54
%58 = load i32, i32* %11
%59 = add nsw i32 %58, 1
br label %61
60: ; preds = %54
br label %61
61: ; preds = %60, %57
%62 = phi i32 [ %59, %57 ], [ 0, %60 ]
br label %63
63: ; preds = %61, %50
%64 = phi i32 [ %53, %50 ], [ %62, %61 ]
store i32 %64, i32* %22
%65 = load i32, i32* %9
%66 = load i32, i32* %12
%67 = icmp sgt i32 %66, 1
br i1 %67, label %68, label %72
68: ; preds = %63
%69 = load i32, i32* %12
%70 = load i32, i32* %10
%71 = sub nsw i32 %69, %70
br label %81
72: ; preds = %63
%73 = load i32, i32* %12
%74 = icmp slt i32 %73, -1
br i1 %74, label %75, label %78
75: ; preds = %72
%76 = load i32, i32* %12
%77 = add nsw i32 %76, 1
br label %79
78: ; preds = %72
br label %79
79: ; preds = %78, %75
%80 = phi i32 [ %77, %75 ], [ 0, %78 ]
br label %81
81: ; preds = %79, %68
%82 = phi i32 [ %71, %68 ], [ %80, %79 ]
%83 = mul nsw i32 %65, %82
store i32 %83, i32* %23
store i32 0, i32* %24
br label %84
84: ; preds = %93, %81
%85 = load i32, i32* %24
%86 = load i32, i32* %21
%87 = icmp slt i32 %85, %86
br i1 %87, label %88, label %96
88: ; preds = %84
%89 = load double*, double** %13
%90 = load i32, i32* %24
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds double, double* %89, i64 %91
store double 0.000000e+00, double* %92
br label %93
93: ; preds = %88
%94 = load i32, i32* %24
%95 = add nsw i32 %94, 1
store i32 %95, i32* %24
br label %84
96: ; preds = %84
store i32 0, i32* %15
%97 = load i32, i32* %23
store i32 %97, i32* %17
br label %98
98: ; preds = %207, %96
%99 = load i32, i32* %15
%100 = load i32, i32* %21
%101 = icmp slt i32 %99, %100
br i1 %101, label %102, label %214
102: ; preds = %98
%103 = load i32, i32* %15
store i32 %103, i32* %16
%104 = load i32, i32* %22
store i32 %104, i32* %18
br label %105
105: ; preds = %201, %102
%106 = load i32, i32* %16
%107 = load i32, i32* %15
%108 = load i32, i32* %9
%109 = add nsw i32 %107, %108
%110 = icmp slt i32 %106, %109
br i1 %110, label %111, label %206
111: ; preds = %105
%112 = load double*, double** %8
%113 = load i32, i32* %16
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds double, double* %112, i64 %114
%116 = load double, double* %115
%117 = load double*, double** %13
%118 = load i32, i32* %20
%119 = load i32, i32* %17
%120 = icmp sge i32 %119, 0
br i1 %120, label %121, label %123
121: ; preds = %111
%122 = load i32, i32* %17
br label %126
123: ; preds = %111
%124 = load i32, i32* %17
%125 = sub nsw i32 0, %124
br label %126
126: ; preds = %123, %121
%127 = phi i32 [ %122, %121 ], [ %125, %123 ]
%128 = sub nsw i32 %118, %127
%129 = icmp sge i32 %128, 0
br i1 %129, label %130, label %142
130: ; preds = %126
%131 = load i32, i32* %20
%132 = load i32, i32* %17
%133 = icmp sge i32 %132, 0
br i1 %133, label %134, label %136
134: ; preds = %130
%135 = load i32, i32* %17
br label %139
136: ; preds = %130
%137 = load i32, i32* %17
%138 = sub nsw i32 0, %137
br label %139
139: ; preds = %136, %134
%140 = phi i32 [ %135, %134 ], [ %138, %136 ]
%141 = sub nsw i32 %131, %140
br label %155
142: ; preds = %126
%143 = load i32, i32* %20
%144 = load i32, i32* %17
%145 = icmp sge i32 %144, 0
br i1 %145, label %146, label %148
146: ; preds = %142
%147 = load i32, i32* %17
br label %151
148: ; preds = %142
%149 = load i32, i32* %17
%150 = sub nsw i32 0, %149
br label %151
151: ; preds = %148, %146
%152 = phi i32 [ %147, %146 ], [ %150, %148 ]
%153 = sub nsw i32 %143, %152
%154 = sub nsw i32 0, %153
br label %155
155: ; preds = %151, %139
%156 = phi i32 [ %141, %139 ], [ %154, %151 ]
%157 = load i32, i32* %19
%158 = load i32, i32* %18
%159 = icmp sge i32 %158, 0
br i1 %159, label %160, label %162
160: ; preds = %155
%161 = load i32, i32* %18
br label %165
162: ; preds = %155
%163 = load i32, i32* %18
%164 = sub nsw i32 0, %163
br label %165
165: ; preds = %162, %160
%166 = phi i32 [ %161, %160 ], [ %164, %162 ]
%167 = sub nsw i32 %157, %166
%168 = icmp sge i32 %167, 0
br i1 %168, label %169, label %181
169: ; preds = %165
%170 = load i32, i32* %19
%171 = load i32, i32* %18
%172 = icmp sge i32 %171, 0
br i1 %172, label %173, label %175
173: ; preds = %169
%174 = load i32, i32* %18
br label %178
175: ; preds = %169
%176 = load i32, i32* %18
%177 = sub nsw i32 0, %176
br label %178
178: ; preds = %175, %173
%179 = phi i32 [ %174, %173 ], [ %177, %175 ]
%180 = sub nsw i32 %170, %179
br label %194
181: ; preds = %165
%182 = load i32, i32* %19
%183 = load i32, i32* %18
%184 = icmp sge i32 %183, 0
br i1 %184, label %185, label %187
185: ; preds = %181
%186 = load i32, i32* %18
br label %190
187: ; preds = %181
%188 = load i32, i32* %18
%189 = sub nsw i32 0, %188
br label %190
190: ; preds = %187, %185
%191 = phi i32 [ %186, %185 ], [ %189, %187 ]
%192 = sub nsw i32 %182, %191
%193 = sub nsw i32 0, %192
br label %194
194: ; preds = %190, %178
%195 = phi i32 [ %180, %178 ], [ %193, %190 ]
%196 = add nsw i32 %156, %195
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds double, double* %117, i64 %197
%199 = load double, double* %198
%200 = fadd double %199, %116
store double %200, double* %198
br label %201
201: ; preds = %194
%202 = load i32, i32* %16
%203 = add nsw i32 %202, 1
store i32 %203, i32* %16
%204 = load i32, i32* %18
%205 = add nsw i32 %204, 1
store i32 %205, i32* %18
br label %105
206: ; preds = %105
br label %207
207: ; preds = %206
%208 = load i32, i32* %9
%209 = load i32, i32* %15
%210 = add nsw i32 %209, %208
store i32 %210, i32* %15
%211 = load i32, i32* %9
%212 = load i32, i32* %17
%213 = add nsw i32 %212, %211
store i32 %213, i32* %17
br label %98
214: ; preds = %98
%215 = load i32, i32* %11
%216 = icmp ne i32 %215, 0
br i1 %216, label %217, label %235
217: ; preds = %214
%218 = load i32, i32* %19
store i32 %218, i32* %15
br label %219
219: ; preds = %230, %217
%220 = load i32, i32* %15
%221 = load i32, i32* %21
%222 = icmp slt i32 %220, %221
br i1 %222, label %223, label %234
223: ; preds = %219
%224 = load double*, double** %13
%225 = load i32, i32* %15
%226 = sext i32 %225 to i64
%227 = getelementptr inbounds double, double* %224, i64 %226
%228 = load double, double* %227
%229 = fmul double %228, 0x3FF6A09E667F3BCD
store double %229, double* %227
br label %230
230: ; preds = %223
%231 = load i32, i32* %9
%232 = load i32, i32* %15
%233 = add nsw i32 %232, %231
store i32 %233, i32* %15
br label %219
234: ; preds = %219
br label %235
235: ; preds = %234, %214
%236 = load i32, i32* %12
%237 = icmp ne i32 %236, 0
br i1 %237, label %238, label %257
238: ; preds = %235
%239 = load i32, i32* %20
store i32 %239, i32* %16
br label %240
240: ; preds = %253, %238
%241 = load i32, i32* %16
%242 = load i32, i32* %20
%243 = load i32, i32* %9
%244 = add nsw i32 %242, %243
%245 = icmp slt i32 %241, %244
br i1 %245, label %246, label %256
246: ; preds = %240
%247 = load double*, double** %13
%248 = load i32, i32* %16
%249 = sext i32 %248 to i64
%250 = getelementptr inbounds double, double* %247, i64 %249
%251 = load double, double* %250
%252 = fmul double %251, 0x3FF6A09E667F3BCD
store double %252, double* %250
br label %253
253: ; preds = %246
%254 = load i32, i32* %16
%255 = add nsw i32 %254, 1
store i32 %255, i32* %16
br label %240
256: ; preds = %240
br label %257
257: ; preds = %256, %235
store double 0.000000e+00, double* %25
store i32 0, i32* %24
br label %258
258: ; preds = %275, %257
%259 = load i32, i32* %24
%260 = load i32, i32* %21
%261 = icmp slt i32 %259, %260
br i1 %261, label %262, label %278
262: ; preds = %258
%263 = load double*, double** %13
%264 = load i32, i32* %24
%265 = sext i32 %264 to i64
%266 = getelementptr inbounds double, double* %263, i64 %265
%267 = load double, double* %266
%268 = load double*, double** %13
%269 = load i32, i32* %24
%270 = sext i32 %269 to i64
%271 = getelementptr inbounds double, double* %268, i64 %270
%272 = load double, double* %271
%273 = load double, double* %25
%274 = call double @llvm.fmuladd.f64(double %267, double %272, double %273)
store double %274, double* %25
br label %275
275: ; preds = %262
%276 = load i32, i32* %24
%277 = add nsw i32 %276, 1
store i32 %277, i32* %24
br label %258
278: ; preds = %258
%279 = load double, double* %25
%280 = call double @sqrt(double %279)
store double %280, double* %25
store double 0.000000e+00, double* %26
store i32 0, i32* %24
br label %281
281: ; preds = %298, %278
%282 = load i32, i32* %24
%283 = load i32, i32* %21
%284 = icmp slt i32 %282, %283
br i1 %284, label %285, label %301
285: ; preds = %281
%286 = load double*, double** %8
%287 = load i32, i32* %24
%288 = sext i32 %287 to i64
%289 = getelementptr inbounds double, double* %286, i64 %288
%290 = load double, double* %289
%291 = load double*, double** %8
%292 = load i32, i32* %24
%293 = sext i32 %292 to i64
%294 = getelementptr inbounds double, double* %291, i64 %293
%295 = load double, double* %294
%296 = load double, double* %26
%297 = call double @llvm.fmuladd.f64(double %290, double %295, double %296)
store double %297, double* %26
br label %298
298: ; preds = %285
%299 = load i32, i32* %24
%300 = add nsw i32 %299, 1
store i32 %300, i32* %24
br label %281
301: ; preds = %281
%302 = load double, double* %26
%303 = call double @sqrt(double %302)
store double %303, double* %26
%304 = load double, double* %25
%305 = load double, double* %26
%306 = fdiv double %304, %305
store double %306, double* %25
store i32 0, i32* %24
br label %307
307: ; preds = %319, %301
%308 = load i32, i32* %24
%309 = load i32, i32* %21
%310 = icmp slt i32 %308, %309
br i1 %310, label %311, label %322
311: ; preds = %307
%312 = load double, double* %25
%313 = load double*, double** %13
%314 = load i32, i32* %24
%315 = sext i32 %314 to i64
%316 = getelementptr inbounds double, double* %313, i64 %315
%317 = load double, double* %316
%318 = fdiv double %317, %312
store double %318, double* %316
br label %319
319: ; preds = %311
%320 = load i32, i32* %24
%321 = add nsw i32 %320, 1
store i32 %321, i32* %24
br label %307
322: ; preds = %307
ret i32 0
}

LLVM IR (-O2):
define i32 @ereflect(double* nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4, double* nocapture %5, i32 %6) {
%8 = icmp sgt i32 %3, 0
%9 = add nsw i32 %1, -1
%10 = select i1 %8, i32 %9, i32 0
%11 = icmp sgt i32 %4, 0
%12 = add nsw i32 %2, -1
%13 = select i1 %11, i32 %12, i32 0
%14 = mul i32 %13, %1
%15 = mul i32 %2, %1
%16 = icmp sgt i32 %3, 1
%17 = sub nsw i32 %3, %1
%18 = icmp slt i32 %3, -1
%19 = add nsw i32 %3, 1
%20 = select i1 %18, i32 %19, i32 0
%21 = select i1 %16, i32 %17, i32 %20
%22 = icmp sgt i32 %15, 0
br i1 %22, label %23, label %64
23: ; preds = %7
%24 = icmp sgt i32 %4, 1
%25 = sub nsw i32 %4, %2
%26 = icmp slt i32 %4, -1
%27 = add nsw i32 %4, 1
%28 = select i1 %26, i32 %27, i32 0
%29 = select i1 %24, i32 %25, i32 %28
%30 = mul nsw i32 %29, %1
%31 = bitcast double* %5 to i8*
%32 = zext i32 %15 to i64
%33 = shl nuw nsw i64 %32, 3
%34 = sext i32 %1 to i64
%35 = zext i32 %15 to i64
%36 = icmp sgt i32 %1, 0
br label %37
37: ; preds = %23, %61
%38 = phi i64 [ 0, %23 ], [ %40, %61 ]
%39 = phi i32 [ %30, %23 ], [ %62, %61 ]
%40 = add i64 %38, %34
br i1 %36, label %41, label %61
41: ; preds = %37
%42 = tail call i32 @llvm.abs.i32(i32 %39, i1 true)
%43 = sub nsw i32 %14, %42
%44 = tail call i32 @llvm.abs.i32(i32 %43, i1 true)
br label %45
45: ; preds = %41, %45
%46 = phi i64 [ %38, %41 ], [ %58, %45 ]
%47 = phi i32 [ %21, %41 ], [ %59, %45 ]
%48 = getelementptr inbounds double, double* %0, i64 %46
%49 = load double, double* %48
%50 = tail call i32 @llvm.abs.i32(i32 %47, i1 true)
%51 = sub nsw i32 %10, %50
%52 = tail call i32 @llvm.abs.i32(i32 %51, i1 true)
%53 = add nuw nsw i32 %52, %44
%54 = zext i32 %53 to i64
%55 = getelementptr inbounds double, double* %5, i64 %54
%56 = load double, double* %55
%57 = fadd double %49, %56
store double %57, double* %55
%58 = add nsw i64 %46, 1
%59 = add nsw i32 %47, 1
%60 = icmp slt i64 %58, %40
br i1 %60, label %45, label %61
61: ; preds = %45, %37
%62 = add nsw i32 %39, %1
%63 = icmp slt i64 %40, %35
br i1 %63, label %37, label %64
64: ; preds = %61, %7
%65 = icmp ne i32 %3, 0
%66 = icmp slt i32 %10, %15
%67 = select i1 %65, i1 %66, i1 false
br i1 %67, label %68, label %79
68: ; preds = %64
%69 = sext i32 %10 to i64
%70 = sext i32 %1 to i64
%71 = sext i32 %15 to i64
br label %72
72: ; preds = %68, %72
%73 = phi i64 [ %69, %68 ], [ %77, %72 ]
%74 = getelementptr inbounds double, double* %5, i64 %73
%75 = load double, double* %74
%76 = fmul double %75, 0x3FF6A09E667F3BCD
store double %76, double* %74
%77 = add i64 %73, %70
%78 = icmp slt i64 %77, %71
br i1 %78, label %72, label %79
79: ; preds = %72, %64
%80 = icmp ne i32 %4, 0
%81 = icmp sgt i32 %1, 0
%82 = and i1 %80, %81
br i1 %82, label %83, label %156
83: ; preds = %79
%84 = add nsw i32 %14, %1
%85 = sext i32 %14 to i64
%86 = sext i32 %84 to i64
%87 = add nsw i64 %85, 1
%88 = call i64 @llvm.smax.i64(i64 %87, i64 %86)
%89 = sub i64 %88, %85
%90 = icmp ult i64 %89, 4
br i1 %90, label %147, label %91
91: ; preds = %83
%92 = and i64 %89, -4
%93 = add i64 %92, %85
%94 = add i64 %92, -4
%95 = lshr exact i64 %94, 2
%96 = add nuw nsw i64 %95, 1
%97 = and i64 %96, 1
%98 = icmp eq i64 %94, 0
br i1 %98, label %130, label %99
99: ; preds = %91
%100 = and i64 %96, 9223372036854775806
br label %101
101: ; preds = %101, %99
%102 = phi i64 [ 0, %99 ], [ %127, %101 ]
%103 = phi i64 [ 0, %99 ], [ %128, %101 ]
%104 = add i64 %102, %85
%105 = getelementptr inbounds double, double* %5, i64 %104
%106 = bitcast double* %105 to <2 x double>*
%107 = load <2 x double>, <2 x double>* %106
%108 = getelementptr inbounds double, double* %105, i64 2
%109 = bitcast double* %108 to <2 x double>*
%110 = load <2 x double>, <2 x double>* %109
%111 = fmul <2 x double> %107, <double 0x3FF6A09E667F3BCD, double 0x3FF6A09E667F3BCD>
%112 = fmul <2 x double> %110, <double 0x3FF6A09E667F3BCD, double 0x3FF6A09E667F3BCD>
%113 = bitcast double* %105 to <2 x double>*
store <2 x double> %111, <2 x double>* %113
%114 = bitcast double* %108 to <2 x double>*
store <2 x double> %112, <2 x double>* %114
%115 = or i64 %102, 4
%116 = add i64 %115, %85
%117 = getelementptr inbounds double, double* %5, i64 %116
%118 = bitcast double* %117 to <2 x double>*
%119 = load <2 x double>, <2 x double>* %118
%120 = getelementptr inbounds double, double* %117, i64 2
%121 = bitcast double* %120 to <2 x double>*
%122 = load <2 x double>, <2 x double>* %121
%123 = fmul <2 x double> %119, <double 0x3FF6A09E667F3BCD, double 0x3FF6A09E667F3BCD>
%124 = fmul <2 x double> %122, <double 0x3FF6A09E667F3BCD, double 0x3FF6A09E667F3BCD>
%125 = bitcast double* %117 to <2 x double>*
store <2 x double> %123, <2 x double>* %125
%126 = bitcast double* %120 to <2 x double>*
store <2 x double> %124, <2 x double>* %126
%127 = add nuw i64 %102, 8
%128 = add i64 %103, 2
%129 = icmp eq i64 %128, %100
br i1 %129, label %130, label %101
130: ; preds = %101, %91
%131 = phi i64 [ 0, %91 ], [ %127, %101 ]
%132 = icmp eq i64 %97, 0
br i1 %132, label %145, label %133
133: ; preds = %130
%134 = add i64 %131, %85
%135 = getelementptr inbounds double, double* %5, i64 %134
%136 = bitcast double* %135 to <2 x double>*
%137 = load <2 x double>, <2 x double>* %136
%138 = getelementptr inbounds double, double* %135, i64 2
%139 = bitcast double* %138 to <2 x double>*
%140 = load <2 x double>, <2 x double>* %139
%141 = fmul <2 x double> %137, <double 0x3FF6A09E667F3BCD, double 0x3FF6A09E667F3BCD>
%142 = fmul <2 x double> %140, <double 0x3FF6A09E667F3BCD, double 0x3FF6A09E667F3BCD>
%143 = bitcast double* %135 to <2 x double>*
store <2 x double> %141, <2 x double>* %143
%144 = bitcast double* %138 to <2 x double>*
store <2 x double> %142, <2 x double>* %144
br label %145
145: ; preds = %130, %133
%146 = icmp eq i64 %89, %92
br i1 %146, label %156, label %147
147: ; preds = %83, %145
%148 = phi i64 [ %85, %83 ], [ %93, %145 ]
br label %149
149: ; preds = %147, %149
%150 = phi i64 [ %154, %149 ], [ %148, %147 ]
%151 = getelementptr inbounds double, double* %5, i64 %150
%152 = load double, double* %151
%153 = fmul double %152, 0x3FF6A09E667F3BCD
store double %153, double* %151
%154 = add nsw i64 %150, 1
%155 = icmp slt i64 %154, %86
br i1 %155, label %149, label %156
156: ; preds = %149, %145, %79
br i1 %22, label %157, label %301
157: ; preds = %156
%158 = zext i32 %15 to i64
%159 = add nsw i64 %158, -1
%160 = and i64 %158, 3
%161 = icmp ult i64 %159, 3
br i1 %161, label %186, label %162
162: ; preds = %157
%163 = and i64 %158, 4294967292
br label %164
164: ; preds = %164, %162
%165 = phi i64 [ 0, %162 ], [ %183, %164 ]
%166 = phi double [ 0.000000e+00, %162 ], [ %182, %164 ]
%167 = phi i64 [ 0, %162 ], [ %184, %164 ]
%168 = getelementptr inbounds double, double* %5, i64 %165
%169 = load double, double* %168
%170 = tail call double @llvm.fmuladd.f64(double %169, double %169, double %166)
%171 = or i64 %165, 1
%172 = getelementptr inbounds double, double* %5, i64 %171
%173 = load double, double* %172
%174 = tail call double @llvm.fmuladd.f64(double %173, double %173, double %170)
%175 = or i64 %165, 2
%176 = getelementptr inbounds double, double* %5, i64 %175
%177 = load double, double* %176
%178 = tail call double @llvm.fmuladd.f64(double %177, double %177, double %174)
%179 = or i64 %165, 3
%180 = getelementptr inbounds double, double* %5, i64 %179
%181 = load double, double* %180
%182 = tail call double @llvm.fmuladd.f64(double %181, double %181, double %178)
%183 = add nuw nsw i64 %165, 4
%184 = add i64 %167, 4
%185 = icmp eq i64 %184, %163
br i1 %185, label %186, label %164
186: ; preds = %164, %157
%187 = phi double [ undef, %157 ], [ %182, %164 ]
%188 = phi i64 [ 0, %157 ], [ %183, %164 ]
%189 = phi double [ 0.000000e+00, %157 ], [ %182, %164 ]
%190 = icmp eq i64 %160, 0
br i1 %190, label %201, label %191
191: ; preds = %186, %191
%192 = phi i64 [ %198, %191 ], [ %188, %186 ]
%193 = phi double [ %197, %191 ], [ %189, %186 ]
%194 = phi i64 [ %199, %191 ], [ 0, %186 ]
%195 = getelementptr inbounds double, double* %5, i64 %192
%196 = load double, double* %195
%197 = tail call double @llvm.fmuladd.f64(double %196, double %196, double %193)
%198 = add nuw nsw i64 %192, 1
%199 = add i64 %194, 1
%200 = icmp eq i64 %199, %160
br i1 %200, label %201, label %191
201: ; preds = %191, %186
%202 = phi double [ %187, %186 ], [ %197, %191 ]
%203 = tail call double @sqrt(double %202)
br i1 %22, label %204, label %301
204: ; preds = %201
%205 = and i64 %158, 3
%206 = icmp ult i64 %159, 3
br i1 %206, label %231, label %207
207: ; preds = %204
%208 = and i64 %158, 4294967292
br label %209
209: ; preds = %209, %207
%210 = phi i64 [ 0, %207 ], [ %228, %209 ]
%211 = phi double [ 0.000000e+00, %207 ], [ %227, %209 ]
%212 = phi i64 [ 0, %207 ], [ %229, %209 ]
%213 = getelementptr inbounds double, double* %0, i64 %210
%214 = load double, double* %213
%215 = tail call double @llvm.fmuladd.f64(double %214, double %214, double %211)
%216 = or i64 %210, 1
%217 = getelementptr inbounds double, double* %0, i64 %216
%218 = load double, double* %217
%219 = tail call double @llvm.fmuladd.f64(double %218, double %218, double %215)
%220 = or i64 %210, 2
%221 = getelementptr inbounds double, double* %0, i64 %220
%222 = load double, double* %221
%223 = tail call double @llvm.fmuladd.f64(double %222, double %222, double %219)
%224 = or i64 %210, 3
%225 = getelementptr inbounds double, double* %0, i64 %224
%226 = load double, double* %225
%227 = tail call double @llvm.fmuladd.f64(double %226, double %226, double %223)
%228 = add nuw nsw i64 %210, 4
%229 = add i64 %212, 4
%230 = icmp eq i64 %229, %208
br i1 %230, label %231, label %209
231: ; preds = %209, %204
%232 = phi double [ undef, %204 ], [ %227, %209 ]
%233 = phi i64 [ 0, %204 ], [ %228, %209 ]
%234 = phi double [ 0.000000e+00, %204 ], [ %227, %209 ]
%235 = icmp eq i64 %205, 0
br i1 %235, label %246, label %236
236: ; preds = %231, %236
%237 = phi i64 [ %243, %236 ], [ %233, %231 ]
%238 = phi double [ %242, %236 ], [ %234, %231 ]
%239 = phi i64 [ %244, %236 ], [ 0, %231 ]
%240 = getelementptr inbounds double, double* %0, i64 %237
%241 = load double, double* %240
%242 = tail call double @llvm.fmuladd.f64(double %241, double %241, double %238)
%243 = add nuw nsw i64 %237, 1
%244 = add i64 %239, 1
%245 = icmp eq i64 %244, %205
br i1 %245, label %246, label %236
246: ; preds = %236, %231
%247 = phi double [ %232, %231 ], [ %242, %236 ]
%248 = tail call double @sqrt(double %247)
%249 = fdiv double %203, %248
br i1 %22, label %250, label %301
250: ; preds = %246
%251 = zext i32 %15 to i64
%252 = icmp eq i32 %15, 1
br i1 %252, label %292, label %253
253: ; preds = %250
%254 = and i64 %158, 4294967294
%255 = insertelement <2 x double> poison, double %249, i64 0
%256 = shufflevector <2 x double> %255, <2 x double> poison, <2 x i32> zeroinitializer
%257 = add nsw i64 %254, -2
%258 = lshr exact i64 %257, 1
%259 = add nuw i64 %258, 1
%260 = and i64 %259, 1
%261 = icmp eq i64 %257, 0
br i1 %261, label %281, label %262
262: ; preds = %253
%263 = and i64 %259, -2
br label %264
264: ; preds = %264, %262
%265 = phi i64 [ 0, %262 ], [ %278, %264 ]
%266 = phi i64 [ 0, %262 ], [ %279, %264 ]
%267 = getelementptr inbounds double, double* %5, i64 %265
%268 = bitcast double* %267 to <2 x double>*
%269 = load <2 x double>, <2 x double>* %268
%270 = fdiv <2 x double> %269, %256
%271 = bitcast double* %267 to <2 x double>*
store <2 x double> %270, <2 x double>* %271
%272 = or i64 %265, 2
%273 = getelementptr inbounds double, double* %5, i64 %272
%274 = bitcast double* %273 to <2 x double>*
%275 = load <2 x double>, <2 x double>* %274
%276 = fdiv <2 x double> %275, %256
%277 = bitcast double* %273 to <2 x double>*
store <2 x double> %276, <2 x double>* %277
%278 = add nuw i64 %265, 4
%279 = add nuw i64 %266, 2
%280 = icmp eq i64 %279, %263
br i1 %280, label %281, label %264
281: ; preds = %264, %253
%282 = phi i64 [ 0, %253 ], [ %278, %264 ]
%283 = icmp eq i64 %260, 0
br i1 %283, label %290, label %284
284: ; preds = %281
%285 = getelementptr inbounds double, double* %5, i64 %282
%286 = bitcast double* %285 to <2 x double>*
%287 = load <2 x double>, <2 x double>* %286
%288 = fdiv <2 x double> %287, %256
%289 = bitcast double* %285 to <2 x double>*
store <2 x double> %288, <2 x double>* %289
br label %290
290: ; preds = %281, %284
%291 = icmp eq i64 %254, %158
br i1 %291, label %301, label %292
292: ; preds = %250, %290
%293 = phi i64 [ 0, %250 ], [ %254, %290 ]
br label %294
294: ; preds = %292, %294
%295 = phi i64 [ %299, %294 ], [ %293, %292 ]
%296 = getelementptr inbounds double, double* %5, i64 %295
%297 = load double, double* %296
%298 = fdiv double %297, %249
store double %298, double* %296
%299 = add nuw nsw i64 %295, 1
%300 = icmp eq i64 %299, %251
br i1 %300, label %301, label %294
301: ; preds = %294, %290, %156, %201, %246
ret i32 0
}