#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 */
int /*<<< orphan*/ printf(char *, float, float);
void main(void) {
  float fahr, celcius;
  int lower, upper, step;
  lower = 0;
  upper = 300;
  step = 20;
  fahr = lower;
  while (fahr <= upper) {
    celcius = 5.0 * (fahr - 32.0) / 9.0;
    printf("%3.0f\t%6.2f\n", fahr, celcius);
    fahr += step;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0xc(%rbp)
movl   $0x12c,-0x10(%rbp)
movl   $0x14,-0x14(%rbp)
cvtsi2ssl -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm1
cvtsi2ssl -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11aa <main+0x9a>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeb5(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xea1(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe8d(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
cvtsi2ssl -0x14(%rbp),%xmm0
addss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1137 <main+0x27>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0xffffffec,%ebp
lea    0xef9(%rip),%rbx
nop
add    $0x14,%ebp
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
addsd  0xec7(%rip),%xmm1
mulsd  0xec7(%rip),%xmm1
divsd  0xec7(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
cmp    $0x119,%ebp
jb     1120 <main+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"%3.0f\09%6.2f\0A\00"
define void @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %10, %1 ]
%3 = sitofp i32 %2 to float
%4 = fpext float %3 to double
%5 = fadd double %4, -3.200000e+01
%6 = fmul double %5, 5.000000e+00
%7 = fdiv double %6, 9.000000e+00
%8 = fptrunc double %7 to float
%9 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %3, float %8)
%10 = add nuw nsw i32 %2, 20
%11 = icmp ugt i32 %2, 280
br i1 %11, label %12, label %1
12: ; preds = %1
ret void
}