#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 *, int *);
int main(void) {
  int la, lb, lc;
  printf("Informe os lados: ");
  scanf("%d %d %d", &la, &lb, &lc);
  if ((la == lb) && (la == lc) && (lb == lc)) {
    printf("Triângulo equilátero\n");
  } else if ((la == lb && la != lc) || (la == lc && la != lb) ||
             (lb == lc && la != lc)) {
    printf("Triângulo isóceles\n");
  } else if (la != lb && la != lc && lb != lc) {
    printf("Triângulo 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    0xed1(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1188 <main+0x68>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1188 <main+0x68>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1188 <main+0x68>
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
jmp    121b <main+0xfb>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11a0 <main+0x80>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11d0 <main+0xb0>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11b8 <main+0x98>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11d0 <main+0xb0>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11e1 <main+0xc1>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     11e1 <main+0xc1>
lea    0xe5d(%rip),%rdi
call   1030 <printf@plt>
jmp    1216 <main+0xf6>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1211 <main+0xf1>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     1211 <main+0xf1>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     1211 <main+0xf1>
lea    0xe3e(%rip),%rdi
call   1030 <printf@plt>
jmp    1216 <main+0xf6>
jmp    121b <main+0xfb>
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    0xecc(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
mov    0x14(%rsp),%edx
mov    0x10(%rsp),%eax
mov    0xc(%rsp),%ecx
cmp    %eax,%edx
jne    1178 <main+0x48>
cmp    %ecx,%edx
jne    1178 <main+0x48>
lea    0xecf(%rip),%rdi
jmp    11aa <main+0x7a>
lea    0xeb1(%rip),%rdi
cmp    %eax,%edx
jne    1187 <main+0x57>
cmp    %ecx,%edx
jne    11aa <main+0x7a>
cmp    %ecx,%edx
jne    118f <main+0x5f>
cmp    %eax,%edx
jne    11aa <main+0x7a>
cmp    %ecx,%eax
jne    1197 <main+0x67>
cmp    %ecx,%edx
jne    11aa <main+0x7a>
cmp    %eax,%edx
je     11af <main+0x7f>
cmp    %ecx,%edx
je     11af <main+0x7f>
cmp    %ecx,%eax
je     11af <main+0x7f>
lea    0xe72(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Informe os lados: \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [24 x i8] c"Tri\C3\A2ngulo equil\C3\A1tero\0A\00"
@.str.3 = [22 x i8] c"Tri\C3\A2ngulo is\C3\B3celes\0A\00"
@.str.4 = [21 x i8] c"Tri\C3\A2ngulo 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 ([19 x i8], [19 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), i32* %2, i32* %3, i32* %4)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %0
%11 = load i32, i32* %2
%12 = load i32, i32* %4
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %20
14: ; preds = %10
%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.2, i64 0, i64 0))
br label %62
20: ; preds = %14, %10, %0
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = icmp eq i32 %21, %22
br i1 %23, label %24, label %28
24: ; preds = %20
%25 = load i32, i32* %2
%26 = load i32, i32* %4
%27 = icmp ne i32 %25, %26
br i1 %27, label %44, label %28
28: ; preds = %24, %20
%29 = load i32, i32* %2
%30 = load i32, i32* %4
%31 = icmp eq i32 %29, %30
br i1 %31, label %32, label %36
32: ; preds = %28
%33 = load i32, i32* %2
%34 = load i32, i32* %3
%35 = icmp ne i32 %33, %34
br i1 %35, label %44, label %36
36: ; preds = %32, %28
%37 = load i32, i32* %3
%38 = load i32, i32* %4
%39 = icmp eq i32 %37, %38
br i1 %39, label %40, label %46
40: ; preds = %36
%41 = load i32, i32* %2
%42 = load i32, i32* %4
%43 = icmp ne i32 %41, %42
br i1 %43, label %44, label %46
44: ; preds = %40, %32, %24
%45 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %61
46: ; preds = %40, %36
%47 = load i32, i32* %2
%48 = load i32, i32* %3
%49 = icmp ne i32 %47, %48
br i1 %49, label %50, label %60
50: ; preds = %46
%51 = load i32, i32* %2
%52 = load i32, i32* %4
%53 = icmp ne i32 %51, %52
br i1 %53, label %54, label %60
54: ; preds = %50
%55 = load i32, i32* %3
%56 = load i32, i32* %4
%57 = icmp ne i32 %55, %56
br i1 %57, label %58, label %60
58: ; preds = %54
%59 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %60
60: ; preds = %58, %54, %50, %46
br label %61
61: ; preds = %60, %44
br label %62
62: ; preds = %61, %18
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Informe os lados: \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@str = [20 x i8] c"Tri\C3\A2ngulo escaleno\00"
@str.5 = [21 x i8] c"Tri\C3\A2ngulo is\C3\B3celes\00"
@str.6 = [23 x i8] c"Tri\C3\A2ngulo 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 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 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), i32* %1, i32* %2, i32* %3)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = icmp eq i32 %9, %10
%12 = load i32, i32* %3
%13 = icmp eq i32 %9, %12
%14 = select i1 %11, i1 %13, i1 false
br i1 %14, label %29, label %15
15: ; preds = %0
%16 = icmp ne i32 %9, %10
%17 = icmp eq i32 %9, %12
%18 = select i1 %16, i1 true, i1 %17
br i1 %18, label %19, label %29
19: ; preds = %15
%20 = icmp ne i32 %9, %12
%21 = select i1 %20, i1 true, i1 %11
br i1 %21, label %22, label %29
22: ; preds = %19
%23 = icmp ne i32 %10, %12
%24 = select i1 %23, i1 true, i1 %17
br i1 %24, label %25, label %29
25: ; preds = %22
br i1 %11, label %32, label %26
26: ; preds = %25
%27 = icmp eq i32 %10, %12
%28 = select i1 %17, i1 true, i1 %27
br i1 %28, label %32, label %29
29: ; preds = %26, %15, %19, %22, %0
%30 = phi i8* [ getelementptr inbounds ([23 x i8], [23 x i8]* @str.6, i64 0, i64 0), %0 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @str.5, i64 0, i64 0), %22 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @str.5, i64 0, i64 0), %19 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @str.5, i64 0, i64 0), %15 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0), %26 ]
%31 = call i32 @puts(i8* dereferenceable(1) %30)
br label %32
32: ; preds = %29, %26, %25
ret i32 0
}