#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 GetTKelvinFromTCelsius(double);
int GetTRankineFromTFahrenheit(double);
scalar_t__ isIP();
double GetDryAirDensity(double TDryBulb, double Pressure) {
  if (isIP())
    return (144. * Pressure) / 53.350 / GetTRankineFromTFahrenheit(TDryBulb);
  else
    return Pressure / 287.042 / GetTKelvinFromTCelsius(TDryBulb);
}


x86 assembly (clang, -O0):
<GetDryAirDensity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    $0x0,%al
call   1040 <isIP@plt>
cmp    $0x0,%rax
je     1192 <GetDryAirDensity+0x62>
movsd  0xeb5(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xea0(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1050 <GetTRankineFromTFahrenheit@plt>
movsd  -0x20(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11c3 <GetDryAirDensity+0x93>
movsd  -0x18(%rbp),%xmm0
movsd  0xe61(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <GetTKelvinFromTCelsius@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetDryAirDensity>:
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
xor    %eax,%eax
call   1040 <isIP@plt>
test   %rax,%rax
je     117c <GetDryAirDensity+0x4c>
movsd  0x8(%rsp),%xmm0
mulsd  0xea6(%rip),%xmm0
divsd  0xea6(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1050 <GetTRankineFromTFahrenheit@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
jmp    119b <GetDryAirDensity+0x6b>
movsd  0x8(%rsp),%xmm0
divsd  0xe86(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <GetTKelvinFromTCelsius@plt>
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @GetDryAirDensity(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = call i64 (...) @isIP()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %2
%9 = load double, double* %5
%10 = fmul double 1.440000e+02, %9
%11 = fdiv double %10, 5.335000e+01
%12 = load double, double* %4
%13 = call i32 @GetTRankineFromTFahrenheit(double %12)
%14 = sitofp i32 %13 to double
%15 = fdiv double %11, %14
store double %15, double* %3
br label %22
16: ; preds = %2
%17 = load double, double* %5
%18 = fdiv double %17, 2.870420e+02
%19 = load double, double* %4
%20 = call double @GetTKelvinFromTCelsius(double %19)
%21 = fdiv double %18, %20
store double %21, double* %3
br label %22
22: ; preds = %16, %8
%23 = load double, double* %3
ret double %23
}

LLVM IR (-O2):
define double @GetDryAirDensity(double %0, double %1) {
%3 = tail call i64 (...) @isIP()
%4 = icmp eq i64 %3, 0
br i1 %4, label %11, label %5
5: ; preds = %2
%6 = fmul double %1, 1.440000e+02
%7 = fdiv double %6, 5.335000e+01
%8 = tail call i32 @GetTRankineFromTFahrenheit(double %0)
%9 = sitofp i32 %8 to double
%10 = fdiv double %7, %9
br label %15
11: ; preds = %2
%12 = fdiv double %1, 2.870420e+02
%13 = tail call double @GetTKelvinFromTCelsius(double %0)
%14 = fdiv double %12, %13
br label %15
15: ; preds = %11, %5
%16 = phi double [ %10, %5 ], [ %14, %11 ]
ret double %16
}