#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 *, int *);
main() {
  int a, b, c;
  printf("Enter the sides of the triangle:");
  scanf("%d%d%d", &a, &b, &c);
  if ((a == b) && (b == c) && (c == a))
    printf("The triangle is an equilateral triangle");
  else if (a == b || b == c || c == a)
    printf("The triangle is an isoceles triangle");
  else
    printf("The triangle is neither isoceles nor equilateral");
  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    0xedf(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1188 <main+0x68>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1188 <main+0x68>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1188 <main+0x68>
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
jmp    11ce <main+0xae>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     11ac <main+0x8c>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     11ac <main+0x8c>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    11bd <main+0x9d>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
jmp    11c9 <main+0xa9>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
jmp    11ce <main+0xae>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x14(%rsp),%eax
mov    0x10(%rsp),%edx
mov    0xc(%rsp),%ecx
cmp    %edx,%eax
jne    1168 <main+0x48>
cmp    %ecx,%eax
jne    1179 <main+0x59>
lea    0xec2(%rip),%rdi
jmp    1180 <main+0x60>
cmp    %ecx,%edx
je     1179 <main+0x59>
cmp    %eax,%ecx
je     1179 <main+0x59>
lea    0xefe(%rip),%rdi
jmp    1180 <main+0x60>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Enter the sides of the triangle:\00"
@.str.1 = [7 x i8] c"%d%d%d\00"
@.str.2 = [40 x i8] c"The triangle is an equilateral triangle\00"
@.str.3 = [37 x i8] c"The triangle is an isoceles triangle\00"
@.str.4 = [49 x i8] c"The triangle is neither isoceles nor equilateral\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 ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %0
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %20
14: ; preds = %10
%15 = load i32, i32* %4
%16 = load i32, i32* %2
%17 = icmp eq i32 %15, %16
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
br label %37
20: ; preds = %14, %10, %0
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = icmp eq i32 %21, %22
br i1 %23, label %32, label %24
24: ; preds = %20
%25 = load i32, i32* %3
%26 = load i32, i32* %4
%27 = icmp eq i32 %25, %26
br i1 %27, label %32, label %28
28: ; preds = %24
%29 = load i32, i32* %4
%30 = load i32, i32* %2
%31 = icmp eq i32 %29, %30
br i1 %31, label %32, label %34
32: ; preds = %28, %24, %20
%33 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
br label %36
34: ; preds = %28
%35 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0))
br label %36
36: ; preds = %34, %32
br label %37
37: ; preds = %36, %18
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"Enter the sides of the triangle:\00"
@.str.1 = [7 x i8] c"%d%d%d\00"
@.str.2 = [40 x i8] c"The triangle is an equilateral triangle\00"
@.str.3 = [37 x i8] c"The triangle is an isoceles triangle\00"
@.str.4 = [49 x i8] c"The triangle is neither isoceles nor equilateral\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 ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = icmp eq i32 %9, %10
%12 = load i32, i32* %3
br i1 %11, label %13, label %15
13: ; preds = %0
%14 = icmp eq i32 %9, %12
br i1 %14, label %20, label %19
15: ; preds = %0
%16 = icmp eq i32 %10, %12
%17 = icmp eq i32 %12, %9
%18 = select i1 %16, i1 true, i1 %17
br i1 %18, label %19, label %20
19: ; preds = %13, %15
br label %20
20: ; preds = %15, %13, %19
%21 = phi i8* [ getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), %19 ], [ getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), %13 ], [ getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0), %15 ]
%22 = call i32 @printf(i8* dereferenceable(1) %21)
ret i32 0
}