#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 ftoc(double);
int /*<<< orphan*/ printf(char *, double, double);
int main(int argc, char **argv) {
  double fahr;
  double celsius;
  double lower = 0;
  double upper = 300;
  double step = 20;
  fahr = lower;
  while (fahr <= upper) {
    celsius = ftoc(fahr);
    printf("%10.0f\t%7.1f\n", fahr, celsius);
    fahr += step;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xec2(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xead(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     11af <main+0x8f>
movsd  -0x18(%rbp),%xmm0
call   1040 <ftoc@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x38(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1162 <main+0x42>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xorps  %xmm0,%xmm0
call   1040 <ftoc@plt>
movaps %xmm0,%xmm1
lea    0xf45(%rip),%rbx
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0xeba(%rip),%xmm0
call   1040 <ftoc@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0xea7(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xea2(%rip),%xmm0
call   1040 <ftoc@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0xe8f(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xe8a(%rip),%xmm0
call   1040 <ftoc@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0xe77(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xe72(%rip),%xmm0
call   1040 <ftoc@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0xe5f(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xe5a(%rip),%xmm0
call   1040 <ftoc@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0xe47(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xe42(%rip),%xmm0
call   1040 <ftoc@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0xe2f(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xe2a(%rip),%xmm0
call   1040 <ftoc@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0xe17(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xe12(%rip),%xmm0
call   1040 <ftoc@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0xdff(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xdfa(%rip),%xmm0
call   1040 <ftoc@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0xde7(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xde2(%rip),%xmm0
call   1040 <ftoc@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0xdcf(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xdca(%rip),%xmm0
call   1040 <ftoc@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0xdb7(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xdb2(%rip),%xmm0
call   1040 <ftoc@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0xd9f(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xd9a(%rip),%xmm0
call   1040 <ftoc@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0xd87(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xd82(%rip),%xmm0
call   1040 <ftoc@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0xd6f(%rip),%xmm0
call   1030 <printf@plt>
movsd  0xd6a(%rip),%xmm0
call   1040 <ftoc@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0xd57(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"%10.0f\09%7.1f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call double @ftoc(double 0.000000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double 0.000000e+00, double %3)
%5 = tail call double @ftoc(double 2.000000e+01)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double 2.000000e+01, double %5)
%7 = tail call double @ftoc(double 4.000000e+01)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double 4.000000e+01, double %7)
%9 = tail call double @ftoc(double 6.000000e+01)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double 6.000000e+01, double %9)
%11 = tail call double @ftoc(double 8.000000e+01)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double 8.000000e+01, double %11)
%13 = tail call double @ftoc(double 1.000000e+02)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double 1.000000e+02, double %13)
%15 = tail call double @ftoc(double 1.200000e+02)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double 1.200000e+02, double %15)
%17 = tail call double @ftoc(double 1.400000e+02)
%18 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double 1.400000e+02, double %17)
%19 = tail call double @ftoc(double 1.600000e+02)
%20 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double 1.600000e+02, double %19)
%21 = tail call double @ftoc(double 1.800000e+02)
%22 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double 1.800000e+02, double %21)
%23 = tail call double @ftoc(double 2.000000e+02)
%24 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double 2.000000e+02, double %23)
%25 = tail call double @ftoc(double 2.200000e+02)
%26 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double 2.200000e+02, double %25)
%27 = tail call double @ftoc(double 2.400000e+02)
%28 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double 2.400000e+02, double %27)
%29 = tail call double @ftoc(double 2.600000e+02)
%30 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double 2.600000e+02, double %29)
%31 = tail call double @ftoc(double 2.800000e+02)
%32 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double 2.800000e+02, double %31)
%33 = tail call double @ftoc(double 3.000000e+02)
%34 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double 3.000000e+02, double %33)
ret i32 0
}