#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*/ print_horizontal_delimetre();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  float fahr, celsius;
  float lower, upper, step;
  lower = -30;
  upper = 50;
  step = 5;
  celsius = lower;
  print_horizontal_delimetre();
  printf("|%8s | %10s|\n", "Celsius", "Fahrenheit");
  while (celsius <= upper) {
    fahr = celsius * 9.0 / 5.0 + 32.0;
    print_horizontal_delimetre();
    printf("|%8.1f | %10.0f|\n", celsius, fahr);
    celsius = celsius + step;
  }
  print_horizontal_delimetre();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xed1(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xec0(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xeaf(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <print_horizontal_delimetre@plt>
lea    0xeba(%rip),%rdi
lea    0xec1(%rip),%rsi
lea    0xec2(%rip),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0xc(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     1207 <main+0xe7>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe79(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe65(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe51(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <print_horizontal_delimetre@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe5d(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  -0xc(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1183 <main+0x63>
mov    $0x0,%al
call   1030 <print_horizontal_delimetre@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
xor    %eax,%eax
call   1030 <print_horizontal_delimetre@plt>
lea    0xee4(%rip),%rdi
lea    0xeeb(%rip),%rsi
lea    0xeec(%rip),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xffffffdd,%ebp
lea    0xee4(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x5,%ebp
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
mulsd  0xe84(%rip),%xmm0
divsd  0xe84(%rip),%xmm0
addsd  0xe84(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0xc(%rsp)
xor    %eax,%eax
call   1030 <print_horizontal_delimetre@plt>
movss  0xc(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0x10(%rsp),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
cmp    $0x2e,%ebp
jl     1160 <main+0x40>
xor    %eax,%eax
call   1030 <print_horizontal_delimetre@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"|%8s | %10s|\0A\00"
@.str.1 = [8 x i8] c"Celsius\00"
@.str.2 = [11 x i8] c"Fahrenheit\00"
@.str.3 = [18 x i8] c"|%8.1f | %10.0f|\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @print_horizontal_delimetre()
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ -30, %0 ], [ %14, %3 ]
%5 = sitofp i32 %4 to float
%6 = fpext float %5 to double
%7 = fmul double %6, 9.000000e+00
%8 = fdiv double %7, 5.000000e+00
%9 = fadd double %8, 3.200000e+01
%10 = fptrunc double %9 to float
%11 = tail call i32 (...) @print_horizontal_delimetre()
%12 = fpext float %10 to double
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), double %6, double %12)
%14 = add nsw i32 %4, 5
%15 = icmp sgt i32 %4, 45
br i1 %15, label %16, label %3
16: ; preds = %3
%17 = tail call i32 (...) @print_horizontal_delimetre()
ret i32 0
}