#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 *, float, float);
void printTemperature(int iLower, int iUpper, int iStep) {
  float iCelsius = 0, iFahr = iLower;
  while (iFahr <= iUpper) {
    iCelsius = (5.0 / 9.0) * (iFahr - 32);
    printf("%3.0f%6.1f\n", iCelsius, iFahr);
    iFahr += iStep;
  }
}


x86 assembly (clang, -O0):
<printTemperature>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm1
cvtsi2ssl -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     119a <printTemperature+0x8a>
movss  -0x14(%rbp),%xmm0
movss  0xeb5(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe9d(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
cvtsi2ssl -0xc(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1133 <printTemperature+0x23>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printTemperature>:
push   %rbx
sub    $0x10,%rsp
cvtsi2ss %edi,%xmm0
cvtsi2ss %esi,%xmm1
ucomiss %xmm0,%xmm1
jb     1183 <printTemperature+0x73>
cvtsi2ss %edx,%xmm2
movss  %xmm2,0x8(%rsp)
lea    0xedd(%rip),%rbx
movss  %xmm1,0xc(%rsp)
nopl   0x0(%rax)
movss  %xmm0,0x4(%rsp)
addss  0xeb2(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xeae(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    %rbx,%rdi
movss  0x4(%rsp),%xmm1
call   1030 <printf@plt>
movss  0xc(%rsp),%xmm1
movss  0x4(%rsp),%xmm0
addss  0x8(%rsp),%xmm0
ucomiss %xmm0,%xmm1
jae    1140 <printTemperature+0x30>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"%3.0f%6.1f\0A\00"
define void @printTemperature(i32 %0, i32 %1, i32 %2) {
%4 = sitofp i32 %0 to float
%5 = sitofp i32 %1 to float
%6 = fcmp ugt float %4, %5
br i1 %6, label %18, label %7
7: ; preds = %3
%8 = sitofp i32 %2 to float
br label %9
9: ; preds = %7, %9
%10 = phi float [ %4, %7 ], [ %16, %9 ]
%11 = fadd float %10, -3.200000e+01
%12 = fpext float %11 to double
%13 = fmul double %12, 0x3FE1C71C71C71C72
%14 = fptrunc double %13 to float
%15 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %14, float %10)
%16 = fadd float %10, %8
%17 = fcmp ugt float %16, %5
br i1 %17, label %18, label %9
18: ; preds = %9, %3
ret void
}