#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 *, ...);
main() {
  float fahr, celsius;
  float lower, upper, step;
  lower = -17.8;
  upper = 150;
  step = (5.0 / 9.0);
  printf("\n");
  printf("+----------------+\n");
  printf("| temp conv tab  |\n");
  printf("+----------------+\n");
  printf("| cls --| fhr ---|\n");
  printf("+----------------+\n");
  celsius = lower;
  while (celsius <= upper) {
    fahr = (celsius * (9.0 / 5.0) + 32.0);
    printf("| %3.1f\t| %6.1f |\n", celsius, fahr);
    celsius = celsius + step;
  }
  printf("+----------------+\n");
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xee1(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xed0(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xebf(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     1215 <main+0x105>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe48(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe44(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe62(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    11a4 <main+0x94>
lea    0xe04(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf13(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xede(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xedd(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
movss  0xe82(%rip),%xmm0
lea    0xe9b(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movss  %xmm0,0xc(%rsp)
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movaps %xmm0,%xmm1
mulsd  0xe65(%rip),%xmm1
addsd  0xe65(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
cvtss2sd %xmm1,%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movss  0xc(%rsp),%xmm0
addss  0xe31(%rip),%xmm0
movss  0xe2d(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    1190 <main+0x60>
lea    0xe72(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [20 x i8] c"+----------------+\0A\00"
@.str.2 = [20 x i8] c"| temp conv tab |\0A\00"
@.str.3 = [20 x i8] c"| cls --| fhr ---|\0A\00"
@.str.4 = [19 x i8] c"| %3.1f\09| %6.1f |\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 0xC031CCCCC0000000, float* %4
store float 1.500000e+02, float* %5
store float 0x3FE1C71C80000000, float* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%13 = load float, float* %4
store float %13, float* %3
br label %14
14: ; preds = %18, %0
%15 = load float, float* %3
%16 = load float, float* %5
%17 = fcmp ole float %15, %16
br i1 %17, label %18, label %31
18: ; preds = %14
%19 = load float, float* %3
%20 = fpext float %19 to double
%21 = call double @llvm.fmuladd.f64(double %20, double 1.800000e+00, double 3.200000e+01)
%22 = fptrunc double %21 to float
store float %22, float* %2
%23 = load float, float* %3
%24 = fpext float %23 to double
%25 = load float, float* %2
%26 = fpext float %25 to double
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), double %24, double %26)
%28 = load float, float* %3
%29 = load float, float* %6
%30 = fadd float %28, %29
store float %30, float* %3
br label %14
31: ; preds = %14
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%34 = load i32, i32* %1
ret i32 %34
}

LLVM IR (-O2):
@.str.4 = [19 x i8] c"| %3.1f\09| %6.1f |\0A\00"
@str.5 = [19 x i8] c"| temp conv tab |\00"
@str.7 = [19 x i8] c"| cls --| fhr ---|\00"
@str.9 = [19 x i8] c"+----------------+\00"
define i32 @main() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.9, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.9, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.7, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.9, i64 0, i64 0))
br label %7
7: ; preds = %0, %7
%8 = phi float [ 0xC031CCCCC0000000, %0 ], [ %14, %7 ]
%9 = fpext float %8 to double
%10 = tail call double @llvm.fmuladd.f64(double %9, double 1.800000e+00, double 3.200000e+01)
%11 = fptrunc double %10 to float
%12 = fpext float %11 to double
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), double %9, double %12)
%14 = fadd float %8, 0x3FE1C71C80000000
%15 = fcmp ugt float %14, 1.500000e+02
br i1 %15, label %16, label %7
16: ; preds = %7
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.9, i64 0, i64 0))
%18 = tail call i32 @putchar(i32 10)
ret i32 0
}