#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
float sin(float);
float sqrt(float);
void eikSolverCPU(float *ttInput, float *ttOutput, float *ttHeap, float *keys,
                  float *radius, float *slowness, int sizeR, float deltaR,
                  float startR, int sizeTheta, float deltaTheta,
                  float startTheta, int sizePhi, float deltaPhi,
                  float startPhi) {
  float theta = startTheta;
  float delRSqInv = 1 / (deltaR * deltaR);
#pragma omp parallel for
  for (int i = 0; i < sizeTheta; i++) {
    theta += deltaTheta;
    for (int j = 0; j < sizePhi; j++) {
      float secondOrder = 0;
      float firstOrder = 0;
      float zerothOrder = 0;
      float slowSq = slowness[j + i * sizePhi];
      float rad = radius[j + i * sizePhi] * deltaR;
      float delTheRadInv = 1 / (rad * deltaTheta);
      float delThePhiRadInv = 1 / (rad * deltaPhi * sin(theta));
      secondOrder += delRSqInv;
      secondOrder += delTheRadInv;
      secondOrder += delThePhiRadInv;
      firstOrder += (j < sizePhi)
                        ? -2.0f * delRSqInv * ttInput[j + 1 + i * sizePhi]
                        : -2.0f * delRSqInv * ttInput[i * sizePhi];
      firstOrder += (j < sizePhi)
                        ? -2.0f * delTheRadInv * ttInput[j + 1 + i * sizePhi]
                        : -2.0f * delTheRadInv * ttInput[i * sizePhi];
      firstOrder += (j < sizePhi)
                        ? -2.0f * delThePhiRadInv * ttInput[j + 1 + i * sizePhi]
                        : -2.0f * delThePhiRadInv * ttInput[i * sizePhi];
      zerothOrder += (i > 0)
                         ? delRSqInv * ttInput[j + (i - 1) * sizePhi]
                         : delRSqInv * ttInput[j + (sizeTheta - 1) * sizePhi];
      zerothOrder += (j > 0) ? delTheRadInv * ttInput[j - 1 + i * sizePhi]
                             : delTheRadInv * ttInput[(i + 1) * sizePhi - 1];
      zerothOrder += (j > 0) ? delThePhiRadInv * ttInput[j - 1 + i * sizePhi]
                             : delThePhiRadInv * ttInput[(i + 1) * sizePhi - 1];
      zerothOrder += -slowSq;
      ttHeap[j + i * sizePhi] =
          -firstOrder +
          sqrt(firstOrder * firstOrder - 4 * secondOrder * zerothOrder) /
              (2.0f * secondOrder);
      ttOutput[j + i * sizePhi] =
          -firstOrder +
          sqrt(firstOrder * firstOrder - 4 * secondOrder * zerothOrder) /
              (2.0f * secondOrder);
      keys[j + i * sizePhi] = j + i * sizePhi;
    }
  }
}


