#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 *, float, double);
void fahrtocelsius() {
  float fahr;
  for (fahr = 0; fahr <= 300; fahr = fahr + 20)
    printf("%3.0f%6.1f\n", fahr, (5.0 / 9.0) * (fahr - 32.0));
}


x86 assembly (clang, -O0):
<fahrtocelsius>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xed8(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jb     117b <fahrtocelsius+0x6b>
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xec8(%rip),%xmm1
subsd  %xmm1,%xmm2
movsd  0xeb4(%rip),%xmm1
mulsd  %xmm2,%xmm1
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
movss  0xe98(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1120 <fahrtocelsius+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fahrtocelsius>:
push   %rbx
lea    0xfa4(%rip),%rbx
movsd  0xee0(%rip),%xmm1
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xf4d(%rip),%xmm0
movsd  0xecd(%rip),%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xf39(%rip),%xmm0
movsd  0xebd(%rip),%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xf25(%rip),%xmm0
movsd  0xead(%rip),%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xf11(%rip),%xmm0
movsd  0xe9d(%rip),%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xefd(%rip),%xmm0
movsd  0xe8d(%rip),%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xee9(%rip),%xmm0
movsd  0xe7d(%rip),%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xed5(%rip),%xmm0
movsd  0xe6d(%rip),%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xec1(%rip),%xmm0
movsd  0xe5d(%rip),%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xead(%rip),%xmm0
movsd  0xe4d(%rip),%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xe99(%rip),%xmm0
movsd  0xe3d(%rip),%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xe85(%rip),%xmm0
movsd  0xe2d(%rip),%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xe71(%rip),%xmm0
movsd  0xe1d(%rip),%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xe5d(%rip),%xmm0
movsd  0xe0d(%rip),%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xe49(%rip),%xmm0
movsd  0xdfd(%rip),%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xe35(%rip),%xmm0
movsd  0xded(%rip),%xmm1
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%3.0f%6.1f\0A\00"
define void @fahrtocelsius() {
%1 = alloca float
store float 0.000000e+00, float* %1
br label %2
2: ; preds = %12, %0
%3 = load float, float* %1
%4 = fcmp ole float %3, 3.000000e+02
br i1 %4, label %5, label %15
5: ; preds = %2
%6 = load float, float* %1
%7 = load float, float* %1
%8 = fpext float %7 to double
%9 = fsub double %8, 3.200000e+01
%10 = fmul double 0x3FE1C71C71C71C72, %9
%11 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %6, double %10)
br label %12
12: ; preds = %5
%13 = load float, float* %1
%14 = fadd float %13, 2.000000e+01
store float %14, float* %1
br label %2
15: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%3.0f%6.1f\0A\00"
define void @fahrtocelsius() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 0.000000e+00, double 0xC031C71C71C71C72)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 2.000000e+01, double 0xC01AAAAAAAAAAAAB)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 4.000000e+01, double 0x4011C71C71C71C72)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 6.000000e+01, double 0x402F1C71C71C71C8)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 8.000000e+01, double 0x403AAAAAAAAAAAAB)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 1.000000e+02, double 0x4042E38E38E38E39)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 1.200000e+02, double 0x404871C71C71C71D)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 1.400000e+02, double 6.000000e+01)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 1.600000e+02, double 0x4051C71C71C71C72)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 1.800000e+02, double 0x40548E38E38E38E4)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 2.000000e+02, double 0x4057555555555556)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 2.200000e+02, double 0x405A1C71C71C71C7)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 2.400000e+02, double 0x405CE38E38E38E39)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 2.600000e+02, double 0x405FAAAAAAAAAAAB)
%15 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 2.800000e+02, double 0x406138E38E38E38E)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 3.000000e+02, double 0x40629C71C71C71C7)
ret void
}