#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 */
float log(float);
float compute_dew_point(float air_temperature_F, int humidity) {
  float air_temperature_C = (air_temperature_F - 32.0) / 1.8;
  float a = 17.271;
  float b = 273.3;
  float humf = humidity / 100.0;
  float gamma = ((a * air_temperature_C) / (b + air_temperature_C)) + log(humf);
  float dewc = (b * gamma) / (a - gamma);
  return ((dewc * 1.8) + 32);
}


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  0xed7(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xec3(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xeca(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xeb9(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xe9f(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
addss  -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x18(%rbp),%xmm0
call   1030 <log@plt>
movaps %xmm0,%xmm1
movss  -0x24(%rbp),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x14(%rbp),%xmm0
mulss  -0x1c(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
subss  -0x1c(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe1c(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe18(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_dew_point>:
push   %rax
cvtss2sd %xmm0,%xmm0
addsd  0xee3(%rip),%xmm0
divsd  0xee3(%rip),%xmm0
cvtsd2ss %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
divsd  0xed8(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movaps %xmm1,%xmm2
mulss  0xed9(%rip),%xmm2
addss  0xed5(%rip),%xmm1
divss  %xmm1,%xmm2
movss  %xmm2,0x4(%rsp)
call   1030 <log@plt>
addss  0x4(%rsp),%xmm0
movss  0xeb8(%rip),%xmm2
mulss  %xmm0,%xmm2
movss  0xea8(%rip),%xmm1
subss  %xmm0,%xmm1
divss  %xmm1,%xmm2
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
mulsd  0xe79(%rip),%xmm0
addsd  0xe81(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @compute_dew_point(float %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
store float %0, float* %3
store i32 %1, i32* %4
%11 = load float, float* %3
%12 = fpext float %11 to double
%13 = fsub double %12, 3.200000e+01
%14 = fdiv double %13, 1.800000e+00
%15 = fptrunc double %14 to float
store float %15, float* %5
store float 0x4031456040000000, float* %6
store float 0x407114CCC0000000, float* %7
%16 = load i32, i32* %4
%17 = sitofp i32 %16 to double
%18 = fdiv double %17, 1.000000e+02
%19 = fptrunc double %18 to float
store float %19, float* %8
%20 = load float, float* %6
%21 = load float, float* %5
%22 = fmul float %20, %21
%23 = load float, float* %7
%24 = load float, float* %5
%25 = fadd float %23, %24
%26 = fdiv float %22, %25
%27 = load float, float* %8
%28 = call float @log(float %27)
%29 = fadd float %26, %28
store float %29, float* %9
%30 = load float, float* %7
%31 = load float, float* %9
%32 = fmul float %30, %31
%33 = load float, float* %6
%34 = load float, float* %9
%35 = fsub float %33, %34
%36 = fdiv float %32, %35
store float %36, float* %10
%37 = load float, float* %10
%38 = fpext float %37 to double
%39 = call double @llvm.fmuladd.f64(double %38, double 1.800000e+00, double 3.200000e+01)
%40 = fptrunc double %39 to float
ret float %40
}

LLVM IR (-O2):
define float @compute_dew_point(float %0, i32 %1) {
%3 = fpext float %0 to double
%4 = fadd double %3, -3.200000e+01
%5 = fdiv double %4, 1.800000e+00
%6 = fptrunc double %5 to float
%7 = sitofp i32 %1 to double
%8 = fdiv double %7, 1.000000e+02
%9 = fptrunc double %8 to float
%10 = fmul float %6, 0x4031456040000000
%11 = fadd float %6, 0x407114CCC0000000
%12 = fdiv float %10, %11
%13 = tail call float @log(float %9)
%14 = fadd float %12, %13
%15 = fmul float %14, 0x407114CCC0000000
%16 = fsub float 0x4031456040000000, %14
%17 = fdiv float %15, %16
%18 = fpext float %17 to double
%19 = tail call double @llvm.fmuladd.f64(double %18, double 1.800000e+00, double 3.200000e+01)
%20 = fptrunc double %19 to float
ret float %20
}