#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 verTriangulo(void) {
  int l1, l2, l3;
  printf("Insira o primeiro lado do triangulo: \n");
  scanf("%i", &l1);
  printf("Insira o segundo lado do triangulo:  \n");
  scanf("%i", &l2);
  printf("Insira o terceiro lado do triangulo: \n");
  scanf("%i", &l3);
  if (l1 == l2 && l1 == l3)
    printf("Triangulo equilátero\n");
  else if (l1 == l2 || l1 == l3 || l2 == l3)
    printf("Triangulo isósceles\n");
  else if (l1 != l2 && l1 != l3 && l2 != l3)
    printf("Triangulo escaleno\n");
}


x86 assembly (clang, -O0):
<verTriangulo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeea(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb4(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11a5 <verTriangulo+0x85>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11a5 <verTriangulo+0x85>
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
jmp    1214 <verTriangulo+0xf4>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     11c9 <verTriangulo+0xa9>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     11c9 <verTriangulo+0xa9>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11da <verTriangulo+0xba>
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
jmp    120f <verTriangulo+0xef>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     120a <verTriangulo+0xea>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     120a <verTriangulo+0xea>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     120a <verTriangulo+0xea>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
jmp    120f <verTriangulo+0xef>
jmp    1214 <verTriangulo+0xf4>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verTriangulo>:
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    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xeea(%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    0xefe(%rip),%rsi
cmp    %edx,%ecx
lea    0xee2(%rip),%rbx
cmove  %rsi,%rbx
cmp    %edx,%eax
lea    0xefd(%rip),%rdi
cmovne %rsi,%rdi
cmove  %rsi,%rbx
cmp    %ecx,%eax
cmovne %rsi,%rdi
cmovne %rbx,%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Insira o primeiro lado do triangulo: \0A\00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [39 x i8] c"Insira o segundo lado do triangulo: \0A\00"
@.str.3 = [39 x i8] c"Insira o terceiro lado do triangulo: \0A\00"
@.str.4 = [23 x i8] c"Triangulo equil\C3\A1tero\0A\00"
@.str.5 = [22 x i8] c"Triangulo is\C3\B3sceles\0A\00"
@.str.6 = [20 x i8] c"Triangulo escaleno\0A\00"
define i32 @verTriangulo() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 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 ([39 x i8], [39 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 ([39 x i8], [39 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 ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
br label %50
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 ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
br label %49
34: ; preds = %28
%35 = load i32, i32* %2
%36 = load i32, i32* %3
%37 = icmp ne i32 %35, %36
br i1 %37, label %38, label %48
38: ; preds = %34
%39 = load i32, i32* %2
%40 = load i32, i32* %4
%41 = icmp ne i32 %39, %40
br i1 %41, label %42, label %48
42: ; preds = %38
%43 = load i32, i32* %3
%44 = load i32, i32* %4
%45 = icmp ne i32 %43, %44
br i1 %45, label %46, label %48
46: ; preds = %42
%47 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
br label %48
48: ; preds = %46, %42, %38, %34
br label %49
49: ; preds = %48, %32
br label %50
50: ; preds = %49, %18
%51 = load i32, i32* %1
ret i32 %51
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%i\00"
@str = [38 x i8] c"Insira o primeiro lado do triangulo: \00"
@str.7 = [38 x i8] c"Insira o segundo lado do triangulo: \00"
@str.8 = [38 x i8] c"Insira o terceiro lado do triangulo: \00"
@str.9 = [19 x i8] c"Triangulo escaleno\00"
@str.10 = [21 x i8] c"Triangulo is\C3\B3sceles\00"
@str.11 = [22 x i8] c"Triangulo equil\C3\A1tero\00"
define i32 @verTriangulo() {
%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 ([38 x i8], [38 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 ([38 x i8], [38 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 ([38 x i8], [38 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 ([22 x i8], [22 x i8]* @str.11, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 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 ([21 x i8], [21 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 undef
}