#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 *, ...);
double temp(int);
int main() {
  int cel, up = 200, low = 0;
  cel = low;
  printf(" Celsius | Fahrenheit\n");
  printf("---------------------\n");
  while (cel <= up) {
    printf("%6d\t | %7.2f\n", cel, temp(cel));
    cel = cel + 20;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xc8,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1198 <main+0x78>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <temp@plt>
mov    -0x14(%rbp),%esi
lea    0xeab(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x8(%rbp)
jmp    115f <main+0x3f>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <temp@plt>
lea    0xea9(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x14,%edi
call   1050 <temp@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x28,%edi
call   1050 <temp@plt>
mov    %rbx,%rdi
mov    $0x28,%esi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x3c,%edi
call   1050 <temp@plt>
mov    %rbx,%rdi
mov    $0x3c,%esi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x50,%edi
call   1050 <temp@plt>
mov    %rbx,%rdi
mov    $0x50,%esi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x64,%edi
call   1050 <temp@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x78,%edi
call   1050 <temp@plt>
mov    %rbx,%rdi
mov    $0x78,%esi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x8c,%edi
call   1050 <temp@plt>
mov    %rbx,%rdi
mov    $0x8c,%esi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa0,%edi
call   1050 <temp@plt>
mov    %rbx,%rdi
mov    $0xa0,%esi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xb4,%edi
call   1050 <temp@plt>
mov    %rbx,%rdi
mov    $0xb4,%esi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xc8,%edi
call   1050 <temp@plt>
mov    %rbx,%rdi
mov    $0xc8,%esi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str.2 = [14 x i8] c"%6d\09 | %7.2f\0A\00"
@str = [22 x i8] c" Celsius | Fahrenheit\00"
@str.3 = [22 x i8] c"---------------------\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.3, i64 0, i64 0))
%3 = tail call double @temp(i32 0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 0, double %3)
%5 = tail call double @temp(i32 20)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 20, double %5)
%7 = tail call double @temp(i32 40)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 40, double %7)
%9 = tail call double @temp(i32 60)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 60, double %9)
%11 = tail call double @temp(i32 80)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 80, double %11)
%13 = tail call double @temp(i32 100)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 100, double %13)
%15 = tail call double @temp(i32 120)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 120, double %15)
%17 = tail call double @temp(i32 140)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 140, double %17)
%19 = tail call double @temp(i32 160)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 160, double %19)
%21 = tail call double @temp(i32 180)
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 180, double %21)
%23 = tail call double @temp(i32 200)
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 200, double %23)
ret i32 0
}