#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, int);
int main() {
  int fahr, celsius;
  int lower, upper, step;
  lower = 0;
  upper = 160;
  step = 20;
  fahr = lower;
  while (fahr <= upper) {
    celsius = 5 * (fahr - 32) / 9;
    printf("%d\t%d\n", fahr, celsius);
    fahr = fahr + step;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0xa0,-0x14(%rbp)
movl   $0x14,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     117a <main+0x6a>
mov    -0x8(%rbp),%eax
sub    $0x20,%eax
imul   $0x5,%eax,%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    113a <main+0x2a>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xffffffef,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
mov    $0xfffffffa,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x28,%esi
mov    $0x4,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3c,%esi
mov    $0xf,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x50,%esi
mov    $0x1a,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
mov    $0x25,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x78,%esi
mov    $0x30,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8c,%esi
mov    $0x3c,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xa0,%esi
mov    $0x47,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d\09%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
store i32 160, i32* %5
store i32 20, i32* %6
%7 = load i32, i32* %4
store i32 %7, i32* %2
br label %8
8: ; preds = %12, %0
%9 = load i32, i32* %2
%10 = load i32, i32* %5
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %23
12: ; preds = %8
%13 = load i32, i32* %2
%14 = sub nsw i32 %13, 32
%15 = mul nsw i32 5, %14
%16 = sdiv i32 %15, 9
store i32 %16, i32* %3
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %17, i32 %18)
%20 = load i32, i32* %2
%21 = load i32, i32* %6
%22 = add nsw i32 %20, %21
store i32 %22, i32* %2
br label %8
23: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d\09%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 0, i32 -17)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 20, i32 -6)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 40, i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 60, i32 15)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 80, i32 26)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 100, i32 37)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 120, i32 48)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 140, i32 60)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 160, i32 71)
ret i32 0
}