#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 *, ...);
int main() {
  int step = 20;
  float fahr = 0;
  int upper = 300;
  float celsius = 0;
  float fdn = 5.0 / 9.0;
  printf("%3s\t%6s\n", "cel", "far");
  while (fahr <= upper) {
    celsius = fdn * (fahr - 32.0);
    printf("%3.0f\t%6.1f\n", fahr, celsius);
    fahr += step;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movl   $0x12c,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xebb(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
lea    0xebf(%rip),%rdi
lea    0xec1(%rip),%rsi
lea    0xebe(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm1
cvtsi2ssl -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11d8 <main+0xc8>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xe75(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe64(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
cvtsi2ssl -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1166 <main+0x56>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xfe0(%rip),%rdi
lea    0xfe2(%rip),%rsi
lea    0xfdf(%rip),%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xfd5(%rip),%rbx
movsd  0xec4(%rip),%xmm1
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xeb7(%rip),%xmm0
movsd  0xeb7(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xead(%rip),%xmm0
movsd  0xead(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xea3(%rip),%xmm0
movsd  0xea3(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe99(%rip),%xmm0
movsd  0xe99(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe8f(%rip),%xmm0
movsd  0xe8f(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe85(%rip),%xmm0
movsd  0xe85(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe7b(%rip),%xmm0
movsd  0xe7b(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe71(%rip),%xmm0
movsd  0xe71(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe67(%rip),%xmm0
movsd  0xe67(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe5d(%rip),%xmm0
movsd  0xe5d(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe53(%rip),%xmm0
movsd  0xe53(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe49(%rip),%xmm0
movsd  0xe49(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe3f(%rip),%xmm0
movsd  0xe3f(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe35(%rip),%xmm0
movsd  0xe35(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe2b(%rip),%xmm0
movsd  0xe2b(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%3s\09%6s\0A\00"
@.str.1 = [4 x i8] c"cel\00"
@.str.2 = [4 x i8] c"far\00"
@.str.3 = [13 x i8] c"%3.0f\09%6.1f\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 0.000000e+00, double 0xC031C71C80000000)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 2.000000e+01, double 0xC01AAAAAC0000000)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 4.000000e+01, double 0x4011C71C80000000)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 6.000000e+01, double 0x402F1C71E0000000)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 8.000000e+01, double 0x403AAAAAC0000000)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 1.000000e+02, double 0x4042E38E40000000)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 1.200000e+02, double 0x404871C740000000)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 1.400000e+02, double 0x404E000020000000)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 1.600000e+02, double 0x4051C71C80000000)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 1.800000e+02, double 0x40548E3900000000)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 2.000000e+02, double 0x4057555560000000)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 2.200000e+02, double 0x405A1C71E0000000)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 2.400000e+02, double 0x405CE38E40000000)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 2.600000e+02, double 0x405FAAAAC0000000)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 2.800000e+02, double 0x406138E3A0000000)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 3.000000e+02, double 0x40629C71E0000000)
ret i32 0
}