#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 *, ...);
void main() {
  float lower, upper, step;
  lower = 0;
  upper = 300;
  step = 20;
  printf("Celsius\tFahrenheit\n");
  for (float celsius = lower; celsius <= upper; celsius += step) {
    float fahr = 9 * celsius / 5 + 32;
    printf("%6.2f\t%6.2f\n", celsius, fahr);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xedc(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xecb(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11c3 <main+0xb3>
movss  0xea3(%rip),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  0xe92(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xe82(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe80(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1152 <main+0x42>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xeef(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffec,%ebp
lea    0xed1(%rip),%rbx
nopl   0x0(%rax,%rax,1)
add    $0x14,%ebp
xorps  %xmm1,%xmm1
cvtsi2ss %ebp,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
mulss  0xea7(%rip),%xmm1
divss  0xea3(%rip),%xmm1
addss  0xe9f(%rip),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
cmp    $0x118,%ebp
jbe    1140 <main+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

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