#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 celsius_to_fahr(float);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  float fahr, celsius;
  float lower, upper, step;
  lower = 0;
  upper = 300;
  step = 20;
  printf("Celsius\tFahrenheit\n-------\t----------\n");
  celsius = lower;
  while (celsius <= upper) {
    fahr = celsius_to_fahr(celsius);
    printf("%7.0f\t%10.0f\n", celsius, fahr);
    celsius = celsius + step;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xec5(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xeb4(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11bf <main+0x9f>
movss  -0xc(%rbp),%xmm0
call   1040 <celsius_to_fahr@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe8b(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1169 <main+0x49>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf8e(%rip),%rdi
call   1030 <puts@plt>
xorps  %xmm0,%xmm0
call   1050 <celsius_to_fahr@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 <celsius_to_fahr@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 <celsius_to_fahr@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 <celsius_to_fahr@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 <celsius_to_fahr@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 <celsius_to_fahr@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 <celsius_to_fahr@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 <celsius_to_fahr@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 <celsius_to_fahr@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 <celsius_to_fahr@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 <celsius_to_fahr@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 <celsius_to_fahr@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 <celsius_to_fahr@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 <celsius_to_fahr@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 <celsius_to_fahr@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 <celsius_to_fahr@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 = [39 x i8] c"Celsius\09Fahrenheit\0A-------\09----------\0A\00"
@.str.1 = [14 x i8] c"%7.0f\09%10.0f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
store i32 0, i32* %1
store float 0.000000e+00, float* %4
store float 3.000000e+02, float* %5
store float 2.000000e+01, float* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%8 = load float, float* %4
store float %8, float* %3
br label %9
9: ; preds = %13, %0
%10 = load float, float* %3
%11 = load float, float* %5
%12 = fcmp ole float %10, %11
br i1 %12, label %13, label %24
13: ; preds = %9
%14 = load float, float* %3
%15 = call float @celsius_to_fahr(float %14)
store float %15, float* %2
%16 = load float, float* %3
%17 = fpext float %16 to double
%18 = load float, float* %2
%19 = fpext float %18 to double
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double %17, double %19)
%21 = load float, float* %3
%22 = load float, float* %6
%23 = fadd float %21, %22
store float %23, float* %3
br label %9
24: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"%7.0f\09%10.0f\0A\00"
@str = [38 x i8] c"Celsius\09Fahrenheit\0A-------\09----------\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%2 = tail call float @celsius_to_fahr(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 @celsius_to_fahr(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 @celsius_to_fahr(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 @celsius_to_fahr(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 @celsius_to_fahr(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 @celsius_to_fahr(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 @celsius_to_fahr(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 @celsius_to_fahr(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 @celsius_to_fahr(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 @celsius_to_fahr(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 @celsius_to_fahr(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 @celsius_to_fahr(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 @celsius_to_fahr(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 @celsius_to_fahr(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 @celsius_to_fahr(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 @celsius_to_fahr(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
}