#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 a, b, c;
  printf("Digite o 1o lado: ");
  scanf("%d", &a);
  printf("Digite o 2o lado: ");
  scanf("%d", &b);
  printf("Digite o 3o lado: ");
  scanf("%d", &c);
  if ((a < b + c) && (b < a + c) && (c < b + a)) {
    if ((a == b) && (b == c)) {
      printf("Os lados formam um Triângulo Equilátero!");
    } else if ((a == b) || (a == c) || (c == b)) {
      printf("Os lados formam um Triângulo Isósceles!");
    } else if ((a != b) && (b != c) && (c != a)) {
      printf("Os lados foram um Triangulo Escaleno!");
    }
  } else {
    printf("Lados nao formam um Triângulo!");
  }
  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
call   1040 <scanf@plt>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb5(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
lea    0xe99(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
cmp    %ecx,%eax
jge    1253 <main+0x133>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    -0x10(%rbp),%ecx
cmp    %ecx,%eax
jge    1253 <main+0x133>
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    -0x8(%rbp),%ecx
cmp    %ecx,%eax
jge    1253 <main+0x133>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11df <main+0xbf>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11df <main+0xbf>
lea    0xe67(%rip),%rdi
call   1030 <printf@plt>
jmp    124e <main+0x12e>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1203 <main+0xe3>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     1203 <main+0xe3>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1214 <main+0xf4>
lea    0xe5d(%rip),%rdi
call   1030 <printf@plt>
jmp    1249 <main+0x129>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1244 <main+0x124>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     1244 <main+0x124>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1244 <main+0x124>
lea    0xe52(%rip),%rdi
call   1030 <printf@plt>
jmp    1249 <main+0x129>
jmp    124e <main+0x12e>
jmp    125f <main+0x13f>
lea    0xe5d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
lea    0xedb(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%edx
mov    0x4(%rsp),%ecx
lea    (%rcx,%rdx,1),%esi
lea    0xf2a(%rip),%rdi
cmp    %esi,%eax
jge    11ce <main+0xae>
lea    (%rcx,%rax,1),%esi
cmp    %esi,%edx
jge    11ce <main+0xae>
lea    (%rdx,%rax,1),%esi
cmp    %esi,%ecx
jge    11ce <main+0xae>
cmp    %ecx,%edx
lea    0xe94(%rip),%rdi
lea    0xeb8(%rip),%rsi
cmovne %rsi,%rdi
cmp    %edx,%eax
cmovne %rsi,%rdi
je     11ce <main+0xae>
cmp    %ecx,%edx
lea    0xecd(%rip),%rdi
cmove  %rsi,%rdi
cmp    %ecx,%eax
cmove  %rsi,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Digite o 1o lado: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [19 x i8] c"Digite o 2o lado: \00"
@.str.3 = [19 x i8] c"Digite o 3o lado: \00"
@.str.4 = [43 x i8] c"Os lados formam um Tri\C3\A2ngulo Equil\C3\A1tero!\00"
@.str.5 = [42 x i8] c"Os lados formam um Tri\C3\A2ngulo Is\C3\B3sceles!\00"
@.str.6 = [38 x i8] c"Os lados foram um Triangulo Escaleno!\00"
@.str.7 = [32 x i8] c"Lados nao formam um Tri\C3\A2ngulo!\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 ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 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 ([19 x i8], [19 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 = load i32, i32* %4
%14 = add nsw i32 %12, %13
%15 = icmp slt i32 %11, %14
br i1 %15, label %16, label %69
16: ; preds = %0
%17 = load i32, i32* %3
%18 = load i32, i32* %2
%19 = load i32, i32* %4
%20 = add nsw i32 %18, %19
%21 = icmp slt i32 %17, %20
br i1 %21, label %22, label %69
22: ; preds = %16
%23 = load i32, i32* %4
%24 = load i32, i32* %3
%25 = load i32, i32* %2
%26 = add nsw i32 %24, %25
%27 = icmp slt i32 %23, %26
br i1 %27, label %28, label %69
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 %38
32: ; preds = %28
%33 = load i32, i32* %3
%34 = load i32, i32* %4
%35 = icmp eq i32 %33, %34
br i1 %35, label %36, label %38
36: ; preds = %32
%37 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0))
br label %68
38: ; preds = %32, %28
%39 = load i32, i32* %2
%40 = load i32, i32* %3
%41 = icmp eq i32 %39, %40
br i1 %41, label %50, label %42
42: ; preds = %38
%43 = load i32, i32* %2
%44 = load i32, i32* %4
%45 = icmp eq i32 %43, %44
br i1 %45, label %50, label %46
46: ; preds = %42
%47 = load i32, i32* %4
%48 = load i32, i32* %3
%49 = icmp eq i32 %47, %48
br i1 %49, label %50, label %52
50: ; preds = %46, %42, %38
%51 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0))
br label %67
52: ; preds = %46
%53 = load i32, i32* %2
%54 = load i32, i32* %3
%55 = icmp ne i32 %53, %54
br i1 %55, label %56, label %66
56: ; preds = %52
%57 = load i32, i32* %3
%58 = load i32, i32* %4
%59 = icmp ne i32 %57, %58
br i1 %59, label %60, label %66
60: ; preds = %56
%61 = load i32, i32* %4
%62 = load i32, i32* %2
%63 = icmp ne i32 %61, %62
br i1 %63, label %64, label %66
64: ; preds = %60
%65 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0))
br label %66
66: ; preds = %64, %60, %56, %52
br label %67
67: ; preds = %66, %50
br label %68
68: ; preds = %67, %36
br label %71
69: ; preds = %22, %16, %0
%70 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0))
br label %71
71: ; preds = %69, %68
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Digite o 1o lado: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [19 x i8] c"Digite o 2o lado: \00"
@.str.3 = [19 x i8] c"Digite o 3o lado: \00"
@.str.4 = [43 x i8] c"Os lados formam um Tri\C3\A2ngulo Equil\C3\A1tero!\00"
@.str.5 = [42 x i8] c"Os lados formam um Tri\C3\A2ngulo Is\C3\B3sceles!\00"
@.str.6 = [38 x i8] c"Os lados foram um Triangulo Escaleno!\00"
@.str.7 = [32 x i8] c"Lados nao formam um Tri\C3\A2ngulo!\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 ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%9 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 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 ([19 x i8], [19 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 = load i32, i32* %3
%16 = add nsw i32 %15, %14
%17 = icmp slt i32 %13, %16
%18 = add nsw i32 %15, %13
%19 = icmp slt i32 %14, %18
%20 = select i1 %17, i1 %19, i1 false
%21 = add nsw i32 %14, %13
%22 = icmp slt i32 %15, %21
%23 = select i1 %20, i1 %22, i1 false
br i1 %23, label %24, label %33
24: ; preds = %0
%25 = icmp eq i32 %13, %14
%26 = icmp eq i32 %14, %15
%27 = select i1 %25, i1 %26, i1 false
%28 = select i1 %27, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0)
br i1 %25, label %33, label %29
29: ; preds = %24
%30 = icmp eq i32 %13, %15
%31 = select i1 %30, i1 true, i1 %26
%32 = select i1 %31, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0)
br label %33
33: ; preds = %29, %24, %0
%34 = phi i8* [ %28, %24 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0), %0 ], [ %32, %29 ]
%35 = call i32 @printf(i8* dereferenceable(1) %34)
ret i32 0
}