#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 ladoA;
  int ladoB;
  int ladoC;
  printf("LADO A: ");
  scanf("%d", &ladoA);
  printf("LADO B: ");
  scanf("%d", &ladoB);
  printf("LADO C: ");
  scanf("%d", &ladoC);
  if (ladoA + ladoB > ladoC && ladoA + ladoC > ladoB && ladoB + ladoC > ladoA) {
    if (ladoA == ladoB && ladoA == ladoC && ladoB == ladoC) {
      printf("SEU TRIANGULO E EQUILATERO.\n");
    } else if (ladoA == ladoB || ladoA == ladoC || ladoB == ladoC) {
      printf("SEU TRIANGULO E ISOCELES.\n");
    } else if (ladoA != ladoB && ladoA != ladoC && ladoB != ladoC) {
      printf("SEU TRIANGULO E ESCALENO.\n");
    }
  } else {
    printf("SEUS VALORES NAO FORMAM UM TRIANGULO.\n");
  }
}


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    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xeab(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
lea    0xe8f(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1259 <main+0x139>
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1259 <main+0x139>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1259 <main+0x139>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11e5 <main+0xc5>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11e5 <main+0xc5>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11e5 <main+0xc5>
lea    0xe43(%rip),%rdi
call   1030 <printf@plt>
jmp    1254 <main+0x134>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1209 <main+0xe9>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     1209 <main+0xe9>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    121a <main+0xfa>
lea    0xe2b(%rip),%rdi
call   1030 <printf@plt>
jmp    124f <main+0x12f>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     124a <main+0x12a>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     124a <main+0x12a>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     124a <main+0x12a>
lea    0xe11(%rip),%rdi
call   1030 <printf@plt>
jmp    124f <main+0x12f>
jmp    1254 <main+0x134>
jmp    1265 <main+0x145>
lea    0xe11(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
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    0xec1(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xeb0(%rip),%rdi
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%ecx
lea    (%rcx,%rax,1),%esi
mov    0x4(%rsp),%edx
lea    0xe81(%rip),%rdi
cmp    %edx,%esi
jle    11ea <main+0xba>
lea    (%rdx,%rax,1),%esi
cmp    %ecx,%esi
jle    11ea <main+0xba>
lea    (%rdx,%rcx,1),%esi
cmp    %eax,%esi
jle    11ea <main+0xba>
mov    %eax,%esi
xor    %ecx,%esi
mov    %eax,%edi
xor    %edx,%edi
or     %esi,%edi
mov    %ecx,%esi
xor    %edx,%esi
or     %edi,%esi
lea    0xeb2(%rip),%rdi
lea    0xe91(%rip),%rsi
cmovne %rsi,%rdi
je     11ea <main+0xba>
cmp    %ecx,%eax
je     11ea <main+0xba>
cmp    %edx,%ecx
lea    0xe64(%rip),%rdi
cmove  %rsi,%rdi
cmp    %edx,%eax
cmove  %rsi,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"LADO A: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [9 x i8] c"LADO B: \00"
@.str.3 = [9 x i8] c"LADO C: \00"
@.str.4 = [29 x i8] c"SEU TRIANGULO E EQUILATERO.\0A\00"
@.str.5 = [27 x i8] c"SEU TRIANGULO E ISOCELES.\0A\00"
@.str.6 = [27 x i8] c"SEU TRIANGULO E ESCALENO.\0A\00"
@.str.7 = [39 x i8] c"SEUS VALORES NAO FORMAM UM TRIANGULO.\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 ([9 x i8], [9 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 ([9 x i8], [9 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 ([9 x i8], [9 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 = add nsw i32 %11, %12
%14 = load i32, i32* %4
%15 = icmp sgt i32 %13, %14
br i1 %15, label %16, label %73
16: ; preds = %0
%17 = load i32, i32* %2
%18 = load i32, i32* %4
%19 = add nsw i32 %17, %18
%20 = load i32, i32* %3
%21 = icmp sgt i32 %19, %20
br i1 %21, label %22, label %73
22: ; preds = %16
%23 = load i32, i32* %3
%24 = load i32, i32* %4
%25 = add nsw i32 %23, %24
%26 = load i32, i32* %2
%27 = icmp sgt i32 %25, %26
br i1 %27, label %28, label %73
28: ; preds = %22
%29 = load i32, i32* %2
%30 = load i32, i32* %3
%31 = icmp eq i32 %29, %30
br i1 %31, label %32, label %42
32: ; preds = %28
%33 = load i32, i32* %2
%34 = load i32, i32* %4
%35 = icmp eq i32 %33, %34
br i1 %35, label %36, label %42
36: ; preds = %32
%37 = load i32, i32* %3
%38 = load i32, i32* %4
%39 = icmp eq i32 %37, %38
br i1 %39, label %40, label %42
40: ; preds = %36
%41 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
br label %72
42: ; preds = %36, %32, %28
%43 = load i32, i32* %2
%44 = load i32, i32* %3
%45 = icmp eq i32 %43, %44
br i1 %45, label %54, label %46
46: ; preds = %42
%47 = load i32, i32* %2
%48 = load i32, i32* %4
%49 = icmp eq i32 %47, %48
br i1 %49, label %54, label %50
50: ; preds = %46
%51 = load i32, i32* %3
%52 = load i32, i32* %4
%53 = icmp eq i32 %51, %52
br i1 %53, label %54, label %56
54: ; preds = %50, %46, %42
%55 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
br label %71
56: ; preds = %50
%57 = load i32, i32* %2
%58 = load i32, i32* %3
%59 = icmp ne i32 %57, %58
br i1 %59, label %60, label %70
60: ; preds = %56
%61 = load i32, i32* %2
%62 = load i32, i32* %4
%63 = icmp ne i32 %61, %62
br i1 %63, label %64, label %70
64: ; preds = %60
%65 = load i32, i32* %3
%66 = load i32, i32* %4
%67 = icmp ne i32 %65, %66
br i1 %67, label %68, label %70
68: ; preds = %64
%69 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0))
br label %70
70: ; preds = %68, %64, %60, %56
br label %71
71: ; preds = %70, %54
br label %72
72: ; preds = %71, %40
br label %75
73: ; preds = %22, %16, %0
%74 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0))
br label %75
75: ; preds = %73, %72
%76 = load i32, i32* %1
ret i32 %76
}

