#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, double);
void main() {
  int fahr;
  for (fahr = 300; fahr >= 0; fahr = fahr - 20) {
    printf("\nFahrenheit:%d\tCelsius:%.2f", fahr, (5.0 / 9) * (fahr - 32));
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x12c,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     115c <main+0x4c>
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%eax
sub    $0x20,%eax
cvtsi2sd %eax,%xmm1
movsd  0xec2(%rip),%xmm0
mulsd  %xmm1,%xmm0
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
sub    $0x14,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <main+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf68(%rip),%rbx
movsd  0xee0(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x12c,%esi
call   1030 <printf@plt>
movsd  0xed3(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x118,%esi
call   1030 <printf@plt>
movsd  0xec6(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x104,%esi
call   1030 <printf@plt>
movsd  0xeb9(%rip),%xmm0
mov    %rbx,%rdi
mov    $0xf0,%esi
call   1030 <printf@plt>
movsd  0xeac(%rip),%xmm0
mov    %rbx,%rdi
mov    $0xdc,%esi
call   1030 <printf@plt>
movsd  0xe9f(%rip),%xmm0
mov    %rbx,%rdi
mov    $0xc8,%esi
call   1030 <printf@plt>
movsd  0xe92(%rip),%xmm0
mov    %rbx,%rdi
mov    $0xb4,%esi
call   1030 <printf@plt>
movsd  0xe85(%rip),%xmm0
mov    %rbx,%rdi
mov    $0xa0,%esi
call   1030 <printf@plt>
movsd  0xe78(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x8c,%esi
call   1030 <printf@plt>
movsd  0xe6b(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x78,%esi
call   1030 <printf@plt>
movsd  0xe5e(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x64,%esi
call   1030 <printf@plt>
movsd  0xe51(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x50,%esi
call   1030 <printf@plt>
movsd  0xe44(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x3c,%esi
call   1030 <printf@plt>
movsd  0xe37(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x28,%esi
call   1030 <printf@plt>
movsd  0xe2a(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x14,%esi
call   1030 <printf@plt>
movsd  0xe1d(%rip),%xmm0
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"\0AFahrenheit:%d\09Celsius:%.2f\00"
define void @main() {
%1 = alloca i32
store i32 300, i32* %1
br label %2
2: ; preds = %12, %0
%3 = load i32, i32* %1
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %15
5: ; preds = %2
%6 = load i32, i32* %1
%7 = load i32, i32* %1
%8 = sub nsw i32 %7, 32
%9 = sitofp i32 %8 to double
%10 = fmul double 0x3FE1C71C71C71C72, %9
%11 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %6, double %10)
br label %12
12: ; preds = %5
%13 = load i32, i32* %1
%14 = sub nsw i32 %13, 20
store i32 %14, i32* %1
br label %2
15: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"\0AFahrenheit:%d\09Celsius:%.2f\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 300, double 0x40629C71C71C71C7)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 280, double 0x406138E38E38E38E)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 260, double 0x405FAAAAAAAAAAAB)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 240, double 0x405CE38E38E38E39)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 220, double 0x405A1C71C71C71C7)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 200, double 0x4057555555555556)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 180, double 0x40548E38E38E38E4)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 160, double 0x4051C71C71C71C72)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 140, double 6.000000e+01)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 120, double 0x404871C71C71C71D)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 100, double 0x4042E38E38E38E39)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 80, double 0x403AAAAAAAAAAAAB)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 60, double 0x402F1C71C71C71C8)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 40, double 0x4011C71C71C71C72)
%15 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 20, double 0xC01AAAAAAAAAAAAB)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 0, double 0xC031C71C71C71C72)
ret void
}