#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 temperatureConversion() {
  int low = 0;
  int max = 300;
  int step = 20;
  float Fahr;
  float Cels;
  printf("Conversion from Fahrenheit to Celsius.\n");
  while (Fahr <= max) {
    Cels = (5.0 / 9.0) * (Fahr - 32.0);
    printf("%3.0f\t%6.1f\n", Fahr, Cels);
    Fahr += step;
  }
  return 0;
}


x86 assembly (clang, -O0):
<temperatureConversion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x12c,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm1
cvtsi2ssl -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11ac <temperatureConversion+0x9c>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xea9(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe95(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xea7(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
cvtsi2ssl -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    113b <temperatureConversion+0x2b>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<temperatureConversion>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"Conversion from Fahrenheit to Celsius.\0A\00"
@.str.1 = [13 x i8] c"%3.0f\09%6.1f\0A\00"
define i32 @temperatureConversion() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
store i32 300, i32* %2
store i32 20, i32* %3
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %12, %0
%8 = load float, float* %4
%9 = load i32, i32* %2
%10 = sitofp i32 %9 to float
%11 = fcmp ole float %8, %10
br i1 %11, label %12, label %27
12: ; preds = %7
%13 = load float, float* %4
%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* %5
%18 = load float, float* %4
%19 = fpext float %18 to double
%20 = load float, float* %5
%21 = fpext float %20 to double
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %19, double %21)
%23 = load i32, i32* %3
%24 = sitofp i32 %23 to float
%25 = load float, float* %4
%26 = fadd float %25, %24
store float %26, float* %4
br label %7
27: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@str = [39 x i8] c"Conversion from Fahrenheit to Celsius.\00"
define i32 @temperatureConversion() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
ret i32 0
}