#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*/ Assert(char *, char *, int);
int GetMoistAirVolume(double, double, double);
double GetMoistAirDensity(double TDryBulb, double HumRatio, double Pressure) {
  double BoundedHumRatio;
  if (!(HumRatio >= 0.)) {
    Assert("Humidity ratio is negative",
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/psychrometrics/psychrolib/refs/heads/"
           "master/src/c/psychrolib.c",
           920);
  }
  BoundedHumRatio = (((HumRatio) > (1e-7)) ? (HumRatio) : (1e-7));
  return (1. + BoundedHumRatio) /
         GetMoistAirVolume(TDryBulb, BoundedHumRatio, Pressure);
}


x86 assembly (clang, -O0):
<GetMoistAirDensity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jae    1161 <GetMoistAirDensity+0x41>
lea    0xec0(%rip),%rdi
lea    0xed4(%rip),%rsi
mov    $0x398,%edx
call   1030 <Assert@plt>
movsd  -0x10(%rbp),%xmm0
movsd  0xe92(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1187 <GetMoistAirDensity+0x67>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1199 <GetMoistAirDensity+0x79>
movsd  0xe71(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1199 <GetMoistAirDensity+0x79>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe5d(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1040 <GetMoistAirVolume@plt>
movsd  -0x30(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetMoistAirDensity>:
sub    $0x18,%rsp
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm1
jae    1168 <GetMoistAirDensity+0x48>
lea    0xedb(%rip),%rdi
lea    0xeef(%rip),%rsi
mov    $0x398,%edx
movsd  %xmm2,(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1030 <Assert@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  (%rsp),%xmm2
maxsd  0xe90(%rip),%xmm1
movsd  0xe90(%rip),%xmm3
addsd  %xmm1,%xmm3
movsd  %xmm3,(%rsp)
call   1040 <GetMoistAirVolume@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  (%rsp),%xmm0
divsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Humidity ratio is negative\00"
@.str.1 = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/psychrometrics/psychrolib/refs/heads/master/src/c/psychrolib.c\00"
define double @GetMoistAirDensity(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* %5
%9 = fcmp oge double %8, 0.000000e+00
br i1 %9, label %12, label %10
10: ; preds = %3
%11 = call i32 @Assert(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 920)
br label %12
12: ; preds = %10, %3
%13 = load double, double* %5
%14 = fcmp ogt double %13, 0x3E7AD7F29ABCAF48
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = load double, double* %5
br label %18
17: ; preds = %12
br label %18
18: ; preds = %17, %15
%19 = phi double [ %16, %15 ], [ 0x3E7AD7F29ABCAF48, %17 ]
store double %19, double* %7
%20 = load double, double* %7
%21 = fadd double 1.000000e+00, %20
%22 = load double, double* %4
%23 = load double, double* %7
%24 = load double, double* %6
%25 = call i32 @GetMoistAirVolume(double %22, double %23, double %24)
%26 = sitofp i32 %25 to double
%27 = fdiv double %21, %26
ret double %27
}

LLVM IR (-O2):
@.str = [27 x i8] c"Humidity ratio is negative\00"
@.str.1 = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/psychrometrics/psychrolib/refs/heads/master/src/c/psychrolib.c\00"
define double @GetMoistAirDensity(double %0, double %1, double %2) {
%4 = fcmp ult double %1, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @Assert(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 920)
br label %7
7: ; preds = %5, %3
%8 = fcmp ogt double %1, 0x3E7AD7F29ABCAF48
%9 = select i1 %8, double %1, double 0x3E7AD7F29ABCAF48
%10 = fadd double %9, 1.000000e+00
%11 = tail call i32 @GetMoistAirVolume(double %0, double %9, double %2)
%12 = sitofp i32 %11 to double
%13 = fdiv double %10, %12
ret double %13
}