#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 /*<<< orphan*/ scanf(char *, float *, float *, float *);
void main() {
  float adao, joao, pedro;
  printf("Digite as alturas de Adao, Joao e Pedro, respectivamente: ");
  scanf("%f %f %f", &adao, &joao, &pedro);
  if (adao > joao)
    if (adao > pedro)
      printf("Adao eh maior que Joao e Pedro\n");
    else if (adao < pedro)
      printf("Adao eh maior que Joao, mas menor que Pedro\n");
    else
      printf("Adao eh maior que Joao e mede o mesmo que Pedro\n");
  else if (adao < joao)
    if (adao > pedro)
      printf("Adao eh menor que Joao, mas maior que Pedro\n");
    else if (adao < pedro)
      printf("Adao eh menor que Joao e Pedro\n");
    else
      printf("Adao eh menor que Joao e mede o mesmo que Pedro\n");
  else if (adao > pedro)
    printf("Adao mede o mesmo que Joao e eh maior que Pedro\n");
  else if (adao < pedro)
    printf("Adao mede o mesmo que Joao e eh menor que Pedro\n");
  else
    printf("Adao mede o mesmo que Joao e Pedro\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xf00(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
call   1040 <scanf@plt>
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    11b5 <main+0x95>
movss  -0x4(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    117b <main+0x5b>
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
jmp    11b0 <main+0x90>
movss  -0x4(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    119f <main+0x7f>
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
jmp    11ab <main+0x8b>
lea    0xeeb(%rip),%rdi
call   1030 <printf@plt>
jmp    11b0 <main+0x90>
jmp    1281 <main+0x161>
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1222 <main+0x102>
movss  -0x4(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    11e8 <main+0xc8>
lea    0xee4(%rip),%rdi
call   1030 <printf@plt>
jmp    121d <main+0xfd>
movss  -0x4(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    120c <main+0xec>
lea    0xeed(%rip),%rdi
call   1030 <printf@plt>
jmp    1218 <main+0xf8>
lea    0xefc(%rip),%rdi
call   1030 <printf@plt>
jmp    121d <main+0xfd>
jmp    127c <main+0x15c>
movss  -0x4(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1242 <main+0x122>
lea    0xf08(%rip),%rdi
call   1030 <printf@plt>
jmp    1277 <main+0x157>
movss  -0x4(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1266 <main+0x146>
lea    0xf15(%rip),%rdi
call   1030 <printf@plt>
jmp    1272 <main+0x152>
lea    0xf35(%rip),%rdi
call   1030 <printf@plt>
jmp    1277 <main+0x157>
jmp    127c <main+0x15c>
jmp    1281 <main+0x161>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
lea    0xef4(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
movss  0x14(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
ucomiss %xmm1,%xmm0
jbe    1180 <main+0x50>
movss  0xc(%rsp),%xmm1
ucomiss %xmm1,%xmm0
jbe    1199 <main+0x69>
lea    0x1020(%rip),%rdi
jmp    11e2 <main+0xb2>
ucomiss %xmm0,%xmm1
movss  0xc(%rsp),%xmm1
jbe    11ac <main+0x7c>
ucomiss %xmm1,%xmm0
jbe    11ba <main+0x8a>
lea    0xf7f(%rip),%rdi
jmp    11e2 <main+0xb2>
ucomiss %xmm0,%xmm1
lea    0xfcf(%rip),%rax
lea    0xf98(%rip),%rdi
jmp    11de <main+0xae>
ucomiss %xmm1,%xmm0
jbe    11cd <main+0x9d>
lea    0xedf(%rip),%rdi
jmp    11e2 <main+0xb2>
ucomiss %xmm0,%xmm1
lea    0xf33(%rip),%rax
lea    0xefc(%rip),%rdi
jmp    11de <main+0xae>
ucomiss %xmm0,%xmm1
lea    0xe90(%rip),%rax
lea    0xe66(%rip),%rdi
cmova  %rax,%rdi
call   1030 <puts@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [59 x i8] c"Digite as alturas de Adao, Joao e Pedro, respectivamente: \00"
@.str.1 = [9 x i8] c"%f %f %f\00"
@.str.2 = [32 x i8] c"Adao eh maior que Joao e Pedro\0A\00"
@.str.3 = [45 x i8] c"Adao eh maior que Joao, mas menor que Pedro\0A\00"
@.str.4 = [49 x i8] c"Adao eh maior que Joao e mede o mesmo que Pedro\0A\00"
@.str.5 = [45 x i8] c"Adao eh menor que Joao, mas maior que Pedro\0A\00"
@.str.6 = [32 x i8] c"Adao eh menor que Joao e Pedro\0A\00"
@.str.7 = [49 x i8] c"Adao eh menor que Joao e mede o mesmo que Pedro\0A\00"
@.str.8 = [49 x i8] c"Adao mede o mesmo que Joao e eh maior que Pedro\0A\00"
@.str.9 = [49 x i8] c"Adao mede o mesmo que Joao e eh menor que Pedro\0A\00"
@.str.10 = [36 x i8] c"Adao mede o mesmo que Joao e Pedro\0A\00"
define void @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), float* %1, float* %2, float* %3)
%6 = load float, float* %1
%7 = load float, float* %2
%8 = fcmp ogt float %6, %7
br i1 %8, label %9, label %25
9: ; preds = %0
%10 = load float, float* %1
%11 = load float, float* %3
%12 = fcmp ogt float %10, %11
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
br label %24
15: ; preds = %9
%16 = load float, float* %1
%17 = load float, float* %3
%18 = fcmp olt float %16, %17
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0))
br label %23
21: ; preds = %15
%22 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0))
br label %23
23: ; preds = %21, %19
br label %24
24: ; preds = %23, %13
br label %62
25: ; preds = %0
%26 = load float, float* %1
%27 = load float, float* %2
%28 = fcmp olt float %26, %27
br i1 %28, label %29, label %45
29: ; preds = %25
%30 = load float, float* %1
%31 = load float, float* %3
%32 = fcmp ogt float %30, %31
br i1 %32, label %33, label %35
33: ; preds = %29
%34 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.5, i64 0, i64 0))
br label %44
35: ; preds = %29
%36 = load float, float* %1
%37 = load float, float* %3
%38 = fcmp olt float %36, %37
br i1 %38, label %39, label %41
39: ; preds = %35
%40 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0))
br label %43
41: ; preds = %35
%42 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.7, i64 0, i64 0))
br label %43
43: ; preds = %41, %39
br label %44
44: ; preds = %43, %33
br label %61
45: ; preds = %25
%46 = load float, float* %1
%47 = load float, float* %3
%48 = fcmp ogt float %46, %47
br i1 %48, label %49, label %51
49: ; preds = %45
%50 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.8, i64 0, i64 0))
br label %60
51: ; preds = %45
%52 = load float, float* %1
%53 = load float, float* %3
%54 = fcmp olt float %52, %53
br i1 %54, label %55, label %57
55: ; preds = %51
%56 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.9, i64 0, i64 0))
br label %59
57: ; preds = %51
%58 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0))
br label %59
59: ; preds = %57, %55
br label %60
60: ; preds = %59, %49
br label %61
61: ; preds = %60, %44
br label %62
62: ; preds = %61, %24
ret void
}

