#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(void) {
  float fahr, celsius;
  float lower, upper, step;
  lower = -20;
  upper = 150;
  step = 10;
  celsius = lower;
  printf(" C:   F:\n");
  printf("________\n");
  while (celsius <= upper) {
    fahr = (9.0 / 5.0) * celsius + 32.0;
    printf("%4.0f %3.0f\n", celsius, fahr);
    celsius = celsius + step;
  }
}


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)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11dd <main+0xcd>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe80(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe7c(%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    0xe72(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    116c <main+0x5c>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xef3(%rip),%rdi
call   1030 <puts@plt>
lea    0xef0(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffe2,%ebp
lea    0xec9(%rip),%rbx
nopw   0x0(%rax,%rax,1)
add    $0xa,%ebp
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
cvtss2sd %xmm0,%xmm0
movaps %xmm0,%xmm1
mulsd  0xe97(%rip),%xmm1
addsd  0xe97(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
cvtss2sd %xmm1,%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
cmp    $0x8d,%ebp
jl     1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c" C: F:\0A\00"
@.str.1 = [10 x i8] c"________\0A\00"
@.str.2 = [13 x i8] c"%4.0f %3.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 -2.000000e+01, float* %4
store float 1.500000e+02, float* %5
store float 1.000000e+01, float* %6
%7 = load float, float* %4
store float %7, float* %3
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, 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 %27
14: ; preds = %10
%15 = load float, float* %3
%16 = fpext float %15 to double
%17 = call double @llvm.fmuladd.f64(double 1.800000e+00, double %16, double 3.200000e+01)
%18 = fptrunc double %17 to float
store float %18, float* %2
%19 = load float, float* %3
%20 = fpext float %19 to double
%21 = load float, float* %2
%22 = fpext float %21 to double
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), double %20, double %22)
%24 = load float, float* %3
%25 = load float, float* %6
%26 = fadd float %24, %25
store float %26, float* %3
br label %10
27: ; preds = %10
%28 = load i32, i32* %1
ret i32 %28
}

LLVM IR (-O2):
@.str.2 = [13 x i8] c"%4.0f %3.0f\0A\00"
@str = [9 x i8] c" C: F:\00"
@str.3 = [9 x i8] c"________\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.3, i64 0, i64 0))
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ -20, %0 ], [ %11, %3 ]
%5 = sitofp i32 %4 to float
%6 = fpext float %5 to double
%7 = tail call double @llvm.fmuladd.f64(double %6, double 1.800000e+00, double 3.200000e+01)
%8 = fptrunc double %7 to float
%9 = fpext float %8 to double
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), double %6, double %9)
%11 = add nsw i32 %4, 10
%12 = icmp sgt i32 %4, 140
br i1 %12, label %13, label %3
13: ; preds = %3
ret i32 0
}