#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 DegtoRad(int);
scalar_t__ MOAtoRad(double);
double RadtoDeg(double);
double cos(double);
scalar_t__ fabs(double);
double pow(double, double);
double retard(int, double, double);
double sin(double);
double ZeroAngle(int DragFunction, double DragCoefficient, double Vi,
                 double SightHeight, double ZeroRange, double yIntercept) {
  double t = 0;
  double dt = 1 / Vi;
  double y = -SightHeight / 12;
  double x = 0;
  double da;
  double v = 0, vx = 0, vy = 0;
  double vx1 = 0, vy1 = 0;
  double dv = 0, dvx = 0, dvy = 0;
  double Gx = 0, Gy = 0;
  double angle = 0;
  int quit = 0;
  da = DegtoRad(14);
  for (angle = 0; quit == 0; angle = angle + da) {
    vy = Vi * sin(angle);
    vx = Vi * cos(angle);
    Gx = (-32.194) * sin(angle);
    Gy = (-32.194) * cos(angle);
    for (t = 0, x = 0, y = -SightHeight / 12; x <= ZeroRange * 3; t = t + dt) {
      vy1 = vy;
      vx1 = vx;
      v = pow((pow(vx, 2) + pow(vy, 2)), 0.5);
      dt = 1 / v;
      dv = retard(DragFunction, DragCoefficient, v);
      dvy = -dv * vy / v * dt;
      dvx = -dv * vx / v * dt;
      vx = vx + dvx;
      vy = vy + dvy;
      vy = vy + dt * Gy;
      vx = vx + dt * Gx;
      x = x + dt * (vx + vx1) / 2;
      y = y + dt * (vy + vy1) / 2;
      if (vy < 0 && y < yIntercept) {
        break;
      }
      if (vy > 3 * vx) {
        break;
      }
    }
    if (y > yIntercept && da > 0) {
      da = -da / 2;
    }
    if (y < yIntercept && da < 0) {
      da = -da / 2;
    }
    if (fabs(da) < MOAtoRad(0.01))
      quit = 1;
    if (angle > DegtoRad(45))
      quit = 1;
  }
  return RadtoDeg(angle);
}


