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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%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  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1198 <main+0x78>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11c9 <main+0xa9>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11fa <main+0xda>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
addss  -0x10(%rbp),%xmm1
ucomiss %xmm1,%xmm0
jb     1223 <main+0x103>
lea    0xdee(%rip),%rdi
call   1030 <printf@plt>
jmp    12f3 <main+0x1d3>
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0xc(%rbp),%xmm3
movss  -0x10(%rbp),%xmm2
mulss  -0x10(%rbp),%xmm2
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
ucomiss %xmm1,%xmm0
jne    1269 <main+0x149>
jp     1269 <main+0x149>
lea    0xdbd(%rip),%rdi
call   1030 <printf@plt>
jmp    12ee <main+0x1ce>
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0xc(%rbp),%xmm3
movss  -0x10(%rbp),%xmm2
mulss  -0x10(%rbp),%xmm2
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
ucomiss %xmm1,%xmm0
jbe    12a9 <main+0x189>
lea    0xd92(%rip),%rdi
call   1030 <printf@plt>
jmp    12e9 <main+0x1c9>
movss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
movss  -0xc(%rbp),%xmm3
movss  -0x10(%rbp),%xmm2
mulss  -0x10(%rbp),%xmm2
mulss  %xmm3,%xmm0
addss  %xmm2,%xmm0
ucomiss %xmm1,%xmm0
jbe    12e4 <main+0x1c4>
lea    0xd69(%rip),%rdi
call   1030 <printf@plt>
jmp    12e9 <main+0x1c9>
jmp    12ee <main+0x1ce>
jmp    12f3 <main+0x1d3>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jne    132e <main+0x20e>
jp     132e <main+0x20e>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jne    132e <main+0x20e>
jp     132e <main+0x20e>
lea    0xd3a(%rip),%rdi
call   1030 <printf@plt>
jmp    136e <main+0x24e>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jne    1348 <main+0x228>
jp     1348 <main+0x228>
jmp    135d <main+0x23d>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jne    1369 <main+0x249>
jp     1369 <main+0x249>
lea    0xd10(%rip),%rdi
call   1030 <printf@plt>
jmp    136e <main+0x24e>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
lea    0xebd(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
movss  0x14(%rsp),%xmm1
movss  0x10(%rsp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1179 <main+0x59>
movss  %xmm0,0x14(%rsp)
movss  %xmm1,0x10(%rsp)
movaps %xmm1,%xmm2
jmp    117f <main+0x5f>
movaps %xmm0,%xmm2
movaps %xmm1,%xmm0
movss  0xc(%rsp),%xmm3
ucomiss %xmm0,%xmm3
jbe    11a6 <main+0x86>
movss  %xmm3,0x14(%rsp)
movss  %xmm0,0xc(%rsp)
movaps %xmm3,%xmm1
ucomiss %xmm2,%xmm0
ja     11b1 <main+0x91>
movaps %xmm0,%xmm3
movaps %xmm2,%xmm0
jmp    11c0 <main+0xa0>
movaps %xmm0,%xmm1
movaps %xmm3,%xmm0
ucomiss %xmm2,%xmm0
jbe    119e <main+0x7e>
movss  %xmm2,0xc(%rsp)
movss  %xmm0,0x10(%rsp)
movaps %xmm2,%xmm3
movaps %xmm0,%xmm2
addss  %xmm3,%xmm2
ucomiss %xmm2,%xmm1
jae    11ec <main+0xcc>
mulss  %xmm1,%xmm1
mulss  %xmm3,%xmm3
mulss  %xmm0,%xmm0
addss  %xmm3,%xmm0
ucomiss %xmm0,%xmm1
jne    1242 <main+0x122>
jp     1242 <main+0x122>
lea    0xe71(%rip),%rdi
jmp    11f3 <main+0xd3>
lea    0xe7c(%rip),%rdi
call   1030 <puts@plt>
movss  0x14(%rsp),%xmm2
movss  0x10(%rsp),%xmm0
ucomiss %xmm0,%xmm2
movss  0xc(%rsp),%xmm1
jne    1226 <main+0x106>
jp     1226 <main+0x106>
ucomiss %xmm1,%xmm0
jne    1226 <main+0x106>
jp     1226 <main+0x106>
lea    0xdfc(%rip),%rdi
call   1030 <puts@plt>
jmp    123b <main+0x11b>
ucomiss %xmm0,%xmm2
lea    0xdd7(%rip),%rdi
jne    1234 <main+0x114>
jnp    121f <main+0xff>
ucomiss %xmm1,%xmm0
jne    123b <main+0x11b>
jnp    121f <main+0xff>
xor    %eax,%eax
add    $0x18,%rsp
ret
jbe    124d <main+0x12d>
lea    0xdfa(%rip),%rdi
jmp    11f3 <main+0xd3>
ucomiss %xmm1,%xmm0
jbe    11f8 <main+0xd8>
lea    0xdd7(%rip),%rdi
jmp    11f3 <main+0xd3>

LLVM IR (-O0):
@.str = [7 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 = [23 x i8] c"TRIANGULO OBTUSANGULO\0A\00"
@.str.4 = [22 x i8] c"TRIANGULO ACUTANGULO\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
%5 = alloca float
%6 = alloca float
store i32 0, i32* %1
store float 0.000000e+00, float* %2
store float 0.000000e+00, float* %3
store float 0.000000e+00, float* %4
store float 0.000000e+00, float* %5
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float* %2, float* %3, float* %4)
%8 = load float, float* %2
%9 = load float, float* %3
%10 = fcmp olt float %8, %9
br i1 %10, label %11, label %15
11: ; preds = %0
%12 = load float, float* %2
store float %12, float* %6
%13 = load float, float* %3
store float %13, float* %2
%14 = load float, float* %6
store float %14, float* %3
br label %15
15: ; preds = %11, %0
%16 = load float, float* %2
%17 = load float, float* %4
%18 = fcmp olt float %16, %17
br i1 %18, label %19, label %23
19: ; preds = %15
%20 = load float, float* %2
store float %20, float* %6
%21 = load float, float* %4
store float %21, float* %2
%22 = load float, float* %6
store float %22, float* %4
br label %23
23: ; preds = %19, %15
%24 = load float, float* %3
%25 = load float, float* %4
%26 = fcmp olt float %24, %25
br i1 %26, label %27, label %31
27: ; preds = %23
%28 = load float, float* %4
store float %28, float* %6
%29 = load float, float* %3
store float %29, float* %4
%30 = load float, float* %6
store float %30, float* %3
br label %31
31: ; preds = %27, %23
%32 = load float, float* %2
%33 = load float, float* %3
%34 = load float, float* %4
%35 = fadd float %33, %34
%36 = fcmp oge float %32, %35
br i1 %36, label %37, label %39
37: ; preds = %31
%38 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %81
39: ; preds = %31
%40 = load float, float* %2
%41 = load float, float* %2
%42 = fmul float %40, %41
%43 = load float, float* %3
%44 = load float, float* %3
%45 = load float, float* %4
%46 = load float, float* %4
%47 = fmul float %45, %46
%48 = call float @llvm.fmuladd.f32(float %43, float %44, float %47)
%49 = fcmp oeq float %42, %48
br i1 %49, label %50, label %52
50: ; preds = %39
%51 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %80
52: ; preds = %39
%53 = load float, float* %2
%54 = load float, float* %2
%55 = fmul float %53, %54
%56 = load float, float* %3
%57 = load float, float* %3
%58 = load float, float* %4
%59 = load float, float* %4
%60 = fmul float %58, %59
%61 = call float @llvm.fmuladd.f32(float %56, float %57, float %60)
%62 = fcmp ogt float %55, %61
br i1 %62, label %63, label %65
63: ; preds = %52
%64 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
br label %79
65: ; preds = %52
%66 = load float, float* %2
%67 = load float, float* %2
%68 = fmul float %66, %67
%69 = load float, float* %3
%70 = load float, float* %3
%71 = load float, float* %4
%72 = load float, float* %4
%73 = fmul float %71, %72
%74 = call float @llvm.fmuladd.f32(float %69, float %70, float %73)
%75 = fcmp olt float %68, %74
br i1 %75, label %76, label %78
76: ; preds = %65
%77 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
br label %78
78: ; preds = %76, %65
br label %79
79: ; preds = %78, %63
br label %80
80: ; preds = %79, %50
br label %81
81: ; preds = %80, %37
%82 = load float, float* %2
%83 = load float, float* %3
%84 = fcmp oeq float %82, %83
br i1 %84, label %85, label %91
85: ; preds = %81
%86 = load float, float* %3
%87 = load float, float* %4
%88 = fcmp oeq float %86, %87
br i1 %88, label %89, label %91
89: ; preds = %85
%90 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
br label %102
91: ; preds = %85, %81
%92 = load float, float* %2
%93 = load float, float* %3
%94 = fcmp oeq float %92, %93
br i1 %94, label %99, label %95
95: ; preds = %91
%96 = load float, float* %3
%97 = load float, float* %4
%98 = fcmp oeq float %96, %97
br i1 %98, label %99, label %101
99: ; preds = %95, %91
%100 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
br label %101
101: ; preds = %99, %95
br label %102
102: ; preds = %101, %89
ret i32 0
}

LLVM IR (-O2):
@.str = [7 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 = [21 x i8] c"TRIANGULO ACUTANGULO\00"
@str.9 = [22 x i8] c"TRIANGULO OBTUSANGULO\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*
store float 0.000000e+00, float* %1
%5 = bitcast float* %2 to i8*
store float 0.000000e+00, float* %2
%6 = bitcast float* %3 to i8*
store float 0.000000e+00, float* %3
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float* %1, float* %2, float* %3)
%8 = load float, float* %1
%9 = load float, float* %2
%10 = fcmp olt float %8, %9
br i1 %10, label %11, label %12
11: ; preds = %0
store float %9, float* %1
store float %8, float* %2
br label %12
12: ; preds = %11, %0
%13 = phi float [ %8, %11 ], [ %9, %0 ]
%14 = phi float [ %9, %11 ], [ %8, %0 ]
%15 = load float, float* %3
%16 = fcmp olt float %14, %15
br i1 %16, label %17, label %18
17: ; preds = %12
store float %15, float* %1
store float %14, float* %3
br label %18
18: ; preds = %17, %12
%19 = phi float [ %15, %17 ], [ %14, %12 ]
%20 = phi float [ %14, %17 ], [ %15, %12 ]
%21 = fcmp olt float %13, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store float %13, float* %3
store float %20, float* %2
br label %23
23: ; preds = %22, %18
%24 = phi float [ %13, %22 ], [ %20, %18 ]
%25 = phi float [ %20, %22 ], [ %13, %18 ]
%26 = fadd float %25, %24
%27 = fcmp ult float %19, %26
br i1 %27, label %28, label %37
28: ; preds = %23
%29 = fmul float %19, %19
%30 = fmul float %24, %24
%31 = call float @llvm.fmuladd.f32(float %25, float %25, float %30)
%32 = fcmp oeq float %29, %31
br i1 %32, label %37, label %33
33: ; preds = %28
%34 = fcmp ogt float %29, %31
br i1 %34, label %37, label %35
35: ; preds = %33
%36 = fcmp olt float %29, %31
br i1 %36, label %37, label %40
37: ; preds = %35, %33, %28, %23
%38 = phi i8* [ getelementptr inbounds ([20 x i8], [20 x i8]* @str.11, i64 0, i64 0), %23 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @str.10, i64 0, i64 0), %28 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @str.9, i64 0, i64 0), %33 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @str.8, i64 0, i64 0), %35 ]
%39 = call i32 @puts(i8* dereferenceable(1) %38)
br label %40
40: ; preds = %37, %35
%41 = load float, float* %1
%42 = load float, float* %2
%43 = fcmp oeq float %41, %42
%44 = load float, float* %3
%45 = fcmp oeq float %42, %44
%46 = select i1 %43, i1 %45, i1 false
br i1 %46, label %49, label %47
47: ; preds = %40
%48 = select i1 %43, i1 true, i1 %45
br i1 %48, label %49, label %52
49: ; preds = %47, %40
%50 = phi i8* [ getelementptr inbounds ([21 x i8], [21 x i8]* @str.7, i64 0, i64 0), %40 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0), %47 ]
%51 = call i32 @puts(i8* dereferenceable(1) %50)
br label %52
52: ; preds = %49, %47
ret i32 0
}