#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 tan(double);
double get_refraction_adj_true(double altitude, double atm_pres, double temp) {
  double R;
  R = 1.02 /
      tan(((altitude + (10.3 / (altitude + 5.11))) * 3.141592653589793 / 180));
  R *= ((atm_pres / 1010) * (283 / (273 + temp)));
  R /= 60.0;
  return (R);
}


x86 assembly (clang, -O0):
<get_refraction_adj_true>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xf0c(%rip),%xmm2
addsd  -0x8(%rbp),%xmm2
movsd  0xef7(%rip),%xmm1
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  0xedf(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xecb(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <tan@plt>
movaps %xmm0,%xmm1
movsd  0xeaf(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe91(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe7d(%rip),%xmm2
addsd  -0x18(%rbp),%xmm2
movsd  0xe68(%rip),%xmm1
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xe41(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_refraction_adj_true>:
sub    $0x28,%rsp
movsd  %xmm2,0x8(%rsp)
movaps %xmm1,0x10(%rsp)
movsd  0xed9(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xed5(%rip),%xmm2
divsd  %xmm1,%xmm2
addsd  %xmm2,%xmm0
mulsd  0xecd(%rip),%xmm0
divsd  0xecd(%rip),%xmm0
call   1030 <tan@plt>
movapd 0x10(%rsp),%xmm2
shufpd $0x2,0xee1(%rip),%xmm2
movapd 0xee9(%rip),%xmm1
unpcklpd %xmm0,%xmm1
movsd  0x8(%rsp),%xmm3
addsd  0xea7(%rip),%xmm3
divpd  %xmm1,%xmm2
movapd %xmm2,%xmm0
movsd  0xe9f(%rip),%xmm1
divsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm1
unpckhpd %xmm2,%xmm0
mulsd  %xmm1,%xmm0
divsd  0xe8f(%rip),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @get_refraction_adj_true(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%8 = load double, double* %4
%9 = load double, double* %4
%10 = fadd double %9, 5.110000e+00
%11 = fdiv double 1.030000e+01, %10
%12 = fadd double %8, %11
%13 = fmul double %12, 0x400921FB54442D18
%14 = fdiv double %13, 1.800000e+02
%15 = call double @tan(double %14)
%16 = fdiv double 1.020000e+00, %15
store double %16, double* %7
%17 = load double, double* %5
%18 = fdiv double %17, 1.010000e+03
%19 = load double, double* %6
%20 = fadd double 2.730000e+02, %19
%21 = fdiv double 2.830000e+02, %20
%22 = fmul double %18, %21
%23 = load double, double* %7
%24 = fmul double %23, %22
store double %24, double* %7
%25 = load double, double* %7
%26 = fdiv double %25, 6.000000e+01
store double %26, double* %7
%27 = load double, double* %7
ret double %27
}

LLVM IR (-O2):
define double @get_refraction_adj_true(double %0, double %1, double %2) {
%4 = fadd double %0, 5.110000e+00
%5 = fdiv double 1.030000e+01, %4
%6 = fadd double %5, %0
%7 = fmul double %6, 0x400921FB54442D18
%8 = fdiv double %7, 1.800000e+02
%9 = tail call double @tan(double %8)
%10 = insertelement <2 x double> <double poison, double 1.020000e+00>, double %1, i64 0
%11 = insertelement <2 x double> <double 1.010000e+03, double poison>, double %9, i64 1
%12 = fdiv <2 x double> %10, %11
%13 = fadd double %2, 2.730000e+02
%14 = fdiv double 2.830000e+02, %13
%15 = extractelement <2 x double> %12, i64 0
%16 = fmul double %15, %14
%17 = extractelement <2 x double> %12, i64 1
%18 = fmul double %16, %17
%19 = fdiv double %18, 6.000000e+01
ret double %19
}