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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x12c,-0x14(%rbp)
movl   $0x14,-0x18(%rbp)
cvtsi2ssl -0x10(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0xc(%rbp),%xmm1
cvtsi2ssl -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11a8 <main+0x88>
movss  -0xc(%rbp),%xmm0
call   1030 <convertToFahr@plt>
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe8b(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtsi2ssl -0x18(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    115c <main+0x3c>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf8d(%rip),%rdi
call   1030 <puts@plt>
xorps  %xmm0,%xmm0
call   1040 <convertToFahr@plt>
lea    0xf6c(%rip),%rbx
xorps  %xmm1,%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movss  0xe9f(%rip),%xmm0
call   1040 <convertToFahr@plt>
movsd  0xed2(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movss  0xe84(%rip),%xmm0
call   1040 <convertToFahr@plt>
movsd  0xebb(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movss  0xe69(%rip),%xmm0
call   1040 <convertToFahr@plt>
movsd  0xea4(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movss  0xe4e(%rip),%xmm0
call   1040 <convertToFahr@plt>
movsd  0xe8d(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movss  0xe33(%rip),%xmm0
call   1040 <convertToFahr@plt>
movsd  0xe76(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movss  0xe18(%rip),%xmm0
call   1040 <convertToFahr@plt>
movsd  0xe5f(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movss  0xdfd(%rip),%xmm0
call   1040 <convertToFahr@plt>
movsd  0xe48(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movss  0xde2(%rip),%xmm0
call   1040 <convertToFahr@plt>
movsd  0xe31(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movss  0xdc7(%rip),%xmm0
call   1040 <convertToFahr@plt>
movsd  0xe1a(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movss  0xdac(%rip),%xmm0
call   1040 <convertToFahr@plt>
movsd  0xe03(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movss  0xd91(%rip),%xmm0
call   1040 <convertToFahr@plt>
movsd  0xdec(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movss  0xd76(%rip),%xmm0
call   1040 <convertToFahr@plt>
movsd  0xdd5(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movss  0xd5b(%rip),%xmm0
call   1040 <convertToFahr@plt>
movsd  0xdbe(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movss  0xd40(%rip),%xmm0
call   1040 <convertToFahr@plt>
movsd  0xda7(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movss  0xd25(%rip),%xmm0
call   1040 <convertToFahr@plt>
movsd  0xd90(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str.1 = [13 x i8] c"%3.0f %3.0f\0A\00"
@str = [19 x i8] c"Fahrenheit Celsius\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 double @convertToFahr(float 0.000000e+00)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %2, double 0.000000e+00)
%4 = tail call double @convertToFahr(float 2.000000e+01)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %4, double 2.000000e+01)
%6 = tail call double @convertToFahr(float 4.000000e+01)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %6, double 4.000000e+01)
%8 = tail call double @convertToFahr(float 6.000000e+01)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %8, double 6.000000e+01)
%10 = tail call double @convertToFahr(float 8.000000e+01)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %10, double 8.000000e+01)
%12 = tail call double @convertToFahr(float 1.000000e+02)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %12, double 1.000000e+02)
%14 = tail call double @convertToFahr(float 1.200000e+02)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %14, double 1.200000e+02)
%16 = tail call double @convertToFahr(float 1.400000e+02)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %16, double 1.400000e+02)
%18 = tail call double @convertToFahr(float 1.600000e+02)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %18, double 1.600000e+02)
%20 = tail call double @convertToFahr(float 1.800000e+02)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %20, double 1.800000e+02)
%22 = tail call double @convertToFahr(float 2.000000e+02)
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %22, double 2.000000e+02)
%24 = tail call double @convertToFahr(float 2.200000e+02)
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %24, double 2.200000e+02)
%26 = tail call double @convertToFahr(float 2.400000e+02)
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %26, double 2.400000e+02)
%28 = tail call double @convertToFahr(float 2.600000e+02)
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %28, double 2.600000e+02)
%30 = tail call double @convertToFahr(float 2.800000e+02)
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %30, double 2.800000e+02)
%32 = tail call double @convertToFahr(float 3.000000e+02)
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %32, double 3.000000e+02)
ret i32 0
}