#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 celtofa(int);
int fatocel(int);
int /*<<< orphan*/ printf(char *, ...);
main() {
  int i;
  printf("fahr  celsius\n");
  for (i = 0; i <= 300; i = i + 20)
    printf("%d\t%d\n", i, fatocel(i));
  printf("celsius  fahr\n");
  for (i = -15; i <= 30; i = i + 5)
    printf("%d\t%d\n", i, celtofa(i));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x12c,-0x8(%rbp)
jg     1190 <main+0x60>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <fatocel@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x8(%rbp)
jmp    1154 <main+0x24>
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xfffffff1,-0x8(%rbp)
cmpl   $0x1e,-0x8(%rbp)
jg     11de <main+0xae>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <celtofa@plt>
mov    -0x10(%rbp),%esi
mov    %eax,%edx
lea    0xe46(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x8(%rbp)
jmp    11a5 <main+0x75>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xebf(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <fatocel@plt>
lea    0xea5(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x14,%edi
call   1060 <fatocel@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x28,%edi
call   1060 <fatocel@plt>
mov    %rbx,%rdi
mov    $0x28,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3c,%edi
call   1060 <fatocel@plt>
mov    %rbx,%rdi
mov    $0x3c,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x50,%edi
call   1060 <fatocel@plt>
mov    %rbx,%rdi
mov    $0x50,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x64,%edi
call   1060 <fatocel@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x78,%edi
call   1060 <fatocel@plt>
mov    %rbx,%rdi
mov    $0x78,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x8c,%edi
call   1060 <fatocel@plt>
mov    %rbx,%rdi
mov    $0x8c,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa0,%edi
call   1060 <fatocel@plt>
mov    %rbx,%rdi
mov    $0xa0,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xb4,%edi
call   1060 <fatocel@plt>
mov    %rbx,%rdi
mov    $0xb4,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xc8,%edi
call   1060 <fatocel@plt>
mov    %rbx,%rdi
mov    $0xc8,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xdc,%edi
call   1060 <fatocel@plt>
mov    %rbx,%rdi
mov    $0xdc,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xf0,%edi
call   1060 <fatocel@plt>
mov    %rbx,%rdi
mov    $0xf0,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x104,%edi
call   1060 <fatocel@plt>
mov    %rbx,%rdi
mov    $0x104,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x118,%edi
call   1060 <fatocel@plt>
mov    %rbx,%rdi
mov    $0x118,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x12c,%edi
call   1060 <fatocel@plt>
mov    %rbx,%rdi
mov    $0x12c,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd10(%rip),%rdi
call   1030 <puts@plt>
mov    $0xfffffff1,%edi
call   1040 <celtofa@plt>
mov    %rbx,%rdi
mov    $0xfffffff1,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xfffffff6,%edi
call   1040 <celtofa@plt>
mov    %rbx,%rdi
mov    $0xfffffff6,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xfffffffb,%edi
call   1040 <celtofa@plt>
mov    %rbx,%rdi
mov    $0xfffffffb,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %edi,%edi
call   1040 <celtofa@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x5,%edi
call   1040 <celtofa@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1040 <celtofa@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xf,%edi
call   1040 <celtofa@plt>
mov    %rbx,%rdi
mov    $0xf,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x14,%edi
call   1040 <celtofa@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x19,%edi
call   1040 <celtofa@plt>
mov    %rbx,%rdi
mov    $0x19,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1e,%edi
call   1040 <celtofa@plt>
mov    %rbx,%rdi
mov    $0x1e,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str.1 = [7 x i8] c"%d\09%d\0A\00"
@str = [14 x i8] c"fahr celsius\00"
@str.3 = [14 x i8] c"celsius fahr\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @fatocel(i32 0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 %2)
%4 = tail call i32 @fatocel(i32 20)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 20, i32 %4)
%6 = tail call i32 @fatocel(i32 40)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 40, i32 %6)
%8 = tail call i32 @fatocel(i32 60)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 60, i32 %8)
%10 = tail call i32 @fatocel(i32 80)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 80, i32 %10)
%12 = tail call i32 @fatocel(i32 100)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 100, i32 %12)
%14 = tail call i32 @fatocel(i32 120)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 120, i32 %14)
%16 = tail call i32 @fatocel(i32 140)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 140, i32 %16)
%18 = tail call i32 @fatocel(i32 160)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 160, i32 %18)
%20 = tail call i32 @fatocel(i32 180)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 180, i32 %20)
%22 = tail call i32 @fatocel(i32 200)
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 200, i32 %22)
%24 = tail call i32 @fatocel(i32 220)
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 220, i32 %24)
%26 = tail call i32 @fatocel(i32 240)
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 240, i32 %26)
%28 = tail call i32 @fatocel(i32 260)
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 260, i32 %28)
%30 = tail call i32 @fatocel(i32 280)
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 280, i32 %30)
%32 = tail call i32 @fatocel(i32 300)
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 300, i32 %32)
%34 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.3, i64 0, i64 0))
%35 = tail call i32 @celtofa(i32 -15)
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 -15, i32 %35)
%37 = tail call i32 @celtofa(i32 -10)
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 -10, i32 %37)
%39 = tail call i32 @celtofa(i32 -5)
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 -5, i32 %39)
%41 = tail call i32 @celtofa(i32 0)
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 %41)
%43 = tail call i32 @celtofa(i32 5)
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 5, i32 %43)
%45 = tail call i32 @celtofa(i32 10)
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 10, i32 %45)
%47 = tail call i32 @celtofa(i32 15)
%48 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 15, i32 %47)
%49 = tail call i32 @celtofa(i32 20)
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 20, i32 %49)
%51 = tail call i32 @celtofa(i32 25)
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 25, i32 %51)
%53 = tail call i32 @celtofa(i32 30)
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 30, i32 %53)
ret i32 0
}