#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 ctof(float);
int /*<<< orphan*/ printf(char *, float, float);
main() {
  float cels, fahr;
  int lower, upper, step;
  lower = 0;
  upper = 300;
  step = 20;
  printf("%2c %4c\n", 'F', 'C');
  for (cels = lower; cels <= upper; cels = cels + step) {
    fahr = ctof(cels);
    printf("%3.0f %5.1f\n", fahr, cels);
  }
}


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)
lea    0xebd(%rip),%rdi
movss  0xead(%rip),%xmm0
movss  0xea9(%rip),%xmm1
call   1030 <printf@plt>
cvtsi2ssl -0x10(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm1
cvtsi2ssl -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11ba <main+0x9a>
movss  -0x8(%rbp),%xmm0
call   1040 <ctof@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtsi2ssl -0x18(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    116a <main+0x4a>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf1c(%rip),%rdi
movss  0xed0(%rip),%xmm0
movss  0xecc(%rip),%xmm1
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
call   1040 <ctof@plt>
lea    0xf01(%rip),%rbx
xorps  %xmm1,%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xea9(%rip),%xmm0
call   1040 <ctof@plt>
mov    %rbx,%rdi
movss  0xe99(%rip),%xmm1
call   1030 <printf@plt>
movss  0xe90(%rip),%xmm0
call   1040 <ctof@plt>
mov    %rbx,%rdi
movss  0xe80(%rip),%xmm1
call   1030 <printf@plt>
movss  0xe77(%rip),%xmm0
call   1040 <ctof@plt>
mov    %rbx,%rdi
movss  0xe67(%rip),%xmm1
call   1030 <printf@plt>
movss  0xe5e(%rip),%xmm0
call   1040 <ctof@plt>
mov    %rbx,%rdi
movss  0xe4e(%rip),%xmm1
call   1030 <printf@plt>
movss  0xe45(%rip),%xmm0
call   1040 <ctof@plt>
mov    %rbx,%rdi
movss  0xe35(%rip),%xmm1
call   1030 <printf@plt>
movss  0xe2c(%rip),%xmm0
call   1040 <ctof@plt>
mov    %rbx,%rdi
movss  0xe1c(%rip),%xmm1
call   1030 <printf@plt>
movss  0xe13(%rip),%xmm0
call   1040 <ctof@plt>
mov    %rbx,%rdi
movss  0xe03(%rip),%xmm1
call   1030 <printf@plt>
movss  0xdfa(%rip),%xmm0
call   1040 <ctof@plt>
mov    %rbx,%rdi
movss  0xdea(%rip),%xmm1
call   1030 <printf@plt>
movss  0xde1(%rip),%xmm0
call   1040 <ctof@plt>
mov    %rbx,%rdi
movss  0xdd1(%rip),%xmm1
call   1030 <printf@plt>
movss  0xdc8(%rip),%xmm0
call   1040 <ctof@plt>
mov    %rbx,%rdi
movss  0xdb8(%rip),%xmm1
call   1030 <printf@plt>
movss  0xdaf(%rip),%xmm0
call   1040 <ctof@plt>
mov    %rbx,%rdi
movss  0xd9f(%rip),%xmm1
call   1030 <printf@plt>
movss  0xd96(%rip),%xmm0
call   1040 <ctof@plt>
mov    %rbx,%rdi
movss  0xd86(%rip),%xmm1
call   1030 <printf@plt>
movss  0xd7d(%rip),%xmm0
call   1040 <ctof@plt>
mov    %rbx,%rdi
movss  0xd6d(%rip),%xmm1
call   1030 <printf@plt>
movss  0xd64(%rip),%xmm0
call   1040 <ctof@plt>
mov    %rbx,%rdi
movss  0xd54(%rip),%xmm1
call   1030 <printf@plt>
movss  0xd4b(%rip),%xmm0
call   1040 <ctof@plt>
mov    %rbx,%rdi
movss  0xd3b(%rip),%xmm1
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%2c %4c\0A\00"
@.str.1 = [13 x i8] c"%3.0f %5.1f\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 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float 7.000000e+01, float 6.700000e+01)
%8 = load i32, i32* %4
%9 = sitofp i32 %8 to float
store float %9, float* %2
br label %10
10: ; preds = %21, %0
%11 = load float, float* %2
%12 = load i32, i32* %5
%13 = sitofp i32 %12 to float
%14 = fcmp ole float %11, %13
br i1 %14, label %15, label %26
15: ; preds = %10
%16 = load float, float* %2
%17 = call float @ctof(float %16)
store float %17, float* %3
%18 = load float, float* %3
%19 = load float, float* %2
%20 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), float %18, float %19)
br label %21
21: ; preds = %15
%22 = load float, float* %2
%23 = load i32, i32* %6
%24 = sitofp i32 %23 to float
%25 = fadd float %22, %24
store float %25, float* %2
br label %10
26: ; preds = %10
%27 = load i32, i32* %1
ret i32 %27
}

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