#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 argc, char **argv) {
  int x, y, z;
  printf("\nintroduzca el valor del lado A\t");
  scanf("%d", &x);
  printf("\nintroduzca el valor del lado B\t");
  scanf("%d", &y);
  printf("\nintroduzca el valor del lado C\t");
  scanf("%d", &z);
  printf("\n\n");
  if (x == y && x == z) {
    printf("el triangulo es equilatero\n");
  } else if (x == y || x == z || y == z) {
    printf("el triangulo es isosceles\n");
  } else if (x != y || x != z || y != z) {
    printf("el triangulo es escaleno");
  } else {
    printf("No es un triagulo\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
lea    0xea0(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jne    11bf <main+0x9f>
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jne    11bf <main+0x9f>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
jmp    123f <main+0x11f>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
je     11e3 <main+0xc3>
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
je     11e3 <main+0xc3>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jne    11f4 <main+0xd4>
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
jmp    123a <main+0x11a>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jne    1218 <main+0xf8>
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jne    1218 <main+0xf8>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
je     1229 <main+0x109>
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
jmp    1235 <main+0x115>
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
jmp    123a <main+0x11a>
jmp    123f <main+0x11f>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
lea    0xed9(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xed0(%rip),%rdi
call   1040 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xef1(%rip),%rdi
call   1030 <puts@plt>
mov    0xc(%rsp),%edx
mov    0x8(%rsp),%eax
mov    0x4(%rsp),%ecx
cmp    %eax,%edx
jne    11b0 <main+0x80>
cmp    %ecx,%edx
jne    11b0 <main+0x80>
lea    0xeed(%rip),%rdi
jmp    11d1 <main+0xa1>
cmp    %eax,%edx
je     11ca <main+0x9a>
cmp    %ecx,%edx
je     11ca <main+0x9a>
cmp    %ecx,%eax
je     11ca <main+0x9a>
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
jmp    11d6 <main+0xa6>
lea    0xeb0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"\0Aintroduzca el valor del lado A\09\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [33 x i8] c"\0Aintroduzca el valor del lado B\09\00"
@.str.3 = [33 x i8] c"\0Aintroduzca el valor del lado C\09\00"
@.str.4 = [3 x i8] c"\0A\0A\00"
@.str.5 = [28 x i8] c"el triangulo es equilatero\0A\00"
@.str.6 = [27 x i8] c"el triangulo es isosceles\0A\00"
@.str.7 = [25 x i8] c"el triangulo es escaleno\00"
@.str.8 = [19 x i8] c"No es un triagulo\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%11 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%13 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%15 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = icmp eq i32 %16, %17
br i1 %18, label %19, label %25
19: ; preds = %2
%20 = load i32, i32* %6
%21 = load i32, i32* %8
%22 = icmp eq i32 %20, %21
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
br label %57
25: ; preds = %19, %2
%26 = load i32, i32* %6
%27 = load i32, i32* %7
%28 = icmp eq i32 %26, %27
br i1 %28, label %37, label %29
29: ; preds = %25
%30 = load i32, i32* %6
%31 = load i32, i32* %8
%32 = icmp eq i32 %30, %31
br i1 %32, label %37, label %33
33: ; preds = %29
%34 = load i32, i32* %7
%35 = load i32, i32* %8
%36 = icmp eq i32 %34, %35
br i1 %36, label %37, label %39
37: ; preds = %33, %29, %25
%38 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0))
br label %56
39: ; preds = %33
%40 = load i32, i32* %6
%41 = load i32, i32* %7
%42 = icmp ne i32 %40, %41
br i1 %42, label %51, label %43
43: ; preds = %39
%44 = load i32, i32* %6
%45 = load i32, i32* %8
%46 = icmp ne i32 %44, %45
br i1 %46, label %51, label %47
47: ; preds = %43
%48 = load i32, i32* %7
%49 = load i32, i32* %8
%50 = icmp ne i32 %48, %49
br i1 %50, label %51, label %53
51: ; preds = %47, %43, %39
%52 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
br label %55
53: ; preds = %47
%54 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
br label %55
55: ; preds = %53, %51
br label %56
56: ; preds = %55, %37
br label %57
57: ; preds = %56, %23
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"\0Aintroduzca el valor del lado A\09\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [33 x i8] c"\0Aintroduzca el valor del lado B\09\00"
@.str.3 = [33 x i8] c"\0Aintroduzca el valor del lado C\09\00"
@.str.7 = [25 x i8] c"el triangulo es escaleno\00"
@str = [2 x i8] c"\0A\00"
@str.10 = [26 x i8] c"el triangulo es isosceles\00"
@str.11 = [27 x i8] c"el triangulo es equilatero\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %5 to i8*
%9 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, 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* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, 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 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = icmp eq i32 %16, %17
%19 = load i32, i32* %5
%20 = icmp eq i32 %16, %19
%21 = select i1 %18, i1 %20, i1 false
br i1 %21, label %22, label %24
22: ; preds = %2
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.11, i64 0, i64 0))
br label %32
24: ; preds = %2
br i1 %18, label %28, label %25
25: ; preds = %24
%26 = icmp eq i32 %17, %19
%27 = select i1 %20, i1 true, i1 %26
br i1 %27, label %28, label %30
28: ; preds = %25, %24
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.10, i64 0, i64 0))
br label %32
30: ; preds = %25
%31 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
br label %32
32: ; preds = %28, %30, %22
ret i32 0
}