#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 cos(double);
double *malloc(int);
int pow(double, int);
int /*<<< orphan*/ print(double *, int, int /*<<< orphan*/, char const *);
int sin(double);
int sqrt(int);
double tan(double);
void iir(int N, double Fp, char const *name) {
  double d = tan(3.14159265358979323846 * .5 * Fp), r = d * d,
         t = sqrt(1 - r * r), n = (1 - sqrt(t)) / (1 + sqrt(t)) * .5;
  double x = (n * n) * (n * n), Q = (((150 * x + 15) * x + 2) * x + 1) * n,
         q = pow(Q, .25), *h;
  int i = 0, j, _1;
  if (!(h = malloc(sizeof(*h) * (size_t)N)))
    goto END;
  for (; i < N; t = n * q / d, t = t * t,
                t = sqrt((1 - t * r) * (1 - t / r)) / (1 + t),
                h[i++] = (1 - t) / (1 + t))
    for (_1 = 1, d = -.5, n = j = 0,
        x = (i + 1) * 3.14159265358979323846 / (N + .5);
         j < 7; ++j, _1 = -_1)
      n += _1 * pow(Q, j * (j + 1)) * sin(x * (j + .5)),
          d += _1 * pow(Q, j * j) * cos(x * j);
END:
  print(h, N, 0, name);
}


