#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 **argv) {
  float upper = 300.0;
  float lower = 0.0;
  float step = 20.0;
  float celsius = 0;
  float fahr = lower;
  for (; fahr <= upper; fahr += step) {
    celsius = (5.0 / 9.0) * (fahr - 32);
    printf("%3.0f%7.1f\n", fahr, celsius);
  }
  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)
movss  0xed6(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xebd(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11c1 <main+0xb1>
movss  -0x24(%rbp),%xmm0
movss  0xe8e(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe86(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x24(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
movss  -0x1c(%rbp),%xmm0
addss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
jmp    115a <main+0x4a>
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
movaps %xmm0,%xmm1
addss  0xecb(%rip),%xmm1
cvtss2sd %xmm1,%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 = [12 x i8] c"%3.0f%7.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 float
%9 = alloca float
%10 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 3.000000e+02, float* %6
store float 0.000000e+00, float* %7
store float 2.000000e+01, float* %8
store float 0.000000e+00, float* %9
%11 = load float, float* %7
store float %11, float* %10
br label %12
12: ; preds = %25, %2
%13 = load float, float* %10
%14 = load float, float* %6
%15 = fcmp ole float %13, %14
br i1 %15, label %16, label %29
16: ; preds = %12
%17 = load float, float* %10
%18 = fsub float %17, 3.200000e+01
%19 = fpext float %18 to double
%20 = fmul double 0x3FE1C71C71C71C72, %19
%21 = fptrunc double %20 to float
store float %21, float* %9
%22 = load float, float* %10
%23 = load float, float* %9
%24 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %22, float %23)
br label %25
25: ; preds = %16
%26 = load float, float* %8
%27 = load float, float* %10
%28 = fadd float %27, %26
store float %28, float* %10
br label %12
29: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%3.0f%7.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 = fadd float %5, -3.200000e+01
%7 = fpext float %6 to double
%8 = fmul double %7, 0x3FE1C71C71C71C72
%9 = fptrunc double %8 to float
%10 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 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
}