#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 getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(int);
int main() {
  float fahr, celsius;
  int lower, upper, step;
  fahr = 0;
  int c = getchar();
  putchar(c);
  printf("Fahrenheit-Celsius table\n");
  while (fahr <= 300) {
    celsius = 5 / 9.0 * (fahr - 32);
    printf("%3.0f\t%6.2f\n", fahr, celsius);
    fahr = fahr + 20;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <putchar@plt>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movss  0xe91(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     11da <main+0xaa>
movss  -0x8(%rbp),%xmm0
movss  0xe82(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe7a(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe76(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xe39(%rip),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1167 <main+0x37>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1060 <getchar@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
lea    0xec5(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffec,%ebp
lea    0xea7(%rip),%rbx
nopl   0x0(%rax)
add    $0x14,%ebp
xorps  %xmm1,%xmm1
cvtsi2ss %ebp,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
addss  0xe77(%rip),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  0xe73(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
cvtss2sd %xmm1,%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
cmp    $0x119,%ebp
jb     1170 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

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