#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 *, ...);
void transtemp() {
  float fahr, cel;
  float lower, upper, step;
  lower = 0;
  upper = 300;
  step = 20;
  fahr = lower;
  printf("%s %s\n", "fahr", "cel");
  while (fahr <= upper) {
    cel = (5. / 9.0) * (fahr - 32.0);
    printf("%3.0f %6.1f\n", fahr, cel);
    fahr += step;
  }
  return;
}


x86 assembly (clang, -O0):
<transtemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xedc(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xecb(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
lea    0xecd(%rip),%rdi
lea    0xecd(%rip),%rsi
lea    0xecb(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x4(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11d1 <transtemp+0xc1>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe8c(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe78(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe72(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
addss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1160 <transtemp+0x50>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<transtemp>:
push   %rbx
lea    0xfd8(%rip),%rdi
lea    0xfd8(%rip),%rsi
lea    0xfd6(%rip),%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xfcc(%rip),%rbx
movsd  0xec4(%rip),%xmm1
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xeb7(%rip),%xmm0
movsd  0xeb7(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xead(%rip),%xmm0
movsd  0xead(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xea3(%rip),%xmm0
movsd  0xea3(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe99(%rip),%xmm0
movsd  0xe99(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe8f(%rip),%xmm0
movsd  0xe8f(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe85(%rip),%xmm0
movsd  0xe85(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe7b(%rip),%xmm0
mov    %rbx,%rdi
movsd  0xe30(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe69(%rip),%xmm0
movsd  0xe69(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe5f(%rip),%xmm0
movsd  0xe5f(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe55(%rip),%xmm0
movsd  0xe55(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe4b(%rip),%xmm0
movsd  0xe4b(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe41(%rip),%xmm0
movsd  0xe41(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe37(%rip),%xmm0
movsd  0xe37(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe2d(%rip),%xmm0
movsd  0xe2d(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe23(%rip),%xmm0
movsd  0xe23(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [5 x i8] c"fahr\00"
@.str.2 = [4 x i8] c"cel\00"
@.str.3 = [13 x i8] c"%3.0f %6.1f\0A\00"
define void @transtemp() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 0.000000e+00, double 0xC031C71C80000000)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 2.000000e+01, double 0xC01AAAAAA0000000)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 4.000000e+01, double 0x4011C71C80000000)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 6.000000e+01, double 0x402F1C71C0000000)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 8.000000e+01, double 0x403AAAAAA0000000)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 1.000000e+02, double 0x4042E38E40000000)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 1.200000e+02, double 0x404871C720000000)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 1.400000e+02, double 6.000000e+01)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 1.600000e+02, double 0x4051C71C80000000)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 1.800000e+02, double 0x40548E38E0000000)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 2.000000e+02, double 0x4057555560000000)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 2.200000e+02, double 0x405A1C71C0000000)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 2.400000e+02, double 0x405CE38E40000000)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 2.600000e+02, double 0x405FAAAAA0000000)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 2.800000e+02, double 0x406138E380000000)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 3.000000e+02, double 0x40629C71C0000000)
ret void
}