#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 *, int *);
int main() {
  int lado1, lado2, lado3;
  printf("\n Entre com lado1 : \n");
  scanf("%d", &lado1);
  printf("\n Entre com lado2 : \n");
  scanf("%d", &lado2);
  printf("\n Entre com lado3 : \n");
  scanf("%d", &lado3);
  if (lado1 == lado2 && lado2 == lado3) {
    printf("\n Triangulo Equilatero\n");
  } else if (lado1 == lado2 || lado1 == lado3 || lado2 == lado3) {
    printf("\n Triangulo Isosceles\n");
  } else {
    printf("\n Triangulo Escaleno\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    0xed4(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
lea    0xe9c(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11ac <main+0x8c>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11ac <main+0x8c>
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
jmp    11f2 <main+0xd2>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     11d0 <main+0xb0>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     11d0 <main+0xb0>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11e1 <main+0xc1>
lea    0xe86(%rip),%rdi
call   1030 <printf@plt>
jmp    11ed <main+0xcd>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
jmp    11f2 <main+0xd2>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed7(%rip),%rdi
call   1030 <puts@plt>
lea    0xec8(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x8(%rsp),%eax
mov    0x4(%rsp),%ecx
cmp    %ecx,%eax
lea    0xee5(%rip),%rdi
lea    0xec8(%rip),%rdx
cmovne %rdx,%rdi
mov    0xc(%rsp),%esi
lea    0xea4(%rip),%rbx
cmove  %rdx,%rbx
cmp    %ecx,%esi
cmove  %rdx,%rbx
cmp    %eax,%esi
cmovne %rdx,%rdi
cmovne %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"\0A Entre com lado1 : \0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"\0A Entre com lado2 : \0A\00"
@.str.3 = [22 x i8] c"\0A Entre com lado3 : \0A\00"
@.str.4 = [24 x i8] c"\0A Triangulo Equilatero\0A\00"
@.str.5 = [23 x i8] c"\0A Triangulo Isosceles\0A\00"
@.str.6 = [22 x i8] c"\0A Triangulo Escaleno\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%9 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %20
14: ; preds = %0
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = icmp eq i32 %15, %16
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
br label %37
20: ; preds = %14, %0
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = icmp eq i32 %21, %22
br i1 %23, label %32, label %24
24: ; preds = %20
%25 = load i32, i32* %2
%26 = load i32, i32* %4
%27 = icmp eq i32 %25, %26
br i1 %27, label %32, label %28
28: ; preds = %24
%29 = load i32, i32* %3
%30 = load i32, i32* %4
%31 = icmp eq i32 %29, %30
br i1 %31, label %32, label %34
32: ; preds = %28, %24, %20
%33 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
br label %36
34: ; preds = %28
%35 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
br label %36
36: ; preds = %34, %32
br label %37
37: ; preds = %36, %18
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [21 x i8] c"\0A Entre com lado1 : \00"
@str.7 = [21 x i8] c"\0A Entre com lado2 : \00"
@str.8 = [21 x i8] c"\0A Entre com lado3 : \00"
@str.9 = [21 x i8] c"\0A Triangulo Escaleno\00"
@str.10 = [22 x i8] c"\0A Triangulo Isosceles\00"
@str.11 = [23 x i8] c"\0A Triangulo Equilatero\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.7, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.8, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%13 = load i32, i32* %1
%14 = load i32, i32* %2
%15 = icmp eq i32 %13, %14
%16 = load i32, i32* %3
%17 = icmp eq i32 %14, %16
%18 = select i1 %15, i1 %17, i1 false
%19 = select i1 %18, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str.11, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @str.10, i64 0, i64 0)
%20 = icmp eq i32 %13, %16
%21 = select i1 %20, i1 true, i1 %17
%22 = select i1 %21, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @str.10, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @str.9, i64 0, i64 0)
%23 = select i1 %15, i8* %19, i8* %22
%24 = call i32 @puts(i8* dereferenceable(1) %23)
ret i32 0
}