#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 */
int M_PI;
int /*<<< orphan*/ abs(int);
double cos(int);
double fabs(double);
int pow(double, int /*<<< orphan*/);
double sin(int);
double sqrt(double);
int _get_imp_response_approx(double fs, int length, double c, int sinchalfwidth,
                             double *beta, double *lspk, double *mic,
                             double *room, double *res, int *nrefl) {
  int a = 0, b = 0, d = 0, l = 0, m = 0, n = 0, i = 0, lr = 0, fb = 0, tb = 0;
  int nits = 0, lits = 0, totalrefl = 0, ii = 0, midsample = 0;
  double dist = 0, maxdist = 0, dx = 0, dy = 0, dz = 0, amplitude = 0, tau = 0;
  maxdist = length * 1.0 / fs * c;
  for (a = 0; a <= 1; a++)
    for (b = 0; b <= 1; b++)
      for (d = 0; d <= 1; d++) {
        m = 0;
        for (lr = -1; lr <= 1; lr = lr + 2) {
          n = 0;
          for (fb = -1; fb <= 1; fb = fb + 2) {
            l = 0;
            for (tb = -1; tb <= 1; tb = tb + 2) {
              if (lr == -1)
                m = 0;
              else
                m = 1;
              while (1) {
                nits = 0;
                if (fb == -1)
                  n = 0;
                else
                  n = 1;
                while (1) {
                  lits = 0;
                  if (tb == -1)
                    l = 0;
                  else
                    l = 1;
                  while (1) {
                    dx = (2 * a - 1) * lspk[0] + mic[0] - 2 * m * room[0];
                    dy = (2 * b - 1) * lspk[1] + mic[1] - 2 * n * room[1];
                    dz = (2 * d - 1) * lspk[2] + mic[2] - 2 * l * room[2];
                    dist = sqrt(dx * dx + dy * dy + dz * dz);
                    if (dist > maxdist)
                      break;
                    amplitude =
                        pow(beta[0], abs(m - a)) * pow(beta[1], abs(m)) *
                        pow(beta[2], abs(n - b)) * pow(beta[3], abs(n)) *
                        pow(beta[4], abs(l - d)) * pow(beta[5], abs(l)) /
                        (4 * M_PI * dist);
                    tau = dist / c;
                    midsample = tau * fs;
                    if (midsample - sinchalfwidth < 0)
                      i = 0;
                    else
                      i = midsample - sinchalfwidth;
                    if (midsample + sinchalfwidth >= length)
                      ii = length;
                    else
                      ii = midsample + sinchalfwidth;
                    for (; i < ii; i++) {
                      if (fabs(tau * fs - i) > 0.0001) {
                        res[i] +=
                            amplitude * sin(M_PI * (tau * fs - i)) /
                            (M_PI * (tau * fs - i)) * 0.5 *
                            (1.0 + cos(M_PI * (tau * fs - i) / sinchalfwidth));
                      } else {
                        res[i] +=
                            amplitude * 0.5 *
                            (1.0 + cos(M_PI * (tau * fs - i) / sinchalfwidth));
                      }
                    }
                    totalrefl++;
                    lits++;
                    l = l + tb;
                  }
                  l = 0;
                  if (lits == 0)
                    break;
                  nits++;
                  n = n + fb;
                }
                if (nits == 0)
                  break;
                n = 0;
                m = m + lr;
              }
            }
          }
        }
      }
  *nrefl = totalrefl;
  return 0;
}