x86 assembly (clang, -O0):
<ZeroAngle>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe51(%rip),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xe1b(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%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
movl   $0x0,-0xb4(%rbp)
mov    $0xe,%edi
call   1050 <DegtoRad@plt>
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
cmpl   $0x0,-0xb4(%rbp)
jne    16d5 <ZeroAngle+0x555>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xc8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0xb0(%rbp),%xmm0
ff
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  0xd0b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  0xce7(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xc97(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x50(%rbp),%xmm1
movsd  0xc99(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     15a4 <ZeroAngle+0x424>
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  0xc71(%rip),%xmm1
call   1080 <pow@plt>
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  0xc57(%rip),%xmm1
call   1080 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xd0(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  0xc43(%rip),%xmm1
call   1080 <pow@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  0xc11(%rip),%xmm0
divsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x4(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
call   10a0 <retard@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x70(%rbp),%xmm0
divsd  -0x60(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x68(%rbp),%xmm0
divsd  -0x60(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
addsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x68(%rbp)
movsd  -0x70(%rbp),%xmm0
addsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0xa8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0xa0(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm2
addsd  -0x78(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xb17(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
addsd  -0x80(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xaea(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x70(%rbp),%xmm0
jbe    156a <ZeroAngle+0x3ea>
movsd  -0x48(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    156a <ZeroAngle+0x3ea>
jmp    15a4 <ZeroAngle+0x424>
movsd  -0x70(%rbp),%xmm0
movsd  0xaa1(%rip),%xmm1
mulsd  -0x68(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jbe    158b <ZeroAngle+0x40b>
jmp    15a4 <ZeroAngle+0x424>
jmp    1590 <ZeroAngle+0x410>
movsd  -0x38(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1372 <ZeroAngle+0x1f2>
movsd  -0x48(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    15f3 <ZeroAngle+0x473>
movsd  -0x58(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    15f3 <ZeroAngle+0x473>
movsd  -0x58(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xa36(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1642 <ZeroAngle+0x4c2>
xorps  %xmm0,%xmm0
ucomisd -0x58(%rbp),%xmm0
jbe    1642 <ZeroAngle+0x4c2>
movsd  -0x58(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0x9e7(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1030 <fabs@plt>
mov    %rax,-0xd8(%rbp)
movsd  0x9d5(%rip),%xmm0
call   1060 <MOAtoRad@plt>
mov    %rax,%rcx
mov    -0xd8(%rbp),%rax
cmp    %rcx,%rax
jge    167d <ZeroAngle+0x4fd>
movl   $0x1,-0xb4(%rbp)
movsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
mov    $0x2d,%edi
call   1050 <DegtoRad@plt>
movaps %xmm0,%xmm1
movsd  -0xe0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    16b6 <ZeroAngle+0x536>
movl   $0x1,-0xb4(%rbp)
jmp    16bb <ZeroAngle+0x53b>
movsd  -0xb0(%rbp),%xmm0
ff
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1284 <ZeroAngle+0x104>
movsd  -0xb0(%rbp),%xmm0
ff
call   1090 <RadtoDeg@plt>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZeroAngle>:
push   %rbp
push   %r14
push   %rbx
sub    $0xb0,%rsp
movsd  %xmm4,0x18(%rsp)
movsd  %xmm3,0x10(%rsp)
movapd %xmm2,(%rsp)
movaps %xmm1,0x30(%rsp)
movsd  %xmm0,0x58(%rsp)
mov    %edi,%r14d
mov    $0xe,%edi
call   1050 <DegtoRad@plt>
movaps %xmm0,0x60(%rsp)
movapd (%rsp),%xmm1
divsd  0xe3a(%rip),%xmm1
movsd  0x10(%rsp),%xmm0
mulsd  0xe34(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movapd 0x30(%rsp),%xmm0
unpcklpd %xmm0,%xmm0
movapd %xmm0,0x30(%rsp)
xorpd  %xmm0,%xmm0
unpcklpd %xmm1,%xmm0
movapd %xmm0,0x70(%rsp)
xorpd  %xmm0,%xmm0
nopl   0x0(%rax)
movapd %xmm0,0x20(%rsp)
call   1040 <sin@plt>
movapd %xmm0,(%rsp)
movapd 0x20(%rsp),%xmm0
call   1070 <cos@plt>
unpcklpd (%rsp),%xmm0
mulpd  0x30(%rsp),%xmm0
movapd %xmm0,(%rsp)
movaps 0x20(%rsp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,0x40(%rsp)
movapd 0x20(%rsp),%xmm0
call   1070 <cos@plt>
movapd (%rsp),%xmm3
movapd 0x40(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
mulpd  0xde4(%rip),%xmm1
movapd %xmm1,0x40(%rsp)
movapd 0x70(%rsp),%xmm4
nopl   0x0(%rax,%rax,1)
movsd  0x10(%rsp),%xmm0
ucomisd %xmm4,%xmm0
jb     1390 <ZeroAngle+0x210>
movapd %xmm3,%xmm1
mulpd  %xmm3,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
movsd  0xd74(%rip),%xmm1
movapd %xmm3,(%rsp)
movapd %xmm4,0xa0(%rsp)
call   1080 <pow@plt>
movapd %xmm0,%xmm1
movapd %xmm0,0x80(%rsp)
movsd  0xd54(%rip),%xmm0
divsd  %xmm1,%xmm0
movapd %xmm0,0x90(%rsp)
mov    %r14d,%edi
movsd  0x58(%rsp),%xmm0
call   10a0 <retard@plt>
movapd 0xa0(%rsp),%xmm4
unpcklpd %xmm0,%xmm0
movapd (%rsp),%xmm2
mulpd  %xmm2,%xmm0
movapd 0x80(%rsp),%xmm1
unpcklpd %xmm1,%xmm1
divpd  %xmm1,%xmm0
movapd 0x90(%rsp),%xmm5
unpcklpd %xmm5,%xmm5
mulpd  %xmm5,%xmm0
movapd %xmm2,%xmm1
subpd  %xmm0,%xmm1
movapd %xmm5,%xmm3
mulpd  0x40(%rsp),%xmm3
addpd  %xmm1,%xmm3
movapd %xmm2,%xmm0
addpd  %xmm3,%xmm0
mulpd  %xmm5,%xmm0
mulpd  0xd0f(%rip),%xmm0
movapd %xmm3,%xmm1
unpckhpd %xmm3,%xmm1
xorpd  %xmm2,%xmm2
ucomisd %xmm1,%xmm2
seta   %al
addpd  %xmm0,%xmm4
movapd %xmm4,%xmm0
unpckhpd %xmm4,%xmm0
movsd  0x18(%rsp),%xmm2
ucomisd %xmm0,%xmm2
seta   %cl
movapd %xmm3,%xmm2
mulsd  0xc8f(%rip),%xmm2
test   %cl,%al
jne    1398 <ZeroAngle+0x218>
ucomisd %xmm2,%xmm1
jbe    1270 <ZeroAngle+0xf0>
jmp    1398 <ZeroAngle+0x218>
nopl   0x0(%rax)
unpckhpd %xmm4,%xmm4
movapd %xmm4,%xmm0
movapd 0x60(%rsp),%xmm4
movapd %xmm4,%xmm3
movsd  0xc76(%rip),%xmm2
mulsd  %xmm2,%xmm3
xorpd  %xmm1,%xmm1
cmpltsd %xmm4,%xmm1
andpd  %xmm1,%xmm3
andnpd %xmm4,%xmm1
orpd   %xmm3,%xmm1
movsd  0x18(%rsp),%xmm3
movapd %xmm3,%xmm5
cmpltsd %xmm0,%xmm5
andpd  %xmm5,%xmm1
andnpd %xmm4,%xmm5
orpd   %xmm1,%xmm5
movapd %xmm5,%xmm1
mulsd  %xmm2,%xmm1
movapd %xmm5,%xmm2
cmpltsd 0xc3d(%rip),%xmm2
andpd  %xmm2,%xmm1
andnpd %xmm5,%xmm2
orpd   %xmm1,%xmm2
cmpltsd %xmm3,%xmm0
andpd  %xmm0,%xmm2
andnpd %xmm5,%xmm0
orpd   %xmm2,%xmm0
movapd %xmm0,(%rsp)
call   1030 <fabs@plt>
mov    %rax,%rbx
movsd  0xc03(%rip),%xmm0
call   1060 <MOAtoRad@plt>
mov    %rax,%rbp
mov    $0x2d,%edi
call   1050 <DegtoRad@plt>
movapd (%rsp),%xmm2
movapd 0x20(%rsp),%xmm1
ucomisd %xmm0,%xmm1
movapd %xmm1,%xmm0
addsd  %xmm2,%xmm0
ja     145f <ZeroAngle+0x2df>
movapd %xmm2,0x60(%rsp)
cmp    %rbp,%rbx
jge    1200 <ZeroAngle+0x80>
add    $0xb0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
jmp    1090 <RadtoDeg@plt>

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

LLVM IR (-O2):
define double @ZeroAngle(i32 %0, double %1, double %2, double %3, double %4, double %5) {
%7 = tail call double @DegtoRad(i32 14)
%8 = fdiv double %3, -1.200000e+01
%9 = fmul double %4, 3.000000e+00
%10 = insertelement <2 x double> poison, double %2, i64 0
%11 = shufflevector <2 x double> %10, <2 x double> poison, <2 x i32> zeroinitializer
%12 = insertelement <2 x double> <double 0.000000e+00, double poison>, double %8, i64 1
br label %13
13: ; preds = %6, %66
%14 = phi double [ 0.000000e+00, %6 ], [ %83, %66 ]
%15 = phi double [ %7, %6 ], [ %77, %66 ]
%16 = tail call double @sin(double %14)
%17 = tail call double @cos(double %14)
%18 = insertelement <2 x double> poison, double %17, i64 0
%19 = insertelement <2 x double> %18, double %16, i64 1
%20 = fmul <2 x double> %19, %11
%21 = tail call double @sin(double %14)
%22 = tail call double @cos(double %14)
%23 = insertelement <2 x double> poison, double %21, i64 0
%24 = insertelement <2 x double> %23, double %22, i64 1
%25 = fmul <2 x double> %24, <double -3.219400e+01, double -3.219400e+01>
br label %26
26: ; preds = %31, %13
%27 = phi <2 x double> [ %20, %13 ], [ %50, %31 ]
%28 = phi <2 x double> [ %12, %13 ], [ %54, %31 ]
%29 = extractelement <2 x double> %28, i64 0
%30 = fcmp ugt double %29, %9
br i1 %30, label %64, label %31
31: ; preds = %26
%32 = fmul <2 x double> %27, %27
%33 = shufflevector <2 x double> %32, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%34 = fadd <2 x double> %32, %33
%35 = extractelement <2 x double> %34, i64 0
%36 = tail call double @pow(double %35, double 5.000000e-01)
%37 = fdiv double 1.000000e+00, %36
%38 = tail call double @retard(i32 %0, double %1, double %36)
%39 = fneg double %38
%40 = insertelement <2 x double> poison, double %39, i64 0
%41 = shufflevector <2 x double> %40, <2 x double> poison, <2 x i32> zeroinitializer
%42 = fmul <2 x double> %27, %41
%43 = insertelement <2 x double> poison, double %36, i64 0
%44 = shufflevector <2 x double> %43, <2 x double> poison, <2 x i32> zeroinitializer
%45 = fdiv <2 x double> %42, %44
%46 = insertelement <2 x double> poison, double %37, i64 0
%47 = shufflevector <2 x double> %46, <2 x double> poison, <2 x i32> zeroinitializer
%48 = fmul <2 x double> %47, %45
%49 = fadd <2 x double> %27, %48
%50 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %47, <2 x double> %25, <2 x double> %49)
%51 = fadd <2 x double> %27, %50
%52 = fmul <2 x double> %47, %51
%53 = fmul <2 x double> %52, <double 5.000000e-01, double 5.000000e-01>
%54 = fadd <2 x double> %28, %53
%55 = extractelement <2 x double> %50, i64 1
%56 = fcmp olt double %55, 0.000000e+00
%57 = extractelement <2 x double> %54, i64 1
%58 = fcmp olt double %57, %5
%59 = select i1 %56, i1 %58, i1 false
%60 = extractelement <2 x double> %50, i64 0
%61 = fmul double %60, 3.000000e+00
%62 = fcmp ogt double %55, %61
%63 = select i1 %59, i1 true, i1 %62
br i1 %63, label %66, label %26
64: ; preds = %26
%65 = extractelement <2 x double> %28, i64 1
br label %66
66: ; preds = %31, %64
%67 = phi double [ %65, %64 ], [ %57, %31 ]
%68 = fcmp ogt double %67, %5
%69 = fcmp ogt double %15, 0.000000e+00
%70 = select i1 %68, i1 %69, i1 false
%71 = fmul double %15, -5.000000e-01
%72 = select i1 %70, double %71, double %15
%73 = fcmp olt double %67, %5
%74 = fcmp olt double %72, 0.000000e+00
%75 = select i1 %73, i1 %74, i1 false
%76 = fmul double %72, -5.000000e-01
%77 = select i1 %75, double %76, double %72
%78 = tail call i64 @fabs(double %77)
%79 = tail call i64 @MOAtoRad(double 1.000000e-02)
%80 = icmp sge i64 %78, %79
%81 = tail call double @DegtoRad(i32 45)
%82 = fcmp ule double %14, %81
%83 = fadd double %14, %77
%84 = select i1 %82, i1 %80, i1 false
br i1 %84, label %13, label %85
85: ; preds = %66
%86 = tail call double @RadtoDeg(double %83)
ret double %86
}