LLVM IR (-O2):
@.str = [59 x i8] c"Digite as alturas de Adao, Joao e Pedro, respectivamente: \00"
@.str.1 = [9 x i8] c"%f %f %f\00"
@str = [35 x i8] c"Adao mede o mesmo que Joao e Pedro\00"
@str.11 = [48 x i8] c"Adao mede o mesmo que Joao e eh menor que Pedro\00"
@str.12 = [48 x i8] c"Adao mede o mesmo que Joao e eh maior que Pedro\00"
@str.13 = [48 x i8] c"Adao eh menor que Joao e mede o mesmo que Pedro\00"
@str.14 = [31 x i8] c"Adao eh menor que Joao e Pedro\00"
@str.15 = [44 x i8] c"Adao eh menor que Joao, mas maior que Pedro\00"
@str.16 = [48 x i8] c"Adao eh maior que Joao e mede o mesmo que Pedro\00"
@str.17 = [44 x i8] c"Adao eh maior que Joao, mas menor que Pedro\00"
@str.18 = [31 x i8] c"Adao eh maior que Joao e Pedro\00"
define void @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), float* %1, float* %2, float* %3)
%9 = load float, float* %1
%10 = load float, float* %2
%11 = fcmp ogt float %9, %10
br i1 %11, label %12, label %18
12: ; preds = %0
%13 = load float, float* %3
%14 = fcmp ogt float %9, %13
br i1 %14, label %30, label %15
15: ; preds = %12
%16 = fcmp olt float %9, %13
%17 = select i1 %16, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @str.17, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @str.16, i64 0, i64 0)
br label %30
18: ; preds = %0
%19 = fcmp olt float %9, %10
%20 = load float, float* %3
%21 = fcmp ogt float %9, %20
br i1 %19, label %22, label %26
22: ; preds = %18
br i1 %21, label %30, label %23
23: ; preds = %22
%24 = fcmp olt float %9, %20
%25 = select i1 %24, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @str.14, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @str.13, i64 0, i64 0)
br label %30
26: ; preds = %18
br i1 %21, label %30, label %27
27: ; preds = %26
%28 = fcmp olt float %9, %20
%29 = select i1 %28, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @str.11, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0)
br label %30
30: ; preds = %27, %26, %23, %22, %15, %12
%31 = phi i8* [ getelementptr inbounds ([31 x i8], [31 x i8]* @str.18, i64 0, i64 0), %12 ], [ %17, %15 ], [ getelementptr inbounds ([44 x i8], [44 x i8]* @str.15, i64 0, i64 0), %22 ], [ %25, %23 ], [ getelementptr inbounds ([48 x i8], [48 x i8]* @str.12, i64 0, i64 0), %26 ], [ %29, %27 ]
%32 = call i32 @puts(i8* dereferenceable(1) %31)
ret void
}