#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, double);
main() {
  float fahr;
  double celsius;
  int upper, step;
  int lower;
  lower = 0;
  upper = 300;
  step = 20;
  fahr = upper;
  while (fahr >= lower) {
    celsius = 5 * (fahr - 32) / 9;
    printf("%f\t%f\n", fahr, celsius);
    fahr = fahr - step;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x12c,-0x14(%rbp)
movl   $0x14,-0x18(%rbp)
cvtsi2ssl -0x14(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtsi2ssl -0x1c(%rbp),%xmm1
ucomiss %xmm1,%xmm0
jb     11b1 <main+0xa1>
movss  -0x8(%rbp),%xmm1
movss  0xeaa(%rip),%xmm0
subss  %xmm0,%xmm1
movss  0xe9a(%rip),%xmm0
mulss  %xmm1,%xmm0
movss  0xe8a(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtsi2ssl -0x18(%rbp),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    113e <main+0x2e>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x140,%ebp
lea    0xeed(%rip),%rbx
nop
add    $0xffffffec,%ebp
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
movaps %xmm0,%xmm1
addss  0xecb(%rip),%xmm1
mulss  0xec7(%rip),%xmm1
divss  0xec3(%rip),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
cmp    $0x13,%ebp
ja     1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%f\09%f\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 300, %0 ], [ %9, %1 ]
%3 = sitofp i32 %2 to float
%4 = fadd float %3, -3.200000e+01
%5 = fmul float %4, 5.000000e+00
%6 = fdiv float %5, 9.000000e+00
%7 = fpext float %6 to double
%8 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float %3, double %7)
%9 = add nsw i32 %2, -20
%10 = icmp ult i32 %2, 20
br i1 %10, label %11, label %1
11: ; preds = %1
ret i32 0
}