#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 lado1, lado2, lado3;
  int continuar = 0;
  do {
    printf("\n Entre com lado 1 : ");
    scanf("%d", &lado1);
    printf("\n Entre com lado 2 : ");
    scanf("%d", &lado2);
    printf("\n Entre com lado 3 : ");
    scanf("%d", &lado3);
    if ((lado1 == lado2) && (lado2 == lado3)) {
      printf("\n Trriangulo equilatero\n");
    } else if ((lado1 == lado2) || (lado1 == lado3) || (lado2 == lado3)) {
      printf("\n Triangulo isosceles\n");
    } else {
      printf("\n Triangulo escaleno\n");
    }
    printf("\nDeseja continuar?(1-sim/0-Nao)");
    scanf("%d", &continuar);
  } while (continuar == 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb1(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xe95(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11b3 <main+0x93>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11b3 <main+0x93>
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
jmp    11f9 <main+0xd9>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     11d7 <main+0xb7>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     11d7 <main+0xb7>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11e8 <main+0xc8>
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
jmp    11f4 <main+0xd4>
lea    0xe86(%rip),%rdi
call   1030 <printf@plt>
jmp    11f9 <main+0xd9>
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
lea    0xe0a(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0x14(%rbp)
je     1136 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
movl   $0x0,0x8(%rsp)
lea    0xec9(%rip),%rbx
lea    0xf3c(%rip),%r13
lea    0xf1f(%rip),%rbp
lea    0xf03(%rip),%r14
lea    0xedc(%rip),%r15
lea    0x8(%rsp),%r12
xchg   %ax,%ax
lea    0xe89(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
lea    0x14(%rsp),%rsi
call   1050 <scanf@plt>
lea    0xe89(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
lea    0x10(%rsp),%rsi
call   1050 <scanf@plt>
lea    0xe86(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x14(%rsp),%eax
mov    0x10(%rsp),%ecx
mov    0xc(%rsp),%edx
cmp    %edx,%ecx
mov    %rbp,%rdi
cmove  %r13,%rdi
mov    %r14,%rsi
cmove  %rbp,%rsi
cmp    %edx,%eax
cmove  %rbp,%rsi
cmp    %ecx,%eax
cmovne %rbp,%rdi
cmovne %rsi,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1050 <scanf@plt>
cmpl   $0x1,0x8(%rsp)
je     1170 <main+0x40>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"\0A Entre com lado 1 : \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"\0A Entre com lado 2 : \00"
@.str.3 = [22 x i8] c"\0A Entre com lado 3 : \00"
@.str.4 = [25 x i8] c"\0A Trriangulo equilatero\0A\00"
@.str.5 = [23 x i8] c"\0A Triangulo isosceles\0A\00"
@.str.6 = [22 x i8] c"\0A Triangulo escaleno\0A\00"
@.str.7 = [32 x i8] c"\0ADeseja continuar?(1-sim/0-Nao)\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %5
br label %6
6: ; preds = %42, %0
%7 = call i32 @printf(i8* 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* %2)
%9 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 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* %3)
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 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* %4)
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = icmp eq i32 %13, %14
br i1 %15, label %16, label %22
16: ; preds = %6
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = icmp eq i32 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
br label %39
22: ; preds = %16, %6
%23 = load i32, i32* %2
%24 = load i32, i32* %3
%25 = icmp eq i32 %23, %24
br i1 %25, label %34, label %26
26: ; preds = %22
%27 = load i32, i32* %2
%28 = load i32, i32* %4
%29 = icmp eq i32 %27, %28
br i1 %29, label %34, label %30
30: ; preds = %26
%31 = load i32, i32* %3
%32 = load i32, i32* %4
%33 = icmp eq i32 %31, %32
br i1 %33, label %34, label %36
34: ; preds = %30, %26, %22
%35 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
br label %38
36: ; preds = %30
%37 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
br label %38
38: ; preds = %36, %34
br label %39
39: ; preds = %38, %20
%40 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0))
%41 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
br label %42
42: ; preds = %39
%43 = load i32, i32* %5
%44 = icmp eq i32 %43, 1
br i1 %44, label %6, label %45
45: ; preds = %42
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"\0A Entre com lado 1 : \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"\0A Entre com lado 2 : \00"
@.str.3 = [22 x i8] c"\0A Entre com lado 3 : \00"
@.str.7 = [32 x i8] c"\0ADeseja continuar?(1-sim/0-Nao)\00"
@str = [21 x i8] c"\0A Triangulo escaleno\00"
@str.8 = [22 x i8] c"\0A Triangulo isosceles\00"
@str.9 = [24 x i8] c"\0A Trriangulo equilatero\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
store i32 0, i32* %4
br label %9
9: ; preds = %9, %0
%10 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%12 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%14 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%16 = load i32, i32* %1
%17 = load i32, i32* %2
%18 = icmp eq i32 %16, %17
%19 = load i32, i32* %3
%20 = icmp eq i32 %17, %19
%21 = select i1 %18, i1 %20, i1 false
%22 = select i1 %21, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str.9, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @str.8, i64 0, i64 0)
%23 = icmp eq i32 %16, %19
%24 = select i1 %23, i1 true, i1 %20
%25 = select i1 %24, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @str.8, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0)
%26 = select i1 %18, i8* %22, i8* %25
%27 = call i32 @puts(i8* dereferenceable(1) %26)
%28 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0))
%29 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%30 = load i32, i32* %4
%31 = icmp eq i32 %30, 1
br i1 %31, label %9, label %32
32: ; preds = %9
ret i32 0
}