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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x12c,-0x8(%rbp)
jg     1183 <main+0x73>
mov    -0x8(%rbp),%eax
sub    $0x20,%eax
imul   $0x5,%eax,%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%esi
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea7(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <main+0x24>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffec,%ebx
mov    $0xff60,%r15w
lea    0xebe(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x14,%ebx
movswl %r15w,%eax
imul   $0x1c72,%eax,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
shr    $0x10,%eax
add    %ecx,%eax
cwtl
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x64,%r15d
cmp    $0x119,%ebx
jb     1150 <main+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Celsius \09Fahrenheit\0A\00"
@.str.1 = [10 x i8] c"%d\09\09%.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %5
5: ; preds = %18, %0
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 300
br i1 %7, label %8, label %21
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 32
%11 = mul nsw i32 5, %10
%12 = sdiv i32 %11, 9
%13 = sitofp i32 %12 to float
store float %13, float* %3
%14 = load i32, i32* %2
%15 = load float, float* %3
%16 = fpext float %15 to double
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %14, double %16)
br label %18
18: ; preds = %8
%19 = load i32, i32* %2
%20 = add nsw i32 %19, 20
store i32 %20, i32* %2
br label %5
21: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"%d\09\09%.2f\0A\00"
@str = [20 x i8] c"Celsius \09Fahrenheit\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %10, %2 ]
%4 = trunc i32 %3 to i16
%5 = mul nuw nsw i16 %4, 5
%6 = add nsw i16 %5, -160
%7 = sdiv i16 %6, 9
%8 = sitofp i16 %7 to double
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %3, double %8)
%10 = add nuw nsw i32 %3, 20
%11 = icmp ult i32 %3, 281
br i1 %11, label %2, label %12
12: ; preds = %2
ret i32 0
}