#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 *);
void main() {
  int a, b, c;
  printf("Informe o primeiro lado: ");
  scanf("%d", &a);
  printf("Informe o segundo lado: ");
  scanf("%d", &b);
  printf("Informe o terceiro lado: ");
  scanf("%d", &c);
  if ((a == b) && (a == c) && (b == c)) {
    printf("Triangulo Equilatero!\n");
  } else if ((a != b) && (a != c) && (b != c)) {
    printf("Triangulo Escaleno!\n");
  } else {
    printf("Triangulo Isoceles!\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
lea    0xea7(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    11b1 <main+0x91>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11b1 <main+0x91>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11b1 <main+0x91>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
jmp    11f7 <main+0xd7>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     11e6 <main+0xc6>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     11e6 <main+0xc6>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     11e6 <main+0xc6>
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
jmp    11f2 <main+0xd2>
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
jmp    11f7 <main+0xd7>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
lea    0xed2(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edx
mov    0x8(%rsp),%eax
mov    0x4(%rsp),%ecx
cmp    %eax,%edx
jne    11a4 <main+0x74>
cmp    %ecx,%edx
jne    11b5 <main+0x85>
lea    0xed6(%rip),%rdi
jmp    11bc <main+0x8c>
cmp    %ecx,%edx
je     11b5 <main+0x85>
cmp    %ecx,%eax
je     11b5 <main+0x85>
lea    0xeb1(%rip),%rdi
jmp    11bc <main+0x8c>
lea    0xe94(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [26 x i8] c"Informe o primeiro lado: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [25 x i8] c"Informe o segundo lado: \00"
@.str.3 = [26 x i8] c"Informe o terceiro lado: \00"
@str = [20 x i8] c"Triangulo Isoceles!\00"
@str.7 = [20 x i8] c"Triangulo Escaleno!\00"
@str.8 = [22 x i8] c"Triangulo Equilatero!\00"
define void @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 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 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 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, 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 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, 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 %13, %16
br i1 %15, label %18, label %19
18: ; preds = %0
br i1 %17, label %23, label %22
19: ; preds = %0
%20 = icmp eq i32 %14, %16
%21 = select i1 %17, i1 true, i1 %20
br i1 %21, label %22, label %23
22: ; preds = %18, %19
br label %23
23: ; preds = %19, %18, %22
%24 = phi i8* [ getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0), %22 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @str.8, i64 0, i64 0), %18 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @str.7, i64 0, i64 0), %19 ]
%25 = call i32 @puts(i8* dereferenceable(1) %24)
ret void
}