#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(void) {
  float fahr, celsius;
  int limitLower, limitHigher, increment;
  limitLower = 0;
  limitHigher = 300;
  increment = 20;
  fahr = limitLower;
  printf("Fahrenheit to Celsius converter from %d degrees to %d degrees\n",
         limitLower, limitHigher);
  printf("=============================================================\n\n");
  while (fahr <= limitHigher) {
    celsius = 5.0 / 9.0 * (fahr - 32.0);
    printf("%3.0f %6.1f\n", fahr, celsius);
    fahr += increment;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x12c,-0x14(%rbp)
movl   $0x14,-0x18(%rbp)
cvtsi2ssl -0x10(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm1
cvtsi2ssl -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11d1 <main+0xc1>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe84(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe70(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xed9(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
cvtsi2ssl -0x18(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1160 <main+0x50>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xfc8(%rip),%rdi
xor    %esi,%esi
mov    $0x12c,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfff(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe6(%rip),%rbx
movsd  0xeaf(%rip),%xmm1
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xea2(%rip),%xmm0
movsd  0xea2(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe98(%rip),%xmm0
movsd  0xe98(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe8e(%rip),%xmm0
movsd  0xe8e(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe84(%rip),%xmm0
movsd  0xe84(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe7a(%rip),%xmm0
movsd  0xe7a(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe70(%rip),%xmm0
movsd  0xe70(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe66(%rip),%xmm0
mov    %rbx,%rdi
movsd  0xe1b(%rip),%xmm1
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe54(%rip),%xmm0
movsd  0xe54(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe4a(%rip),%xmm0
movsd  0xe4a(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe40(%rip),%xmm0
movsd  0xe40(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe36(%rip),%xmm0
movsd  0xe36(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe2c(%rip),%xmm0
movsd  0xe2c(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe22(%rip),%xmm0
movsd  0xe22(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe18(%rip),%xmm0
movsd  0xe18(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe0e(%rip),%xmm0
movsd  0xe0e(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

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