#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 fah;
  int cel;
  printf("Celsius | Fahrenheit\n");
  printf("--------------------\n");
  for (cel = 300; cel >= 0; cel = cel - 20) {
    printf("%5d\t|%10.2f\n", cel, (9.0 * cel / 5.0) + 32.0);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xef2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x12c,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1194 <main+0x84>
mov    -0xc(%rbp),%esi
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xeb4(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xea0(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe8c(%rip),%xmm1
addsd  %xmm1,%xmm0
lea    0xec5(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
sub    $0x14,%eax
mov    %eax,-0xc(%rbp)
jmp    1142 <main+0x32>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xefa(%rip),%rdi
call   1030 <puts@plt>
lea    0xf03(%rip),%rdi
call   1030 <puts@plt>
mov    $0x140,%ebx
lea    0xed0(%rip),%r14
nopl   0x0(%rax,%rax,1)
add    $0xffffffec,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mulsd  0xe9e(%rip),%xmm0
divsd  0xe9e(%rip),%xmm0
addsd  0xe9e(%rip),%xmm0
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x1,%al
call   1040 <printf@plt>
cmp    $0x13,%ebx
ja     1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

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