#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(void) {
  int lA, lB, lC;
  printf("Insira o valor de lA: \n");
  scanf("%i", &lA);
  printf("Insira o valor de lB: \n");
  scanf("%i", &lB);
  printf("Insira o valor de lC: \n");
  scanf("%i", &lC);
  if (lA == lB && lA == lC) {
    printf("Triangulo equilátero!!!\n");
  } else if (lA == lB || lA == lC || lB == lC) {
    printf("Triangulo isosceles\n");
  } else {
    printf("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    0xed6(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
lea    0xe9e(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11ac <main+0x8c>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11ac <main+0x8c>
lea    0xea9(%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    0xe8e(%rip),%rdi
call   1030 <printf@plt>
jmp    11ed <main+0xcd>
lea    0xe92(%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    0xece(%rip),%rdi
call   1030 <puts@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%ecx
mov    0x4(%rsp),%edx
lea    0xed1(%rip),%rsi
cmp    %edx,%ecx
lea    0xeb5(%rip),%rbx
cmove  %rsi,%rbx
cmp    %edx,%eax
lea    0xecf(%rip),%rdi
cmovne %rsi,%rdi
cmove  %rsi,%rbx
cmp    %ecx,%eax
cmovne %rsi,%rdi
cmovne %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Insira o valor de lA: \0A\00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [24 x i8] c"Insira o valor de lB: \0A\00"
@.str.3 = [24 x i8] c"Insira o valor de lC: \0A\00"
@.str.4 = [26 x i8] c"Triangulo equil\C3\A1tero!!!\0A\00"
@.str.5 = [21 x i8] c"Triangulo isosceles\0A\00"
@.str.6 = [20 x i8] c"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 ([24 x i8], [24 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 ([24 x i8], [24 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 ([24 x i8], [24 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* %2
%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 ([26 x i8], [26 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 ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
br label %36
34: ; preds = %28
%35 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 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"%i\00"
@str = [23 x i8] c"Insira o valor de lA: \00"
@str.7 = [23 x i8] c"Insira o valor de lB: \00"
@str.8 = [23 x i8] c"Insira o valor de lC: \00"
@str.9 = [19 x i8] c"Triangulo escaleno\00"
@str.10 = [20 x i8] c"Triangulo isosceles\00"
@str.11 = [25 x i8] c"Triangulo equil\C3\A1tero!!!\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 ([23 x i8], [23 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 ([23 x i8], [23 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 ([23 x i8], [23 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 %13, %16
%18 = select i1 %15, i1 %17, i1 false
%19 = select i1 %18, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @str.11, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str.10, i64 0, i64 0)
%20 = icmp eq i32 %14, %16
%21 = select i1 %17, i1 true, i1 %20
%22 = select i1 %21, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str.10, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 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
}