#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 GetSatVapPres(double);
double GetRelHumFromTDewPoint(double TDryBulb, double TDewPoint) {
  double VapPres, SatVapPres;
  if (!(TDewPoint <= TDryBulb)) {
    Assert("Dew point temperature is above dry bulb temperature",
           "/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",
           236);
  }
  VapPres = GetSatVapPres(TDewPoint);
  SatVapPres = GetSatVapPres(TDryBulb);
  return VapPres / SatVapPres;
}


x86 assembly (clang, -O0):
<GetRelHumFromTDewPoint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jae    115e <GetRelHumFromTDewPoint+0x3e>
lea    0xeb3(%rip),%rdi
lea    0xee0(%rip),%rsi
mov    $0xec,%edx
call   1040 <Assert@plt>
movsd  -0x10(%rbp),%xmm0
call   1030 <GetSatVapPres@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <GetSatVapPres@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetRelHumFromTDewPoint>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
ucomisd %xmm1,%xmm0
jae    1154 <GetRelHumFromTDewPoint+0x34>
lea    0xec9(%rip),%rdi
lea    0xef6(%rip),%rsi
mov    $0xec,%edx
movsd  %xmm1,0x8(%rsp)
call   1040 <Assert@plt>
movsd  0x8(%rsp),%xmm1
movapd %xmm1,%xmm0
call   1030 <GetSatVapPres@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <GetSatVapPres@plt>
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [52 x i8] c"Dew point temperature is above dry bulb temperature\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 @GetRelHumFromTDewPoint(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
%7 = load double, double* %4
%8 = load double, double* %3
%9 = fcmp ole double %7, %8
br i1 %9, label %12, label %10
10: ; preds = %2
%11 = call i32 @Assert(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 236)
br label %12
12: ; preds = %10, %2
%13 = load double, double* %4
%14 = call double @GetSatVapPres(double %13)
store double %14, double* %5
%15 = load double, double* %3
%16 = call double @GetSatVapPres(double %15)
store double %16, double* %6
%17 = load double, double* %5
%18 = load double, double* %6
%19 = fdiv double %17, %18
ret double %19
}

LLVM IR (-O2):
@.str = [52 x i8] c"Dew point temperature is above dry bulb temperature\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 @GetRelHumFromTDewPoint(double %0, double %1) {
%3 = fcmp ugt double %1, %0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @Assert(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 236)
br label %6
6: ; preds = %4, %2
%7 = tail call double @GetSatVapPres(double %1)
%8 = tail call double @GetSatVapPres(double %0)
%9 = fdiv double %7, %8
ret double %9
}