#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 */
int /*<<< orphan*/ deg2rad(double);
int tan(int /*<<< orphan*/);
double atmospheric_refraction_correction(float pressure, float temperature,
                                         double e0) {
  return (pressure / 1010.0) * (283.0 / (273.0 + temperature)) * 1.02 /
         (60 * tan(deg2rad(e0 + 10.3 / (e0 + 5.11))));
}


x86 assembly (clang, -O0):
<atmospheric_refraction_correction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movsd  %xmm2,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee0(%rip),%xmm1
divsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xec3(%rip),%xmm2
addsd  %xmm1,%xmm2
movsd  0xeaf(%rip),%xmm1
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe97(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe79(%rip),%xmm2
addsd  -0x10(%rbp),%xmm2
movsd  0xe64(%rip),%xmm1
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
call   1030 <deg2rad@plt>
mov    %eax,%edi
call   1040 <tan@plt>
movsd  -0x18(%rbp),%xmm0
imul   $0x3c,%eax,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atmospheric_refraction_correction>:
sub    $0x18,%rsp
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
addsd  0xecc(%rip),%xmm1
shufpd $0x2,0xee3(%rip),%xmm0
movapd 0xeeb(%rip),%xmm3
unpcklpd %xmm1,%xmm3
divpd  %xmm3,%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  0xea7(%rip),%xmm1
movapd %xmm1,(%rsp)
movsd  0xea2(%rip),%xmm1
addsd  %xmm2,%xmm1
movsd  0xe9e(%rip),%xmm0
divsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
call   1030 <deg2rad@plt>
mov    %eax,%edi
call   1040 <tan@plt>
imul   $0x3c,%eax,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movapd (%rsp),%xmm0
divsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @atmospheric_refraction_correction(float %0, float %1, double %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca double
store float %0, float* %4
store float %1, float* %5
store double %2, double* %6
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = fdiv double %8, 1.010000e+03
%10 = load float, float* %5
%11 = fpext float %10 to double
%12 = fadd double 2.730000e+02, %11
%13 = fdiv double 2.830000e+02, %12
%14 = fmul double %9, %13
%15 = fmul double %14, 1.020000e+00
%16 = load double, double* %6
%17 = load double, double* %6
%18 = fadd double %17, 5.110000e+00
%19 = fdiv double 1.030000e+01, %18
%20 = fadd double %16, %19
%21 = call i32 @deg2rad(double %20)
%22 = call i32 @tan(i32 %21)
%23 = mul nsw i32 60, %22
%24 = sitofp i32 %23 to double
%25 = fdiv double %15, %24
ret double %25
}

LLVM IR (-O2):
define double @atmospheric_refraction_correction(float %0, float %1, double %2) {
%4 = fpext float %0 to double
%5 = fpext float %1 to double
%6 = fadd double %5, 2.730000e+02
%7 = insertelement <2 x double> <double poison, double 2.830000e+02>, double %4, i64 0
%8 = insertelement <2 x double> <double 1.010000e+03, double poison>, double %6, i64 1
%9 = fdiv <2 x double> %7, %8
%10 = shufflevector <2 x double> %9, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%11 = fmul <2 x double> %9, %10
%12 = extractelement <2 x double> %11, i64 0
%13 = fmul double %12, 1.020000e+00
%14 = fadd double %2, 5.110000e+00
%15 = fdiv double 1.030000e+01, %14
%16 = fadd double %15, %2
%17 = tail call i32 @deg2rad(double %16)
%18 = tail call i32 @tan(i32 %17)
%19 = mul nsw i32 %18, 60
%20 = sitofp i32 %19 to double
%21 = fdiv double %13, %20
ret double %21
}