#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 *, ...);
main() {
  float *fp, *cp;
  float fahr = 0.0, celsius = 0.0;
  int lower, upper, step;
  lower = 0;
  upper = 300;
  step = 20;
  fahr = upper;
  fp = &fahr;
  cp = &celsius;
  printf("%3s\t%6s\n", "Fahrenheit", "Celsius");
  printf("%3s\t%6s\n", "----------", "-------");
  while (fahr >= lower) {
    celsius = (5.0 / 9.0) * (fahr - 32.0);
    printf("%3.0f\t%12.1f\n", *fp, *cp);
    fahr = fahr - step;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x12c,-0x28(%rbp)
movl   $0x14,-0x2c(%rbp)
cvtsi2ssl -0x28(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
lea    -0x1c(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    0xeab(%rip),%rdi
lea    0xead(%rip),%rsi
lea    0xeb1(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8f(%rip),%rdi
lea    0xea4(%rip),%rsi
lea    0xea0(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x1c(%rbp),%xmm0
cvtsi2ssl -0x24(%rbp),%xmm1
ucomiss %xmm1,%xmm0
jb     1211 <main+0x101>
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe4e(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe3a(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe45(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0x1c(%rbp),%xmm0
cvtsi2ssl -0x2c(%rbp),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    1196 <main+0x86>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xfd8(%rip),%rbx
lea    0xfda(%rip),%rsi
lea    0xfde(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xfd5(%rip),%rsi
lea    0xfd1(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xfc8(%rip),%rbx
movsd  0xea9(%rip),%xmm0
movsd  0xea9(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe9f(%rip),%xmm0
movsd  0xe9f(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe95(%rip),%xmm0
movsd  0xe95(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe8b(%rip),%xmm0
movsd  0xe8b(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe81(%rip),%xmm0
movsd  0xe81(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe77(%rip),%xmm0
movsd  0xe77(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe6d(%rip),%xmm0
movsd  0xe6d(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe63(%rip),%xmm0
movsd  0xe63(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe59(%rip),%xmm0
movsd  0xe59(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe4f(%rip),%xmm0
movsd  0xe4f(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe45(%rip),%xmm0
movsd  0xe45(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe3b(%rip),%xmm0
movsd  0xe3b(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe31(%rip),%xmm1
mov    %rbx,%rdi
movsd  0xdee(%rip),%xmm0
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe1f(%rip),%xmm0
movsd  0xe1f(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe15(%rip),%xmm0
movsd  0xe15(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe0b(%rip),%xmm1
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%3s\09%6s\0A\00"
@.str.1 = [11 x i8] c"Fahrenheit\00"
@.str.2 = [8 x i8] c"Celsius\00"
@.str.3 = [11 x i8] c"----------\00"
@.str.4 = [8 x i8] c"-------\00"
@.str.5 = [14 x i8] c"%3.0f\09%12.1f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float*
%3 = alloca float*
%4 = alloca float
%5 = alloca float
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
store float 0.000000e+00, float* %4
store float 0.000000e+00, float* %5
store i32 0, i32* %6
store i32 300, i32* %7
store i32 20, i32* %8
%9 = load i32, i32* %7
%10 = sitofp i32 %9 to float
store float %10, float* %4
store float* %4, float** %2
store float* %5, float** %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %13
13: ; preds = %18, %0
%14 = load float, float* %4
%15 = load i32, i32* %6
%16 = sitofp i32 %15 to float
%17 = fcmp oge float %14, %16
br i1 %17, label %18, label %35
18: ; preds = %13
%19 = load float, float* %4
%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* %5
%24 = load float*, float** %2
%25 = load float, float* %24
%26 = fpext float %25 to double
%27 = load float*, float** %3
%28 = load float, float* %27
%29 = fpext float %28 to double
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), double %26, double %29)
%31 = load float, float* %4
%32 = load i32, i32* %8
%33 = sitofp i32 %32 to float
%34 = fsub float %31, %33
store float %34, float* %4
br label %13
35: ; preds = %13
%36 = load i32, i32* %1
ret i32 %36
}

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