#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 */
float inputfloat(char *, float);
int /*<<< orphan*/ printf(char *);
int main() {
  float a, b, c;
  a = inputfloat("a", a);
  b = inputfloat("b", b);
  c = inputfloat("c", c);
  if (a != b && b != c) {
    printf("Triangolo scaleno\n");
  } else if (a == b && b == c) {
    printf("Triangolo equilatero\n");
  } else {
    printf("Triangolo isoscele\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  -0x8(%rbp),%xmm0
lea    0xec5(%rip),%rdi
call   1040 <inputfloat@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0xc(%rbp),%xmm0
lea    0xeb1(%rip),%rdi
call   1040 <inputfloat@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0x10(%rbp),%xmm0
lea    0xe9d(%rip),%rdi
call   1040 <inputfloat@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jne    118b <main+0x6b>
jp     118b <main+0x6b>
jmp    11b6 <main+0x96>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jne    11a5 <main+0x85>
jp     11a5 <main+0x85>
jmp    11b6 <main+0x96>
lea    0xe5a(%rip),%rdi
call   1030 <printf@plt>
jmp    1202 <main+0xe2>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jne    11f1 <main+0xd1>
jp     11f1 <main+0xd1>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jne    11f1 <main+0xd1>
jp     11f1 <main+0xd1>
lea    0xe32(%rip),%rdi
call   1030 <printf@plt>
jmp    11fd <main+0xdd>
lea    0xe37(%rip),%rdi
call   1030 <printf@plt>
jmp    1202 <main+0xe2>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <inputfloat@plt>
movss  %xmm0,0x4(%rsp)
lea    0xec8(%rip),%rdi
call   1040 <inputfloat@plt>
movss  %xmm0,(%rsp)
lea    0xeb9(%rip),%rdi
call   1040 <inputfloat@plt>
movss  (%rsp),%xmm2
ucomiss %xmm0,%xmm2
lea    0xea7(%rip),%rax
lea    0xeb3(%rip),%rdi
cmovne %rax,%rdi
cmovp  %rax,%rdi
movss  0x4(%rsp),%xmm1
ucomiss %xmm2,%xmm1
cmovne %rax,%rdi
cmovp  %rax,%rdi
ucomiss %xmm0,%xmm2
lea    0xea5(%rip),%rax
mov    %rdi,%rcx
cmovne %rax,%rcx
cmovp  %rax,%rcx
ucomiss %xmm2,%xmm1
cmovne %rcx,%rdi
cmovp  %rcx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
@.str.1 = [2 x i8] c"b\00"
@.str.2 = [2 x i8] c"c\00"
@.str.3 = [19 x i8] c"Triangolo scaleno\0A\00"
@.str.4 = [22 x i8] c"Triangolo equilatero\0A\00"
@.str.5 = [20 x i8] c"Triangolo isoscele\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = load float, float* %2
%6 = call float @inputfloat(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), float %5)
store float %6, float* %2
%7 = load float, float* %3
%8 = call float @inputfloat(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), float %7)
store float %8, float* %3
%9 = load float, float* %4
%10 = call float @inputfloat(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), float %9)
store float %10, float* %4
%11 = load float, float* %2
%12 = load float, float* %3
%13 = fcmp une float %11, %12
br i1 %13, label %14, label %20
14: ; preds = %0
%15 = load float, float* %3
%16 = load float, float* %4
%17 = fcmp une float %15, %16
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
br label %33
20: ; preds = %14, %0
%21 = load float, float* %2
%22 = load float, float* %3
%23 = fcmp oeq float %21, %22
br i1 %23, label %24, label %30
24: ; preds = %20
%25 = load float, float* %3
%26 = load float, float* %4
%27 = fcmp oeq float %25, %26
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
br label %32
30: ; preds = %24, %20
%31 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
br label %32
32: ; preds = %30, %28
br label %33
33: ; preds = %32, %18
%34 = load i32, i32* %1
ret i32 %34
}

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
@.str.1 = [2 x i8] c"b\00"
@.str.2 = [2 x i8] c"c\00"
@str = [19 x i8] c"Triangolo isoscele\00"
@str.6 = [21 x i8] c"Triangolo equilatero\00"
@str.7 = [18 x i8] c"Triangolo scaleno\00"
define i32 @main() {
%1 = tail call float @inputfloat(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), float undef)
%2 = tail call float @inputfloat(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), float undef)
%3 = tail call float @inputfloat(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), float undef)
%4 = fcmp une float %1, %2
%5 = fcmp une float %2, %3
%6 = select i1 %4, i1 %5, i1 false
%7 = fcmp oeq float %1, %2
%8 = fcmp oeq float %2, %3
%9 = select i1 %7, i1 %8, i1 false
%10 = select i1 %9, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @str.6, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0)
%11 = select i1 %6, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.7, i64 0, i64 0), i8* %10
%12 = tail call i32 @puts(i8* dereferenceable(1) %11)
ret i32 0
}