#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 */
scalar_t__ isIP();
int pow(int, double);
double GetStandardAtmPressure(double Altitude) {
  double Pressure;
  if (isIP())
    Pressure = 14.696 * pow(1. - 6.8754e-06 * Altitude, 5.2559);
  else
    Pressure = 101325. * pow(1. - 2.25577e-05 * Altitude, 5.2559);
  return Pressure;
}


x86 assembly (clang, -O0):
<GetStandardAtmPressure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <isIP@plt>
cmp    $0x0,%rax
je     1186 <GetStandardAtmPressure+0x66>
movsd  -0x8(%rbp),%xmm0
movsd  0xedd(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec1(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
movsd  0xea1(%rip),%xmm0
call   1030 <pow@plt>
cvtsi2sd %eax,%xmm1
movsd  0xea8(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    11c9 <GetStandardAtmPressure+0xa9>
movsd  -0x8(%rbp),%xmm0
movsd  0xe7d(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe79(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
movsd  0xe59(%rip),%xmm0
call   1030 <pow@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe40(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetStandardAtmPressure>:
push   %rbp
push   %rbx
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1040 <isIP@plt>
xor    %ebx,%ebx
movsd  0xecf(%rip),%xmm0
test   %rax,%rax
sete   %bpl
je     1151 <GetStandardAtmPressure+0x31>
movsd  (%rsp),%xmm1
mulsd  0xec1(%rip),%xmm1
jmp    115e <GetStandardAtmPressure+0x3e>
movsd  (%rsp),%xmm1
mulsd  0xea2(%rip),%xmm1
addsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
movsd  0xeaa(%rip),%xmm0
call   1030 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    %bpl,%bl
lea    0xe9c(%rip),%rax
mulsd  (%rax,%rbx,8),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @GetStandardAtmPressure(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = call i64 (...) @isIP()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load double, double* %2
%8 = call double @llvm.fmuladd.f64(double -6.875400e-06, double %7, double 1.000000e+00)
%9 = fptosi double %8 to i32
%10 = call i32 @pow(i32 %9, double 5.255900e+00)
%11 = sitofp i32 %10 to double
%12 = fmul double 1.469600e+01, %11
store double %12, double* %3
br label %20
13: ; preds = %1
%14 = load double, double* %2
%15 = call double @llvm.fmuladd.f64(double -2.255770e-05, double %14, double 1.000000e+00)
%16 = fptosi double %15 to i32
%17 = call i32 @pow(i32 %16, double 5.255900e+00)
%18 = sitofp i32 %17 to double
%19 = fmul double 1.013250e+05, %18
store double %19, double* %3
br label %20
20: ; preds = %13, %6
%21 = load double, double* %3
ret double %21
}

LLVM IR (-O2):
define double @GetStandardAtmPressure(double %0) {
%2 = tail call i64 (...) @isIP()
%3 = icmp eq i64 %2, 0
%4 = tail call double @llvm.fmuladd.f64(double %0, double -2.255770e-05, double 1.000000e+00)
%5 = tail call double @llvm.fmuladd.f64(double %0, double -6.875400e-06, double 1.000000e+00)
%6 = select i1 %3, double %4, double %5
%7 = select i1 %3, double 1.013250e+05, double 1.469600e+01
%8 = fptosi double %6 to i32
%9 = tail call i32 @pow(i32 %8, double 5.255900e+00)
%10 = sitofp i32 %9 to double
%11 = fmul double %7, %10
ret double %11
}