x86 assembly (clang, -O0):
<iir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  0xe99(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1060 <tan@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe26(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1090 <sqrt@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x30(%rbp)
cvttsd2si -0x30(%rbp),%edi
call   1090 <sqrt@plt>
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
mov    %eax,-0x68(%rbp)
cvttsd2si -0x30(%rbp),%edi
call   1090 <sqrt@plt>
mov    %eax,%ecx
mov    -0x68(%rbp),%eax
add    $0x1,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  0xdf9(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  0xdb6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdb2(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd8d(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd70(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
xor    %edi,%edi
call   1080 <pow@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x5c(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x58(%rbp)
cmp    $0x0,%rax
jne    12dc <iir+0x16c>
jmp    14dc <iir+0x36c>
jmp    12e1 <iir+0x171>
mov    -0x5c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    14d7 <iir+0x367>
movl   $0x1,-0x64(%rbp)
movsd  0xd3c(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  0xd0e(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xced(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
cmpl   $0x7,-0x60(%rbp)
jge    1407 <iir+0x297>
mov    -0x64(%rbp),%eax
mov    %eax,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
mov    -0x60(%rbp),%edi
mov    -0x60(%rbp),%eax
add    $0x1,%eax
imul   %eax,%edi
call   1080 <pow@plt>
mov    %eax,%ecx
mov    -0x78(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x74(%rbp)
movsd  -0x40(%rbp),%xmm0
cvtsi2sdl -0x60(%rbp),%xmm1
movsd  0xc9d(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1040 <sin@plt>
mov    %eax,%ecx
mov    -0x74(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
mov    -0x60(%rbp),%edi
imul   -0x60(%rbp),%edi
call   1080 <pow@plt>
mov    %eax,%ecx
mov    -0x70(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x6c(%rbp)
movsd  -0x40(%rbp),%xmm0
cvtsi2sdl -0x60(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1070 <cos@plt>
mov    %eax,%ecx
mov    -0x6c(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
xor    %eax,%eax
sub    -0x64(%rbp),%eax
mov    %eax,-0x64(%rbp)
jmp    1340 <iir+0x1d0>
jmp    140c <iir+0x29c>
movsd  -0x38(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xba4(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm2
divsd  -0x28(%rbp),%xmm2
movsd  0xb8e(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1090 <sqrt@plt>
cvtsi2sd %eax,%xmm0
movsd  0xb71(%rip),%xmm1
addsd  -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xb5b(%rip),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  0xb4e(%rip),%xmm1
addsd  -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x58(%rbp),%rax
mov    -0x5c(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x5c(%rbp)
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    12e1 <iir+0x171>
jmp    14dc <iir+0x36c>
mov    -0x58(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    -0x18(%rbp),%rcx
xor    %edx,%edx
call   1030 <print@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iir>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rsi,0x28(%rsp)
mov    %edi,%r15d
mulsd  0xe72(%rip),%xmm0
call   1060 <tan@plt>
mulsd  %xmm0,%xmm0
movsd  %xmm0,0x40(%rsp)
mulsd  %xmm0,%xmm0
movsd  0xe5f(%rip),%xmm1
subsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
call   1090 <sqrt@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1090 <sqrt@plt>
mov    $0x1,%ebp
sub    %eax,%ebp
mov    %ebx,%edi
call   1090 <sqrt@plt>
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm2
mulsd  0xe2d(%rip),%xmm2
movapd %xmm2,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm1
movsd  0xe21(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe1d(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe19(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xded(%rip),%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm0,(%rsp)
xor    %edi,%edi
call   1080 <pow@plt>
mov    %eax,%ebp
lea    0x0(,%r15,8),%edi
call   1050 <malloc@plt>
mov    %rax,%r13
test   %rax,%rax
je     1651 <iir+0x4e1>
test   %r15d,%r15d
jle    1651 <iir+0x4e1>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
movsd  %xmm0,0x38(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
addsd  0xda4(%rip),%xmm0
movsd  %xmm0,0x30(%rsp)
mov    %r15d,%r12d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rbx),%r14
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
mulsd  0xd9c(%rip),%xmm0
divsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
xor    %edi,%edi
call   1080 <pow@plt>
mov    %eax,%ebp
movsd  0x8(%rsp),%xmm0
mulsd  0xd54(%rip),%xmm0
call   1040 <sin@plt>
imul   %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
xor    %edi,%edi
call   1080 <pow@plt>
mov    %eax,%ebp
movsd  0x8(%rsp),%xmm0
mulsd  0xda3(%rip),%xmm0
call   1070 <cos@plt>
imul   %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0xd34(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  (%rsp),%xmm0
mov    $0x2,%edi
call   1080 <pow@plt>
mov    %eax,%ebp
movsd  0x8(%rsp),%xmm0
mulsd  0xd17(%rip),%xmm0
call   1040 <sin@plt>
imul   %ebp,%eax
neg    %eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
mov    $0x1,%edi
call   1080 <pow@plt>
mov    %eax,%ebp
movsd  0x8(%rsp),%xmm0
call   1070 <cos@plt>
imul   %ebp,%eax
neg    %eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  (%rsp),%xmm0
mov    $0x6,%edi
call   1080 <pow@plt>
mov    %eax,%ebp
movsd  0x8(%rsp),%xmm0
mulsd  0xcaf(%rip),%xmm0
call   1040 <sin@plt>
imul   %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  (%rsp),%xmm0
mov    $0x4,%edi
call   1080 <pow@plt>
mov    %eax,%ebp
movsd  0x8(%rsp),%xmm0
addsd  %xmm0,%xmm0
call   1070 <cos@plt>
imul   %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
mov    $0xc,%edi
call   1080 <pow@plt>
mov    %eax,%ebp
movsd  0x8(%rsp),%xmm0
mulsd  0xc47(%rip),%xmm0
call   1040 <sin@plt>
imul   %ebp,%eax
neg    %eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  (%rsp),%xmm0
mov    $0x9,%edi
call   1080 <pow@plt>
mov    %eax,%ebp
movsd  0x8(%rsp),%xmm0
mulsd  0xc13(%rip),%xmm0
call   1070 <cos@plt>
imul   %ebp,%eax
neg    %eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
mov    $0x14,%edi
call   1080 <pow@plt>
mov    %eax,%ebp
movsd  0x8(%rsp),%xmm0
mulsd  0xbdf(%rip),%xmm0
call   1040 <sin@plt>
imul   %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  (%rsp),%xmm0
mov    $0x10,%edi
call   1080 <pow@plt>
mov    %eax,%ebp
movsd  0x8(%rsp),%xmm0
mulsd  0xbad(%rip),%xmm0
call   1070 <cos@plt>
imul   %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
mov    $0x1e,%edi
call   1080 <pow@plt>
mov    %eax,%ebp
movsd  0x8(%rsp),%xmm0
mulsd  0xb7b(%rip),%xmm0
call   1040 <sin@plt>
imul   %ebp,%eax
neg    %eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  (%rsp),%xmm0
mov    $0x19,%edi
call   1080 <pow@plt>
mov    %eax,%ebp
movsd  0x8(%rsp),%xmm0
mulsd  0xb47(%rip),%xmm0
call   1070 <cos@plt>
imul   %ebp,%eax
neg    %eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  (%rsp),%xmm0
mov    $0x2a,%edi
call   1080 <pow@plt>
mov    %eax,%ebp
movsd  0x8(%rsp),%xmm0
mulsd  0xb13(%rip),%xmm0
call   1040 <sin@plt>
imul   %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x18(%rsp),%xmm0
mulsd  0x38(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
mov    $0x24,%edi
call   1080 <pow@plt>
mov    %eax,%ebp
movsd  0x8(%rsp),%xmm0
mulsd  0xadb(%rip),%xmm0
call   1070 <cos@plt>
imul   %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x20(%rsp),%xmm0
movsd  0x10(%rsp),%xmm3
divsd  %xmm0,%xmm3
mulsd  %xmm3,%xmm3
movsd  %xmm3,0x10(%rsp)
movapd %xmm3,%xmm0
movsd  0x40(%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xa1c(%rip),%xmm4
movapd %xmm4,%xmm1
subsd  %xmm0,%xmm1
movapd %xmm3,%xmm0
divsd  %xmm2,%xmm0
movapd %xmm4,%xmm2
subsd  %xmm0,%xmm2
mulsd  %xmm1,%xmm2
cvttsd2si %xmm2,%edi
call   1090 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x9e8(%rip),%xmm2
movsd  0x10(%rsp),%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movapd %xmm2,%xmm1
subsd  %xmm0,%xmm1
addsd  %xmm2,%xmm0
divsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%r13,%rbx,8)
mov    %r14,%rbx
cmp    %r14,%r12
jne    1280 <iir+0x110>
mov    %r13,%rdi
mov    %r15d,%esi
xor    %edx,%edx
mov    0x28(%rsp),%rcx
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <print@plt>

LLVM IR (-O0):
define void @iir(i32 %0, double %1, i8* %2) {
%4 = alloca i32
%5 = alloca double
%6 = alloca i8*
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
store i32 %0, i32* %4
store double %1, double* %5
store i8* %2, i8** %6
%18 = load double, double* %5
%19 = fmul double 0x3FF921FB54442D18, %18
%20 = call double @tan(double %19)
store double %20, double* %7
%21 = load double, double* %7
%22 = load double, double* %7
%23 = fmul double %21, %22
store double %23, double* %8
%24 = load double, double* %8
%25 = load double, double* %8
%26 = fneg double %24
%27 = call double @llvm.fmuladd.f64(double %26, double %25, double 1.000000e+00)
%28 = fptosi double %27 to i32
%29 = call i32 @sqrt(i32 %28)
%30 = sitofp i32 %29 to double
store double %30, double* %9
%31 = load double, double* %9
%32 = fptosi double %31 to i32
%33 = call i32 @sqrt(i32 %32)
%34 = sub nsw i32 1, %33
%35 = load double, double* %9
%36 = fptosi double %35 to i32
%37 = call i32 @sqrt(i32 %36)
%38 = add nsw i32 1, %37
%39 = sdiv i32 %34, %38
%40 = sitofp i32 %39 to double
%41 = fmul double %40, 5.000000e-01
store double %41, double* %10
%42 = load double, double* %10
%43 = load double, double* %10
%44 = fmul double %42, %43
%45 = load double, double* %10
%46 = load double, double* %10
%47 = fmul double %45, %46
%48 = fmul double %44, %47
store double %48, double* %11
%49 = load double, double* %11
%50 = call double @llvm.fmuladd.f64(double 1.500000e+02, double %49, double 1.500000e+01)
%51 = load double, double* %11
%52 = call double @llvm.fmuladd.f64(double %50, double %51, double 2.000000e+00)
%53 = load double, double* %11
%54 = call double @llvm.fmuladd.f64(double %52, double %53, double 1.000000e+00)
%55 = load double, double* %10
%56 = fmul double %54, %55
store double %56, double* %12
%57 = load double, double* %12
%58 = call i32 @pow(double %57, i32 0)
%59 = sitofp i32 %58 to double
store double %59, double* %13
store i32 0, i32* %15
%60 = load i32, i32* %4
%61 = sext i32 %60 to i64
%62 = mul i64 8, %61
%63 = trunc i64 %62 to i32
%64 = call double* @malloc(i32 %63)
store double* %64, double** %14
%65 = icmp ne double* %64, null
br i1 %65, label %67, label %66
66: ; preds = %3
br label %160
67: ; preds = %3
br label %68
68: ; preds = %125, %67
%69 = load i32, i32* %15
%70 = load i32, i32* %4
%71 = icmp slt i32 %69, %70
br i1 %71, label %72, label %159
72: ; preds = %68
store i32 1, i32* %17
store double -5.000000e-01, double* %7
store i32 0, i32* %16
store double 0.000000e+00, double* %10
%73 = load i32, i32* %15
%74 = add nsw i32 %73, 1
%75 = sitofp i32 %74 to double
%76 = fmul double %75, 0x400921FB54442D18
%77 = load i32, i32* %4
%78 = sitofp i32 %77 to double
%79 = fadd double %78, 5.000000e-01
%80 = fdiv double %76, %79
store double %80, double* %11
br label %81
81: ; preds = %119, %72
%82 = load i32, i32* %16
%83 = icmp slt i32 %82, 7
br i1 %83, label %84, label %124
84: ; preds = %81
%85 = load i32, i32* %17
%86 = load double, double* %12
%87 = load i32, i32* %16
%88 = load i32, i32* %16
%89 = add nsw i32 %88, 1
%90 = mul nsw i32 %87, %89
%91 = call i32 @pow(double %86, i32 %90)
%92 = mul nsw i32 %85, %91
%93 = load double, double* %11
%94 = load i32, i32* %16
%95 = sitofp i32 %94 to double
%96 = fadd double %95, 5.000000e-01
%97 = fmul double %93, %96
%98 = call i32 @sin(double %97)
%99 = mul nsw i32 %92, %98
%100 = sitofp i32 %99 to double
%101 = load double, double* %10
%102 = fadd double %101, %100
store double %102, double* %10
%103 = load i32, i32* %17
%104 = load double, double* %12
%105 = load i32, i32* %16
%106 = load i32, i32* %16
%107 = mul nsw i32 %105, %106
%108 = call i32 @pow(double %104, i32 %107)
%109 = mul nsw i32 %103, %108
%110 = load double, double* %11
%111 = load i32, i32* %16
%112 = sitofp i32 %111 to double
%113 = fmul double %110, %112
%114 = call i32 @cos(double %113)
%115 = mul nsw i32 %109, %114
%116 = sitofp i32 %115 to double
%117 = load double, double* %7
%118 = fadd double %117, %116
store double %118, double* %7
br label %119
119: ; preds = %84
%120 = load i32, i32* %16
%121 = add nsw i32 %120, 1
store i32 %121, i32* %16
%122 = load i32, i32* %17
%123 = sub nsw i32 0, %122
store i32 %123, i32* %17
br label %81
124: ; preds = %81
br label %125
125: ; preds = %124
%126 = load double, double* %10
%127 = load double, double* %13
%128 = fmul double %126, %127
%129 = load double, double* %7
%130 = fdiv double %128, %129
store double %130, double* %9
%131 = load double, double* %9
%132 = load double, double* %9
%133 = fmul double %131, %132
store double %133, double* %9
%134 = load double, double* %9
%135 = load double, double* %8
%136 = fneg double %134
%137 = call double @llvm.fmuladd.f64(double %136, double %135, double 1.000000e+00)
%138 = load double, double* %9
%139 = load double, double* %8
%140 = fdiv double %138, %139
%141 = fsub double 1.000000e+00, %140
%142 = fmul double %137, %141
%143 = fptosi double %142 to i32
%144 = call i32 @sqrt(i32 %143)
%145 = sitofp i32 %144 to double
%146 = load double, double* %9
%147 = fadd double 1.000000e+00, %146
%148 = fdiv double %145, %147
store double %148, double* %9
%149 = load double, double* %9
%150 = fsub double 1.000000e+00, %149
%151 = load double, double* %9
%152 = fadd double 1.000000e+00, %151
%153 = fdiv double %150, %152
%154 = load double*, double** %14
%155 = load i32, i32* %15
%156 = add nsw i32 %155, 1
store i32 %156, i32* %15
%157 = sext i32 %155 to i64
%158 = getelementptr inbounds double, double* %154, i64 %157
store double %153, double* %158
br label %68
159: ; preds = %68
br label %160
160: ; preds = %159, %66
%161 = load double*, double** %14
%162 = load i32, i32* %4
%163 = load i8*, i8** %6
%164 = call i32 @print(double* %161, i32 %162, i32 0, i8* %163)
ret void
}

LLVM IR (-O2):
define void @iir(i32 %0, double %1, i8* %2) {
%4 = fmul double %1, 0x3FF921FB54442D18
%5 = tail call double @tan(double %4)
%6 = fmul double %5, %5
%7 = fneg double %6
%8 = tail call double @llvm.fmuladd.f64(double %7, double %6, double 1.000000e+00)
%9 = fptosi double %8 to i32
%10 = tail call i32 @sqrt(i32 %9)
%11 = tail call i32 @sqrt(i32 %10)
%12 = sub nsw i32 1, %11
%13 = tail call i32 @sqrt(i32 %10)
%14 = add nsw i32 %13, 1
%15 = sdiv i32 %12, %14
%16 = sitofp i32 %15 to double
%17 = fmul double %16, 5.000000e-01
%18 = fmul double %17, %17
%19 = fmul double %18, %18
%20 = tail call double @llvm.fmuladd.f64(double %19, double 1.500000e+02, double 1.500000e+01)
%21 = tail call double @llvm.fmuladd.f64(double %20, double %19, double 2.000000e+00)
%22 = tail call double @llvm.fmuladd.f64(double %21, double %19, double 1.000000e+00)
%23 = fmul double %17, %22
%24 = tail call i32 @pow(double %23, i32 0)
%25 = sitofp i32 %24 to double
%26 = shl i32 %0, 3
%27 = tail call double* @malloc(i32 %26)
%28 = icmp ne double* %27, null
%29 = icmp sgt i32 %0, 0
%30 = and i1 %28, %29
br i1 %30, label %31, label %148
31: ; preds = %3
%32 = sitofp i32 %0 to double
%33 = fadd double %32, 5.000000e-01
%34 = zext i32 %0 to i64
br label %35
35: ; preds = %31, %35
%36 = phi i64 [ 0, %31 ], [ %37, %35 ]
%37 = add nuw nsw i64 %36, 1
%38 = trunc i64 %37 to i32
%39 = sitofp i32 %38 to double
%40 = fmul double %39, 0x400921FB54442D18
%41 = fdiv double %40, %33
%42 = tail call i32 @pow(double %23, i32 0)
%43 = fmul double %41, 5.000000e-01
%44 = tail call i32 @sin(double %43)
%45 = mul nsw i32 %42, %44
%46 = sitofp i32 %45 to double
%47 = tail call i32 @pow(double %23, i32 0)
%48 = fmul double %41, 0.000000e+00
%49 = tail call i32 @cos(double %48)
%50 = mul nsw i32 %47, %49
%51 = sitofp i32 %50 to double
%52 = fadd double %51, -5.000000e-01
%53 = tail call i32 @pow(double %23, i32 2)
%54 = fmul double %41, 1.500000e+00
%55 = tail call i32 @sin(double %54)
%56 = mul i32 %53, %55
%57 = sub i32 0, %56
%58 = sitofp i32 %57 to double
%59 = fadd double %46, %58
%60 = tail call i32 @pow(double %23, i32 1)
%61 = tail call i32 @cos(double %41)
%62 = mul i32 %60, %61
%63 = sub i32 0, %62
%64 = sitofp i32 %63 to double
%65 = fadd double %52, %64
%66 = tail call i32 @pow(double %23, i32 6)
%67 = fmul double %41, 2.500000e+00
%68 = tail call i32 @sin(double %67)
%69 = mul nsw i32 %66, %68
%70 = sitofp i32 %69 to double
%71 = fadd double %59, %70
%72 = tail call i32 @pow(double %23, i32 4)
%73 = fmul double %41, 2.000000e+00
%74 = tail call i32 @cos(double %73)
%75 = mul nsw i32 %72, %74
%76 = sitofp i32 %75 to double
%77 = fadd double %65, %76
%78 = tail call i32 @pow(double %23, i32 12)
%79 = fmul double %41, 3.500000e+00
%80 = tail call i32 @sin(double %79)
%81 = mul i32 %78, %80
%82 = sub i32 0, %81
%83 = sitofp i32 %82 to double
%84 = fadd double %71, %83
%85 = tail call i32 @pow(double %23, i32 9)
%86 = fmul double %41, 3.000000e+00
%87 = tail call i32 @cos(double %86)
%88 = mul i32 %85, %87
%89 = sub i32 0, %88
%90 = sitofp i32 %89 to double
%91 = fadd double %77, %90
%92 = tail call i32 @pow(double %23, i32 20)
%93 = fmul double %41, 4.500000e+00
%94 = tail call i32 @sin(double %93)
%95 = mul nsw i32 %92, %94
%96 = sitofp i32 %95 to double
%97 = fadd double %84, %96
%98 = tail call i32 @pow(double %23, i32 16)
%99 = fmul double %41, 4.000000e+00
%100 = tail call i32 @cos(double %99)
%101 = mul nsw i32 %98, %100
%102 = sitofp i32 %101 to double
%103 = fadd double %91, %102
%104 = tail call i32 @pow(double %23, i32 30)
%105 = fmul double %41, 5.500000e+00
%106 = tail call i32 @sin(double %105)
%107 = mul i32 %104, %106
%108 = sub i32 0, %107
%109 = sitofp i32 %108 to double
%110 = fadd double %97, %109
%111 = tail call i32 @pow(double %23, i32 25)
%112 = fmul double %41, 5.000000e+00
%113 = tail call i32 @cos(double %112)
%114 = mul i32 %111, %113
%115 = sub i32 0, %114
%116 = sitofp i32 %115 to double
%117 = fadd double %103, %116
%118 = tail call i32 @pow(double %23, i32 42)
%119 = fmul double %41, 6.500000e+00
%120 = tail call i32 @sin(double %119)
%121 = mul nsw i32 %118, %120
%122 = sitofp i32 %121 to double
%123 = fadd double %110, %122
%124 = tail call i32 @pow(double %23, i32 36)
%125 = fmul double %41, 6.000000e+00
%126 = tail call i32 @cos(double %125)
%127 = mul nsw i32 %124, %126
%128 = sitofp i32 %127 to double
%129 = fadd double %117, %128
%130 = fmul double %123, %25
%131 = fdiv double %130, %129
%132 = fmul double %131, %131
%133 = fneg double %132
%134 = tail call double @llvm.fmuladd.f64(double %133, double %6, double 1.000000e+00)
%135 = fdiv double %132, %6
%136 = fsub double 1.000000e+00, %135
%137 = fmul double %134, %136
%138 = fptosi double %137 to i32
%139 = tail call i32 @sqrt(i32 %138)
%140 = sitofp i32 %139 to double
%141 = fadd double %132, 1.000000e+00
%142 = fdiv double %140, %141
%143 = fsub double 1.000000e+00, %142
%144 = fadd double %142, 1.000000e+00
%145 = fdiv double %143, %144
%146 = getelementptr inbounds double, double* %27, i64 %36
store double %145, double* %146
%147 = icmp eq i64 %37, %34
br i1 %147, label %148, label %35
148: ; preds = %35, %3
%149 = tail call i32 @print(double* %27, i32 %0, i32 0, i8* %2)
ret void
}