#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(float, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, float *, float *, float *);
int /*<<< orphan*/ troca(float *, float *);
int main() {
  float a, b, c;
  scanf("%f %f %f", &a, &b, &c);
  if (a < c)
    troca(&a, &c);
  if (b < c)
    troca(&b, &c);
  if (a < b)
    troca(&a, &b);
  if (a >= (b + c)) {
    printf("NAO FORMA TRIANGULO\n");
    return 0;
  }
  if (pow(a, 2) == ((pow(b, 2) + pow(c, 2))))
    printf("TRIANGULO RETANGULO\n");
  if (pow(a, 2) < ((pow(b, 2) + pow(c, 2))))
    printf("TRIANGULO ACUTANGULO\n");
  else if (pow(a, 2) > ((pow(b, 2) + pow(c, 2))))
    printf("TRIANGULO OBTUSANGULO\n");
  if (a == b && b == c)
    printf("TRIANGULO EQUILATERO\n");
  else if ((a == b) || (b == c) || (c == a))
    printf("TRIANGULO ISOSCELES\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1187 <main+0x47>
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1060 <troca@plt>
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11a7 <main+0x67>
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1060 <troca@plt>
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11c7 <main+0x87>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1060 <troca@plt>
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
addss  -0x10(%rbp),%xmm1
ucomiss %xmm1,%xmm0
jb     11f7 <main+0xb7>
lea    0xe23(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13a5 <main+0x265>
movss  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,-0x20(%rbp)
movss  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    -0x20(%rbp),%rcx
mov    %rax,%rdx
mov    -0x18(%rbp),%rax
add    %rdx,%rcx
cmp    %rcx,%rax
jne    124f <main+0x10f>
lea    0xdd4(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,-0x28(%rbp)
movss  -0xc(%rbp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,-0x30(%rbp)
movss  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    -0x30(%rbp),%rcx
mov    %rax,%rdx
mov    -0x28(%rbp),%rax
add    %rdx,%rcx
cmp    %rcx,%rax
jge    12ac <main+0x16c>
lea    0xd91(%rip),%rdi
call   1030 <printf@plt>
jmp    1309 <main+0x1c9>
movss  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,-0x38(%rbp)
movss  -0xc(%rbp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,-0x40(%rbp)
movss  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    -0x40(%rbp),%rcx
mov    %rax,%rdx
mov    -0x38(%rbp),%rax
add    %rdx,%rcx
cmp    %rcx,%rax
jle    1304 <main+0x1c4>
lea    0xd4a(%rip),%rdi
call   1030 <printf@plt>
jmp    1309 <main+0x1c9>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jne    1344 <main+0x204>
jp     1344 <main+0x204>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jne    1344 <main+0x204>
jp     1344 <main+0x204>
lea    0xd26(%rip),%rdi
call   1030 <printf@plt>
jmp    139e <main+0x25e>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jne    135e <main+0x21e>
jp     135e <main+0x21e>
jmp    138d <main+0x24d>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jne    1378 <main+0x238>
jp     1378 <main+0x238>
jmp    138d <main+0x24d>
movss  -0x10(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jne    1399 <main+0x259>
jp     1399 <main+0x259>
lea    0xce2(%rip),%rdi
call   1030 <printf@plt>
jmp    139e <main+0x25e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xeb2(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
ucomiss 0x14(%rsp),%xmm0
jbe    1184 <main+0x44>
lea    0x14(%rsp),%rdi
lea    0xc(%rsp),%rsi
call   1060 <troca@plt>
movss  0xc(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
ucomiss %xmm1,%xmm0
jbe    11a4 <main+0x64>
lea    0x10(%rsp),%rdi
lea    0xc(%rsp),%rsi
call   1060 <troca@plt>
movss  0x10(%rsp),%xmm1
movss  0x14(%rsp),%xmm0
ucomiss %xmm0,%xmm1
jbe    11ca <main+0x8a>
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1060 <troca@plt>
movss  0x14(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
addss  0xc(%rsp),%xmm1
ucomiss %xmm1,%xmm0
jae    1264 <main+0x124>
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,%r14
movss  0x10(%rsp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
add    %rbx,%rax
cmp    %rax,%r14
jne    121d <main+0xdd>
lea    0xe45(%rip),%rdi
call   1030 <puts@plt>
movss  0x14(%rsp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,%r14
movss  0x10(%rsp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
add    %rbx,%rax
cmp    %rax,%r14
jge    1270 <main+0x130>
lea    0xde6(%rip),%rdi
jmp    12b5 <main+0x175>
lea    0xe06(%rip),%rdi
jmp    12f4 <main+0x1b4>
movss  0x14(%rsp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,%r14
movss  0x10(%rsp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
add    %rbx,%rax
cmp    %rax,%r14
jle    12ba <main+0x17a>
lea    0xd7d(%rip),%rdi
call   1030 <puts@plt>
movss  0x14(%rsp),%xmm0
movss  0x10(%rsp),%xmm2
movss  0xc(%rsp),%xmm1
ucomiss %xmm1,%xmm2
lea    0xd33(%rip),%rax
lea    0xd40(%rip),%rdi
cmovne %rax,%rdi
cmovp  %rax,%rdi
ucomiss %xmm2,%xmm0
cmovne %rax,%rdi
cmovp  %rax,%rdi
jne    1303 <main+0x1c3>
jp     1303 <main+0x1c3>
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret
ucomiss %xmm1,%xmm2
jne    130a <main+0x1ca>
jnp    1316 <main+0x1d6>
ucomiss %xmm0,%xmm1
mov    %rax,%rdi
jne    12f9 <main+0x1b9>
jp     12f9 <main+0x1b9>
jmp    12f4 <main+0x1b4>
mov    %rax,%rdi
jmp    12f4 <main+0x1b4>

LLVM IR (-O0):
@.str = [9 x i8] c"%f %f %f\00"
@.str.1 = [21 x i8] c"NAO FORMA TRIANGULO\0A\00"
@.str.2 = [21 x i8] c"TRIANGULO RETANGULO\0A\00"
@.str.3 = [22 x i8] c"TRIANGULO ACUTANGULO\0A\00"
@.str.4 = [23 x i8] c"TRIANGULO OBTUSANGULO\0A\00"
@.str.5 = [22 x i8] c"TRIANGULO EQUILATERO\0A\00"
@.str.6 = [21 x i8] c"TRIANGULO ISOSCELES\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float* %2, float* %3, float* %4)
%6 = load float, float* %2
%7 = load float, float* %4
%8 = fcmp olt float %6, %7
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 @troca(float* %2, float* %4)
br label %11
11: ; preds = %9, %0
%12 = load float, float* %3
%13 = load float, float* %4
%14 = fcmp olt float %12, %13
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = call i32 @troca(float* %3, float* %4)
br label %17
17: ; preds = %15, %11
%18 = load float, float* %2
%19 = load float, float* %3
%20 = fcmp olt float %18, %19
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = call i32 @troca(float* %2, float* %3)
br label %23
23: ; preds = %21, %17
%24 = load float, float* %2
%25 = load float, float* %3
%26 = load float, float* %4
%27 = fadd float %25, %26
%28 = fcmp oge float %24, %27
br i1 %28, label %29, label %31
29: ; preds = %23
%30 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %91
31: ; preds = %23
%32 = load float, float* %2
%33 = call i64 @pow(float %32, i32 2)
%34 = load float, float* %3
%35 = call i64 @pow(float %34, i32 2)
%36 = load float, float* %4
%37 = call i64 @pow(float %36, i32 2)
%38 = add nsw i64 %35, %37
%39 = icmp eq i64 %33, %38
br i1 %39, label %40, label %42
40: ; preds = %31
%41 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %42
42: ; preds = %40, %31
%43 = load float, float* %2
%44 = call i64 @pow(float %43, i32 2)
%45 = load float, float* %3
%46 = call i64 @pow(float %45, i32 2)
%47 = load float, float* %4
%48 = call i64 @pow(float %47, i32 2)
%49 = add nsw i64 %46, %48
%50 = icmp slt i64 %44, %49
br i1 %50, label %51, label %53
51: ; preds = %42
%52 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %65
53: ; preds = %42
%54 = load float, float* %2
%55 = call i64 @pow(float %54, i32 2)
%56 = load float, float* %3
%57 = call i64 @pow(float %56, i32 2)
%58 = load float, float* %4
%59 = call i64 @pow(float %58, i32 2)
%60 = add nsw i64 %57, %59
%61 = icmp sgt i64 %55, %60
br i1 %61, label %62, label %64
62: ; preds = %53
%63 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
br label %64
64: ; preds = %62, %53
br label %65
65: ; preds = %64, %51
%66 = load float, float* %2
%67 = load float, float* %3
%68 = fcmp oeq float %66, %67
br i1 %68, label %69, label %75
69: ; preds = %65
%70 = load float, float* %3
%71 = load float, float* %4
%72 = fcmp oeq float %70, %71
br i1 %72, label %73, label %75
73: ; preds = %69
%74 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
br label %90
75: ; preds = %69, %65
%76 = load float, float* %2
%77 = load float, float* %3
%78 = fcmp oeq float %76, %77
br i1 %78, label %87, label %79
79: ; preds = %75
%80 = load float, float* %3
%81 = load float, float* %4
%82 = fcmp oeq float %80, %81
br i1 %82, label %87, label %83
83: ; preds = %79
%84 = load float, float* %4
%85 = load float, float* %2
%86 = fcmp oeq float %84, %85
br i1 %86, label %87, label %89
87: ; preds = %83, %79, %75
%88 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
br label %89
89: ; preds = %87, %83
br label %90
90: ; preds = %89, %73
store i32 0, i32* %1
br label %91
91: ; preds = %90, %29
%92 = load i32, i32* %1
ret i32 %92
}

LLVM IR (-O2):
@.str = [9 x i8] c"%f %f %f\00"
@str = [20 x i8] c"TRIANGULO ISOSCELES\00"
@str.7 = [21 x i8] c"TRIANGULO EQUILATERO\00"
@str.8 = [22 x i8] c"TRIANGULO OBTUSANGULO\00"
@str.9 = [21 x i8] c"TRIANGULO ACUTANGULO\00"
@str.10 = [20 x i8] c"TRIANGULO RETANGULO\00"
@str.11 = [20 x i8] c"NAO FORMA TRIANGULO\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float* %1, float* %2, float* %3)
%8 = load float, float* %1
%9 = load float, float* %3
%10 = fcmp olt float %8, %9
br i1 %10, label %11, label %14
11: ; preds = %0
%12 = call i32 @troca(float* %1, float* %3)
%13 = load float, float* %3
br label %14
14: ; preds = %11, %0
%15 = phi float [ %13, %11 ], [ %9, %0 ]
%16 = load float, float* %2
%17 = fcmp olt float %16, %15
br i1 %17, label %18, label %21
18: ; preds = %14
%19 = call i32 @troca(float* %2, float* %3)
%20 = load float, float* %2
br label %21
21: ; preds = %18, %14
%22 = phi float [ %20, %18 ], [ %16, %14 ]
%23 = load float, float* %1
%24 = fcmp olt float %23, %22
br i1 %24, label %25, label %29
25: ; preds = %21
%26 = call i32 @troca(float* %1, float* %2)
%27 = load float, float* %1
%28 = load float, float* %2
br label %29
29: ; preds = %25, %21
%30 = phi float [ %28, %25 ], [ %22, %21 ]
%31 = phi float [ %27, %25 ], [ %23, %21 ]
%32 = load float, float* %3
%33 = fadd float %30, %32
%34 = fcmp ult float %31, %33
br i1 %34, label %35, label %77
35: ; preds = %29
%36 = call i64 @pow(float %31, i32 2)
%37 = load float, float* %2
%38 = call i64 @pow(float %37, i32 2)
%39 = load float, float* %3
%40 = call i64 @pow(float %39, i32 2)
%41 = add nsw i64 %40, %38
%42 = icmp eq i64 %36, %41
br i1 %42, label %43, label %45
43: ; preds = %35
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.10, i64 0, i64 0))
br label %45
45: ; preds = %43, %35
%46 = load float, float* %1
%47 = call i64 @pow(float %46, i32 2)
%48 = load float, float* %2
%49 = call i64 @pow(float %48, i32 2)
%50 = load float, float* %3
%51 = call i64 @pow(float %50, i32 2)
%52 = add nsw i64 %51, %49
%53 = icmp slt i64 %47, %52
br i1 %53, label %63, label %54
54: ; preds = %45
%55 = load float, float* %1
%56 = call i64 @pow(float %55, i32 2)
%57 = load float, float* %2
%58 = call i64 @pow(float %57, i32 2)
%59 = load float, float* %3
%60 = call i64 @pow(float %59, i32 2)
%61 = add nsw i64 %60, %58
%62 = icmp sgt i64 %56, %61
br i1 %62, label %63, label %66
63: ; preds = %54, %45
%64 = phi i8* [ getelementptr inbounds ([21 x i8], [21 x i8]* @str.9, i64 0, i64 0), %45 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @str.8, i64 0, i64 0), %54 ]
%65 = call i32 @puts(i8* dereferenceable(1) %64)
br label %66
66: ; preds = %63, %54
%67 = load float, float* %1
%68 = load float, float* %2
%69 = fcmp oeq float %67, %68
%70 = load float, float* %3
%71 = fcmp oeq float %68, %70
%72 = select i1 %69, i1 %71, i1 false
%73 = select i1 %72, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @str.7, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0)
br i1 %69, label %77, label %74
74: ; preds = %66
%75 = fcmp oeq float %70, %67
%76 = select i1 %71, i1 true, i1 %75
br i1 %76, label %77, label %80
77: ; preds = %66, %74, %29
%78 = phi i8* [ getelementptr inbounds ([20 x i8], [20 x i8]* @str.11, i64 0, i64 0), %29 ], [ %73, %66 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0), %74 ]
%79 = call i32 @puts(i8* dereferenceable(1) %78)
br label %80
80: ; preds = %77, %74
ret i32 0
}