#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 *, ...);
void celsius_to_fahrenheit(void) {
  printf("%-10s%10s\n", "Celsius", "Fahrenheit");
  float hesaplanan_sicaklik;
  float celsius;
  for (celsius = 0; celsius <= 100; celsius++) {
    hesaplanan_sicaklik = celsius * 1.8 + 32;
    printf("%7.1f%13.1f\n", celsius, hesaplanan_sicaklik);
  }
}


x86 assembly (clang, -O0):
<celsius_to_fahrenheit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xef9(%rip),%rdi
lea    0xefd(%rip),%rsi
lea    0xefe(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xebc(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     11af <celsius_to_fahrenheit+0x9f>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea9(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xea5(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xea5(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  0xe64(%rip),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    113c <celsius_to_fahrenheit+0x2c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celsius_to_fahrenheit>:
push   %rbp
push   %rbx
push   %rax
lea    0xef6(%rip),%rdi
lea    0xefa(%rip),%rsi
lea    0xefb(%rip),%rdx
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef6(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
cvtss2sd %xmm0,%xmm0
movaps %xmm0,%xmm1
mulsd  0xeaa(%rip),%xmm1
addsd  0xeaa(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
cvtss2sd %xmm1,%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    $0x65,%ebp
jne    1140 <celsius_to_fahrenheit+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%-10s%10s\0A\00"
@.str.1 = [8 x i8] c"Celsius\00"
@.str.2 = [11 x i8] c"Fahrenheit\00"
@.str.3 = [13 x i8] c"%7.1f%13.1f\0A\00"
define void @celsius_to_fahrenheit() {
%1 = alloca float
%2 = alloca float
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
store float 0.000000e+00, float* %2
br label %4
4: ; preds = %17, %0
%5 = load float, float* %2
%6 = fcmp ole float %5, 1.000000e+02
br i1 %6, label %7, label %20
7: ; preds = %4
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = call double @llvm.fmuladd.f64(double %9, double 1.800000e+00, double 3.200000e+01)
%11 = fptrunc double %10 to float
store float %11, float* %1
%12 = load float, float* %2
%13 = fpext float %12 to double
%14 = load float, float* %1
%15 = fpext float %14 to double
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double %13, double %15)
br label %17
17: ; preds = %7
%18 = load float, float* %2
%19 = fadd float %18, 1.000000e+00
store float %19, float* %2
br label %4
20: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"%-10s%10s\0A\00"
@.str.1 = [8 x i8] c"Celsius\00"
@.str.2 = [11 x i8] c"Fahrenheit\00"
@.str.3 = [13 x i8] c"%7.1f%13.1f\0A\00"
define void @celsius_to_fahrenheit() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %10, %2 ]
%4 = sitofp i32 %3 to float
%5 = fpext float %4 to double
%6 = tail call double @llvm.fmuladd.f64(double %5, double 1.800000e+00, double 3.200000e+01)
%7 = fptrunc double %6 to float
%8 = fpext float %7 to double
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double %5, double %8)
%10 = add nuw nsw i32 %3, 1
%11 = icmp eq i32 %10, 101
br i1 %11, label %12, label %2
12: ; preds = %2
ret void
}