#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 */
double DBL_EPSILON;
double asin(double);
double cos(double);
int cosh(double);
double const fabs(double);
double pow(int, int);
double sin(double);
double sqrt(int);
double tanh(double);
void JacobiElliptic(double x, double k, double *cn, double *sn, double *dn) {
  const double tol = DBL_EPSILON;
  double a[16], b[16], c[16], phi[16];
  int i;
  if (1 == k) {
    *cn = 1. / cosh(x);
    *sn = tanh(x);
    *dn = *cn;
    return;
  } else if (0 == k) {
    *cn = cos(x);
    *sn = sin(x);
    *dn = 1;
    return;
  }
  a[0] = 1;
  c[0] = sqrt(k);
  b[0] = sqrt(1 - k);
  i = 0;
  while (fabs(c[i]) > tol) {
    a[i + 1] = 0.5 * a[i] + 0.5 * b[i];
    b[i + 1] = sqrt(a[i] * b[i]);
    c[i + 1] = 0.5 * a[i] - 0.5 * b[i];
    ++i;
  }
  phi[i] = pow(2., i) * a[i] * x;
  while (i > 0) {
    phi[i - 1] = 0.5 * (phi[i] + asin(c[i] / a[i] * sin(phi[i])));
    --i;
  }
  *cn = cos(phi[0]);
  *sn = sin(phi[0]);
  *dn = sqrt(1. - k * (*sn) * (*sn));
}


