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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x12c,-0x20(%rbp)
movl   $0x14,-0x24(%rbp)
cvtsi2ssl -0x1c(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm1
cvtsi2ssl -0x20(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11b0 <main+0xa0>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe9f(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe8b(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtsi2ssl -0x24(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1145 <main+0x35>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0xffffffec,%ebp
lea    0xef1(%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
cvtsd2ss %xmm1,%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
cmp    $0x119,%ebp
jb     1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

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