#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 */
scalar_t__ pow(int, int);
int /*<<< orphan*/ printf(char *, char *);
void angle_check(int thin, int medium, int thick) {
  char *triangle[3] = {"Acute-angled", "Obtuse-angled", "Right-angled"};
  if (pow(thin, 2) + pow(medium, 2) < pow(thick, 2))
    printf("\nGiven numbers form sides of a %s triangle", triangle[1]);
  else if (pow(thin, 2) + pow(medium, 2) == pow(thick, 2))
    printf("\nGiven numbers form sides of a %s triangle", triangle[2]);
  else
    printf("\nGiven numbers form sides of a %s triangle", triangle[0]);
}


x86 assembly (clang, -O0):
<angle_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    0x2cc8(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cc5(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2cc2(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   1040 <pow@plt>
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x2,%esi
call   1040 <pow@plt>
mov    %rax,%rcx
mov    -0x40(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x2,%esi
call   1040 <pow@plt>
mov    %rax,%rcx
mov    -0x38(%rbp),%rax
cmp    %rcx,%rax
jge    11b0 <angle_check+0x90>
mov    -0x28(%rbp),%rsi
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
jmp    1223 <angle_check+0x103>
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   1040 <pow@plt>
mov    %rax,-0x50(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x2,%esi
call   1040 <pow@plt>
mov    %rax,%rcx
mov    -0x50(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x2,%esi
call   1040 <pow@plt>
mov    %rax,%rcx
mov    -0x48(%rbp),%rax
cmp    %rcx,%rax
jne    120e <angle_check+0xee>
mov    -0x20(%rbp),%rsi
lea    0xe24(%rip),%rdi
call   1030 <printf@plt>
jmp    121e <angle_check+0xfe>
mov    -0x30(%rbp),%rsi
lea    0xe0f(%rip),%rdi
call   1030 <printf@plt>
jmp    1223 <angle_check+0x103>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<angle_check>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edx,%r14d
mov    %esi,%r15d
mov    %edi,%r12d
mov    $0x2,%esi
call   1040 <pow@plt>
mov    %rax,%rbp
mov    %r15d,%edi
mov    $0x2,%esi
call   1040 <pow@plt>
mov    %rax,%rbx
add    %rbp,%rbx
mov    %r14d,%edi
mov    $0x2,%esi
call   1040 <pow@plt>
cmp    %rax,%rbx
jge    116c <angle_check+0x4c>
lea    0xea3(%rip),%rsi
jmp    11b1 <angle_check+0x91>
mov    %r12d,%edi
mov    $0x2,%esi
call   1040 <pow@plt>
mov    %rax,%rbx
mov    %r15d,%edi
mov    $0x2,%esi
call   1040 <pow@plt>
mov    %rax,%rbp
add    %rbx,%rbp
mov    %r14d,%edi
mov    $0x2,%esi
call   1040 <pow@plt>
cmp    %rax,%rbp
lea    0xe75(%rip),%rax
lea    0xe53(%rip),%rsi
cmove  %rax,%rsi
lea    0xe70(%rip),%rdi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Acute-angled\00"
@.str.1 = [14 x i8] c"Obtuse-angled\00"
@.str.2 = [13 x i8] c"Right-angled\00"
@__const.angle_check.triangle = [3 x i8*] [i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i32 0, i32 0)]
@.str.3 = [43 x i8] c"\0AGiven numbers form sides of a %s triangle\00"
define void @angle_check(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [3 x i8*]
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = bitcast [3 x i8*]* %7 to i8*
%9 = load i32, i32* %4
%10 = call i64 @pow(i32 %9, i32 2)
%11 = load i32, i32* %5
%12 = call i64 @pow(i32 %11, i32 2)
%13 = add nsw i64 %10, %12
%14 = load i32, i32* %6
%15 = call i64 @pow(i32 %14, i32 2)
%16 = icmp slt i64 %13, %15
br i1 %16, label %17, label %21
17: ; preds = %3
%18 = getelementptr inbounds [3 x i8*], [3 x i8*]* %7, i64 0, i64 1
%19 = load i8*, i8** %18
%20 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), i8* %19)
br label %39
21: ; preds = %3
%22 = load i32, i32* %4
%23 = call i64 @pow(i32 %22, i32 2)
%24 = load i32, i32* %5
%25 = call i64 @pow(i32 %24, i32 2)
%26 = add nsw i64 %23, %25
%27 = load i32, i32* %6
%28 = call i64 @pow(i32 %27, i32 2)
%29 = icmp eq i64 %26, %28
br i1 %29, label %30, label %34
30: ; preds = %21
%31 = getelementptr inbounds [3 x i8*], [3 x i8*]* %7, i64 0, i64 2
%32 = load i8*, i8** %31
%33 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), i8* %32)
br label %38
34: ; preds = %21
%35 = getelementptr inbounds [3 x i8*], [3 x i8*]* %7, i64 0, i64 0
%36 = load i8*, i8** %35
%37 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), i8* %36)
br label %38
38: ; preds = %34, %30
br label %39
39: ; preds = %38, %17
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Acute-angled\00"
@.str.1 = [14 x i8] c"Obtuse-angled\00"
@.str.2 = [13 x i8] c"Right-angled\00"
@.str.3 = [43 x i8] c"\0AGiven numbers form sides of a %s triangle\00"
define void @angle_check(i32 %0, i32 %1, i32 %2) {
%4 = tail call i64 @pow(i32 %0, i32 2)
%5 = tail call i64 @pow(i32 %1, i32 2)
%6 = add nsw i64 %5, %4
%7 = tail call i64 @pow(i32 %2, i32 2)
%8 = icmp slt i64 %6, %7
br i1 %8, label %16, label %9
9: ; preds = %3
%10 = tail call i64 @pow(i32 %0, i32 2)
%11 = tail call i64 @pow(i32 %1, i32 2)
%12 = add nsw i64 %11, %10
%13 = tail call i64 @pow(i32 %2, i32 2)
%14 = icmp eq i64 %12, %13
%15 = select i1 %14, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
br label %16
16: ; preds = %9, %3
%17 = phi i8* [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), %3 ], [ %15, %9 ]
%18 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), i8* %17)
ret void
}