#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*/ printf(char *, ...);
float to_celsius(float);
int main() {
  printf("Fahrenheit\tCelsius\n");
  float celsius;
  for (float fahr = 0.0; fahr <= 300.0; fahr = fahr + 20.0) {
    celsius = to_celsius(fahr);
    printf("%10.2f\t%7.2f\n", fahr, celsius);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeaa(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     11b2 <main+0x92>
movss  -0xc(%rbp),%xmm0
call   1040 <to_celsius@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe9c(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe68(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1145 <main+0x25>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf8e(%rip),%rdi
call   1030 <puts@plt>
xorps  %xmm0,%xmm0
call   1050 <to_celsius@plt>
cvtss2sd %xmm0,%xmm1
lea    0xf68(%rip),%rbx
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xe9b(%rip),%xmm0
call   1050 <to_celsius@plt>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xec7(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xe79(%rip),%xmm0
call   1050 <to_celsius@plt>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xea9(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xe57(%rip),%xmm0
call   1050 <to_celsius@plt>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xe8b(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xe35(%rip),%xmm0
call   1050 <to_celsius@plt>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xe6d(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xe13(%rip),%xmm0
call   1050 <to_celsius@plt>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xe4f(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xdf1(%rip),%xmm0
call   1050 <to_celsius@plt>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xe31(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xdcf(%rip),%xmm0
call   1050 <to_celsius@plt>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xe13(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xdad(%rip),%xmm0
call   1050 <to_celsius@plt>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xdf5(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xd8b(%rip),%xmm0
call   1050 <to_celsius@plt>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xdd7(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xd69(%rip),%xmm0
call   1050 <to_celsius@plt>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xdb9(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xd47(%rip),%xmm0
call   1050 <to_celsius@plt>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xd9b(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xd25(%rip),%xmm0
call   1050 <to_celsius@plt>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xd7d(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xd03(%rip),%xmm0
call   1050 <to_celsius@plt>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xd5f(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xce1(%rip),%xmm0
call   1050 <to_celsius@plt>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xd41(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xcbf(%rip),%xmm0
call   1050 <to_celsius@plt>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xd23(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Fahrenheit\09Celsius\0A\00"
@.str.1 = [14 x i8] c"%10.2f\09%7.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
store float 0.000000e+00, float* %3
br label %5
5: ; preds = %17, %0
%6 = load float, float* %3
%7 = fpext float %6 to double
%8 = fcmp ole double %7, 3.000000e+02
br i1 %8, label %9, label %22
9: ; preds = %5
%10 = load float, float* %3
%11 = call float @to_celsius(float %10)
store float %11, float* %2
%12 = load float, float* %3
%13 = fpext float %12 to double
%14 = load float, float* %2
%15 = fpext float %14 to double
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double %13, double %15)
br label %17
17: ; preds = %9
%18 = load float, float* %3
%19 = fpext float %18 to double
%20 = fadd double %19, 2.000000e+01
%21 = fptrunc double %20 to float
store float %21, float* %3
br label %5
22: ; preds = %5
%23 = load i32, i32* %1
ret i32 %23
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"%10.2f\09%7.2f\0A\00"
@str = [19 x i8] c"Fahrenheit\09Celsius\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%2 = tail call float @to_celsius(float 0.000000e+00)
%3 = fpext float %2 to double
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double 0.000000e+00, double %3)
%5 = tail call float @to_celsius(float 2.000000e+01)
%6 = fpext float %5 to double
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double 2.000000e+01, double %6)
%8 = tail call float @to_celsius(float 4.000000e+01)
%9 = fpext float %8 to double
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double 4.000000e+01, double %9)
%11 = tail call float @to_celsius(float 6.000000e+01)
%12 = fpext float %11 to double
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double 6.000000e+01, double %12)
%14 = tail call float @to_celsius(float 8.000000e+01)
%15 = fpext float %14 to double
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double 8.000000e+01, double %15)
%17 = tail call float @to_celsius(float 1.000000e+02)
%18 = fpext float %17 to double
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double 1.000000e+02, double %18)
%20 = tail call float @to_celsius(float 1.200000e+02)
%21 = fpext float %20 to double
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double 1.200000e+02, double %21)
%23 = tail call float @to_celsius(float 1.400000e+02)
%24 = fpext float %23 to double
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double 1.400000e+02, double %24)
%26 = tail call float @to_celsius(float 1.600000e+02)
%27 = fpext float %26 to double
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double 1.600000e+02, double %27)
%29 = tail call float @to_celsius(float 1.800000e+02)
%30 = fpext float %29 to double
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double 1.800000e+02, double %30)
%32 = tail call float @to_celsius(float 2.000000e+02)
%33 = fpext float %32 to double
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double 2.000000e+02, double %33)
%35 = tail call float @to_celsius(float 2.200000e+02)
%36 = fpext float %35 to double
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double 2.200000e+02, double %36)
%38 = tail call float @to_celsius(float 2.400000e+02)
%39 = fpext float %38 to double
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double 2.400000e+02, double %39)
%41 = tail call float @to_celsius(float 2.600000e+02)
%42 = fpext float %41 to double
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double 2.600000e+02, double %42)
%44 = tail call float @to_celsius(float 2.800000e+02)
%45 = fpext float %44 to double
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double 2.800000e+02, double %45)
%47 = tail call float @to_celsius(float 3.000000e+02)
%48 = fpext float %47 to double
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double 3.000000e+02, double %48)
ret i32 0
}