#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() {
  float degrees;
  printf("Fahrenheit | Celcius\n");
  printf("--------------------\n");
  for (degrees = 300; degrees >= 0; degrees -= 20)
    printf("%10.f | %6.1f\n", degrees, (5.0 / 9.0) * (degrees - 32.0));
  printf("--------------------\n");
  printf("\n");
  printf("Celcius | Fahrenheit\n");
  printf("--------------------\n");
  for (degrees = 300; degrees >= 0; degrees -= 20)
    printf("%10.f | %6.1f\n", degrees, ((degrees / (5.0 / 9.0)) + 32.0));
  printf("--------------------\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xef2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  0xebd(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     11ac <main+0x9c>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xe95(%rip),%xmm1
subsd  %xmm1,%xmm2
movsd  0xe91(%rip),%xmm1
mulsd  %xmm2,%xmm1
lea    0xeba(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xe66(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1148 <main+0x38>
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  0xe14(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1255 <main+0x145>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xdf4(%rip),%xmm2
divsd  %xmm2,%xmm1
movsd  0xde0(%rip),%xmm2
addsd  %xmm2,%xmm1
lea    0xe11(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xdbd(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    11f1 <main+0xe1>
lea    0xdd2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
lea    0xfd4(%rip),%rdi
call   1040 <puts@plt>
lea    0xff2(%rip),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xfaa(%rip),%rbx
movsd  0xea2(%rip),%xmm0
movsd  0xea2(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xe98(%rip),%xmm0
movsd  0xe98(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xe8e(%rip),%xmm0
movsd  0xe8e(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xe84(%rip),%xmm0
movsd  0xe84(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xe7a(%rip),%xmm0
movsd  0xe7a(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xe70(%rip),%xmm0
movsd  0xe70(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xe66(%rip),%xmm0
movsd  0xe66(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xe5c(%rip),%xmm0
movsd  0xe5c(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xe52(%rip),%xmm0
movsd  0xe52(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xe48(%rip),%xmm0
movsd  0xe48(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xe3e(%rip),%xmm0
movsd  0xe3e(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xe34(%rip),%xmm0
movsd  0xe34(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xe2a(%rip),%xmm1
mov    %rbx,%rdi
movsd  0xde7(%rip),%xmm0
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xe18(%rip),%xmm0
movsd  0xe18(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xe0e(%rip),%xmm0
movsd  0xe0e(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xe04(%rip),%xmm1
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe1a(%rip),%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    $0x140,%ebp
nopl   0x0(%rax)
add    $0xffffffec,%ebp
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
cvtss2sd %xmm0,%xmm0
movaps %xmm0,%xmm1
divsd  0xdb7(%rip),%xmm1
addsd  0xdb7(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
cmp    $0x13,%ebp
ja     1320 <main+0x1f0>
lea    0xde2(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Fahrenheit | Celcius\0A\00"
@.str.1 = [22 x i8] c"--------------------\0A\00"
@.str.2 = [15 x i8] c"%10.f | %6.1f\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [22 x i8] c"Celcius | Fahrenheit\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
store float 3.000000e+02, float* %2
br label %5
5: ; preds = %16, %0
%6 = load float, float* %2
%7 = fcmp oge float %6, 0.000000e+00
br i1 %7, label %8, label %19
8: ; preds = %5
%9 = load float, float* %2
%10 = fpext float %9 to double
%11 = load float, float* %2
%12 = fpext float %11 to double
%13 = fsub double %12, 3.200000e+01
%14 = fmul double 0x3FE1C71C71C71C72, %13
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double %10, double %14)
br label %16
16: ; preds = %8
%17 = load float, float* %2
%18 = fsub float %17, 2.000000e+01
store float %18, float* %2
br label %5
19: ; preds = %5
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
store float 3.000000e+02, float* %2
br label %24
24: ; preds = %35, %19
%25 = load float, float* %2
%26 = fcmp oge float %25, 0.000000e+00
br i1 %26, label %27, label %38
27: ; preds = %24
%28 = load float, float* %2
%29 = fpext float %28 to double
%30 = load float, float* %2
%31 = fpext float %30 to double
%32 = fdiv double %31, 0x3FE1C71C71C71C72
%33 = fadd double %32, 3.200000e+01
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double %29, double %33)
br label %35
35: ; preds = %27
%36 = load float, float* %2
%37 = fsub float %36, 2.000000e+01
store float %37, float* %2
br label %24
38: ; preds = %24
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [15 x i8] c"%10.f | %6.1f\0A\00"
@str = [21 x i8] c"Fahrenheit | Celcius\00"
@str.7 = [21 x i8] c"Celcius | Fahrenheit\00"
@str.9 = [21 x i8] c"--------------------\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.9, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double 3.000000e+02, double 0x40629C71C71C71C7)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double 2.800000e+02, double 0x406138E38E38E38E)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double 2.600000e+02, double 0x405FAAAAAAAAAAAB)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double 2.400000e+02, double 0x405CE38E38E38E39)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double 2.200000e+02, double 0x405A1C71C71C71C7)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double 2.000000e+02, double 0x4057555555555556)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double 1.800000e+02, double 0x40548E38E38E38E4)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double 1.600000e+02, double 0x4051C71C71C71C72)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double 1.400000e+02, double 6.000000e+01)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double 1.200000e+02, double 0x404871C71C71C71D)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double 1.000000e+02, double 0x4042E38E38E38E39)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double 8.000000e+01, double 0x403AAAAAAAAAAAAB)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double 6.000000e+01, double 0x402F1C71C71C71C8)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double 4.000000e+01, double 0x4011C71C71C71C72)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double 2.000000e+01, double 0xC01AAAAAAAAAAAAB)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double 0.000000e+00, double 0xC031C71C71C71C72)
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.9, i64 0, i64 0))
%20 = tail call i32 @putchar(i32 10)
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.7, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.9, i64 0, i64 0))
br label %23
23: ; preds = %0, %23
%24 = phi i32 [ 300, %0 ], [ %30, %23 ]
%25 = sitofp i32 %24 to float
%26 = fpext float %25 to double
%27 = fdiv double %26, 0x3FE1C71C71C71C72
%28 = fadd double %27, 3.200000e+01
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double %26, double %28)
%30 = add nsw i32 %24, -20
%31 = icmp ult i32 %24, 20
br i1 %31, label %32, label %23
32: ; preds = %23
%33 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.9, i64 0, i64 0))
ret i32 0
}