#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() {
  printf("%3s = %6s\n", "Fahrenheit", "Celsius");
  for (float fahrenheit = -50; fahrenheit <= 250; fahrenheit += 10) {
    float celsius = (5.0 / 9.0) * (fahrenheit - 32);
    printf("%3.0f°F = %6.2f°C\n", fahrenheit, celsius);
  }
  printf("%3s = %6s\n", "Celsius", "Fahrenheit");
  for (float celsius = -50; celsius <= 250; celsius += 10) {
    float fahrenheit = (celsius * 9.0 / 5.0) + 32;
    printf("%3.0f°C = %6.2f°F\n", celsius, fahrenheit);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf0a(%rip),%rdi
lea    0xf0e(%rip),%rsi
lea    0xf12(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
movss  0xebd(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeb4(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     11bb <main+0xab>
movss  -0x8(%rbp),%xmm0
movss  0xea5(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeb1(%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    0xeb1(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  0xe5c(%rip),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1148 <main+0x38>
lea    0xe6e(%rip),%rdi
lea    0xe7d(%rip),%rsi
lea    0xe6b(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
movss  0xe21(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe18(%rip),%xmm0
ucomiss -0x10(%rbp),%xmm0
jb     1263 <main+0x153>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe19(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe05(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xdf1(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe1e(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  0xdb4(%rip),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    11e4 <main+0xd4>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xf0e(%rip),%rdi
lea    0xf12(%rip),%rsi
lea    0xf16(%rip),%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0xffffffc4,%ebp
lea    0xf0b(%rip),%rbx
nopl   0x0(%rax,%rax,1)
add    $0xa,%ebp
xorps  %xmm1,%xmm1
cvtsi2ss %ebp,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
addss  0xea7(%rip),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  0xea3(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
cvtss2sd %xmm1,%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
cmp    $0xf0,%ebp
jle    1140 <main+0x30>
lea    0xea2(%rip),%rdi
lea    0xeb1(%rip),%rsi
lea    0xe9f(%rip),%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0xffffffc4,%ebp
lea    0xeb4(%rip),%rbx
nopw   0x0(%rax,%rax,1)
add    $0xa,%ebp
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
cvtss2sd %xmm0,%xmm0
movaps %xmm0,%xmm1
mulsd  0xe47(%rip),%xmm1
divsd  0xe47(%rip),%xmm1
addsd  0xe47(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
cvtss2sd %xmm1,%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
cmp    $0xf0,%ebp
jle    11b0 <main+0xa0>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%3s = %6s\0A\00"
@.str.1 = [11 x i8] c"Fahrenheit\00"
@.str.2 = [8 x i8] c"Celsius\00"
@.str.3 = [21 x i8] c"%3.0f\C2\B0F = %6.2f\C2\B0C\0A\00"
@.str.4 = [21 x i8] c"%3.0f\C2\B0C = %6.2f\C2\B0F\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 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))
store float -5.000000e+01, float* %2
br label %7
7: ; preds = %21, %0
%8 = load float, float* %2
%9 = fcmp ole float %8, 2.500000e+02
br i1 %9, label %10, label %24
10: ; preds = %7
%11 = load float, float* %2
%12 = fsub float %11, 3.200000e+01
%13 = fpext float %12 to double
%14 = fmul double 0x3FE1C71C71C71C72, %13
%15 = fptrunc double %14 to float
store float %15, float* %3
%16 = load float, float* %2
%17 = fpext float %16 to double
%18 = load float, float* %3
%19 = fpext float %18 to double
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), double %17, double %19)
br label %21
21: ; preds = %10
%22 = load float, float* %2
%23 = fadd float %22, 1.000000e+01
store float %23, float* %2
br label %7
24: ; preds = %7
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
store float -5.000000e+01, float* %4
br label %26
26: ; preds = %41, %24
%27 = load float, float* %4
%28 = fcmp ole float %27, 2.500000e+02
br i1 %28, label %29, label %44
29: ; preds = %26
%30 = load float, float* %4
%31 = fpext float %30 to double
%32 = fmul double %31, 9.000000e+00
%33 = fdiv double %32, 5.000000e+00
%34 = fadd double %33, 3.200000e+01
%35 = fptrunc double %34 to float
store float %35, float* %5
%36 = load float, float* %4
%37 = fpext float %36 to double
%38 = load float, float* %5
%39 = fpext float %38 to double
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), double %37, double %39)
br label %41
41: ; preds = %29
%42 = load float, float* %4
%43 = fadd float %42, 1.000000e+01
store float %43, float* %4
br label %26
44: ; preds = %26
%45 = load i32, i32* %1
ret i32 %45
}

LLVM IR (-O2):
@.str = [11 x i8] c"%3s = %6s\0A\00"
@.str.1 = [11 x i8] c"Fahrenheit\00"
@.str.2 = [8 x i8] c"Celsius\00"
@.str.3 = [21 x i8] c"%3.0f\C2\B0F = %6.2f\C2\B0C\0A\00"
@.str.4 = [21 x i8] c"%3.0f\C2\B0C = %6.2f\C2\B0F\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 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))
br label %4
2: ; preds = %4
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %17
4: ; preds = %0, %4
%5 = phi i32 [ -50, %0 ], [ %14, %4 ]
%6 = sitofp i32 %5 to float
%7 = fadd float %6, -3.200000e+01
%8 = fpext float %7 to double
%9 = fmul double %8, 0x3FE1C71C71C71C72
%10 = fptrunc double %9 to float
%11 = fpext float %6 to double
%12 = fpext float %10 to double
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), double %11, double %12)
%14 = add nsw i32 %5, 10
%15 = icmp sgt i32 %5, 240
br i1 %15, label %2, label %4
16: ; preds = %17
ret i32 0
17: ; preds = %2, %17
%18 = phi i32 [ -50, %2 ], [ %27, %17 ]
%19 = sitofp i32 %18 to float
%20 = fpext float %19 to double
%21 = fmul double %20, 9.000000e+00
%22 = fdiv double %21, 5.000000e+00
%23 = fadd double %22, 3.200000e+01
%24 = fptrunc double %23 to float
%25 = fpext float %24 to double
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), double %20, double %25)
%27 = add nsw i32 %18, 10
%28 = icmp sgt i32 %18, 240
br i1 %28, label %16, label %17
}