#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 fahr_to_celsius(float);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  float fahr;
  int lower, upper, step;
  lower = 0;
  upper = 300;
  step = 20;
  fahr = lower;
  printf("CELSIUS\tFAHR\n");
  while (fahr <= upper) {
    printf("%3.0f\t%6.1f\n", fahr_to_celsius(fahr), fahr);
    fahr = fahr + step;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x12c,-0x1c(%rbp)
movl   $0x14,-0x20(%rbp)
cvtsi2ssl -0x18(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm1
cvtsi2ssl -0x1c(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11af <main+0x8f>
movss  -0x14(%rbp),%xmm0
call   1040 <fahr_to_celsius@plt>
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe7e(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtsi2ssl -0x20(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1163 <main+0x43>
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   1050 <fahr_to_celsius@plt>
lea    0xf6c(%rip),%rbx
xorps  %xmm1,%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xe9f(%rip),%xmm0
call   1050 <fahr_to_celsius@plt>
movsd  0xed2(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xe84(%rip),%xmm0
call   1050 <fahr_to_celsius@plt>
movsd  0xebb(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xe69(%rip),%xmm0
call   1050 <fahr_to_celsius@plt>
movsd  0xea4(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xe4e(%rip),%xmm0
call   1050 <fahr_to_celsius@plt>
movsd  0xe8d(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xe33(%rip),%xmm0
call   1050 <fahr_to_celsius@plt>
movsd  0xe76(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xe18(%rip),%xmm0
call   1050 <fahr_to_celsius@plt>
movsd  0xe5f(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xdfd(%rip),%xmm0
call   1050 <fahr_to_celsius@plt>
movsd  0xe48(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xde2(%rip),%xmm0
call   1050 <fahr_to_celsius@plt>
movsd  0xe31(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xdc7(%rip),%xmm0
call   1050 <fahr_to_celsius@plt>
movsd  0xe1a(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xdac(%rip),%xmm0
call   1050 <fahr_to_celsius@plt>
movsd  0xe03(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xd91(%rip),%xmm0
call   1050 <fahr_to_celsius@plt>
movsd  0xdec(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xd76(%rip),%xmm0
call   1050 <fahr_to_celsius@plt>
movsd  0xdd5(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xd5b(%rip),%xmm0
call   1050 <fahr_to_celsius@plt>
movsd  0xdbe(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xd40(%rip),%xmm0
call   1050 <fahr_to_celsius@plt>
movsd  0xda7(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xd25(%rip),%xmm0
call   1050 <fahr_to_celsius@plt>
movsd  0xd90(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str.1 = [13 x i8] c"%3.0f\09%6.1f\0A\00"
@str = [13 x i8] c"CELSIUS\09FAHR\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%4 = tail call double @fahr_to_celsius(float 0.000000e+00)
%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 0.000000e+00)
%6 = tail call double @fahr_to_celsius(float 2.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 2.000000e+01)
%8 = tail call double @fahr_to_celsius(float 4.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 4.000000e+01)
%10 = tail call double @fahr_to_celsius(float 6.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 6.000000e+01)
%12 = tail call double @fahr_to_celsius(float 8.000000e+01)
%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 8.000000e+01)
%14 = tail call double @fahr_to_celsius(float 1.000000e+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.000000e+02)
%16 = tail call double @fahr_to_celsius(float 1.200000e+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.200000e+02)
%18 = tail call double @fahr_to_celsius(float 1.400000e+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.400000e+02)
%20 = tail call double @fahr_to_celsius(float 1.600000e+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.600000e+02)
%22 = tail call double @fahr_to_celsius(float 1.800000e+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 1.800000e+02)
%24 = tail call double @fahr_to_celsius(float 2.000000e+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.000000e+02)
%26 = tail call double @fahr_to_celsius(float 2.200000e+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.200000e+02)
%28 = tail call double @fahr_to_celsius(float 2.400000e+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.400000e+02)
%30 = tail call double @fahr_to_celsius(float 2.600000e+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.600000e+02)
%32 = tail call double @fahr_to_celsius(float 2.800000e+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 2.800000e+02)
%34 = tail call double @fahr_to_celsius(float 3.000000e+02)
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %34, double 3.000000e+02)
ret i32 0
}