#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);
int main() {
  int fahr;
  double celsius;
  int step = 20;
  fahr = 0;
  while (fahr < 100) {
    celsius = 5.0 * (fahr - 32.0) / 9.0;
    printf("%4d\t%6.1f\n", fahr, celsius);
    fahr += step;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x14,-0x14(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1187 <main+0x77>
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xecc(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xeb8(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xea4(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf10(%rip),%rbx
movsd  0xee0(%rip),%xmm0
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
movsd  0xed6(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x14,%esi
call   1030 <printf@plt>
movsd  0xec9(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x28,%esi
call   1030 <printf@plt>
movsd  0xebc(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x3c,%esi
call   1030 <printf@plt>
movsd  0xeaf(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x50,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%4d\09%6.1f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca i32
store i32 0, i32* %1
store i32 20, i32* %4
store i32 0, i32* %2
br label %5
5: ; preds = %8, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 100
br i1 %7, label %8, label %20
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sitofp i32 %9 to double
%11 = fsub double %10, 3.200000e+01
%12 = fmul double 5.000000e+00, %11
%13 = fdiv double %12, 9.000000e+00
store double %13, double* %3
%14 = load i32, i32* %2
%15 = load double, double* %3
%16 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %14, double %15)
%17 = load i32, i32* %4
%18 = load i32, i32* %2
%19 = add nsw i32 %18, %17
store i32 %19, i32* %2
br label %5
20: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"%4d\09%6.1f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 0, double 0xC031C71C71C71C72)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 20, double 0xC01AAAAAAAAAAAAB)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 40, double 0x4011C71C71C71C72)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 60, double 0x402F1C71C71C71C7)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 80, double 0x403AAAAAAAAAAAAB)
ret i32 0
}