#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() {
  float f = 0;
  float c = 0;
  printf("Fahrenheit-Celsius\n ");
  for (f; f <= 300; f = f + 20) {
    c = (f - 32) * 5 / 9;
    printf("    %.0f\t    %5.1f\n", f, c);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  0xebb(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     11b4 <main+0xa4>
movss  -0x8(%rbp),%xmm0
movss  0xeb0(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xea0(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xe90(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe93(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  0xe6b(%rip),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    113d <main+0x2d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xef2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0xffffffec,%ebp
lea    0xef4(%rip),%rbx
nopl   (%rax)
add    $0x14,%ebp
xorps  %xmm1,%xmm1
cvtsi2ss %ebp,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
addss  0xeb7(%rip),%xmm1
mulss  0xeb3(%rip),%xmm1
divss  0xeaf(%rip),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
cmp    $0x119,%ebp
jb     1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

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