#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 GetHumRatioFromTWetBulb(double, double, double);
double GetTDewPointFromHumRatio(double, double, double);
double GetTDewPointFromTWetBulb(double TDryBulb, double TWetBulb,
                                double Pressure) {
  double HumRatio;
  if (!(TWetBulb <= TDryBulb)) {
    Assert("Wet bulb 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",
           284);
  }
  HumRatio = GetHumRatioFromTWetBulb(TDryBulb, TWetBulb, Pressure);
  return GetTDewPointFromHumRatio(TDryBulb, HumRatio, Pressure);
}


x86 assembly (clang, -O0):
<GetTDewPointFromTWetBulb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jae    1173 <GetTDewPointFromTWetBulb+0x43>
lea    0xe9e(%rip),%rdi
lea    0xeca(%rip),%rsi
mov    $0x11c,%edx
call   1050 <Assert@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1040 <GetHumRatioFromTWetBulb@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1030 <GetTDewPointFromHumRatio@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetTDewPointFromTWetBulb>:
sub    $0x18,%rsp
movsd  %xmm2,0x8(%rsp)
movsd  %xmm0,(%rsp)
ucomisd %xmm1,%xmm0
jae    1169 <GetTDewPointFromTWetBulb+0x39>
lea    0xeb4(%rip),%rdi
lea    0xee0(%rip),%rsi
mov    $0x11c,%edx
movsd  %xmm1,0x10(%rsp)
call   1050 <Assert@plt>
movsd  0x10(%rsp),%xmm1
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm2
call   1040 <GetHumRatioFromTWetBulb@plt>
movaps %xmm0,%xmm1
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm2
add    $0x18,%rsp
jmp    1030 <GetTDewPointFromHumRatio@plt>

LLVM IR (-O0):
@.str = [51 x i8] c"Wet bulb 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 @GetTDewPointFromTWetBulb(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 = load double, double* %4
%10 = fcmp ole double %8, %9
br i1 %10, label %13, label %11
11: ; preds = %3
%12 = call i32 @Assert(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 284)
br label %13
13: ; preds = %11, %3
%14 = load double, double* %4
%15 = load double, double* %5
%16 = load double, double* %6
%17 = call double @GetHumRatioFromTWetBulb(double %14, double %15, double %16)
store double %17, double* %7
%18 = load double, double* %4
%19 = load double, double* %7
%20 = load double, double* %6
%21 = call double @GetTDewPointFromHumRatio(double %18, double %19, double %20)
ret double %21
}

LLVM IR (-O2):
@.str = [51 x i8] c"Wet bulb 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 @GetTDewPointFromTWetBulb(double %0, double %1, double %2) {
%4 = fcmp ugt double %1, %0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @Assert(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 284)
br label %7
7: ; preds = %5, %3
%8 = tail call double @GetHumRatioFromTWetBulb(double %0, double %1, double %2)
%9 = tail call double @GetTDewPointFromHumRatio(double %0, double %8, double %2)
ret double %9
}