x86 assembly (clang, -O0):
<_get_imp_response_approx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %esi,-0x1c(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
mov    %r9,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
movl   $0x0,-0x60(%rbp)
movl   $0x0,-0x64(%rbp)
movl   $0x0,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
movl   $0x0,-0x70(%rbp)
movl   $0x0,-0x74(%rbp)
movl   $0x0,-0x78(%rbp)
movl   $0x0,-0x7c(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xdba(%rip),%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movl   $0x0,-0x44(%rbp)
cmpl   $0x1,-0x44(%rbp)
jg     19f0 <_get_imp_response_approx+0x8a0>
movl   $0x0,-0x48(%rbp)
cmpl   $0x1,-0x48(%rbp)
jg     19dd <_get_imp_response_approx+0x88d>
movl   $0x0,-0x4c(%rbp)
cmpl   $0x1,-0x4c(%rbp)
jg     19ca <_get_imp_response_approx+0x87a>
movl   $0x0,-0x54(%rbp)
movl   $0xffffffff,-0x60(%rbp)
cmpl   $0x1,-0x60(%rbp)
jg     19b7 <_get_imp_response_approx+0x867>
movl   $0x0,-0x58(%rbp)
movl   $0xffffffff,-0x64(%rbp)
cmpl   $0x1,-0x64(%rbp)
jg     19a4 <_get_imp_response_approx+0x854>
movl   $0x0,-0x50(%rbp)
movl   $0xffffffff,-0x68(%rbp)
cmpl   $0x1,-0x68(%rbp)
jg     1991 <_get_imp_response_approx+0x841>
cmpl   $0xffffffff,-0x60(%rbp)
jne    12ed <_get_imp_response_approx+0x19d>
movl   $0x0,-0x54(%rbp)
jmp    12f4 <_get_imp_response_approx+0x1a4>
movl   $0x1,-0x54(%rbp)
jmp    12f9 <_get_imp_response_approx+0x1a9>
movl   $0x0,-0x6c(%rbp)
cmpl   $0xffffffff,-0x64(%rbp)
jne    1316 <_get_imp_response_approx+0x1c6>
movl   $0x0,-0x58(%rbp)
jmp    131d <_get_imp_response_approx+0x1cd>
movl   $0x1,-0x58(%rbp)
jmp    1322 <_get_imp_response_approx+0x1d2>
movl   $0x0,-0x70(%rbp)
cmpl   $0xffffffff,-0x68(%rbp)
jne    133f <_get_imp_response_approx+0x1ef>
movl   $0x0,-0x50(%rbp)
jmp    1346 <_get_imp_response_approx+0x1f6>
movl   $0x1,-0x50(%rbp)
jmp    134b <_get_imp_response_approx+0x1fb>
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x54(%rbp),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x48(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
mov    -0x30(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x38(%rbp),%rax
movsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x58(%rbp),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
mov    -0x40(%rbp),%rax
movsd  0x8(%rax),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x4c(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
mov    -0x30(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x38(%rbp),%rax
movsd  0x10(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x50(%rbp),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
mov    -0x40(%rbp),%rax
movsd  0x10(%rax),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x98(%rbp),%xmm1
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0xa0(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0xa8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1070 <sqrt@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
ucomisd -0x90(%rbp),%xmm0
ff
jbe    14d3 <_get_imp_response_approx+0x383>
jmp    192d <_get_imp_response_approx+0x7dd>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
mov    -0x54(%rbp),%edi
sub    -0x44(%rbp),%edi
call   1030 <abs@plt>
movsd  -0x110(%rbp),%xmm0
ff
mov    %eax,%edi
call   1060 <pow@plt>
mov    %eax,-0xfc(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
mov    -0x54(%rbp),%edi
call   1030 <abs@plt>
movsd  -0x108(%rbp),%xmm0
ff
mov    %eax,%edi
call   1060 <pow@plt>
mov    %eax,%ecx
mov    -0xfc(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0xec(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
mov    -0x58(%rbp),%edi
sub    -0x48(%rbp),%edi
call   1030 <abs@plt>
movsd  -0xf8(%rbp),%xmm0
ff
mov    %eax,%edi
call   1060 <pow@plt>
mov    %eax,%ecx
mov    -0xec(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0xdc(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
mov    -0x58(%rbp),%edi
call   1030 <abs@plt>
movsd  -0xe8(%rbp),%xmm0
ff
mov    %eax,%edi
call   1060 <pow@plt>
mov    %eax,%ecx
mov    -0xdc(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0xcc(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
mov    -0x50(%rbp),%edi
sub    -0x4c(%rbp),%edi
call   1030 <abs@plt>
movsd  -0xd8(%rbp),%xmm0
ff
mov    %eax,%edi
call   1060 <pow@plt>
mov    %eax,%ecx
mov    -0xcc(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0xbc(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0x50(%rbp),%edi
call   1030 <abs@plt>
movsd  -0xc8(%rbp),%xmm0
ff
mov    %eax,%edi
call   1060 <pow@plt>
mov    %eax,%ecx
mov    -0xbc(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
mov    0x29bd(%rip),%rax
mov    (%rax),%eax
shl    $0x2,%eax
cvtsi2sd %eax,%xmm1
mulsd  -0x88(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
mulsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
sub    -0x1c(%rbp),%eax
cmp    $0x0,%eax
jge    168c <_get_imp_response_approx+0x53c>
movl   $0x0,-0x5c(%rbp)
jmp    1695 <_get_imp_response_approx+0x545>
mov    -0x7c(%rbp),%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x7c(%rbp),%eax
add    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     16af <_get_imp_response_approx+0x55f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x78(%rbp)
jmp    16b8 <_get_imp_response_approx+0x568>
mov    -0x7c(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x78(%rbp)
jmp    16bd <_get_imp_response_approx+0x56d>
mov    -0x5c(%rbp),%eax
cmp    -0x78(%rbp),%eax
jge    190d <_get_imp_response_approx+0x7bd>
movsd  -0xb8(%rbp),%xmm0
ff
movsd  -0x8(%rbp),%xmm2
cvtsi2sdl -0x5c(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movaps 0x91f(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0x8fb(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    185f <_get_imp_response_approx+0x70f>
movsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
mov    0x28ba(%rip),%rax
cvtsi2sdl (%rax),%xmm0
movsd  -0xb8(%rbp),%xmm1
ff
movsd  -0x8(%rbp),%xmm3
cvtsi2sdl -0x5c(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x120(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mov    0x2862(%rip),%rax
cvtsi2sdl (%rax),%xmm1
movsd  -0xb8(%rbp),%xmm2
ff
movsd  -0x8(%rbp),%xmm4
cvtsi2sdl -0x5c(%rbp),%xmm3
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  0x845(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
mov    0x280a(%rip),%rax
cvtsi2sdl (%rax),%xmm0
movsd  -0xb8(%rbp),%xmm1
ff
movsd  -0x8(%rbp),%xmm3
cvtsi2sdl -0x5c(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x1c(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x118(%rbp),%xmm0
ff
movsd  0x7c4(%rip),%xmm2
addsd  %xmm1,%xmm2
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    18fa <_get_imp_response_approx+0x7aa>
movsd  0x7a9(%rip),%xmm0
mulsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0x128(%rbp)
ff
mov    0x276a(%rip),%rax
cvtsi2sdl (%rax),%xmm0
movsd  -0xb8(%rbp),%xmm1
ff
movsd  -0x8(%rbp),%xmm3
cvtsi2sdl -0x5c(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x1c(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x128(%rbp),%xmm0
ff
movsd  0x724(%rip),%xmm2
addsd  %xmm1,%xmm2
mov    0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    18ff <_get_imp_response_approx+0x7af>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    16bd <_get_imp_response_approx+0x56d>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
mov    -0x50(%rbp),%eax
add    -0x68(%rbp),%eax
mov    %eax,-0x50(%rbp)
jmp    134b <_get_imp_response_approx+0x1fb>
movl   $0x0,-0x50(%rbp)
cmpl   $0x0,-0x70(%rbp)
jne    1943 <_get_imp_response_approx+0x7f3>
jmp    195a <_get_imp_response_approx+0x80a>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x58(%rbp),%eax
add    -0x64(%rbp),%eax
mov    %eax,-0x58(%rbp)
jmp    1322 <_get_imp_response_approx+0x1d2>
cmpl   $0x0,-0x6c(%rbp)
jne    1969 <_get_imp_response_approx+0x819>
jmp    197e <_get_imp_response_approx+0x82e>
movl   $0x0,-0x58(%rbp)
mov    -0x54(%rbp),%eax
add    -0x60(%rbp),%eax
mov    %eax,-0x54(%rbp)
jmp    12f9 <_get_imp_response_approx+0x1a9>
jmp    1983 <_get_imp_response_approx+0x833>
mov    -0x68(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x68(%rbp)
jmp    12cd <_get_imp_response_approx+0x17d>
jmp    1996 <_get_imp_response_approx+0x846>
mov    -0x64(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x64(%rbp)
jmp    12b5 <_get_imp_response_approx+0x165>
jmp    19a9 <_get_imp_response_approx+0x859>
mov    -0x60(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x60(%rbp)
jmp    129d <_get_imp_response_approx+0x14d>
jmp    19bc <_get_imp_response_approx+0x86c>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1285 <_get_imp_response_approx+0x135>
jmp    19cf <_get_imp_response_approx+0x87f>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1274 <_get_imp_response_approx+0x124>
jmp    19e2 <_get_imp_response_approx+0x892>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1263 <_get_imp_response_approx+0x113>
mov    -0x74(%rbp),%ecx
mov    0x18(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_get_imp_response_approx>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x148,%rsp
mov    %r9,0x108(%rsp)
mov    %r8,0x100(%rsp)
mov    %rcx,0xf8(%rsp)
mov    %rdx,0xc0(%rsp)
mov    %edi,0x44(%rsp)
cvtsi2sd %edi,%xmm2
mov    0x180(%rsp),%r15
movsd  %xmm0,0xb0(%rsp)
divsd  %xmm0,%xmm2
mov    %esi,0x48(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %esi,%xmm0
movsd  %xmm0,0x88(%rsp)
movsd  %xmm1,0xb8(%rsp)
mulsd  %xmm1,%xmm2
movsd  %xmm2,0xf0(%rsp)
mov    $0x1,%al
mov    0x2e27(%rip),%r13
movl   $0x0,0x10(%rsp)
xor    %r14d,%r14d
jmp    11e6 <_get_imp_response_approx+0xa6>
xchg   %ax,%ax
mov    $0x1,%r14d
testb  $0x1,0x2c(%rsp)
mov    $0x0,%eax
je     1707 <_get_imp_response_approx+0x5c7>
mov    %eax,0x2c(%rsp)
lea    (%r14,%r14,1),%eax
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0xe8(%rsp)
mov    $0x1,%al
xor    %ecx,%ecx
mov    %r14,0xa8(%rsp)
jmp    1221 <_get_imp_response_approx+0xe1>
nop
mov    $0x1,%ecx
testb  $0x1,0x30(%rsp)
mov    $0x0,%eax
je     11d0 <_get_imp_response_approx+0x90>
mov    %eax,0x30(%rsp)
lea    (%rcx,%rcx,1),%eax
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0xe0(%rsp)
xor    %edx,%edx
mov    $0x1,%al
mov    %rcx,0x90(%rsp)
jmp    1261 <_get_imp_response_approx+0x121>
nopl   0x0(%rax)
mov    $0x1,%edx
testb  $0x1,0x34(%rsp)
mov    $0x0,%eax
je     1210 <_get_imp_response_approx+0xd0>
mov    %eax,0x34(%rsp)
mov    %rdx,0xa0(%rsp)
lea    (%rdx,%rdx,1),%eax
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0xd8(%rsp)
mov    $0xffffffff,%ebx
jmp    1299 <_get_imp_response_approx+0x159>
nopw   0x0(%rax,%rax,1)
lea    0x2(%rbx),%eax
test   %ebx,%ebx
mov    %eax,%ebx
jns    1250 <_get_imp_response_approx+0x110>
xor    %eax,%eax
cmp    $0xffffffff,%ebx
setne  %al
mov    %eax,0x38(%rsp)
mov    $0xffffffff,%ebp
mov    %rbx,0xc8(%rsp)
jmp    12c9 <_get_imp_response_approx+0x189>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0x2(%rbp),%eax
test   %ebp,%ebp
mov    %eax,%ebp
jns    1290 <_get_imp_response_approx+0x150>
xor    %eax,%eax
cmp    $0xffffffff,%ebp
setne  %al
mov    %eax,0x3c(%rsp)
mov    $0xffffffff,%eax
mov    %rbp,0xd0(%rsp)
jmp    12fc <_get_imp_response_approx+0x1bc>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x78(%rsp),%rdx
lea    0x2(%rdx),%eax
test   %edx,%edx
jns    12c0 <_get_imp_response_approx+0x180>
xor    %edx,%edx
mov    %rax,0x78(%rsp)
cmp    $0xffffffff,%eax
setne  %dl
mov    %edx,0x40(%rsp)
mov    0x38(%rsp),%eax
mov    %eax,%edx
jmp    1329 <_get_imp_response_approx+0x1e9>
cs nopw 0x0(%rax,%rax,1)
nop
add    %ebx,%edx
cmpl   $0x0,0xc(%rsp)
je     12f0 <_get_imp_response_approx+0x1b0>
lea    (%rdx,%rdx,1),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
xorpd  0xcc5(%rip),%xmm0
movapd %xmm0,0x120(%rsp)
mov    %edx,%eax
sub    %r14d,%eax
mov    %eax,%esi
neg    %esi
cmovs  %eax,%esi
mov    %esi,0x50(%rsp)
mov    %edx,%eax
neg    %eax
mov    %rdx,0x80(%rsp)
cmovs  %edx,%eax
mov    %eax,0x4c(%rsp)
movl   $0x0,0xc(%rsp)
mov    0x3c(%rsp),%eax
mov    %eax,%edx
cs nopw 0x0(%rax,%rax,1)
nop
lea    (%rdx,%rdx,1),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
xorpd  0xc6e(%rip),%xmm0
movapd %xmm0,0x130(%rsp)
mov    %edx,%eax
sub    %ecx,%eax
mov    %eax,%ecx
neg    %ecx
cmovs  %eax,%ecx
mov    %ecx,0x58(%rsp)
mov    %edx,%eax
neg    %eax
mov    %rdx,0x98(%rsp)
cmovs  %edx,%eax
mov    %eax,0x54(%rsp)
mov    0x40(%rsp),%eax
mov    %eax,%r12d
movl   $0x0,0x14(%rsp)
jmp    13ff <_get_imp_response_approx+0x2bf>
xchg   %ax,%ax
addl   $0x1,0x10(%rsp)
addl   $0x1,0x14(%rsp)
mov    0x110(%rsp),%r12
add    0x78(%rsp),%r12d
mov    0xa8(%rsp),%r14
mov    0xc8(%rsp),%rbx
mov    0xd0(%rsp),%rbp
mov    0xf8(%rsp),%rdx
movsd  (%rdx),%xmm0
mulsd  0xe8(%rsp),%xmm0
mov    0x100(%rsp),%rax
addsd  (%rax),%xmm0
mov    0x108(%rsp),%rcx
movsd  (%rcx),%xmm1
mulsd  0x120(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  0x8(%rdx),%xmm0
mulsd  0xe0(%rsp),%xmm0
addsd  0x8(%rax),%xmm0
movsd  0x8(%rcx),%xmm2
mulsd  0x130(%rsp),%xmm2
addsd  %xmm0,%xmm2
movsd  0x10(%rdx),%xmm0
mulsd  0xd8(%rsp),%xmm0
addsd  0x10(%rax),%xmm0
lea    (%r12,%r12,1),%eax
xorps  %xmm3,%xmm3
cvtsi2sd %eax,%xmm3
mulsd  0x10(%rcx),%xmm3
subsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm2
mulsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ucomisd 0xb97(%rip),%xmm0
jb     14b0 <_get_imp_response_approx+0x370>
xorps  %xmm1,%xmm1
sqrtsd %xmm0,%xmm1
jmp    14b9 <_get_imp_response_approx+0x379>
nopl   0x0(%rax)
call   1060 <sqrt@plt>
movapd %xmm0,%xmm1
mov    0x80(%rsp),%rdx
ucomisd 0xf0(%rsp),%xmm1
ja     16e0 <_get_imp_response_approx+0x5a0>
mov    0xc0(%rsp),%rbx
movsd  (%rbx),%xmm0
mov    0x50(%rsp),%edi
movsd  %xmm1,0x60(%rsp)
call   1050 <pow@plt>
mov    %eax,0x20(%rsp)
movsd  0x8(%rbx),%xmm0
mov    0x4c(%rsp),%edi
call   1050 <pow@plt>
mov    %eax,0x18(%rsp)
movsd  0x10(%rbx),%xmm0
mov    0x58(%rsp),%edi
call   1050 <pow@plt>
mov    %eax,%r14d
movsd  0x18(%rbx),%xmm0
mov    0x54(%rsp),%edi
call   1050 <pow@plt>
mov    %eax,0x5c(%rsp)
movsd  0x20(%rbx),%xmm0
mov    %r12d,%eax
sub    0xa0(%rsp),%eax
mov    %eax,%edi
neg    %edi
cmovs  %eax,%edi
call   1050 <pow@plt>
mov    %eax,%ebp
movsd  0x28(%rbx),%xmm0
mov    %r12d,%edi
neg    %edi
mov    %r12,0x110(%rsp)
cmovs  %r12d,%edi
call   1050 <pow@plt>
movsd  0x60(%rsp),%xmm1
movapd %xmm1,%xmm0
divsd  0xb8(%rsp),%xmm0
mulsd  0xb0(%rsp),%xmm0
movsd  %xmm0,0x118(%rsp)
cvttsd2si %xmm0,%ecx
mov    %ecx,%edx
mov    0x48(%rsp),%esi
sub    %esi,%edx
mov    $0x0,%edi
cmovs  %edi,%edx
add    %esi,%ecx
mov    0x44(%rsp),%esi
cmp    %esi,%ecx
cmovge %esi,%ecx
cmp    %ecx,%edx
jge    13d0 <_get_imp_response_approx+0x290>
mov    0x18(%rsp),%esi
imul   0x20(%rsp),%esi
imul   0x5c(%rsp),%r14d
imul   %esi,%r14d
imul   %eax,%ebp
imul   %r14d,%ebp
cvtsi2sd %ebp,%xmm2
mov    0x0(%r13),%eax
shl    $0x2,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  %xmm0,%xmm1
divsd  %xmm1,%xmm2
movsd  %xmm2,0x20(%rsp)
mulsd  0xa36(%rip),%xmm2
movsd  %xmm2,0x18(%rsp)
mov    %edx,%ebp
mov    %ecx,%r14d
jmp    1639 <_get_imp_response_approx+0x4f9>
nopw   0x0(%rax,%rax,1)
divsd  0x88(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <cos@plt>
addsd  0xa16(%rip),%xmm0
mulsd  0x18(%rsp),%xmm0
addsd  (%r15,%rbp,8),%xmm0
movsd  %xmm0,(%r15,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%r14
je     13d0 <_get_imp_response_approx+0x290>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
movsd  0x118(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
andpd  0x9b7(%rip),%xmm0
ucomisd 0x9c7(%rip),%xmm0
xorps  %xmm0,%xmm0
cvtsi2sdl 0x0(%r13),%xmm0
mulsd  %xmm1,%xmm0
jbe    1600 <_get_imp_response_approx+0x4c0>
mov    %r13,%rbx
cvttsd2si %xmm0,%edi
movapd %xmm1,0x60(%rsp)
call   1030 <sin@plt>
mulsd  0x20(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtsi2sdl 0x0(%r13),%xmm1
movapd 0x60(%rsp),%xmm2
mulsd  %xmm1,%xmm2
divsd  %xmm2,%xmm0
mulsd  0x979(%rip),%xmm0
movsd  %xmm0,0x60(%rsp)
divsd  0x88(%rsp),%xmm2
cvttsd2si %xmm2,%edi
call   1040 <cos@plt>
addsd  0x969(%rip),%xmm0
mulsd  0x60(%rsp),%xmm0
jmp    1620 <_get_imp_response_approx+0x4e0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpl   $0x0,0x14(%rsp)
mov    0x90(%rsp),%rcx
je     1320 <_get_imp_response_approx+0x1e0>
addl   $0x1,0xc(%rsp)
mov    0x98(%rsp),%rdx
add    %ebp,%edx
jmp    1380 <_get_imp_response_approx+0x240>
mov    0x188(%rsp),%rax
mov    0x10(%rsp),%ecx
mov    %ecx,(%rax)
xor    %eax,%eax
add    $0x148,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@M_PI = global i32 0
define i32 @_get_imp_response_approx(double %0, i32 %1, double %2, i32 %3, double* nocapture %4, double* nocapture %5, double* nocapture %6, double* nocapture %7, double* nocapture %8, i32* nocapture writeonly %9) {
%11 = sitofp i32 %1 to double
%12 = fdiv double %11, %0
%13 = fmul double %12, %2
%14 = getelementptr inbounds double, double* %5, i64 1
%15 = getelementptr inbounds double, double* %6, i64 1
%16 = getelementptr inbounds double, double* %7, i64 1
%17 = getelementptr inbounds double, double* %5, i64 2
%18 = getelementptr inbounds double, double* %6, i64 2
%19 = getelementptr inbounds double, double* %7, i64 2
%20 = getelementptr inbounds double, double* %4, i64 1
%21 = getelementptr inbounds double, double* %4, i64 2
%22 = getelementptr inbounds double, double* %4, i64 3
%23 = getelementptr inbounds double, double* %4, i64 4
%24 = getelementptr inbounds double, double* %4, i64 5
%25 = sitofp i32 %3 to double
br label %26
26: ; preds = %10, %210
%27 = phi i32 [ 0, %10 ], [ %84, %210 ]
%28 = phi i1 [ true, %10 ], [ false, %210 ]
%29 = phi i32 [ 0, %10 ], [ 1, %210 ]
%30 = shl nuw nsw i32 %29, 1
%31 = add nsw i32 %30, -1
%32 = sitofp i32 %31 to double
br label %33
33: ; preds = %26, %209
%34 = phi i32 [ %27, %26 ], [ %84, %209 ]
%35 = phi i1 [ true, %26 ], [ false, %209 ]
%36 = phi i32 [ 0, %26 ], [ 1, %209 ]
%37 = shl nuw nsw i32 %36, 1
%38 = add nsw i32 %37, -1
%39 = sitofp i32 %38 to double
br label %40
40: ; preds = %33, %208
%41 = phi i32 [ %34, %33 ], [ %84, %208 ]
%42 = phi i1 [ true, %33 ], [ false, %208 ]
%43 = phi i32 [ 0, %33 ], [ 1, %208 ]
%44 = shl nuw nsw i32 %43, 1
%45 = add nsw i32 %44, -1
%46 = sitofp i32 %45 to double
br label %47
47: ; preds = %40, %205
%48 = phi i32 [ %41, %40 ], [ %84, %205 ]
%49 = phi i32 [ -1, %40 ], [ %206, %205 ]
%50 = icmp ne i32 %49, -1
%51 = zext i1 %50 to i32
br label %52
52: ; preds = %47, %202
%53 = phi i32 [ %48, %47 ], [ %84, %202 ]
%54 = phi i32 [ -1, %47 ], [ %203, %202 ]
%55 = icmp ne i32 %54, -1
%56 = zext i1 %55 to i32
br label %57
57: ; preds = %52, %199
%58 = phi i32 [ %53, %52 ], [ %84, %199 ]
%59 = phi i32 [ -1, %52 ], [ %200, %199 ]
%60 = icmp ne i32 %59, -1
%61 = zext i1 %60 to i32
br label %62
62: ; preds = %196, %57
%63 = phi i32 [ %51, %57 ], [ %198, %196 ]
%64 = phi i32 [ %58, %57 ], [ %84, %196 ]
%65 = shl nsw i32 %63, 1
%66 = sitofp i32 %65 to double
%67 = fneg double %66
%68 = sub nsw i32 %63, %29
%69 = tail call i32 @llvm.abs.i32(i32 %68, i1 true)
%70 = tail call i32 @llvm.abs.i32(i32 %63, i1 true)
br label %71
71: ; preds = %193, %62
%72 = phi i32 [ %56, %62 ], [ %195, %193 ]
%73 = phi i32 [ 0, %62 ], [ %194, %193 ]
%74 = phi i32 [ %64, %62 ], [ %84, %193 ]
%75 = shl nsw i32 %72, 1
%76 = sitofp i32 %75 to double
%77 = fneg double %76
%78 = sub nsw i32 %72, %36
%79 = tail call i32 @llvm.abs.i32(i32 %78, i1 true)
%80 = tail call i32 @llvm.abs.i32(i32 %72, i1 true)
br label %81
81: ; preds = %187, %71
%82 = phi i32 [ %61, %71 ], [ %190, %187 ]
%83 = phi i32 [ 0, %71 ], [ %189, %187 ]
%84 = phi i32 [ %74, %71 ], [ %188, %187 ]
%85 = load double, double* %5
%86 = load double, double* %6
%87 = tail call double @llvm.fmuladd.f64(double %32, double %85, double %86)
%88 = load double, double* %7
%89 = tail call double @llvm.fmuladd.f64(double %67, double %88, double %87)
%90 = load double, double* %14
%91 = load double, double* %15
%92 = tail call double @llvm.fmuladd.f64(double %39, double %90, double %91)
%93 = load double, double* %16
%94 = tail call double @llvm.fmuladd.f64(double %77, double %93, double %92)
%95 = load double, double* %17
%96 = load double, double* %18
%97 = tail call double @llvm.fmuladd.f64(double %46, double %95, double %96)
%98 = shl nsw i32 %82, 1
%99 = sitofp i32 %98 to double
%100 = load double, double* %19
%101 = fneg double %99
%102 = tail call double @llvm.fmuladd.f64(double %101, double %100, double %97)
%103 = fmul double %94, %94
%104 = tail call double @llvm.fmuladd.f64(double %89, double %89, double %103)
%105 = tail call double @llvm.fmuladd.f64(double %102, double %102, double %104)
%106 = tail call double @sqrt(double %105)
%107 = fcmp ogt double %106, %13
br i1 %107, label %191, label %108
108: ; preds = %81
%109 = load double, double* %4
%110 = tail call i32 @pow(double %109, i32 %69)
%111 = load double, double* %20
%112 = tail call i32 @pow(double %111, i32 %70)
%113 = mul nsw i32 %112, %110
%114 = load double, double* %21
%115 = tail call i32 @pow(double %114, i32 %79)
%116 = mul nsw i32 %113, %115
%117 = load double, double* %22
%118 = tail call i32 @pow(double %117, i32 %80)
%119 = mul nsw i32 %116, %118
%120 = load double, double* %23
%121 = sub nsw i32 %82, %43
%122 = tail call i32 @llvm.abs.i32(i32 %121, i1 true)
%123 = tail call i32 @pow(double %120, i32 %122)
%124 = mul nsw i32 %119, %123
%125 = load double, double* %24
%126 = tail call i32 @llvm.abs.i32(i32 %82, i1 true)
%127 = tail call i32 @pow(double %125, i32 %126)
%128 = mul nsw i32 %124, %127
%129 = sitofp i32 %128 to double
%130 = load i32, i32* @M_PI
%131 = shl nsw i32 %130, 2
%132 = sitofp i32 %131 to double
%133 = fmul double %106, %132
%134 = fdiv double %129, %133
%135 = fdiv double %106, %2
%136 = fmul double %135, %0
%137 = fptosi double %136 to i32
%138 = sub nsw i32 %137, %3
%139 = icmp sgt i32 %138, 0
%140 = select i1 %139, i32 %138, i32 0
%141 = add nsw i32 %137, %3
%142 = icmp slt i32 %141, %1
%143 = select i1 %142, i32 %141, i32 %1
%144 = icmp slt i32 %140, %143
br i1 %144, label %145, label %187
145: ; preds = %108
%146 = fmul double %134, 5.000000e-01
%147 = zext i32 %140 to i64
%148 = zext i32 %143 to i64
br label %149
149: ; preds = %145, %184
%150 = phi i64 [ %147, %145 ], [ %185, %184 ]
%151 = trunc i64 %150 to i32
%152 = sitofp i32 %151 to double
%153 = fneg double %152
%154 = tail call double @llvm.fmuladd.f64(double %135, double %0, double %153)
%155 = tail call double @llvm.fabs.f64(double %154)
%156 = fcmp ogt double %155, 1.000000e-04
%157 = load i32, i32* @M_PI
%158 = sitofp i32 %157 to double
%159 = fmul double %154, %158
br i1 %156, label %160, label %176
160: ; preds = %149
%161 = fptosi double %159 to i32
%162 = tail call double @sin(i32 %161)
%163 = fmul double %134, %162
%164 = load i32, i32* @M_PI
%165 = sitofp i32 %164 to double
%166 = fmul double %154, %165
%167 = fdiv double %163, %166
%168 = fmul double %167, 5.000000e-01
%169 = fdiv double %166, %25
%170 = fptosi double %169 to i32
%171 = tail call double @cos(i32 %170)
%172 = fadd double %171, 1.000000e+00
%173 = getelementptr inbounds double, double* %8, i64 %150
%174 = load double, double* %173
%175 = tail call double @llvm.fmuladd.f64(double %168, double %172, double %174)
store double %175, double* %173
br label %184
176: ; preds = %149
%177 = fdiv double %159, %25
%178 = fptosi double %177 to i32
%179 = tail call double @cos(i32 %178)
%180 = fadd double %179, 1.000000e+00
%181 = getelementptr inbounds double, double* %8, i64 %150
%182 = load double, double* %181
%183 = tail call double @llvm.fmuladd.f64(double %146, double %180, double %182)
store double %183, double* %181
br label %184
184: ; preds = %160, %176
%185 = add nuw nsw i64 %150, 1
%186 = icmp eq i64 %185, %148
br i1 %186, label %187, label %149
187: ; preds = %184, %108
%188 = add nsw i32 %84, 1
%189 = add nuw nsw i32 %83, 1
%190 = add nsw i32 %82, %59
br label %81
191: ; preds = %81
%192 = icmp eq i32 %83, 0
br i1 %192, label %196, label %193
193: ; preds = %191
%194 = add nuw nsw i32 %73, 1
%195 = add nsw i32 %72, %54
br label %71
196: ; preds = %191
%197 = icmp eq i32 %73, 0
%198 = add nsw i32 %63, %49
br i1 %197, label %199, label %62
199: ; preds = %196
%200 = add nsw i32 %59, 2
%201 = icmp slt i32 %59, 0
br i1 %201, label %57, label %202
202: ; preds = %199
%203 = add nsw i32 %54, 2
%204 = icmp slt i32 %54, 0
br i1 %204, label %52, label %205
205: ; preds = %202
%206 = add nsw i32 %49, 2
%207 = icmp slt i32 %49, 0
br i1 %207, label %47, label %208
208: ; preds = %205
br i1 %42, label %40, label %209
209: ; preds = %208
br i1 %35, label %33, label %210
210: ; preds = %209
br i1 %28, label %26, label %211
211: ; preds = %210
store i32 %84, i32* %9
ret i32 0
}