#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(float, double);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float fahrenheit, celsius, windspeed, windchill;
  printf("Enter the temperature (degrees F): ");
  scanf("%f", &fahrenheit);
  printf("Enter the wind speed (mph): ");
  scanf("%f", &windspeed);
  windchill = 35.74 + 0.6215 * fahrenheit - 35.75 * pow(windspeed, 0.16) +
              0.4275 * fahrenheit * pow(windspeed, 0.16);
  celsius = (5.0 / 9.0) * (windchill - 32);
  printf("\nThe wind chill is %4.1f F or %4.1f C", windchill, celsius);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf04(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xef7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe94(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe90(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movss  -0x10(%rbp),%xmm0
movsd  0xe5a(%rip),%xmm1
call   1050 <pow@plt>
movsd  -0x30(%rbp),%xmm1
movsd  0xe58(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe32(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movss  -0x10(%rbp),%xmm0
movsd  0xe14(%rip),%xmm1
call   1050 <pow@plt>
movsd  -0x28(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
movss  0xe0c(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xdcc(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe1e(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xef8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf0e(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xefd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xe7c(%rip),%xmm0
addsd  0xe7c(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movss  0x8(%rsp),%xmm0
movsd  0xe70(%rip),%xmm1
call   1050 <pow@plt>
mulsd  0xe6b(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xe55(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
movss  0x8(%rsp),%xmm0
movsd  0xe31(%rip),%xmm1
call   1050 <pow@plt>
mulsd  0x18(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
addss  0xe2a(%rip),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  0xe16(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe57(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Enter the temperature (degrees F): \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [29 x i8] c"Enter the wind speed (mph): \00"
@.str.3 = [38 x i8] c"\0AThe wind chill is %4.1f F or %4.1f C\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%10 = load float, float* %2
%11 = fpext float %10 to double
%12 = call double @llvm.fmuladd.f64(double 6.215000e-01, double %11, double 3.574000e+01)
%13 = load float, float* %4
%14 = call double @pow(float %13, double 1.600000e-01)
%15 = call double @llvm.fmuladd.f64(double -3.575000e+01, double %14, double %12)
%16 = load float, float* %2
%17 = fpext float %16 to double
%18 = fmul double 4.275000e-01, %17
%19 = load float, float* %4
%20 = call double @pow(float %19, double 1.600000e-01)
%21 = call double @llvm.fmuladd.f64(double %18, double %20, double %15)
%22 = fptrunc double %21 to float
store float %22, float* %5
%23 = load float, float* %5
%24 = fsub float %23, 3.200000e+01
%25 = fpext float %24 to double
%26 = fmul double 0x3FE1C71C71C71C72, %25
%27 = fptrunc double %26 to float
store float %27, float* %3
%28 = load float, float* %5
%29 = fpext float %28 to double
%30 = load float, float* %3
%31 = fpext float %30 to double
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), double %29, double %31)
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c"Enter the temperature (degrees F): \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [29 x i8] c"Enter the wind speed (mph): \00"
@.str.3 = [38 x i8] c"\0AThe wind chill is %4.1f F or %4.1f C\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%9 = load float, float* %1
%10 = fpext float %9 to double
%11 = call double @llvm.fmuladd.f64(double %10, double 6.215000e-01, double 3.574000e+01)
%12 = load float, float* %2
%13 = call double @pow(float %12, double 1.600000e-01)
%14 = call double @llvm.fmuladd.f64(double %13, double -3.575000e+01, double %11)
%15 = load float, float* %1
%16 = fpext float %15 to double
%17 = fmul double %16, 4.275000e-01
%18 = load float, float* %2
%19 = call double @pow(float %18, double 1.600000e-01)
%20 = call double @llvm.fmuladd.f64(double %17, double %19, double %14)
%21 = fptrunc double %20 to float
%22 = fadd float %21, -3.200000e+01
%23 = fpext float %22 to double
%24 = fmul double %23, 0x3FE1C71C71C71C72
%25 = fptrunc double %24 to float
%26 = fpext float %21 to double
%27 = fpext float %25 to double
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), double %26, double %27)
ret i32 0
}