#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 *);
void main() {
  int a, b, c;
  printf("Digite o valor de A: ");
  scanf("%d", &a);
  printf("Digite o valor de B: ");
  scanf(" %d", &b);
  printf("Digite o valor de C: ");
  scanf(" %d", &c);
  if (a < b + c && b < a + c && c < a + b) {
    printf("\nABC eh um triangulo ");
    if (a == b && a == c)
      printf("equilatero.\n");
    else if (a == b || a == c || b == c)
      printf("isosceles.\n");
    else
      printf("escaleno.\n");
  } else
    printf("\nABC nao eh um triangulo.\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb9(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    122f <main+0x10f>
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    122f <main+0x10f>
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    -0x8(%rbp),%ecx
cmp    %ecx,%eax
jge    122f <main+0x10f>
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    11e4 <main+0xc4>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11e4 <main+0xc4>
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
jmp    122a <main+0x10a>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1208 <main+0xe8>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1208 <main+0xe8>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1219 <main+0xf9>
lea    0xe5a(%rip),%rdi
call   1030 <printf@plt>
jmp    1225 <main+0x105>
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
jmp    122a <main+0x10a>
jmp    123b <main+0x11b>
lea    0xe4a(%rip),%rdi
call   1030 <printf@plt>
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    0xee5(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
lea    0xec7(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%ecx
mov    0x8(%rsp),%eax
mov    0x4(%rsp),%edx
lea    (%rdx,%rax,1),%esi
lea    0xebb(%rip),%rdi
cmp    %esi,%ecx
jge    11f9 <main+0xc9>
lea    (%rdx,%rcx,1),%esi
cmp    %esi,%eax
jge    11f9 <main+0xc9>
add    %ecx,%eax
cmp    %eax,%edx
jge    11f9 <main+0xc9>
lea    0xe8d(%rip),%rdi
call   1040 <printf@plt>
mov    0xc(%rsp),%eax
mov    0x4(%rsp),%ecx
cmp    %ecx,%eax
lea    0xebc(%rip),%rdi
lea    0xeaa(%rip),%rdx
cmovne %rdx,%rdi
mov    0x8(%rsp),%esi
cmp    %esi,%eax
cmovne %rdx,%rdi
je     11f9 <main+0xc9>
cmp    %ecx,%esi
lea    0xe87(%rip),%rdi
cmove  %rdx,%rdi
cmp    %ecx,%eax
cmove  %rdx,%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Digite o valor de A: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"Digite o valor de B: \00"
@.str.3 = [4 x i8] c" %d\00"
@.str.4 = [22 x i8] c"Digite o valor de C: \00"
@.str.5 = [22 x i8] c"\0AABC eh um triangulo \00"
@.str.6 = [13 x i8] c"equilatero.\0A\00"
@.str.7 = [12 x i8] c"isosceles.\0A\00"
@.str.8 = [11 x i8] c"escaleno.\0A\00"
@.str.9 = [27 x i8] c"\0AABC nao eh um triangulo.\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = add nsw i32 %11, %12
%14 = icmp slt i32 %10, %13
br i1 %14, label %15, label %56
15: ; preds = %0
%16 = load i32, i32* %2
%17 = load i32, i32* %1
%18 = load i32, i32* %3
%19 = add nsw i32 %17, %18
%20 = icmp slt i32 %16, %19
br i1 %20, label %21, label %56
21: ; preds = %15
%22 = load i32, i32* %3
%23 = load i32, i32* %1
%24 = load i32, i32* %2
%25 = add nsw i32 %23, %24
%26 = icmp slt i32 %22, %25
br i1 %26, label %27, label %56
27: ; preds = %21
%28 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
%29 = load i32, i32* %1
%30 = load i32, i32* %2
%31 = icmp eq i32 %29, %30
br i1 %31, label %32, label %38
32: ; preds = %27
%33 = load i32, i32* %1
%34 = load i32, i32* %3
%35 = icmp eq i32 %33, %34
br i1 %35, label %36, label %38
36: ; preds = %32
%37 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0))
br label %55
38: ; preds = %32, %27
%39 = load i32, i32* %1
%40 = load i32, i32* %2
%41 = icmp eq i32 %39, %40
br i1 %41, label %50, label %42
42: ; preds = %38
%43 = load i32, i32* %1
%44 = load i32, i32* %3
%45 = icmp eq i32 %43, %44
br i1 %45, label %50, label %46
46: ; preds = %42
%47 = load i32, i32* %2
%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 ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
br label %54
52: ; preds = %46
%53 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
br label %54
54: ; preds = %52, %50
br label %55
55: ; preds = %54, %36
br label %58
56: ; preds = %21, %15, %0
%57 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0))
br label %58
58: ; preds = %56, %55
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Digite o valor de A: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"Digite o valor de B: \00"
@.str.3 = [4 x i8] c" %d\00"
@.str.4 = [22 x i8] c"Digite o valor de C: \00"
@.str.5 = [22 x i8] c"\0AABC eh um triangulo \00"
@str = [26 x i8] c"\0AABC nao eh um triangulo.\00"
@str.10 = [10 x i8] c"escaleno.\00"
@str.11 = [11 x i8] c"isosceles.\00"
@str.12 = [12 x i8] c"equilatero.\00"
define void @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 ([22 x i8], [22 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 ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%11 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, 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 %37
24: ; preds = %0
%25 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
%26 = load i32, i32* %1
%27 = load i32, i32* %2
%28 = icmp eq i32 %26, %27
%29 = load i32, i32* %3
%30 = icmp eq i32 %26, %29
%31 = select i1 %28, i1 %30, i1 false
%32 = select i1 %31, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str.12, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.11, i64 0, i64 0)
br i1 %28, label %37, label %33
33: ; preds = %24
%34 = icmp eq i32 %27, %29
%35 = select i1 %30, i1 true, i1 %34
%36 = select i1 %35, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.11, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.10, i64 0, i64 0)
br label %37
37: ; preds = %33, %24, %0
%38 = phi i8* [ %32, %24 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0), %0 ], [ %36, %33 ]
%39 = call i32 @puts(i8* dereferenceable(1) %38)
ret void
}