x86 assembly (clang, -O0):
<eikSolverCPU>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movss  %xmm0,-0x34(%rbp)
movss  %xmm1,-0x38(%rbp)
movss  %xmm2,-0x3c(%rbp)
movss  %xmm3,-0x40(%rbp)
movss  %xmm4,-0x44(%rbp)
movss  %xmm5,-0x48(%rbp)
movss  -0x40(%rbp),%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  -0x34(%rbp),%xmm1
mulss  -0x34(%rbp),%xmm1
movss  0xe7a(%rip),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    16b9 <eikSolverCPU+0x599>
movss  -0x3c(%rbp),%xmm0
addss  -0x4c(%rbp),%xmm0
movss  %xmm0,-0x4c(%rbp)
movl   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    16a6 <eikSolverCPU+0x586>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x5c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x64(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x58(%rbp),%ecx
mov    -0x54(%rbp),%edx
imul   0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x68(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x58(%rbp),%ecx
mov    -0x54(%rbp),%edx
imul   0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
mulss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x6c(%rbp)
movss  -0x6c(%rbp),%xmm1
mulss  -0x3c(%rbp),%xmm1
movss  0xdd3(%rip),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x70(%rbp)
movss  -0x6c(%rbp),%xmm0
mulss  -0x44(%rbp),%xmm0
movss  %xmm0,-0x78(%rbp)
movss  -0x4c(%rbp),%xmm0
call   1030 <sin@plt>
movss  -0x78(%rbp),%xmm1
mulss  %xmm0,%xmm1
movss  0xda0(%rip),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x74(%rbp)
movss  -0x50(%rbp),%xmm0
addss  -0x5c(%rbp),%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x70(%rbp),%xmm0
addss  -0x5c(%rbp),%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x74(%rbp),%xmm0
addss  -0x5c(%rbp),%xmm0
movss  %xmm0,-0x5c(%rbp)
mov    -0x58(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    12d4 <eikSolverCPU+0x1b4>
movss  0xd5a(%rip),%xmm0
mulss  -0x50(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    $0x1,%ecx
mov    -0x54(%rbp),%edx
imul   0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mulss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x7c(%rbp)
jmp    12f9 <eikSolverCPU+0x1d9>
movss  0xd28(%rip),%xmm0
mulss  -0x50(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   0x20(%rbp),%ecx
movslq %ecx,%rcx
mulss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x7c(%rbp)
movss  -0x7c(%rbp),%xmm0
addss  -0x60(%rbp),%xmm0
movss  %xmm0,-0x60(%rbp)
mov    -0x58(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    1346 <eikSolverCPU+0x226>
movss  0xce8(%rip),%xmm0
mulss  -0x70(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    $0x1,%ecx
mov    -0x54(%rbp),%edx
imul   0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mulss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x80(%rbp)
jmp    136b <eikSolverCPU+0x24b>
movss  0xcb6(%rip),%xmm0
mulss  -0x70(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   0x20(%rbp),%ecx
movslq %ecx,%rcx
mulss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x80(%rbp)
movss  -0x80(%rbp),%xmm0
addss  -0x60(%rbp),%xmm0
movss  %xmm0,-0x60(%rbp)
mov    -0x58(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    13bb <eikSolverCPU+0x29b>
movss  0xc76(%rip),%xmm0
mulss  -0x74(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x58(%rbp),%ecx
add    $0x1,%ecx
mov    -0x54(%rbp),%edx
imul   0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mulss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x84(%rbp)
ff
jmp    13e3 <eikSolverCPU+0x2c3>
movss  0xc41(%rip),%xmm0
mulss  -0x74(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   0x20(%rbp),%ecx
movslq %ecx,%rcx
mulss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x84(%rbp)
ff
movss  -0x84(%rbp),%xmm0
ff
addss  -0x60(%rbp),%xmm0
movss  %xmm0,-0x60(%rbp)
cmpl   $0x0,-0x54(%rbp)
jle    142c <eikSolverCPU+0x30c>
movss  -0x50(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x58(%rbp),%ecx
mov    -0x54(%rbp),%edx
sub    $0x1,%edx
imul   0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mulss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x88(%rbp)
ff
jmp    1454 <eikSolverCPU+0x334>
movss  -0x50(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x58(%rbp),%ecx
mov    0x18(%rbp),%edx
sub    $0x1,%edx
imul   0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mulss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x88(%rbp)
ff
movss  -0x88(%rbp),%xmm0
ff
addss  -0x64(%rbp),%xmm0
movss  %xmm0,-0x64(%rbp)
cmpl   $0x0,-0x58(%rbp)
jle    149d <eikSolverCPU+0x37d>
movss  -0x70(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x58(%rbp),%ecx
sub    $0x1,%ecx
mov    -0x54(%rbp),%edx
imul   0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mulss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x8c(%rbp)
ff
jmp    14c3 <eikSolverCPU+0x3a3>
movss  -0x70(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x54(%rbp),%ecx
add    $0x1,%ecx
imul   0x20(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mulss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x8c(%rbp)
ff
movss  -0x8c(%rbp),%xmm0
ff
addss  -0x64(%rbp),%xmm0
movss  %xmm0,-0x64(%rbp)
cmpl   $0x0,-0x58(%rbp)
jle    150c <eikSolverCPU+0x3ec>
movss  -0x74(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x58(%rbp),%ecx
sub    $0x1,%ecx
mov    -0x54(%rbp),%edx
imul   0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mulss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x90(%rbp)
ff
jmp    1532 <eikSolverCPU+0x412>
movss  -0x74(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x54(%rbp),%ecx
add    $0x1,%ecx
imul   0x20(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mulss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x90(%rbp)
ff
movss  -0x90(%rbp),%xmm0
ff
addss  -0x64(%rbp),%xmm0
movss  %xmm0,-0x64(%rbp)
movss  -0x68(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
addss  -0x64(%rbp),%xmm0
movss  %xmm0,-0x64(%rbp)
movss  -0x60(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x98(%rbp)
ff
movss  -0x60(%rbp),%xmm0
movss  -0x60(%rbp),%xmm2
movss  0xa80(%rip),%xmm1
mulss  -0x5c(%rbp),%xmm1
mulss  -0x64(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movss  -0x98(%rbp),%xmm0
ff
movss  0xa45(%rip),%xmm2
mulss  -0x5c(%rbp),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x58(%rbp),%ecx
mov    -0x54(%rbp),%edx
imul   0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
movss  -0x60(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x94(%rbp)
ff
movss  -0x60(%rbp),%xmm0
movss  -0x60(%rbp),%xmm2
movss  0x9f8(%rip),%xmm1
mulss  -0x5c(%rbp),%xmm1
mulss  -0x64(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movss  -0x94(%rbp),%xmm0
ff
movss  0x9bd(%rip),%xmm2
mulss  -0x5c(%rbp),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x58(%rbp),%ecx
mov    -0x54(%rbp),%edx
imul   0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x58(%rbp),%eax
mov    -0x54(%rbp),%ecx
imul   0x20(%rbp),%ecx
add    %ecx,%eax
cvtsi2ss %eax,%xmm0
mov    -0x20(%rbp),%rax
mov    -0x58(%rbp),%ecx
mov    -0x54(%rbp),%edx
imul   0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    11b8 <eikSolverCPU+0x98>
jmp    16ab <eikSolverCPU+0x58b>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1196 <eikSolverCPU+0x76>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eikSolverCPU>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
movss  %xmm4,0x30(%rsp)
movss  %xmm3,0x8(%rsp)
movss  %xmm2,0x14(%rsp)
movss  %xmm0,0x10(%rsp)
mov    %r9,0x68(%rsp)
mov    %r8,0x60(%rsp)
mov    %rcx,0x58(%rsp)
mov    %rdx,0x50(%rsp)
mov    %rsi,0x48(%rsp)
mov    %rdi,0x18(%rsp)
cmpl   $0x0,0xe8(%rsp)
jle    14b9 <eikSolverCPU+0x399>
mov    0xf0(%rsp),%edx
movss  0x10(%rsp),%xmm0
mulss  %xmm0,%xmm0
movss  0xe72(%rip),%xmm1
divss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
movaps %xmm1,%xmm2
addss  %xmm0,%xmm2
movss  %xmm2,0x28(%rsp)
movss  %xmm1,0x2c(%rsp)
addss  %xmm1,%xmm1
movss  %xmm1,0x24(%rsp)
movslq %edx,%rax
mov    %rax,0x40(%rsp)
mov    %eax,%eax
mov    %rax,0x78(%rsp)
mov    0x18(%rsp),%rax
add    $0x4,%rax
mov    %rax,0x38(%rsp)
xor    %esi,%esi
jmp    11fc <eikSolverCPU+0xdc>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0xf0(%rsp),%edx
mov    0x70(%rsp),%rsi
mov    0xe8(%rsp),%eax
cmp    %rax,%rsi
je     14b9 <eikSolverCPU+0x399>
movss  0x8(%rsp),%xmm0
addss  0x14(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
test   %edx,%edx
jle    14b0 <eikSolverCPU+0x390>
mov    %rsi,%rax
imul   0x40(%rsp),%rax
test   %rsi,%rsi
mov    %esi,%ecx
cmove  0xe8(%rsp),%ecx
add    $0xffffffff,%ecx
imul   %edx,%ecx
add    $0x1,%rsi
movslq %ecx,%rcx
mov    %esi,%edi
imul   %edx,%edi
mov    %edi,0x34(%rsp)
mov    %rsi,0x70(%rsp)
lea    -0x1(%rsi),%r12d
imul   %edx,%r12d
mov    0x68(%rsp),%rdx
lea    (%rdx,%rax,4),%rdx
mov    %rdx,0xa0(%rsp)
mov    0x60(%rsp),%rdx
lea    (%rdx,%rax,4),%rdx
mov    %rdx,0x98(%rsp)
mov    0x50(%rsp),%rdx
lea    (%rdx,%rax,4),%rdx
mov    %rdx,0x90(%rsp)
mov    0x48(%rsp),%rdx
lea    (%rdx,%rax,4),%rdx
mov    %rdx,0x88(%rsp)
mov    0x58(%rsp),%rdx
lea    (%rdx,%rax,4),%rdx
mov    %rdx,0x80(%rsp)
mov    0x18(%rsp),%rdx
lea    (%rdx,%rcx,4),%rbx
mov    0x38(%rsp),%rcx
lea    (%rcx,%rax,4),%rbp
xor    %r15d,%r15d
jmp    12fa <eikSolverCPU+0x1da>
nopl   0x0(%rax,%rax,1)
divss  %xmm4,%xmm1
xorps  %xmm0,%xmm0
cvtsi2ss %r13d,%xmm0
subss  %xmm5,%xmm1
mov    0x88(%rsp),%rax
movss  %xmm1,(%rax,%r15,4)
mov    0x80(%rsp),%rax
movss  %xmm0,(%rax,%r15,4)
mov    %r14,%r15
cmp    %r14,0x78(%rsp)
je     11e0 <eikSolverCPU+0xc0>
mov    0xa0(%rsp),%rax
movss  (%rax,%r15,4),%xmm0
movss  %xmm0,(%rsp)
mov    0x98(%rsp),%rax
movss  (%rax,%r15,4),%xmm2
mulss  0x10(%rsp),%xmm2
movaps %xmm2,%xmm0
mulss  0x14(%rsp),%xmm0
movss  0xcce(%rip),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,0xc(%rsp)
mulss  0x30(%rsp),%xmm2
movss  %xmm2,0x4(%rsp)
movss  0x8(%rsp),%xmm0
call   1030 <sin@plt>
mulss  0x4(%rsp),%xmm0
movss  0xc9f(%rip),%xmm1
divss  %xmm0,%xmm1
movss  0x28(%rsp),%xmm4
movss  0xc(%rsp),%xmm3
addss  %xmm3,%xmm4
addss  %xmm1,%xmm4
movss  0x0(%rbp,%r15,4),%xmm0
movss  0x24(%rsp),%xmm2
mulss  %xmm0,%xmm2
xorps  %xmm5,%xmm5
subss  %xmm2,%xmm5
movaps %xmm3,%xmm2
movaps %xmm3,%xmm6
addss  %xmm3,%xmm2
mulss  %xmm0,%xmm2
subss  %xmm2,%xmm5
movaps %xmm1,%xmm2
addss  %xmm1,%xmm2
mulss  %xmm0,%xmm2
subss  %xmm2,%xmm5
movss  (%rbx,%r15,4),%xmm0
mulss  0x2c(%rsp),%xmm0
lea    (%r12,%r15,1),%r13
test   %r15,%r15
mov    %r13d,%eax
cmove  0x34(%rsp),%eax
xorps  %xmm3,%xmm3
addss  %xmm3,%xmm0
add    $0xffffffff,%eax
cltq
mov    0x18(%rsp),%rcx
movss  (%rcx,%rax,4),%xmm2
mulss  %xmm2,%xmm6
addss  %xmm0,%xmm6
mulss  %xmm2,%xmm1
addss  %xmm6,%xmm1
subss  (%rsp),%xmm1
movaps %xmm4,%xmm0
mulss  0xc01(%rip),%xmm0
mulss  %xmm1,%xmm0
movaps %xmm5,%xmm2
mulss  %xmm5,%xmm2
addss  %xmm0,%xmm2
xorps  %xmm1,%xmm1
sqrtss %xmm2,%xmm1
ucomiss %xmm3,%xmm2
movaps %xmm1,%xmm0
movss  %xmm5,0x4(%rsp)
jae    145a <eikSolverCPU+0x33a>
movaps %xmm2,%xmm0
movss  %xmm4,(%rsp)
movss  %xmm1,0xc(%rsp)
movss  %xmm2,0x20(%rsp)
call   1040 <sqrt@plt>
movss  0x20(%rsp),%xmm2
movss  0xc(%rsp),%xmm1
movss  0x4(%rsp),%xmm5
movss  (%rsp),%xmm4
xorps  %xmm3,%xmm3
lea    0x1(%r15),%r14
addss  %xmm4,%xmm4
divss  %xmm4,%xmm0
subss  %xmm5,%xmm0
mov    0x90(%rsp),%rax
movss  %xmm0,(%rax,%r15,4)
ucomiss %xmm3,%xmm2
jae    12c0 <eikSolverCPU+0x1a0>
movaps %xmm2,%xmm0
movss  %xmm4,(%rsp)
call   1040 <sqrt@plt>
movss  0x4(%rsp),%xmm5
movss  (%rsp),%xmm4
movaps %xmm0,%xmm1
jmp    12c0 <eikSolverCPU+0x1a0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rsi
jmp    11ec <eikSolverCPU+0xcc>
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @eikSolverCPU(float* nocapture %0, float* nocapture writeonly %1, float* nocapture writeonly %2, float* nocapture writeonly %3, float* nocapture %4, float* nocapture %5, i32 %6, float %7, float %8, i32 %9, float %10, float %11, i32 %12, float %13, float %14) {
%16 = fmul float %7, %7
%17 = fdiv float 1.000000e+00, %16
%18 = icmp sgt i32 %9, 0
br i1 %18, label %19, label %26
19: ; preds = %15
%20 = icmp sgt i32 %12, 0
%21 = fadd float %17, 0.000000e+00
%22 = fmul float %17, 2.000000e+00
%23 = sext i32 %12 to i64
%24 = zext i32 %9 to i64
%25 = zext i32 %12 to i64
br label %27
26: ; preds = %44, %15
ret void
27: ; preds = %19, %44
%28 = phi i64 [ 0, %19 ], [ %45, %44 ]
%29 = phi float [ %11, %19 ], [ %30, %44 ]
%30 = fadd float %29, %10
br i1 %20, label %33, label %31
31: ; preds = %27
%32 = add nuw nsw i64 %28, 1
br label %44
33: ; preds = %27
%34 = mul nsw i64 %28, %23
%35 = icmp eq i64 %28, 0
%36 = trunc i64 %28 to i32
%37 = select i1 %35, i32 %9, i32 %36
%38 = add nsw i32 %37, -1
%39 = mul nsw i32 %38, %12
%40 = add nuw nsw i64 %28, 1
%41 = sext i32 %39 to i64
%42 = trunc i64 %40 to i32
%43 = mul i32 %42, %12
br label %47
44: ; preds = %47, %31
%45 = phi i64 [ %32, %31 ], [ %40, %47 ]
%46 = icmp eq i64 %45, %24
br i1 %46, label %26, label %27
47: ; preds = %33, %47
%48 = phi i64 [ 0, %33 ], [ %63, %47 ]
%49 = add nsw i64 %48, %34
%50 = getelementptr inbounds float, float* %5, i64 %49
%51 = load float, float* %50
%52 = getelementptr inbounds float, float* %4, i64 %49
%53 = load float, float* %52
%54 = fmul float %53, %7
%55 = fmul float %54, %10
%56 = fdiv float 1.000000e+00, %55
%57 = fmul float %54, %13
%58 = tail call float @sin(float %30)
%59 = fmul float %58, %57
%60 = fdiv float 1.000000e+00, %59
%61 = fadd float %21, %56
%62 = fadd float %61, %60
%63 = add nuw nsw i64 %48, 1
%64 = add nsw i64 %63, %34
%65 = getelementptr inbounds float, float* %0, i64 %64
%66 = load float, float* %65
%67 = fmul float %22, %66
%68 = fsub float 0.000000e+00, %67
%69 = fmul float %56, 2.000000e+00
%70 = fmul float %66, %69
%71 = fsub float %68, %70
%72 = fmul float %60, 2.000000e+00
%73 = fmul float %66, %72
%74 = fsub float %71, %73
%75 = add nsw i64 %48, %41
%76 = getelementptr inbounds float, float* %0, i64 %75
%77 = load float, float* %76
%78 = fmul float %17, %77
%79 = fadd float %78, 0.000000e+00
%80 = icmp eq i64 %48, 0
%81 = trunc i64 %49 to i32
%82 = select i1 %80, i32 %43, i32 %81
%83 = add i32 %82, -1
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds float, float* %0, i64 %84
%86 = load float, float* %85
%87 = fmul float %56, %86
%88 = fadd float %79, %87
%89 = fmul float %60, %86
%90 = fadd float %88, %89
%91 = fsub float %90, %51
%92 = fmul float %62, -4.000000e+00
%93 = fmul float %92, %91
%94 = tail call float @llvm.fmuladd.f32(float %74, float %74, float %93)
%95 = tail call float @sqrt(float %94)
%96 = fmul float %62, 2.000000e+00
%97 = fdiv float %95, %96
%98 = fsub float %97, %74
%99 = getelementptr inbounds float, float* %2, i64 %49
store float %98, float* %99
%100 = tail call float @sqrt(float %94)
%101 = fdiv float %100, %96
%102 = fsub float %101, %74
%103 = getelementptr inbounds float, float* %1, i64 %49
store float %102, float* %103
%104 = sitofp i32 %81 to float
%105 = getelementptr inbounds float, float* %3, i64 %49
store float %104, float* %105
%106 = icmp eq i64 %63, %25
br i1 %106, label %44, label %47
}