#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 EXIT_SUCCESS;
float celsius(int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("---------------------- \n Fahrenheit Celsius \n "
         "---------------------- \n ");
  for (int i = 0; i <= 200; i += 20) {
    float f1 = celsius(i);
    printf("%d ------------ %f \n", i, f1);
  }
  return EXIT_SUCCESS;
}


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   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0xc8,-0x8(%rbp)
jg     1186 <main+0x66>
mov    -0x8(%rbp),%edi
call   1040 <celsius@plt>
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%esi
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xed7(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x8(%rbp)
jmp    1144 <main+0x24>
mov    0x2e53(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <celsius@plt>
cvtss2sd %xmm0,%xmm0
lea    0xf07(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%al
call   1030 <printf@plt>
mov    $0x14,%edi
call   1040 <celsius@plt>
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x14,%esi
mov    $0x1,%al
call   1030 <printf@plt>
mov    $0x28,%edi
call   1040 <celsius@plt>
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x28,%esi
mov    $0x1,%al
call   1030 <printf@plt>
mov    $0x3c,%edi
call   1040 <celsius@plt>
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x3c,%esi
mov    $0x1,%al
call   1030 <printf@plt>
mov    $0x50,%edi
call   1040 <celsius@plt>
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x50,%esi
mov    $0x1,%al
call   1030 <printf@plt>
mov    $0x64,%edi
call   1040 <celsius@plt>
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x64,%esi
mov    $0x1,%al
call   1030 <printf@plt>
mov    $0x78,%edi
call   1040 <celsius@plt>
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x78,%esi
mov    $0x1,%al
call   1030 <printf@plt>
mov    $0x8c,%edi
call   1040 <celsius@plt>
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x8c,%esi
mov    $0x1,%al
call   1030 <printf@plt>
mov    $0xa0,%edi
call   1040 <celsius@plt>
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0xa0,%esi
mov    $0x1,%al
call   1030 <printf@plt>
mov    $0xb4,%edi
call   1040 <celsius@plt>
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0xb4,%esi
mov    $0x1,%al
call   1030 <printf@plt>
mov    $0xc8,%edi
call   1040 <celsius@plt>
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0xc8,%esi
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x2d6a(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [72 x i8] c"---------------------- \0A Fahrenheit Celsius \0A ---------------------- \0A \00"
@.str.1 = [21 x i8] c"%d ------------ %f \0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
%2 = tail call float @celsius(i32 0)
%3 = fpext float %2 to double
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 0, double %3)
%5 = tail call float @celsius(i32 20)
%6 = fpext float %5 to double
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 20, double %6)
%8 = tail call float @celsius(i32 40)
%9 = fpext float %8 to double
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 40, double %9)
%11 = tail call float @celsius(i32 60)
%12 = fpext float %11 to double
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 60, double %12)
%14 = tail call float @celsius(i32 80)
%15 = fpext float %14 to double
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 80, double %15)
%17 = tail call float @celsius(i32 100)
%18 = fpext float %17 to double
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 100, double %18)
%20 = tail call float @celsius(i32 120)
%21 = fpext float %20 to double
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 120, double %21)
%23 = tail call float @celsius(i32 140)
%24 = fpext float %23 to double
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 140, double %24)
%26 = tail call float @celsius(i32 160)
%27 = fpext float %26 to double
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 160, double %27)
%29 = tail call float @celsius(i32 180)
%30 = fpext float %29 to double
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 180, double %30)
%32 = tail call float @celsius(i32 200)
%33 = fpext float %32 to double
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 200, double %33)
%35 = load i32, i32* @EXIT_SUCCESS
ret i32 %35
}