#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 ephTan(double);
double ephAtmRef(double h) {
  double r;
  if (h * 60 > -1 / ephTan(7.31 / 4.4))
    r = 1.02 / ephTan(h + 10.3 / (h + 5.11)) + 0.0019279;
  else
    r = 0;
  return h + r / 60;
}


x86 assembly (clang, -O0):
<ephAtmRef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeeb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xed1(%rip),%xmm0
call   1030 <ephTan@plt>
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
movsd  0xeb4(%rip),%xmm1
divsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    11a6 <ephAtmRef+0x96>
movsd  -0x8(%rbp),%xmm0
movsd  0xec9(%rip),%xmm2
addsd  -0x8(%rbp),%xmm2
movsd  0xeb4(%rip),%xmm1
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
call   1030 <ephTan@plt>
movaps %xmm0,%xmm1
movsd  0xe94(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  0xe80(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    11ae <ephAtmRef+0x9e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xe50(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ephAtmRef>:
sub    $0x18,%rsp
movsd  0xee4(%rip),%xmm1
movsd  %xmm0,0x8(%rsp)
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0xed4(%rip),%xmm0
call   1030 <ephTan@plt>
movsd  0xecf(%rip),%xmm1
divsd  %xmm0,%xmm1
xorpd  %xmm0,%xmm0
movsd  0x10(%rsp),%xmm2
ucomisd %xmm1,%xmm2
jbe    1194 <ephAtmRef+0x84>
movsd  0xebb(%rip),%xmm1
movsd  0x8(%rsp),%xmm2
addsd  %xmm2,%xmm1
movsd  0xeb1(%rip),%xmm0
divsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
call   1030 <ephTan@plt>
movapd %xmm0,%xmm1
movsd  0xea0(%rip),%xmm0
divsd  %xmm1,%xmm0
addsd  0xe9c(%rip),%xmm0
divsd  0xe64(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @ephAtmRef(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double %4, 6.000000e+01
%6 = call double @ephTan(double 0x3FFA94F2094F2094)
%7 = fdiv double -1.000000e+00, %6
%8 = fcmp ogt double %5, %7
br i1 %8, label %9, label %18
9: ; preds = %1
%10 = load double, double* %2
%11 = load double, double* %2
%12 = fadd double %11, 5.110000e+00
%13 = fdiv double 1.030000e+01, %12
%14 = fadd double %10, %13
%15 = call double @ephTan(double %14)
%16 = fdiv double 1.020000e+00, %15
%17 = fadd double %16, 1.927900e-03
store double %17, double* %3
br label %19
18: ; preds = %1
store double 0.000000e+00, double* %3
br label %19
19: ; preds = %18, %9
%20 = load double, double* %2
%21 = load double, double* %3
%22 = fdiv double %21, 6.000000e+01
%23 = fadd double %20, %22
ret double %23
}

LLVM IR (-O2):
define double @ephAtmRef(double %0) {
%2 = fmul double %0, 6.000000e+01
%3 = tail call double @ephTan(double 0x3FFA94F2094F2094)
%4 = fdiv double -1.000000e+00, %3
%5 = fcmp ogt double %2, %4
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = fadd double %0, 5.110000e+00
%8 = fdiv double 1.030000e+01, %7
%9 = fadd double %8, %0
%10 = tail call double @ephTan(double %9)
%11 = fdiv double 1.020000e+00, %10
%12 = fadd double %11, 1.927900e-03
br label %13
13: ; preds = %1, %6
%14 = phi double [ %12, %6 ], [ 0.000000e+00, %1 ]
%15 = fdiv double %14, 6.000000e+01
%16 = fadd double %15, %0
ret double %16
}