#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 ellipse(double, double, double);
void calc_2d_angles(int *nangles, double *theta, double *kmax, double *dcf,
                    double fov1, double fov2, double res1, double res2,
                    double theta_width) {
  int n = 0;
  double S;
  double del_theta_est, del_theta;
  theta[n] = 0.0;
  while (theta[n] < theta_width) {
    del_theta_est =
        1.0 /
        (ellipse(theta[n], 1.0 / (2.0 * res1), 1.0 / (2.0 * res2)) *
         ellipse(theta[n] + 3.1415926535897932384626433832795028841971 / 2.0,
                 fov1, fov2));
    del_theta =
        1.0 / (ellipse(theta[n] + del_theta_est / 2.0, 1.0 / (2.0 * res1),
                       1.0 / (2.0 * res2)) *
               ellipse(theta[n] + del_theta_est / 2.0 +
                           3.1415926535897932384626433832795028841971 / 2.0,
                       fov1, fov2));
    theta[n + 1] = theta[n] + del_theta;
    n++;
  }
  if (theta[n] - theta_width > theta_width - theta[n - 1]) {
    *nangles = n - 1;
    S = theta_width / theta[n - 1];
  } else {
    *nangles = n;
    S = theta_width / theta[n];
  }
  for (n = 0; n < *nangles; n++) {
    theta[n] *= S;
    kmax[n] = ellipse(theta[n], 1.0 / (2.0 * res1), 1.0 / (2.0 * res2));
    dcf[n] =
        kmax[n] /
        ellipse(theta[n] + 3.1415926535897932384626433832795028841971 / 2.0,
                fov1, fov2);
  }
  return;
}