x86 assembly (clang, -O0):
<JacobiElliptic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x250,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    0x2e40(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe47(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jne    1213 <JacobiElliptic+0x93>
jp     1213 <JacobiElliptic+0x93>
movsd  -0x8(%rbp),%xmm0
call   1040 <cosh@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe20(%rip),%xmm0
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm0
call   1030 <tanh@plt>
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1531 <JacobiElliptic+0x3b1>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jne    1260 <JacobiElliptic+0xe0>
jp     1260 <JacobiElliptic+0xe0>
movsd  -0x8(%rbp),%xmm0
call   1080 <cos@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm0
call   1060 <sin@plt>
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
movsd  0xda9(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    1531 <JacobiElliptic+0x3b1>
jmp    1265 <JacobiElliptic+0xe5>
movsd  0xd93(%rip),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
cvttsd2si -0x10(%rbp),%edi
call   10a0 <sqrt@plt>
movsd  %xmm0,-0x1b0(%rbp)
ff
movsd  0xd71(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   10a0 <sqrt@plt>
movsd  %xmm0,-0x130(%rbp)
ff
movl   $0x0,-0x234(%rbp)
movslq -0x234(%rbp),%rax
movsd  -0x1b0(%rbp,%rax,8),%xmm0
ff ff
call   1050 <fabs@plt>
ucomisd -0x30(%rbp),%xmm0
jbe    13cf <JacobiElliptic+0x24f>
movslq -0x234(%rbp),%rax
movsd  -0xb0(%rbp,%rax,8),%xmm0
ff ff
movslq -0x234(%rbp),%rax
movsd  0xd1a(%rip),%xmm1
mulsd  -0x130(%rbp,%rax,8),%xmm1
ff ff
movsd  0xd09(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x234(%rbp),%eax
add    $0x1,%eax
cltq
movsd  %xmm0,-0xb0(%rbp,%rax,8)
ff ff
movslq -0x234(%rbp),%rax
movsd  -0xb0(%rbp,%rax,8),%xmm0
ff ff
movslq -0x234(%rbp),%rax
mulsd  -0x130(%rbp,%rax,8),%xmm0
ff ff
cvttsd2si %xmm0,%edi
call   10a0 <sqrt@plt>
mov    -0x234(%rbp),%eax
add    $0x1,%eax
cltq
movsd  %xmm0,-0x130(%rbp,%rax,8)
ff ff
movslq -0x234(%rbp),%rax
movsd  -0xb0(%rbp,%rax,8),%xmm0
ff ff
movslq -0x234(%rbp),%rax
movsd  0xc91(%rip),%xmm1
mulsd  -0x130(%rbp,%rax,8),%xmm1
ff ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xc69(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x234(%rbp),%eax
add    $0x1,%eax
cltq
movsd  %xmm0,-0x1b0(%rbp,%rax,8)
ff ff
mov    -0x234(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x234(%rbp)
jmp    12af <JacobiElliptic+0x12f>
mov    -0x234(%rbp),%esi
mov    $0x2,%edi
call   1090 <pow@plt>
movslq -0x234(%rbp),%rax
mulsd  -0xb0(%rbp,%rax,8),%xmm0
ff ff
mulsd  -0x8(%rbp),%xmm0
movslq -0x234(%rbp),%rax
movsd  %xmm0,-0x230(%rbp,%rax,8)
ff ff
cmpl   $0x0,-0x234(%rbp)
jle    14ba <JacobiElliptic+0x33a>
movslq -0x234(%rbp),%rax
movsd  -0x230(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x240(%rbp)
ff
movslq -0x234(%rbp),%rax
movsd  -0x1b0(%rbp,%rax,8),%xmm0
ff ff
movslq -0x234(%rbp),%rax
divsd  -0xb0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x248(%rbp)
ff
movslq -0x234(%rbp),%rax
movsd  -0x230(%rbp,%rax,8),%xmm0
ff ff
call   1060 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x248(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
call   1070 <asin@plt>
movsd  -0x240(%rbp),%xmm1
ff
addsd  %xmm0,%xmm1
movsd  0xb7a(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x234(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  %xmm0,-0x230(%rbp,%rax,8)
ff ff
mov    -0x234(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x234(%rbp)
jmp    1404 <JacobiElliptic+0x284>
movsd  -0x230(%rbp),%xmm0
ff
call   1080 <cos@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x230(%rbp),%xmm0
ff
call   1060 <sin@plt>
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x20(%rbp),%rax
mulsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xae4(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   10a0 <sqrt@plt>
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x250,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<JacobiElliptic>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1c0,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
ucomisd 0xe6f(%rip),%xmm1
movsd  %xmm0,0x10(%rsp)
jne    11d4 <JacobiElliptic+0x64>
jp     11d4 <JacobiElliptic+0x64>
call   1040 <cosh@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0xe51(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%r12)
movsd  0x10(%rsp),%xmm0
call   1030 <tanh@plt>
movsd  %xmm0,(%r15)
movsd  (%r12),%xmm0
jmp    13f1 <JacobiElliptic+0x281>
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jne    1208 <JacobiElliptic+0x98>
jp     1208 <JacobiElliptic+0x98>
call   1070 <cos@plt>
movsd  %xmm0,(%r12)
movsd  0x10(%rsp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,(%r15)
movsd  0xdfd(%rip),%xmm0
jmp    13f1 <JacobiElliptic+0x281>
mov    0x2dd9(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,0x28(%rsp)
movabs $0x3ff0000000000000,%rax
mov    %rax,0xc0(%rsp)
cvttsd2si %xmm1,%edi
movsd  %xmm1,0x20(%rsp)
call   1090 <sqrt@plt>
movaps %xmm0,(%rsp)
movsd  %xmm0,0x140(%rsp)
movsd  0xdb1(%rip),%xmm0
subsd  0x20(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1090 <sqrt@plt>
movsd  0x28(%rsp),%xmm1
movapd (%rsp),%xmm3
andpd  0xdaf(%rip),%xmm3
xor    %r13d,%r13d
ucomisd %xmm1,%xmm3
jbe    1318 <JacobiElliptic+0x1a8>
movapd %xmm0,%xmm2
xor    %r13d,%r13d
movsd  0xd73(%rip),%xmm0
nopl   (%rax)
movapd %xmm2,0x30(%rsp)
mov    %r13,%rbx
movapd %xmm2,%xmm3
movsd  0xd63(%rip),%xmm1
mulsd  %xmm1,%xmm3
movapd %xmm0,%xmm4
mulsd  %xmm1,%xmm4
movsd  %xmm4,0x18(%rsp)
addsd  %xmm4,%xmm3
movsd  %xmm3,(%rsp)
add    $0x1,%r13
movsd  %xmm3,0xc8(%rsp,%rbx,8)
mulsd  %xmm2,%xmm0
cvttsd2si %xmm0,%edi
call   1090 <sqrt@plt>
movsd  0x28(%rsp),%xmm1
movapd 0x30(%rsp),%xmm2
mulsd  0xd22(%rip),%xmm2
addsd  0x18(%rsp),%xmm2
movsd  %xmm2,0x148(%rsp,%rbx,8)
andpd  0xd1b(%rip),%xmm2
ucomisd %xmm1,%xmm2
movapd %xmm0,%xmm2
movsd  (%rsp),%xmm0
ja     1290 <JacobiElliptic+0x120>
mov    %r13d,%ebx
mov    $0x2,%edi
mov    %r13d,%esi
call   1080 <pow@plt>
movsd  0xc0(%rsp,%rbx,8),%xmm1
mulsd  %xmm1,%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x40(%rsp,%rbx,8)
test   %r13d,%r13d
jle    13a9 <JacobiElliptic+0x239>
cs nopw 0x0(%rax,%rax,1)
movsd  %xmm0,(%rsp)
movsd  0x140(%rsp,%rbx,8),%xmm2
divsd  %xmm1,%xmm2
movsd  %xmm2,0x18(%rsp)
call   1050 <sin@plt>
mulsd  0x18(%rsp),%xmm0
call   1060 <asin@plt>
addsd  (%rsp),%xmm0
mulsd  0xc83(%rip),%xmm0
lea    -0x1(%rbx),%eax
movsd  %xmm0,0x40(%rsp,%rax,8)
cmp    $0x2,%rbx
jl     13a9 <JacobiElliptic+0x239>
movsd  0x38(%rsp,%rbx,8),%xmm0
movsd  0xb8(%rsp,%rbx,8),%xmm1
add    $0xffffffffffffffff,%rbx
jmp    1350 <JacobiElliptic+0x1e0>
movsd  0x40(%rsp),%xmm0
movsd  %xmm0,(%rsp)
call   1070 <cos@plt>
movsd  %xmm0,(%r12)
movsd  (%rsp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,(%r15)
movsd  0x20(%rsp),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xc1c(%rip),%xmm0
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1090 <sqrt@plt>
movsd  %xmm0,(%r14)
add    $0x1c0,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@DBL_EPSILON = global double 0.000000e+00
define void @JacobiElliptic(double %0, double %1, double* nocapture %2, double* nocapture writeonly %3, double* nocapture writeonly %4) {
%6 = alloca [16 x double]
%7 = alloca [16 x double]
%8 = alloca [16 x double]
%9 = load double, double* @DBL_EPSILON
%10 = bitcast [16 x double]* %6 to i8*
%11 = bitcast [16 x double]* %7 to i8*
%12 = bitcast [16 x double]* %8 to i8*
%13 = fcmp oeq double %1, 1.000000e+00
br i1 %13, label %14, label %20
14: ; preds = %5
%15 = tail call i32 @cosh(double %0)
%16 = sitofp i32 %15 to double
%17 = fdiv double 1.000000e+00, %16
store double %17, double* %2
%18 = tail call double @tanh(double %0)
store double %18, double* %3
%19 = load double, double* %2
br label %94
20: ; preds = %5
%21 = fcmp oeq double %1, 0.000000e+00
br i1 %21, label %22, label %25
22: ; preds = %20
%23 = tail call double @cos(double %0)
store double %23, double* %2
%24 = tail call double @sin(double %0)
store double %24, double* %3
br label %94
25: ; preds = %20
%26 = getelementptr inbounds [16 x double], [16 x double]* %6, i64 0, i64 0
store double 1.000000e+00, double* %26
%27 = fptosi double %1 to i32
%28 = tail call double @sqrt(i32 %27)
%29 = getelementptr inbounds [16 x double], [16 x double]* %7, i64 0, i64 0
store double %28, double* %29
%30 = fsub double 1.000000e+00, %1
%31 = fptosi double %30 to i32
%32 = tail call double @sqrt(i32 %31)
%33 = tail call double @llvm.fabs.f64(double %28)
%34 = fcmp ogt double %33, %9
br i1 %34, label %35, label %53
35: ; preds = %25, %35
%36 = phi double [ %45, %35 ], [ %32, %25 ]
%37 = phi double [ %40, %35 ], [ 1.000000e+00, %25 ]
%38 = phi i64 [ %41, %35 ], [ 0, %25 ]
%39 = fmul double %36, 5.000000e-01
%40 = tail call double @llvm.fmuladd.f64(double %37, double 5.000000e-01, double %39)
%41 = add nuw nsw i64 %38, 1
%42 = getelementptr inbounds [16 x double], [16 x double]* %6, i64 0, i64 %41
store double %40, double* %42
%43 = fmul double %37, %36
%44 = fptosi double %43 to i32
%45 = tail call double @sqrt(i32 %44)
%46 = fmul double %36, -5.000000e-01
%47 = tail call double @llvm.fmuladd.f64(double %37, double 5.000000e-01, double %46)
%48 = getelementptr inbounds [16 x double], [16 x double]* %7, i64 0, i64 %41
store double %47, double* %48
%49 = tail call double @llvm.fabs.f64(double %47)
%50 = fcmp ogt double %49, %9
br i1 %50, label %35, label %51
51: ; preds = %35
%52 = trunc i64 %41 to i32
br label %53
53: ; preds = %51, %25
%54 = phi i32 [ 0, %25 ], [ %52, %51 ]
%55 = zext i32 %54 to i64
%56 = tail call double @pow(i32 2, i32 %54)
%57 = getelementptr inbounds [16 x double], [16 x double]* %6, i64 0, i64 %55
%58 = load double, double* %57
%59 = fmul double %56, %58
%60 = fmul double %59, %0
%61 = getelementptr inbounds [16 x double], [16 x double]* %8, i64 0, i64 %55
store double %60, double* %61
%62 = icmp sgt i32 %54, 0
br i1 %62, label %63, label %84
63: ; preds = %53, %79
%64 = phi double [ %83, %79 ], [ %58, %53 ]
%65 = phi double [ %81, %79 ], [ %60, %53 ]
%66 = phi i64 [ %75, %79 ], [ %55, %53 ]
%67 = getelementptr inbounds [16 x double], [16 x double]* %7, i64 0, i64 %66
%68 = load double, double* %67
%69 = fdiv double %68, %64
%70 = tail call double @sin(double %65)
%71 = fmul double %69, %70
%72 = tail call double @asin(double %71)
%73 = fadd double %65, %72
%74 = fmul double %73, 5.000000e-01
%75 = add nsw i64 %66, -1
%76 = and i64 %75, 4294967295
%77 = getelementptr inbounds [16 x double], [16 x double]* %8, i64 0, i64 %76
store double %74, double* %77
%78 = icmp sgt i64 %66, 1
br i1 %78, label %79, label %84
79: ; preds = %63
%80 = getelementptr inbounds [16 x double], [16 x double]* %8, i64 0, i64 %75
%81 = load double, double* %80
%82 = getelementptr inbounds [16 x double], [16 x double]* %6, i64 0, i64 %75
%83 = load double, double* %82
br label %63
84: ; preds = %63, %53
%85 = getelementptr inbounds [16 x double], [16 x double]* %8, i64 0, i64 0
%86 = load double, double* %85
%87 = tail call double @cos(double %86)
store double %87, double* %2
%88 = tail call double @sin(double %86)
store double %88, double* %3
%89 = fneg double %88
%90 = fmul double %89, %1
%91 = tail call double @llvm.fmuladd.f64(double %90, double %88, double 1.000000e+00)
%92 = fptosi double %91 to i32
%93 = tail call double @sqrt(i32 %92)
br label %94
94: ; preds = %84, %22, %14
%95 = phi double [ %93, %84 ], [ 1.000000e+00, %22 ], [ %19, %14 ]
store double %95, double* %4
ret void
}