#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 *);
int main() {
  int a, b, c;
  printf("Enter the Length of 3 Sides: ");
  scanf("%d %d %d", &a, &b, &c);
  a = a * a;
  b = b * b;
  c = c * c;
  if ((a == b + c) || (b == a + c) || (c == a + b))
    printf("Its A  Rt. Angled Triangle \n");
  else
    printf("Not a Rt. Angled Traingle \n");
  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    0xedc(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
cmp    %ecx,%eax
je     11a4 <main+0x84>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    -0x10(%rbp),%ecx
cmp    %ecx,%eax
je     11a4 <main+0x84>
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jne    11b5 <main+0x95>
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
jmp    11c1 <main+0xa1>
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
lea    0xed7(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
mov    0x14(%rsp),%eax
imul   %eax,%eax
mov    %eax,0x14(%rsp)
mov    0x10(%rsp),%ecx
imul   %ecx,%ecx
mov    %ecx,0x10(%rsp)
mov    0xc(%rsp),%edx
imul   %edx,%edx
mov    %edx,0xc(%rsp)
lea    (%rcx,%rax,1),%esi
cmp    %esi,%edx
lea    0xeba(%rip),%r8
lea    0xe98(%rip),%rdi
cmove  %r8,%rdi
lea    (%rdx,%rax,1),%esi
cmp    %esi,%ecx
cmove  %r8,%rdi
add    %edx,%ecx
cmp    %ecx,%eax
cmove  %r8,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Enter the Length of 3 Sides: \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [29 x i8] c"Its A Rt. Angled Triangle \0A\00"
@.str.3 = [28 x i8] c"Not a Rt. Angled Traingle \0A\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 ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = mul nsw i32 %7, %8
store i32 %9, i32* %2
%10 = load i32, i32* %3
%11 = load i32, i32* %3
%12 = mul nsw i32 %10, %11
store i32 %12, i32* %3
%13 = load i32, i32* %4
%14 = load i32, i32* %4
%15 = mul nsw i32 %13, %14
store i32 %15, i32* %4
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = add nsw i32 %17, %18
%20 = icmp eq i32 %16, %19
br i1 %20, label %33, label %21
21: ; preds = %0
%22 = load i32, i32* %3
%23 = load i32, i32* %2
%24 = load i32, i32* %4
%25 = add nsw i32 %23, %24
%26 = icmp eq i32 %22, %25
br i1 %26, label %33, label %27
27: ; preds = %21
%28 = load i32, i32* %4
%29 = load i32, i32* %2
%30 = load i32, i32* %3
%31 = add nsw i32 %29, %30
%32 = icmp eq i32 %28, %31
br i1 %32, label %33, label %35
33: ; preds = %27, %21, %0
%34 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
br label %37
35: ; preds = %27
%36 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
br label %37
37: ; preds = %35, %33
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Enter the Length of 3 Sides: \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@str = [27 x i8] c"Not a Rt. Angled Traingle \00"
@str.4 = [28 x i8] c"Its A Rt. Angled Triangle \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 ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%9 = load i32, i32* %1
%10 = mul nsw i32 %9, %9
store i32 %10, i32* %1
%11 = load i32, i32* %2
%12 = mul nsw i32 %11, %11
store i32 %12, i32* %2
%13 = load i32, i32* %3
%14 = mul nsw i32 %13, %13
store i32 %14, i32* %3
%15 = add nuw nsw i32 %14, %12
%16 = icmp eq i32 %10, %15
%17 = add nuw nsw i32 %14, %10
%18 = icmp eq i32 %12, %17
%19 = select i1 %16, i1 true, i1 %18
%20 = add nuw nsw i32 %12, %10
%21 = icmp eq i32 %14, %20
%22 = select i1 %19, i1 true, i1 %21
%23 = select i1 %22, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0)
%24 = call i32 @puts(i8* dereferenceable(1) %23)
ret i32 0
}