x86 assembly (clang, -O0):
<calc_2d_angles>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
movsd  %xmm1,-0x30(%rbp)
movsd  %xmm2,-0x38(%rbp)
movsd  %xmm3,-0x40(%rbp)
movsd  %xmm4,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    12e5 <calc_2d_angles+0x1d5>
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xe84(%rip),%xmm2
mulsd  -0x38(%rbp),%xmm2
movsd  0xe6f(%rip),%xmm1
divsd  %xmm2,%xmm1
movsd  0xe6b(%rip),%xmm3
mulsd  -0x40(%rbp),%xmm3
movsd  0xe56(%rip),%xmm2
divsd  %xmm3,%xmm2
call   1030 <ellipse@plt>
movsd  %xmm0,-0x78(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  0xe30(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
call   1030 <ellipse@plt>
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xe13(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x60(%rbp),%xmm1
movsd  0xdf8(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  0xde8(%rip),%xmm2
mulsd  -0x38(%rbp),%xmm2
movsd  0xdd3(%rip),%xmm1
divsd  %xmm2,%xmm1
movsd  0xdcf(%rip),%xmm3
mulsd  -0x40(%rbp),%xmm3
movsd  0xdba(%rip),%xmm2
divsd  %xmm3,%xmm2
call   1030 <ellipse@plt>
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x60(%rbp),%xmm1
movsd  0xd9a(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  0xd7a(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
call   1030 <ellipse@plt>
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xd5e(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x68(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x4c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    115b <calc_2d_angles+0x4b>
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x48(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
mov    -0x10(%rbp),%rax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm1
ucomisd %xmm1,%xmm0
jbe    1345 <calc_2d_angles+0x235>
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
movsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1365 <calc_2d_angles+0x255>
mov    -0x4c(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
movsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%eax
jge    1440 <calc_2d_angles+0x330>
movsd  -0x58(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xc69(%rip),%xmm2
mulsd  -0x38(%rbp),%xmm2
movsd  0xc54(%rip),%xmm1
divsd  %xmm2,%xmm1
movsd  0xc50(%rip),%xmm3
mulsd  -0x40(%rbp),%xmm3
movsd  0xc3b(%rip),%xmm2
divsd  %xmm3,%xmm2
call   1030 <ellipse@plt>
mov    -0x18(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  0xbfb(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
call   1030 <ellipse@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
divsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    136c <calc_2d_angles+0x25c>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_2d_angles>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
movsd  %xmm3,0x38(%rsp)
movsd  %xmm2,0x30(%rsp)
movsd  %xmm1,0x28(%rsp)
movsd  %xmm0,0x20(%rsp)
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r13
mov    %rdi,%r12
movq   $0x0,(%rsi)
xorpd  %xmm0,%xmm0
xor    %ebp,%ebp
ucomisd %xmm0,%xmm4
mov    %rsi,%rbx
jbe    126c <calc_2d_angles+0x15c>
movsd  0x30(%rsp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xe92(%rip),%xmm1
movapd %xmm1,%xmm2
divsd  %xmm0,%xmm2
movsd  %xmm2,0x10(%rsp)
movsd  0x38(%rsp),%xmm0
addsd  %xmm0,%xmm0
divsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
xorpd  %xmm0,%xmm0
xor    %ebp,%ebp
mov    %r13,%rbx
movsd  %xmm4,0x18(%rsp)
nop
movsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
call   1030 <ellipse@plt>
movsd  %xmm0,(%rsp)
movsd  (%rbx),%xmm0
movsd  0xe46(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x28(%rsp),%xmm2
call   1030 <ellipse@plt>
mulsd  (%rsp),%xmm0
movsd  0xe1c(%rip),%xmm1
divsd  %xmm0,%xmm1
mulsd  0xe20(%rip),%xmm1
movsd  %xmm1,0x40(%rsp)
movsd  (%rbx),%xmm0
addsd  %xmm1,%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
call   1030 <ellipse@plt>
movsd  %xmm0,(%rsp)
movsd  0x40(%rsp),%xmm0
addsd  (%rbx),%xmm0
addsd  0xde2(%rip),%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x28(%rsp),%xmm2
call   1030 <ellipse@plt>
movsd  0x18(%rsp),%xmm4
movapd %xmm0,%xmm1
mulsd  (%rsp),%xmm1
movsd  0xdb2(%rip),%xmm0
divsd  %xmm1,%xmm0
addsd  (%rbx),%xmm0
movsd  %xmm0,0x8(%rbx)
add    $0x8,%rbx
add    $0x1,%ebp
ucomisd %xmm0,%xmm4
ja     11a0 <calc_2d_angles+0x90>
subsd  %xmm4,%xmm0
movslq %ebp,%rcx
add    $0xffffffff,%ebp
movapd %xmm4,%xmm1
subsd  -0x8(%r13,%rcx,8),%xmm1
ucomisd %xmm1,%xmm0
lea    -0x8(%r13,%rcx,8),%rax
cmova  %ebp,%ecx
cmovbe %rbx,%rax
mov    %ecx,(%r12)
test   %ecx,%ecx
jle    1351 <calc_2d_angles+0x241>
divsd  (%rax),%xmm4
movsd  0x30(%rsp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xd4d(%rip),%xmm1
movapd %xmm1,%xmm2
divsd  %xmm0,%xmm2
movsd  %xmm2,(%rsp)
movsd  0x38(%rsp),%xmm0
addsd  %xmm0,%xmm0
divsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
xor    %ebx,%ebx
movsd  %xmm4,0x18(%rsp)
nopl   0x0(%rax)
movsd  0x0(%r13,%rbx,8),%xmm0
mulsd  %xmm4,%xmm0
movsd  %xmm0,0x0(%r13,%rbx,8)
movsd  (%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
call   1030 <ellipse@plt>
movsd  %xmm0,0x10(%rsp)
movsd  %xmm0,(%r15,%rbx,8)
movsd  0x0(%r13,%rbx,8),%xmm0
addsd  0xceb(%rip),%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x28(%rsp),%xmm2
call   1030 <ellipse@plt>
movsd  0x18(%rsp),%xmm4
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%r14,%rbx,8)
add    $0x1,%rbx
movslq (%r12),%rax
cmp    %rax,%rbx
jl     12e0 <calc_2d_angles+0x1d0>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @calc_2d_angles(i32* nocapture %0, double* nocapture %1, double* nocapture writeonly %2, double* nocapture writeonly %3, double %4, double %5, double %6, double %7, double %8) {
store double 0.000000e+00, double* %1
%10 = fcmp ogt double %8, 0.000000e+00
br i1 %10, label %11, label %43
11: ; preds = %9
%12 = fmul double %6, 2.000000e+00
%13 = fdiv double 1.000000e+00, %12
%14 = fmul double %7, 2.000000e+00
%15 = fdiv double 1.000000e+00, %14
br label %16
16: ; preds = %11, %16
%17 = phi i64 [ 0, %11 ], [ %38, %16 ]
%18 = phi double [ 0.000000e+00, %11 ], [ %37, %16 ]
%19 = phi double* [ %1, %11 ], [ %39, %16 ]
%20 = tail call double @ellipse(double %18, double %13, double %15)
%21 = load double, double* %19
%22 = fadd double %21, 0x3FF921FB54442D18
%23 = tail call double @ellipse(double %22, double %4, double %5)
%24 = fmul double %20, %23
%25 = fdiv double 1.000000e+00, %24
%26 = load double, double* %19
%27 = fmul double %25, 5.000000e-01
%28 = fadd double %26, %27
%29 = tail call double @ellipse(double %28, double %13, double %15)
%30 = load double, double* %19
%31 = fadd double %30, %27
%32 = fadd double %31, 0x3FF921FB54442D18
%33 = tail call double @ellipse(double %32, double %4, double %5)
%34 = fmul double %29, %33
%35 = fdiv double 1.000000e+00, %34
%36 = load double, double* %19
%37 = fadd double %36, %35
%38 = add nuw i64 %17, 1
%39 = getelementptr inbounds double, double* %1, i64 %38
store double %37, double* %39
%40 = fcmp olt double %37, %8
br i1 %40, label %16, label %41
41: ; preds = %16
%42 = trunc i64 %38 to i32
br label %43
43: ; preds = %41, %9
%44 = phi i32 [ 0, %9 ], [ %42, %41 ]
%45 = phi double* [ %1, %9 ], [ %39, %41 ]
%46 = phi double [ 0.000000e+00, %9 ], [ %37, %41 ]
%47 = fsub double %46, %8
%48 = add nsw i32 %44, -1
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds double, double* %1, i64 %49
%51 = load double, double* %50
%52 = fsub double %8, %51
%53 = fcmp ogt double %47, %52
%54 = select i1 %53, i32 %48, i32 %44
%55 = select i1 %53, double* %50, double* %45
store i32 %54, i32* %0
%56 = load double, double* %55
%57 = fdiv double %8, %56
%58 = icmp sgt i32 %54, 0
br i1 %58, label %59, label %80
59: ; preds = %43
%60 = fmul double %6, 2.000000e+00
%61 = fdiv double 1.000000e+00, %60
%62 = fmul double %7, 2.000000e+00
%63 = fdiv double 1.000000e+00, %62
br label %64
64: ; preds = %59, %64
%65 = phi i64 [ 0, %59 ], [ %76, %64 ]
%66 = getelementptr inbounds double, double* %1, i64 %65
%67 = load double, double* %66
%68 = fmul double %57, %67
store double %68, double* %66
%69 = tail call double @ellipse(double %68, double %61, double %63)
%70 = getelementptr inbounds double, double* %2, i64 %65
store double %69, double* %70
%71 = load double, double* %66
%72 = fadd double %71, 0x3FF921FB54442D18
%73 = tail call double @ellipse(double %72, double %4, double %5)
%74 = fdiv double %69, %73
%75 = getelementptr inbounds double, double* %3, i64 %65
store double %74, double* %75
%76 = add nuw nsw i64 %65, 1
%77 = load i32, i32* %0
%78 = sext i32 %77 to i64
%79 = icmp slt i64 %76, %78
br i1 %79, label %64, label %80
80: ; preds = %64, %43
ret void
}