#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 tipo_triangulo(int x, int y, int z) {
  if (x == y && y == z) {
    printf("Triangulo Equilatero!\n");
  } else if (x != y && x != z) {
    printf("Triangulo Escaleno\n");
  } else {
    printf("Triangulo Isoceles\n");
  }
}


x86 assembly (clang, -O0):
<tipo_triangulo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    114a <tipo_triangulo+0x3a>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    114a <tipo_triangulo+0x3a>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
jmp    1184 <tipo_triangulo+0x74>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1173 <tipo_triangulo+0x63>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1173 <tipo_triangulo+0x63>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
jmp    117f <tipo_triangulo+0x6f>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
jmp    1184 <tipo_triangulo+0x74>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tipo_triangulo>:
cmp    %edx,%edi
lea    0xee7(%rip),%rax
lea    0xef3(%rip),%rcx
cmove  %rax,%rcx
cmp    %esi,%edi
cmove  %rax,%rcx
cmp    %edx,%esi
lea    0xef3(%rip),%rax
cmovne %rcx,%rax
cmp    %esi,%edi
cmovne %rcx,%rax
mov    %rax,%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Triangulo Equilatero!\0A\00"
@.str.1 = [20 x i8] c"Triangulo Escaleno\0A\00"
@.str.2 = [20 x i8] c"Triangulo Isoceles\0A\00"
define void @tipo_triangulo(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %16
10: ; preds = %3
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %29
16: ; preds = %10, %3
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = icmp ne i32 %17, %18
br i1 %19, label %20, label %26
20: ; preds = %16
%21 = load i32, i32* %4
%22 = load i32, i32* %6
%23 = icmp ne i32 %21, %22
br i1 %23, label %24, label %26
24: ; preds = %20
%25 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
br label %28
26: ; preds = %20, %16
%27 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %28
28: ; preds = %26, %24
br label %29
29: ; preds = %28, %14
ret void
}

LLVM IR (-O2):
@str = [19 x i8] c"Triangulo Isoceles\00"
@str.3 = [19 x i8] c"Triangulo Escaleno\00"
@str.4 = [22 x i8] c"Triangulo Equilatero!\00"
define void @tipo_triangulo(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, %1
%5 = icmp eq i32 %1, %2
%6 = and i1 %4, %5
%7 = icmp eq i32 %0, %2
%8 = or i1 %4, %7
%9 = select i1 %8, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @str.3, i64 0, i64 0)
%10 = select i1 %6, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @str.4, i64 0, i64 0), i8* %9
%11 = tail call i32 @puts(i8* dereferenceable(1) %10)
ret void
}