#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 *, ...);
int main(void) {
  float celsius(float gradiFahrenheit);
  float fahrenheit(float gradiCelsius);
  float contatoreCelsius = 0;
  float contatoreFahrenheit = 32;
  printf("%33s\t%31s\n", "Conversione Celsius in Fahrenheit",
         "Conversione Fahrenheit in Celsius");
  do {
    while (contatoreCelsius++ < 100) {
      printf("%.2f e' pari a: %.2f \t\t\t %.2f e' pari a: %.2f\n",
             contatoreCelsius, fahrenheit(contatoreCelsius),
             contatoreFahrenheit, celsius(contatoreFahrenheit));
      contatoreFahrenheit++;
    }
    printf("%33s\t\t %.2f e' pari a: %.2f\n", " ", contatoreFahrenheit,
           celsius(contatoreFahrenheit));
  } while (contatoreFahrenheit++ < 212);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeb1(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
lea    0xeb5(%rip),%rdi
lea    0xeb9(%rip),%rsi
lea    0xed4(%rip),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1175 <main+0x45>
movss  -0x8(%rbp),%xmm1
movss  0xe86(%rip),%xmm2
movaps %xmm1,%xmm0
addss  %xmm2,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xe6e(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    1213 <main+0xe3>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <fahrenheit@plt>
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movss  -0xc(%rbp),%xmm0
call   1050 <celsius@plt>
movsd  -0x28(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movaps %xmm0,%xmm3
movsd  -0x18(%rbp),%xmm0
cvtss2sd %xmm3,%xmm3
lea    0xe6a(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
movss  0xe04(%rip),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1175 <main+0x45>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movss  -0xc(%rbp),%xmm0
call   1050 <celsius@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
cvtss2sd %xmm1,%xmm1
lea    0xe50(%rip),%rdi
lea    0xe66(%rip),%rsi
mov    $0x2,%al
call   1040 <printf@plt>
movss  -0xc(%rbp),%xmm1
movss  0xdaf(%rip),%xmm2
movaps %xmm1,%xmm0
addss  %xmm2,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xd9f(%rip),%xmm0
ucomiss %xmm1,%xmm0
ja     1170 <main+0x40>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
lea    0xed0(%rip),%rdi
lea    0xed4(%rip),%rsi
lea    0xeef(%rip),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
movss  0xea3(%rip),%xmm1
xorps  %xmm0,%xmm0
movss  0xe9c(%rip),%xmm2
movss  0xe98(%rip),%xmm3
lea    0xee8(%rip),%rbx
lea    0xf10(%rip),%r14
lea    0xf26(%rip),%r15
jmp    1212 <main+0xe2>
nopw   0x0(%rax,%rax,1)
movss  %xmm0,0x4(%rsp)
movss  %xmm1,(%rsp)
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
call   1030 <fahrenheit@plt>
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x18(%rsp)
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
movss  (%rsp),%xmm0
call   1050 <celsius@plt>
xorps  %xmm3,%xmm3
cvtss2sd %xmm0,%xmm3
mov    %rbx,%rdi
movsd  0x8(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
mov    $0x4,%al
call   1040 <printf@plt>
movss  0x4(%rsp),%xmm0
movss  (%rsp),%xmm1
movss  0xdfe(%rip),%xmm2
addss  %xmm2,%xmm1
movss  0xdf6(%rip),%xmm3
ucomiss %xmm0,%xmm3
addss  %xmm2,%xmm0
ja     1190 <main+0x60>
movss  %xmm0,0x4(%rsp)
movss  %xmm1,(%rsp)
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
movss  (%rsp),%xmm0
call   1050 <celsius@plt>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
mov    %r14,%rdi
mov    %r15,%rsi
movsd  0x8(%rsp),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
movss  0x4(%rsp),%xmm0
movss  (%rsp),%xmm1
movss  0xd9e(%rip),%xmm2
ucomiss %xmm1,%xmm2
movss  0xd8b(%rip),%xmm2
addss  %xmm2,%xmm1
movss  0xd83(%rip),%xmm3
ja     1212 <main+0xe2>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%33s\09%31s\0A\00"
@.str.1 = [34 x i8] c"Conversione Celsius in Fahrenheit\00"
@.str.2 = [34 x i8] c"Conversione Fahrenheit in Celsius\00"
@.str.3 = [47 x i8] c"%.2f e' pari a: %.2f \09\09\09 %.2f e' pari a: %.2f\0A\00"
@.str.4 = [29 x i8] c"%33s\09\09 %.2f e' pari a: %.2f\0A\00"
@.str.5 = [2 x i8] c" \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
store float 0.000000e+00, float* %2
store float 3.200000e+01, float* %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
br label %5
5: ; preds = %31, %0
br label %6
6: ; preds = %10, %5
%7 = load float, float* %2
%8 = fadd float %7, 1.000000e+00
store float %8, float* %2
%9 = fcmp olt float %7, 1.000000e+02
br i1 %9, label %10, label %24
10: ; preds = %6
%11 = load float, float* %2
%12 = fpext float %11 to double
%13 = load float, float* %2
%14 = call float @fahrenheit(float %13)
%15 = fpext float %14 to double
%16 = load float, float* %3
%17 = fpext float %16 to double
%18 = load float, float* %3
%19 = call float @celsius(float %18)
%20 = fpext float %19 to double
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), double %12, double %15, double %17, double %20)
%22 = load float, float* %3
%23 = fadd float %22, 1.000000e+00
store float %23, float* %3
br label %6
24: ; preds = %6
%25 = load float, float* %3
%26 = fpext float %25 to double
%27 = load float, float* %3
%28 = call float @celsius(float %27)
%29 = fpext float %28 to double
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), double %26, double %29)
br label %31
31: ; preds = %24
%32 = load float, float* %3
%33 = fadd float %32, 1.000000e+00
store float %33, float* %3
%34 = fcmp olt float %32, 2.120000e+02
br i1 %34, label %5, label %35
35: ; preds = %31
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"%33s\09%31s\0A\00"
@.str.1 = [34 x i8] c"Conversione Celsius in Fahrenheit\00"
@.str.2 = [34 x i8] c"Conversione Fahrenheit in Celsius\00"
@.str.3 = [47 x i8] c"%.2f e' pari a: %.2f \09\09\09 %.2f e' pari a: %.2f\0A\00"
@.str.4 = [29 x i8] c"%33s\09\09 %.2f e' pari a: %.2f\0A\00"
@.str.5 = [2 x i8] c" \00"
define i32 @main() {
%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 ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
br label %2
2: ; preds = %20, %0
%3 = phi float [ 0.000000e+00, %0 ], [ %22, %20 ]
%4 = phi float [ 3.200000e+01, %0 ], [ %27, %20 ]
%5 = fadd float %3, 1.000000e+00
%6 = fcmp olt float %3, 1.000000e+02
br i1 %6, label %7, label %20
7: ; preds = %2, %7
%8 = phi float [ %18, %7 ], [ %5, %2 ]
%9 = phi float [ %17, %7 ], [ %4, %2 ]
%10 = fpext float %8 to double
%11 = tail call float @fahrenheit(float %8)
%12 = fpext float %11 to double
%13 = fpext float %9 to double
%14 = tail call float @celsius(float %9)
%15 = fpext float %14 to double
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), double %10, double %12, double %13, double %15)
%17 = fadd float %9, 1.000000e+00
%18 = fadd float %8, 1.000000e+00
%19 = fcmp olt float %8, 1.000000e+02
br i1 %19, label %7, label %20
20: ; preds = %7, %2
%21 = phi float [ %4, %2 ], [ %17, %7 ]
%22 = phi float [ %5, %2 ], [ %18, %7 ]
%23 = fpext float %21 to double
%24 = tail call float @celsius(float %21)
%25 = fpext float %24 to double
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), double %23, double %25)
%27 = fadd float %21, 1.000000e+00
%28 = fcmp olt float %21, 2.120000e+02
br i1 %28, label %2, label %29
29: ; preds = %20
ret i32 0
}