#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 pow(int, double);
int round(double);
int windchill_F(int temp_F, int windspeed) {
  double ret;
  if (temp_F == 999 || windspeed < 0)
    return 999;
  ret = 35.74 + 0.6215 * temp_F +
        (-35.75 + 0.4275 * temp_F) * pow(windspeed * 50292 / 57875.0, 0.16);
  if (ret > temp_F)
    return temp_F;
  return round(ret);
}


x86 assembly (clang, -O0):
<windchill_F>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x3e7,-0x8(%rbp)
je     1145 <windchill_F+0x25>
cmpl   $0x0,-0xc(%rbp)
jge    1151 <windchill_F+0x31>
movl   $0x3e7,-0x4(%rbp)
jmp    1203 <windchill_F+0xe3>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xec2(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xebe(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xe90(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe8c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
imul   $0xc474,-0xc(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xe60(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
movsd  0xe48(%rip),%xmm0
call   1030 <pow@plt>
movsd  -0x28(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jbe    11f6 <windchill_F+0xd6>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1203 <windchill_F+0xe3>
movsd  -0x18(%rbp),%xmm0
call   1040 <round@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<windchill_F>:
mov    $0x3e7,%eax
cmp    $0x3e7,%edi
je     11c0 <windchill_F+0xa0>
test   %esi,%esi
js     11c0 <windchill_F+0xa0>
push   %rbx
sub    $0x20,%rsp
mov    %edi,%ebx
cvtsi2sd %edi,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xeae(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xeaa(%rip),%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  0xea4(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xea0(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
imul   $0xc474,%esi,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  0xe8d(%rip),%xmm0
cvttsd2si %xmm0,%edi
movsd  0xe89(%rip),%xmm0
call   1030 <pow@plt>
mulsd  0x8(%rsp),%xmm0
addsd  0x18(%rsp),%xmm0
ucomisd 0x10(%rsp),%xmm0
mov    %ebx,%eax
lea    0x20(%rsp),%rsp
pop    %rbx
jbe    11c1 <windchill_F+0xa1>
ret
jmp    1040 <round@plt>

LLVM IR (-O0):
define i32 @windchill_F(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 999
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9, %2
store i32 999, i32* %3
br label %36
13: ; preds = %9
%14 = load i32, i32* %4
%15 = sitofp i32 %14 to double
%16 = call double @llvm.fmuladd.f64(double 6.215000e-01, double %15, double 3.574000e+01)
%17 = load i32, i32* %4
%18 = sitofp i32 %17 to double
%19 = call double @llvm.fmuladd.f64(double 4.275000e-01, double %18, double -3.575000e+01)
%20 = load i32, i32* %5
%21 = mul nsw i32 %20, 50292
%22 = sitofp i32 %21 to double
%23 = fdiv double %22, 5.787500e+04
%24 = fptosi double %23 to i32
%25 = call double @pow(i32 %24, double 1.600000e-01)
%26 = call double @llvm.fmuladd.f64(double %19, double %25, double %16)
store double %26, double* %6
%27 = load double, double* %6
%28 = load i32, i32* %4
%29 = sitofp i32 %28 to double
%30 = fcmp ogt double %27, %29
br i1 %30, label %31, label %33
31: ; preds = %13
%32 = load i32, i32* %4
store i32 %32, i32* %3
br label %36
33: ; preds = %13
%34 = load double, double* %6
%35 = call i32 @round(double %34)
store i32 %35, i32* %3
br label %36
36: ; preds = %33, %31, %12
%37 = load i32, i32* %3
ret i32 %37
}

LLVM IR (-O2):
define i32 @windchill_F(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 999
%4 = icmp slt i32 %1, 0
%5 = or i1 %3, %4
br i1 %5, label %19, label %6
6: ; preds = %2
%7 = sitofp i32 %0 to double
%8 = tail call double @llvm.fmuladd.f64(double %7, double 6.215000e-01, double 3.574000e+01)
%9 = tail call double @llvm.fmuladd.f64(double %7, double 4.275000e-01, double -3.575000e+01)
%10 = mul nsw i32 %1, 50292
%11 = sitofp i32 %10 to double
%12 = fdiv double %11, 5.787500e+04
%13 = fptosi double %12 to i32
%14 = tail call double @pow(i32 %13, double 1.600000e-01)
%15 = tail call double @llvm.fmuladd.f64(double %9, double %14, double %8)
%16 = fcmp ogt double %15, %7
br i1 %16, label %19, label %17
17: ; preds = %6
%18 = tail call i32 @round(double %15)
br label %19
19: ; preds = %6, %2, %17
%20 = phi i32 [ %18, %17 ], [ 999, %2 ], [ %0, %6 ]
ret i32 %20
}