#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 cos(double);
scalar_t__ fabs(double);
double libballistics_computeRetardation(int, double, double);
double libballistics_deg2rad(int);
scalar_t__ libballistics_moa2rad(double);
double libballistics_rad2deg(double);
double pow(double, double);
double sin(double);
double libballistics_computeZeroAngle(int dragFunction, double bC,
                                      double velocity, double sightHeight,
                                      double zeroRange, double yIntercept) {
  double t = 0, x = 0;
  double dt = 1 / velocity;
  double y = -sightHeight / 12;
  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;
  da = libballistics_deg2rad(14);
  for (angle = 0;; angle = angle + da) {
    vy = velocity * sin(angle);
    vx = velocity * 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 = libballistics_computeRetardation(dragFunction, bC, 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) < libballistics_moa2rad(0.01))
      break;
    if (angle > libballistics_deg2rad(45))
      break;
  }
  return libballistics_rad2deg(angle);
}


x86 assembly (clang, -O0):
<libballistics_computeZeroAngle>:
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)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe49(%rip),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xe13(%rip),%xmm1
divsd  %xmm1,%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
mov    $0xe,%edi
call   1040 <libballistics_deg2rad@plt>
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
call   1070 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
call   1090 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0xb8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0xb0(%rbp),%xmm0
ff
call   1070 <sin@plt>
movaps %xmm0,%xmm1
movsd  0xd22(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
call   1090 <cos@plt>
movaps %xmm0,%xmm1
movsd  0xcfe(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xcae(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x40(%rbp),%xmm1
movsd  0xcb0(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     158d <libballistics_computeZeroAngle+0x40d>
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  0xc88(%rip),%xmm1
call   10a0 <pow@plt>
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  0xc6e(%rip),%xmm1
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xc8(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  0xc5a(%rip),%xmm1
call   10a0 <pow@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  0xc28(%rip),%xmm0
divsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x4(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
call   1050 <libballistics_computeRetardation@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  -0x48(%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  -0x48(%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  -0x48(%rbp),%xmm0
movsd  -0xa8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm0
movsd  -0xa0(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm2
addsd  -0x78(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xb2e(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
addsd  -0x80(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xb01(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x70(%rbp),%xmm0
jbe    1553 <libballistics_computeZeroAngle+0x3d3>
movsd  -0x50(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1553 <libballistics_computeZeroAngle+0x3d3>
jmp    158d <libballistics_computeZeroAngle+0x40d>
movsd  -0x70(%rbp),%xmm0
movsd  0xab8(%rip),%xmm1
mulsd  -0x68(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jbe    1574 <libballistics_computeZeroAngle+0x3f4>
jmp    158d <libballistics_computeZeroAngle+0x40d>
jmp    1579 <libballistics_computeZeroAngle+0x3f9>
movsd  -0x38(%rbp),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    135b <libballistics_computeZeroAngle+0x1db>
movsd  -0x50(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    15dc <libballistics_computeZeroAngle+0x45c>
movsd  -0x58(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    15dc <libballistics_computeZeroAngle+0x45c>
movsd  -0x58(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xa4d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    162b <libballistics_computeZeroAngle+0x4ab>
xorps  %xmm0,%xmm0
ucomisd -0x58(%rbp),%xmm0
jbe    162b <libballistics_computeZeroAngle+0x4ab>
movsd  -0x58(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0x9fe(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1060 <fabs@plt>
mov    %rax,-0xd0(%rbp)
movsd  0x9ec(%rip),%xmm0
call   1080 <libballistics_moa2rad@plt>
mov    %rax,%rcx
mov    -0xd0(%rbp),%rax
cmp    %rcx,%rax
jge    1661 <libballistics_computeZeroAngle+0x4e1>
jmp    16b4 <libballistics_computeZeroAngle+0x534>
movsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
mov    $0x2d,%edi
call   1040 <libballistics_deg2rad@plt>
movaps %xmm0,%xmm1
movsd  -0xd8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1695 <libballistics_computeZeroAngle+0x515>
jmp    16b4 <libballistics_computeZeroAngle+0x534>
jmp    169a <libballistics_computeZeroAngle+0x51a>
movsd  -0xb0(%rbp),%xmm0
ff
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    127a <libballistics_computeZeroAngle+0xfa>
movsd  -0xb0(%rbp),%xmm0
ff
call   1030 <libballistics_rad2deg@plt>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libballistics_computeZeroAngle>:
push   %r14
push   %rbx
sub    $0xb8,%rsp
movsd  %xmm4,0x28(%rsp)
movsd  %xmm3,0x20(%rsp)
movapd %xmm2,0x10(%rsp)
movaps %xmm1,0x30(%rsp)
movsd  %xmm0,0x58(%rsp)
mov    %edi,%ebx
mov    $0xe,%edi
call   1040 <libballistics_deg2rad@plt>
movaps %xmm0,0x60(%rsp)
movapd 0x10(%rsp),%xmm1
divsd  0xe3a(%rip),%xmm1
movsd  0x20(%rsp),%xmm0
mulsd  0xe34(%rip),%xmm0
movsd  %xmm0,0x20(%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)
movsd  %xmm0,0x8(%rsp)
call   1070 <sin@plt>
movapd %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1090 <cos@plt>
unpcklpd 0x10(%rsp),%xmm0
mulpd  0x30(%rsp),%xmm0
movapd %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1070 <sin@plt>
movaps %xmm0,0x40(%rsp)
movsd  0x8(%rsp),%xmm0
call   1090 <cos@plt>
movapd 0x10(%rsp),%xmm3
movapd 0x40(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
mulpd  0xddf(%rip),%xmm1
movapd %xmm1,0x40(%rsp)
movapd 0x70(%rsp),%xmm4
nopl   (%rax)
movsd  0x20(%rsp),%xmm0
ucomisd %xmm4,%xmm0
jb     1390 <libballistics_computeZeroAngle+0x210>
movapd %xmm3,%xmm1
mulpd  %xmm3,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
movsd  0xd74(%rip),%xmm1
movapd %xmm3,0x10(%rsp)
movapd %xmm4,0xa0(%rsp)
call   10a0 <pow@plt>
movapd %xmm0,%xmm1
movapd %xmm0,0x80(%rsp)
movsd  0xd53(%rip),%xmm0
divsd  %xmm1,%xmm0
movapd %xmm0,0x90(%rsp)
mov    %ebx,%edi
movsd  0x58(%rsp),%xmm0
call   1050 <libballistics_computeRetardation@plt>
movapd 0xa0(%rsp),%xmm4
unpcklpd %xmm0,%xmm0
movapd 0x10(%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  0xd0e(%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  0x28(%rsp),%xmm2
ucomisd %xmm0,%xmm2
seta   %cl
movapd %xmm3,%xmm2
mulsd  0xc8e(%rip),%xmm2
test   %cl,%al
jne    1398 <libballistics_computeZeroAngle+0x218>
ucomisd %xmm2,%xmm1
jbe    1270 <libballistics_computeZeroAngle+0xf0>
jmp    1398 <libballistics_computeZeroAngle+0x218>
nopw   0x0(%rax,%rax,1)
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  0x28(%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,0x10(%rsp)
call   1060 <fabs@plt>
mov    %rax,%r14
movsd  0xc02(%rip),%xmm0
call   1080 <libballistics_moa2rad@plt>
cmp    %rax,%r14
movsd  0x8(%rsp),%xmm1
jl     1465 <libballistics_computeZeroAngle+0x2e5>
mov    $0x2d,%edi
call   1040 <libballistics_deg2rad@plt>
movsd  0x8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
ja     1465 <libballistics_computeZeroAngle+0x2e5>
movapd 0x10(%rsp),%xmm0
addsd  %xmm0,%xmm1
movapd %xmm0,0x60(%rsp)
movapd %xmm1,%xmm0
jmp    1200 <libballistics_computeZeroAngle+0x80>
movapd %xmm1,%xmm0
add    $0xb8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <libballistics_rad2deg@plt>

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

LLVM IR (-O2):
define double @libballistics_computeZeroAngle(i32 %0, double %1, double %2, double %3, double %4, double %5) {
%7 = tail call double @libballistics_deg2rad(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 = %84, %6
%14 = phi double [ %7, %6 ], [ %77, %84 ]
%15 = phi double [ 0.000000e+00, %6 ], [ %85, %84 ]
%16 = tail call double @sin(double %15)
%17 = tail call double @cos(double %15)
%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 %15)
%22 = tail call double @cos(double %15)
%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 @libballistics_computeRetardation(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 %14, 0.000000e+00
%70 = select i1 %68, i1 %69, i1 false
%71 = fmul double %14, -5.000000e-01
%72 = select i1 %70, double %71, double %14
%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 @libballistics_moa2rad(double 1.000000e-02)
%80 = icmp slt i64 %78, %79
br i1 %80, label %86, label %81
81: ; preds = %66
%82 = tail call double @libballistics_deg2rad(i32 45)
%83 = fcmp ogt double %15, %82
br i1 %83, label %86, label %84
84: ; preds = %81
%85 = fadd double %15, %77
br label %13
86: ; preds = %81, %66
%87 = tail call double @libballistics_rad2deg(double %15)
ret double %87
}