LLVM IR (-O2):
@.str = [9 x i8] c"LADO A: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [9 x i8] c"LADO B: \00"
@.str.3 = [9 x i8] c"LADO C: \00"
@str = [38 x i8] c"SEUS VALORES NAO FORMAM UM TRIANGULO.\00"
@str.8 = [26 x i8] c"SEU TRIANGULO E ESCALENO.\00"
@str.9 = [26 x i8] c"SEU TRIANGULO E ISOCELES.\00"
@str.10 = [28 x i8] c"SEU TRIANGULO E 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 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 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 ([9 x i8], [9 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 ([9 x i8], [9 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 = add nsw i32 %14, %13
%16 = load i32, i32* %3
%17 = icmp sgt i32 %15, %16
%18 = add nsw i32 %16, %13
%19 = icmp sgt i32 %18, %14
%20 = select i1 %17, i1 %19, i1 false
%21 = add nsw i32 %16, %14
%22 = icmp sgt i32 %21, %13
%23 = select i1 %20, i1 %22, i1 false
br i1 %23, label %24, label %35
24: ; preds = %0
%25 = icmp eq i32 %13, %14
%26 = icmp eq i32 %13, %16
%27 = select i1 %25, i1 %26, i1 false
%28 = icmp eq i32 %14, %16
%29 = select i1 %27, i1 %28, i1 false
%30 = or i1 %29, %25
%31 = select i1 %29, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str.10, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.9, i64 0, i64 0)
br i1 %30, label %35, label %32
32: ; preds = %24
%33 = select i1 %26, i1 true, i1 %28
%34 = select i1 %33, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.9, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.8, i64 0, i64 0)
br label %35
35: ; preds = %32, %24, %0
%36 = phi i8* [ %31, %24 ], [ getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0), %0 ], [ %34, %32 ]
%37 = call i32 @puts(i8* dereferenceable(1) %36)
ret i32 0
}