#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 f2c(float);
int /*<<< orphan*/ printf(char *, float, float);
int main(void) {
  float fahr, celsius;
  int lower, upper, step;
  lower = 0;
  upper = 300;
  step = 20;
  printf("%3c %3c\n", 'F', 'C');
  fahr = lower;
  while (fahr <= upper) {
    celsius = f2c(fahr);
    printf("%3.0f %6.1f\n", fahr, celsius);
    fahr += 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)
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     11b6 <main+0x96>
movss  -0x8(%rbp),%xmm0
call   1040 <f2c@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
cvtsi2ssl -0x18(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    116a <main+0x4a>
xor    %eax,%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 <f2c@plt>
movaps %xmm0,%xmm1
lea    0xefe(%rip),%rbx
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xea6(%rip),%xmm0
call   1040 <f2c@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xe93(%rip),%xmm0
call   1030 <printf@plt>
movss  0xe8a(%rip),%xmm0
call   1040 <f2c@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xe77(%rip),%xmm0
call   1030 <printf@plt>
movss  0xe6e(%rip),%xmm0
call   1040 <f2c@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xe5b(%rip),%xmm0
call   1030 <printf@plt>
movss  0xe52(%rip),%xmm0
call   1040 <f2c@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xe3f(%rip),%xmm0
call   1030 <printf@plt>
movss  0xe36(%rip),%xmm0
call   1040 <f2c@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xe23(%rip),%xmm0
call   1030 <printf@plt>
movss  0xe1a(%rip),%xmm0
call   1040 <f2c@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xe07(%rip),%xmm0
call   1030 <printf@plt>
movss  0xdfe(%rip),%xmm0
call   1040 <f2c@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xdeb(%rip),%xmm0
call   1030 <printf@plt>
movss  0xde2(%rip),%xmm0
call   1040 <f2c@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xdcf(%rip),%xmm0
call   1030 <printf@plt>
movss  0xdc6(%rip),%xmm0
call   1040 <f2c@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xdb3(%rip),%xmm0
call   1030 <printf@plt>
movss  0xdaa(%rip),%xmm0
call   1040 <f2c@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xd97(%rip),%xmm0
call   1030 <printf@plt>
movss  0xd8e(%rip),%xmm0
call   1040 <f2c@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xd7b(%rip),%xmm0
call   1030 <printf@plt>
movss  0xd72(%rip),%xmm0
call   1040 <f2c@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xd5f(%rip),%xmm0
call   1030 <printf@plt>
movss  0xd56(%rip),%xmm0
call   1040 <f2c@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xd43(%rip),%xmm0
call   1030 <printf@plt>
movss  0xd3a(%rip),%xmm0
call   1040 <f2c@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xd27(%rip),%xmm0
call   1030 <printf@plt>
movss  0xd1e(%rip),%xmm0
call   1040 <f2c@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xd0b(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%3c %3c\0A\00"
@.str.1 = [13 x i8] c"%3.0f %6.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 = %15, %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 %25
15: ; preds = %10
%16 = load float, float* %2
%17 = call float @f2c(float %16)
store float %17, float* %3
%18 = load float, float* %2
%19 = load float, float* %3
%20 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), float %18, float %19)
%21 = load i32, i32* %6
%22 = sitofp i32 %21 to float
%23 = load float, float* %2
%24 = fadd float %23, %22
store float %24, float* %2
br label %10
25: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%3c %3c\0A\00"
@.str.1 = [13 x i8] c"%3.0f %6.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 @f2c(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 0.000000e+00, float %2)
%4 = tail call float @f2c(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 2.000000e+01, float %4)
%6 = tail call float @f2c(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 4.000000e+01, float %6)
%8 = tail call float @f2c(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 6.000000e+01, float %8)
%10 = tail call float @f2c(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 8.000000e+01, float %10)
%12 = tail call float @f2c(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 1.000000e+02, float %12)
%14 = tail call float @f2c(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 1.200000e+02, float %14)
%16 = tail call float @f2c(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 1.400000e+02, float %16)
%18 = tail call float @f2c(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 1.600000e+02, float %18)
%20 = tail call float @f2c(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 1.800000e+02, float %20)
%22 = tail call float @f2c(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 2.000000e+02, float %22)
%24 = tail call float @f2c(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 2.200000e+02, float %24)
%26 = tail call float @f2c(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 2.400000e+02, float %26)
%28 = tail call float @f2c(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 2.600000e+02, float %28)
%30 = tail call float @f2c(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 2.800000e+02, float %30)
%32 = tail call float @f2c(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 3.000000e+02, float %32)
ret i32 0
}