#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 argc, char const *argv[]) {
  float fahr, celsius;
  float lower, upper, step;
  lower = -273;
  upper = 100;
  step = 20;
  celsius = lower;
  printf("%s %s\n", "celsius", "fahr");
  while (celsius <= upper) {
    fahr = celsius * (9.0 / 5.0) + 32.0;
    printf("%3.0f %8.1f\n", celsius, fahr);
    celsius += step;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xeda(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  0xeb8(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
lea    0xec2(%rip),%rdi
lea    0xec2(%rip),%rsi
lea    0xec3(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm1
movss  -0x20(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11e4 <main+0xd4>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe79(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe75(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe6b(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0x24(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1173 <main+0x63>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xef6(%rip),%rdi
lea    0xef6(%rip),%rsi
lea    0xef7(%rip),%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0xfffffedb,%ebp
lea    0xee9(%rip),%rbx
nopl   0x0(%rax,%rax,1)
add    $0x14,%ebp
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
cvtss2sd %xmm0,%xmm0
movaps %xmm0,%xmm1
mulsd  0xea7(%rip),%xmm1
addsd  0xea7(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
cvtss2sd %xmm1,%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
cmp    $0x51,%ebp
jl     1140 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [8 x i8] c"celsius\00"
@.str.2 = [5 x i8] c"fahr\00"
@.str.3 = [13 x i8] c"%3.0f %8.1f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 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 ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %4
4: ; preds = %2, %4
%5 = phi i32 [ -273, %2 ], [ %12, %4 ]
%6 = sitofp i32 %5 to float
%7 = fpext float %6 to double
%8 = tail call double @llvm.fmuladd.f64(double %7, double 1.800000e+00, double 3.200000e+01)
%9 = fptrunc double %8 to float
%10 = fpext float %9 to double
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double %7, double %10)
%12 = add nsw i32 %5, 20
%13 = icmp sgt i32 %5, 80
br i1 %13, label %14, label %4
14: ; preds = %4
ret i32 0
}