#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 log(double);
double log10(double);
int pow(int, double);
float compute_dew_point(float celsius, int humidity) {
  double RATIO = 373.15 / (273.15 + celsius);
  double RHS = -7.90298 * (RATIO - 1);
  RHS += 5.02808 * log10(RATIO);
  RHS += -1.3816e-7 * (pow(10, (11.344 * (1 - 1 / RATIO))) - 1);
  RHS += 8.1328e-3 * (pow(10, (-3.49149 * (RATIO - 1))) - 1);
  RHS += log10(1013.246);
  double VP = pow(10, RHS - 3) * humidity;
  double T = log(VP / 0.61078);
  return (241.88 * T) / (17.558 - T);
}


x86 assembly (clang, -O0):
<compute_dew_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xf17(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xf03(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xec5(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xed9(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1050 <log10@plt>
movsd  -0x18(%rbp),%xmm1
movsd  0xeb1(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe84(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  0xe77(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  0xe7b(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    $0xa,%edi
call   1040 <pow@plt>
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xe51(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xe2f(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe1b(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    $0xa,%edi
call   1040 <pow@plt>
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xdf1(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xdd4(%rip),%xmm0
call   1050 <log10@plt>
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xdb0(%rip),%xmm1
subsd  %xmm1,%xmm0
mov    $0xa,%edi
call   1040 <pow@plt>
imul   -0x8(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xd80(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <log@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  0xd62(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  0xd4d(%rip),%xmm1
subsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_dew_point>:
push   %rbx
sub    $0x20,%rsp
mov    %edi,%ebx
cvtss2sd %xmm0,%xmm1
addsd  0xebd(%rip),%xmm1
movsd  0xebd(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
movapd %xmm0,%xmm1
addsd  0xeaf(%rip),%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  0xea9(%rip),%xmm2
mulsd  %xmm1,%xmm2
movsd  %xmm2,0x8(%rsp)
call   1050 <log10@plt>
mulsd  0xe9a(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xe76(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
addsd  0xe80(%rip),%xmm0
mulsd  0xe80(%rip),%xmm0
mov    $0xa,%edi
call   1040 <pow@plt>
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xe6c(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  0xe5a(%rip),%xmm0
mov    $0xa,%edi
call   1040 <pow@plt>
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xe46(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
addsd  0xe40(%rip),%xmm0
addsd  0xe40(%rip),%xmm0
mov    $0xa,%edi
call   1040 <pow@plt>
imul   %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  0xe2c(%rip),%xmm0
call   1030 <log@plt>
movsd  0xe27(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xe23(%rip),%xmm2
subsd  %xmm0,%xmm2
divsd  %xmm2,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define float @compute_dew_point(float %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store float %0, float* %3
store i32 %1, i32* %4
%9 = load float, float* %3
%10 = fpext float %9 to double
%11 = fadd double 2.731500e+02, %10
%12 = fdiv double 3.731500e+02, %11
store double %12, double* %5
%13 = load double, double* %5
%14 = fsub double %13, 1.000000e+00
%15 = fmul double -7.902980e+00, %14
store double %15, double* %6
%16 = load double, double* %5
%17 = call double @log10(double %16)
%18 = load double, double* %6
%19 = call double @llvm.fmuladd.f64(double 5.028080e+00, double %17, double %18)
store double %19, double* %6
%20 = load double, double* %5
%21 = fdiv double 1.000000e+00, %20
%22 = fsub double 1.000000e+00, %21
%23 = fmul double 1.134400e+01, %22
%24 = call i32 @pow(i32 10, double %23)
%25 = sub nsw i32 %24, 1
%26 = sitofp i32 %25 to double
%27 = load double, double* %6
%28 = call double @llvm.fmuladd.f64(double -1.381600e-07, double %26, double %27)
store double %28, double* %6
%29 = load double, double* %5
%30 = fsub double %29, 1.000000e+00
%31 = fmul double -3.491490e+00, %30
%32 = call i32 @pow(i32 10, double %31)
%33 = sub nsw i32 %32, 1
%34 = sitofp i32 %33 to double
%35 = load double, double* %6
%36 = call double @llvm.fmuladd.f64(double 8.132800e-03, double %34, double %35)
store double %36, double* %6
%37 = call double @log10(double 0x408FA9F7CED91687)
%38 = load double, double* %6
%39 = fadd double %38, %37
store double %39, double* %6
%40 = load double, double* %6
%41 = fsub double %40, 3.000000e+00
%42 = call i32 @pow(i32 10, double %41)
%43 = load i32, i32* %4
%44 = mul nsw i32 %42, %43
%45 = sitofp i32 %44 to double
store double %45, double* %7
%46 = load double, double* %7
%47 = fdiv double %46, 6.107800e-01
%48 = call double @log(double %47)
store double %48, double* %8
%49 = load double, double* %8
%50 = fmul double 2.418800e+02, %49
%51 = load double, double* %8
%52 = fsub double 1.755800e+01, %51
%53 = fdiv double %50, %52
%54 = fptrunc double %53 to float
ret float %54
}

LLVM IR (-O2):
define float @compute_dew_point(float %0, i32 %1) {
%3 = fpext float %0 to double
%4 = fadd double %3, 2.731500e+02
%5 = fdiv double 3.731500e+02, %4
%6 = fadd double %5, -1.000000e+00
%7 = fmul double %6, -7.902980e+00
%8 = tail call double @log10(double %5)
%9 = tail call double @llvm.fmuladd.f64(double %8, double 5.028080e+00, double %7)
%10 = fdiv double 1.000000e+00, %5
%11 = fsub double 1.000000e+00, %10
%12 = fmul double %11, 1.134400e+01
%13 = tail call i32 @pow(i32 10, double %12)
%14 = add nsw i32 %13, -1
%15 = sitofp i32 %14 to double
%16 = tail call double @llvm.fmuladd.f64(double %15, double -1.381600e-07, double %9)
%17 = fmul double %6, -3.491490e+00
%18 = tail call i32 @pow(i32 10, double %17)
%19 = add nsw i32 %18, -1
%20 = sitofp i32 %19 to double
%21 = tail call double @llvm.fmuladd.f64(double %20, double 8.132800e-03, double %16)
%22 = fadd double %21, 0x40080BB4409E541B
%23 = fadd double %22, -3.000000e+00
%24 = tail call i32 @pow(i32 10, double %23)
%25 = mul nsw i32 %24, %1
%26 = sitofp i32 %25 to double
%27 = fdiv double %26, 6.107800e-01
%28 = tail call double @log(double %27)
%29 = fmul double %28, 2.418800e+02
%30 = fsub double 1.755800e+01, %28
%31 = fdiv double %29, %30
%32 = fptrunc double %31 to float
ret float %32
}