#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 *);
int main() {
  float x, y, z;
  printf("Entre com as 3 dimensões: ");
  scanf("%f %f %f", &x, &y, &z);
  if (x + y > z && x + z > y && z + y > x) {
    if (x == y && y == z) {
      printf("Equilatero\n");
    } else if (x == y || y == z || x == z) {
      printf("Isóceles\n");
    } else {
      printf("Escaleno\n");
    }
  } else {
    printf("Não é triangulo\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    123a <main+0x11a>
movss  -0x8(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    123a <main+0x11a>
movss  -0x10(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    123a <main+0x11a>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jne    11ca <main+0xaa>
jp     11ca <main+0xaa>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jne    11ca <main+0xaa>
jp     11ca <main+0xaa>
lea    0xe65(%rip),%rdi
call   1030 <printf@plt>
jmp    1235 <main+0x115>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jne    11e4 <main+0xc4>
jp     11e4 <main+0xc4>
jmp    1213 <main+0xf3>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jne    11fe <main+0xde>
jp     11fe <main+0xde>
jmp    1213 <main+0xf3>
movss  -0x8(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jne    1224 <main+0x104>
jp     1224 <main+0x104>
lea    0xe17(%rip),%rdi
call   1030 <printf@plt>
jmp    1230 <main+0x110>
lea    0xe11(%rip),%rdi
call   1030 <printf@plt>
jmp    1235 <main+0x115>
jmp    1246 <main+0x126>
lea    0xe05(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
movss  0x14(%rsp),%xmm2
movss  0x10(%rsp),%xmm0
movaps %xmm2,%xmm3
addss  %xmm0,%xmm3
movss  0xc(%rsp),%xmm1
ucomiss %xmm1,%xmm3
lea    0xea7(%rip),%rdi
jbe    11e3 <main+0xb3>
movaps %xmm2,%xmm3
addss  %xmm1,%xmm3
ucomiss %xmm0,%xmm3
jbe    11e3 <main+0xb3>
movaps %xmm0,%xmm3
addss  %xmm1,%xmm3
ucomiss %xmm2,%xmm3
jbe    11e3 <main+0xb3>
ucomiss %xmm1,%xmm0
lea    0xe9e(%rip),%rax
lea    0xea1(%rip),%rdi
cmovne %rax,%rdi
cmovp  %rax,%rdi
ucomiss %xmm0,%xmm2
cmovne %rax,%rdi
cmovp  %rax,%rdi
jne    11c0 <main+0x90>
jnp    11e3 <main+0xb3>
ucomiss %xmm1,%xmm2
lea    0xe6d(%rip),%rcx
mov    %rax,%rdx
cmovne %rcx,%rdx
cmovp  %rcx,%rdx
ucomiss %xmm1,%xmm0
cmovne %rdx,%rax
cmovp  %rdx,%rax
mov    %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Entre com as 3 dimens\C3\B5es: \00"
@.str.1 = [9 x i8] c"%f %f %f\00"
@.str.2 = [12 x i8] c"Equilatero\0A\00"
@.str.3 = [11 x i8] c"Is\C3\B3celes\0A\00"
@.str.4 = [10 x i8] c"Escaleno\0A\00"
@.str.5 = [19 x i8] c"N\C3\A3o \C3\A9 triangulo\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), float* %2, float* %3, float* %4)
%7 = load float, float* %2
%8 = load float, float* %3
%9 = fadd float %7, %8
%10 = load float, float* %4
%11 = fcmp ogt float %9, %10
br i1 %11, label %12, label %52
12: ; preds = %0
%13 = load float, float* %2
%14 = load float, float* %4
%15 = fadd float %13, %14
%16 = load float, float* %3
%17 = fcmp ogt float %15, %16
br i1 %17, label %18, label %52
18: ; preds = %12
%19 = load float, float* %4
%20 = load float, float* %3
%21 = fadd float %19, %20
%22 = load float, float* %2
%23 = fcmp ogt float %21, %22
br i1 %23, label %24, label %52
24: ; preds = %18
%25 = load float, float* %2
%26 = load float, float* %3
%27 = fcmp oeq float %25, %26
br i1 %27, label %28, label %34
28: ; preds = %24
%29 = load float, float* %3
%30 = load float, float* %4
%31 = fcmp oeq float %29, %30
br i1 %31, label %32, label %34
32: ; preds = %28
%33 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
br label %51
34: ; preds = %28, %24
%35 = load float, float* %2
%36 = load float, float* %3
%37 = fcmp oeq float %35, %36
br i1 %37, label %46, label %38
38: ; preds = %34
%39 = load float, float* %3
%40 = load float, float* %4
%41 = fcmp oeq float %39, %40
br i1 %41, label %46, label %42
42: ; preds = %38
%43 = load float, float* %2
%44 = load float, float* %4
%45 = fcmp oeq float %43, %44
br i1 %45, label %46, label %48
46: ; preds = %42, %38, %34
%47 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
br label %50
48: ; preds = %42
%49 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
br label %50
50: ; preds = %48, %46
br label %51
51: ; preds = %50, %32
br label %54
52: ; preds = %18, %12, %0
%53 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
br label %54
54: ; preds = %52, %51
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"Entre com as 3 dimens\C3\B5es: \00"
@.str.1 = [9 x i8] c"%f %f %f\00"
@str = [18 x i8] c"N\C3\A3o \C3\A9 triangulo\00"
@str.6 = [9 x i8] c"Escaleno\00"
@str.7 = [10 x i8] c"Is\C3\B3celes\00"
@str.8 = [11 x i8] c"Equilatero\00"
define i32 @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 ([28 x i8], [28 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 = fadd float %9, %10
%12 = load float, float* %3
%13 = fcmp ogt float %11, %12
%14 = fadd float %9, %12
%15 = fcmp ogt float %14, %10
%16 = and i1 %13, %15
%17 = fadd float %10, %12
%18 = fcmp ogt float %17, %9
%19 = select i1 %16, i1 %18, i1 false
br i1 %19, label %20, label %29
20: ; preds = %0
%21 = fcmp oeq float %9, %10
%22 = fcmp oeq float %10, %12
%23 = select i1 %21, i1 %22, i1 false
%24 = select i1 %23, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.8, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.7, i64 0, i64 0)
br i1 %21, label %29, label %25
25: ; preds = %20
%26 = fcmp oeq float %9, %12
%27 = select i1 %22, i1 true, i1 %26
%28 = select i1 %27, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.7, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.6, i64 0, i64 0)
br label %29
29: ; preds = %25, %20, %0
%30 = phi i8* [ %24, %20 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0), %0 ], [ %28, %25 ]
%31 = call i32 @puts(i8* dereferenceable(1) %30)
ret i32 0
}