#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 */
double CelsiusToFahrenheit(int);
int /*<<< orphan*/ printf(char *, ...);
main() {
  int c;
  printf("Celsius to Fahrenheit table.\n");
  printf("  C    F\n");
  for (c = 0; c <= 100; c += 5) {
    printf("%3d  %3g\n", c, CelsiusToFahrenheit(c));
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     1189 <main+0x69>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <CelsiusToFahrenheit@plt>
mov    -0xc(%rbp),%esi
lea    0xeb4(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x8(%rbp)
jmp    1152 <main+0x32>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <CelsiusToFahrenheit@plt>
lea    0xea9(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x5,%edi
call   1040 <CelsiusToFahrenheit@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1040 <CelsiusToFahrenheit@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xf,%edi
call   1040 <CelsiusToFahrenheit@plt>
mov    %rbx,%rdi
mov    $0xf,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x14,%edi
call   1040 <CelsiusToFahrenheit@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x19,%edi
call   1040 <CelsiusToFahrenheit@plt>
mov    %rbx,%rdi
mov    $0x19,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x1e,%edi
call   1040 <CelsiusToFahrenheit@plt>
mov    %rbx,%rdi
mov    $0x1e,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x23,%edi
call   1040 <CelsiusToFahrenheit@plt>
mov    %rbx,%rdi
mov    $0x23,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x28,%edi
call   1040 <CelsiusToFahrenheit@plt>
mov    %rbx,%rdi
mov    $0x28,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x2d,%edi
call   1040 <CelsiusToFahrenheit@plt>
mov    %rbx,%rdi
mov    $0x2d,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x32,%edi
call   1040 <CelsiusToFahrenheit@plt>
mov    %rbx,%rdi
mov    $0x32,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x37,%edi
call   1040 <CelsiusToFahrenheit@plt>
mov    %rbx,%rdi
mov    $0x37,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x3c,%edi
call   1040 <CelsiusToFahrenheit@plt>
mov    %rbx,%rdi
mov    $0x3c,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x41,%edi
call   1040 <CelsiusToFahrenheit@plt>
mov    %rbx,%rdi
mov    $0x41,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x46,%edi
call   1040 <CelsiusToFahrenheit@plt>
mov    %rbx,%rdi
mov    $0x46,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x4b,%edi
call   1040 <CelsiusToFahrenheit@plt>
mov    %rbx,%rdi
mov    $0x4b,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x50,%edi
call   1040 <CelsiusToFahrenheit@plt>
mov    %rbx,%rdi
mov    $0x50,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x55,%edi
call   1040 <CelsiusToFahrenheit@plt>
mov    %rbx,%rdi
mov    $0x55,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x5a,%edi
call   1040 <CelsiusToFahrenheit@plt>
mov    %rbx,%rdi
mov    $0x5a,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x5f,%edi
call   1040 <CelsiusToFahrenheit@plt>
mov    %rbx,%rdi
mov    $0x5f,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0x64,%edi
call   1040 <CelsiusToFahrenheit@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Celsius to Fahrenheit table.\0A\00"
@.str.1 = [10 x i8] c" C F\0A\00"
@.str.2 = [10 x i8] c"%3d %3g\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %5
5: ; preds = %13, %0
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 100
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = load i32, i32* %2
%10 = load i32, i32* %2
%11 = call double @CelsiusToFahrenheit(i32 %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %9, double %11)
br label %13
13: ; preds = %8
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 5
store i32 %15, i32* %2
br label %5
16: ; preds = %5
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
@.str.2 = [10 x i8] c"%3d %3g\0A\00"
@str = [29 x i8] c"Celsius to Fahrenheit table.\00"
@str.3 = [9 x i8] c" C F\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.3, i64 0, i64 0))
%3 = tail call double @CelsiusToFahrenheit(i32 0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 0, double %3)
%5 = tail call double @CelsiusToFahrenheit(i32 5)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 5, double %5)
%7 = tail call double @CelsiusToFahrenheit(i32 10)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 10, double %7)
%9 = tail call double @CelsiusToFahrenheit(i32 15)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 15, double %9)
%11 = tail call double @CelsiusToFahrenheit(i32 20)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 20, double %11)
%13 = tail call double @CelsiusToFahrenheit(i32 25)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 25, double %13)
%15 = tail call double @CelsiusToFahrenheit(i32 30)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 30, double %15)
%17 = tail call double @CelsiusToFahrenheit(i32 35)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 35, double %17)
%19 = tail call double @CelsiusToFahrenheit(i32 40)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 40, double %19)
%21 = tail call double @CelsiusToFahrenheit(i32 45)
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 45, double %21)
%23 = tail call double @CelsiusToFahrenheit(i32 50)
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 50, double %23)
%25 = tail call double @CelsiusToFahrenheit(i32 55)
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 55, double %25)
%27 = tail call double @CelsiusToFahrenheit(i32 60)
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 60, double %27)
%29 = tail call double @CelsiusToFahrenheit(i32 65)
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 65, double %29)
%31 = tail call double @CelsiusToFahrenheit(i32 70)
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 70, double %31)
%33 = tail call double @CelsiusToFahrenheit(i32 75)
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 75, double %33)
%35 = tail call double @CelsiusToFahrenheit(i32 80)
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 80, double %35)
%37 = tail call double @CelsiusToFahrenheit(i32 85)
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 85, double %37)
%39 = tail call double @CelsiusToFahrenheit(i32 90)
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 90, double %39)
%41 = tail call double @CelsiusToFahrenheit(i32 95)
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 95, double %41)
%43 = tail call double @CelsiusToFahrenheit(i32 100)
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 100, double %43)
ret i32 0
}