#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);
double GetSpecificHumFromHumRatio(double HumRatio) {
  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",
           626);
  }
  BoundedHumRatio = (((HumRatio) > (1e-7)) ? (HumRatio) : (1e-7));
  return BoundedHumRatio / (1.0 + BoundedHumRatio);
}


x86 assembly (clang, -O0):
<GetSpecificHumFromHumRatio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jae    1147 <GetSpecificHumFromHumRatio+0x37>
lea    0xeda(%rip),%rdi
lea    0xeee(%rip),%rsi
mov    $0x272,%edx
call   1030 <Assert@plt>
movsd  -0x8(%rbp),%xmm0
movsd  0xeac(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    116d <GetSpecificHumFromHumRatio+0x5d>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    117f <GetSpecificHumFromHumRatio+0x6f>
movsd  0xe8b(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    117f <GetSpecificHumFromHumRatio+0x6f>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe72(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetSpecificHumFromHumRatio>:
push   %rax
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jae    113d <GetSpecificHumFromHumRatio+0x2d>
lea    0xeee(%rip),%rdi
lea    0xf02(%rip),%rsi
mov    $0x272,%edx
movsd  %xmm0,(%rsp)
call   1030 <Assert@plt>
movsd  (%rsp),%xmm0
maxsd  0xebb(%rip),%xmm0
movsd  0xebb(%rip),%xmm1
addsd  %xmm0,%xmm1
divsd  %xmm1,%xmm0
pop    %rax
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 @GetSpecificHumFromHumRatio(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fcmp oge double %4, 0.000000e+00
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = 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 626)
br label %8
8: ; preds = %6, %1
%9 = load double, double* %2
%10 = fcmp ogt double %9, 0x3E7AD7F29ABCAF48
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = load double, double* %2
br label %14
13: ; preds = %8
br label %14
14: ; preds = %13, %11
%15 = phi double [ %12, %11 ], [ 0x3E7AD7F29ABCAF48, %13 ]
store double %15, double* %3
%16 = load double, double* %3
%17 = load double, double* %3
%18 = fadd double 1.000000e+00, %17
%19 = fdiv double %16, %18
ret double %19
}

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 @GetSpecificHumFromHumRatio(double %0) {
%2 = fcmp ult double %0, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = 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 626)
br label %5
5: ; preds = %3, %1
%6 = fcmp ogt double %0, 0x3E7AD7F29ABCAF48
%7 = select i1 %6, double %0, double 0x3E7AD7F29ABCAF48
%8 = fadd double %7, 1.000000e+00
%9 = fdiv double %7, %8
ret double %9
}