#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 *, char *);
int /*<<< orphan*/ scanf(char *, float *);
int main(void) {
  float primoLato;
  float secondoLato;
  float terzoLato;
  float latoPiuGrande = 0;
  float secondoLatoPiuGrande = 0;
  float terzoLatoPiuGrande = 0;
  printf("%s", "Inserisci il primo lato (>0): ");
  scanf("%f", &primoLato);
  printf("%s", "Inserisci il secondo lato (>0): ");
  scanf("%f", &secondoLato);
  printf("%s", "Inserisci il terzo lato (>0): ");
  scanf("%f", &terzoLato);
  if (primoLato > secondoLato) {
    if (primoLato > terzoLato) {
      if (secondoLato > terzoLato) {
        latoPiuGrande = primoLato;
        secondoLatoPiuGrande = secondoLato;
        terzoLatoPiuGrande = terzoLato;
      } else {
        latoPiuGrande = primoLato;
        secondoLatoPiuGrande = terzoLato;
        terzoLatoPiuGrande = secondoLato;
      }
    } else {
      latoPiuGrande = primoLato;
      secondoLatoPiuGrande = secondoLato;
      terzoLatoPiuGrande = terzoLato;
    }
  } else {
    if (secondoLato > terzoLato) {
      if (primoLato > terzoLato) {
        latoPiuGrande = secondoLato;
        secondoLatoPiuGrande = primoLato;
        terzoLatoPiuGrande = terzoLato;
      } else {
        latoPiuGrande = secondoLato;
        secondoLatoPiuGrande = terzoLato;
        terzoLatoPiuGrande = primoLato;
      }
    } else {
      latoPiuGrande = terzoLato;
      secondoLatoPiuGrande = secondoLato;
      terzoLatoPiuGrande = primoLato;
    }
  }
  if ((secondoLatoPiuGrande + terzoLatoPiuGrande) > latoPiuGrande) {
    if ((secondoLatoPiuGrande - terzoLatoPiuGrande) <= latoPiuGrande) {
      printf("%s", "I lati inseriti corrispondono ad un triangolo!\n");
    } else {
      printf("%s", "I lati inseriti non corrispondono ad un triangolo!\n");
    }
  } else {
    printf("%s", "I lati inseriti non corrispondono ad un triangolo!\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,-0x14(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
lea    0xeb2(%rip),%rdi
lea    0xeae(%rip),%rsi
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe8f(%rip),%rdi
lea    0xead(%rip),%rsi
call   1030 <printf@plt>
lea    0xe9e(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe6c(%rip),%rdi
lea    0xeab(%rip),%rsi
call   1030 <printf@plt>
lea    0xe7b(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1246 <main+0x126>
movss  -0x8(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1223 <main+0x103>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1200 <main+0xe0>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    121e <main+0xfe>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    1241 <main+0x121>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    12cd <main+0x1ad>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    12aa <main+0x18a>
movss  -0x8(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1287 <main+0x167>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    12a5 <main+0x185>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    12c8 <main+0x1a8>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    12cd <main+0x1ad>
movss  -0x18(%rbp),%xmm0
addss  -0x1c(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    1329 <main+0x209>
movss  -0x18(%rbp),%xmm1
subss  -0x1c(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     1311 <main+0x1f1>
lea    0xd00(%rip),%rdi
lea    0xd5e(%rip),%rsi
call   1030 <printf@plt>
jmp    1324 <main+0x204>
lea    0xce8(%rip),%rdi
lea    0xd76(%rip),%rsi
call   1030 <printf@plt>
jmp    133c <main+0x21c>
lea    0xcd0(%rip),%rdi
lea    0xd5e(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xed2(%rip),%r14
lea    0xece(%rip),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
lea    0xede(%rip),%rbx
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xecd(%rip),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xed2(%rip),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x14(%rsp),%xmm1
movss  0x10(%rsp),%xmm0
ucomiss %xmm0,%xmm1
movss  0xc(%rsp),%xmm2
jbe    11b8 <main+0x98>
ucomiss %xmm2,%xmm1
jbe    11cd <main+0xad>
movaps %xmm0,%xmm4
maxss  %xmm2,%xmm4
minss  %xmm0,%xmm2
movaps %xmm1,%xmm3
movaps %xmm4,%xmm0
jmp    11d0 <main+0xb0>
ucomiss %xmm2,%xmm0
jbe    11d5 <main+0xb5>
movaps %xmm0,%xmm3
movaps %xmm1,%xmm0
maxss  %xmm2,%xmm0
minss  %xmm1,%xmm2
jmp    11d0 <main+0xb0>
movaps %xmm1,%xmm3
movaps %xmm2,%xmm1
jmp    11d8 <main+0xb8>
movaps %xmm2,%xmm3
movaps %xmm0,%xmm2
addss  %xmm1,%xmm2
subss  %xmm1,%xmm0
ucomiss %xmm0,%xmm3
lea    0xea8(%rip),%rax
lea    0xe71(%rip),%rsi
cmovb  %rax,%rsi
ucomiss %xmm3,%xmm2
cmovbe %rax,%rsi
lea    0xdfa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [31 x i8] c"Inserisci il primo lato (>0): \00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [33 x i8] c"Inserisci il secondo lato (>0): \00"
@.str.4 = [31 x i8] c"Inserisci il terzo lato (>0): \00"
@.str.5 = [48 x i8] c"I lati inseriti corrispondono ad un triangolo!\0A\00"
@.str.6 = [52 x i8] c"I lati inseriti non corrispondono ad un triangolo!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store i32 0, i32* %1
store float 0.000000e+00, float* %5
store float 0.000000e+00, float* %6
store float 0.000000e+00, float* %7
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %3)
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %4)
%14 = load float, float* %2
%15 = load float, float* %3
%16 = fcmp ogt float %14, %15
br i1 %16, label %17, label %39
17: ; preds = %0
%18 = load float, float* %2
%19 = load float, float* %4
%20 = fcmp ogt float %18, %19
br i1 %20, label %21, label %34
21: ; preds = %17
%22 = load float, float* %3
%23 = load float, float* %4
%24 = fcmp ogt float %22, %23
br i1 %24, label %25, label %29
25: ; preds = %21
%26 = load float, float* %2
store float %26, float* %5
%27 = load float, float* %3
store float %27, float* %6
%28 = load float, float* %4
store float %28, float* %7
br label %33
29: ; preds = %21
%30 = load float, float* %2
store float %30, float* %5
%31 = load float, float* %4
store float %31, float* %6
%32 = load float, float* %3
store float %32, float* %7
br label %33
33: ; preds = %29, %25
br label %38
34: ; preds = %17
%35 = load float, float* %2
store float %35, float* %5
%36 = load float, float* %3
store float %36, float* %6
%37 = load float, float* %4
store float %37, float* %7
br label %38
38: ; preds = %34, %33
br label %61
39: ; preds = %0
%40 = load float, float* %3
%41 = load float, float* %4
%42 = fcmp ogt float %40, %41
br i1 %42, label %43, label %56
43: ; preds = %39
%44 = load float, float* %2
%45 = load float, float* %4
%46 = fcmp ogt float %44, %45
br i1 %46, label %47, label %51
47: ; preds = %43
%48 = load float, float* %3
store float %48, float* %5
%49 = load float, float* %2
store float %49, float* %6
%50 = load float, float* %4
store float %50, float* %7
br label %55
51: ; preds = %43
%52 = load float, float* %3
store float %52, float* %5
%53 = load float, float* %4
store float %53, float* %6
%54 = load float, float* %2
store float %54, float* %7
br label %55
55: ; preds = %51, %47
br label %60
56: ; preds = %39
%57 = load float, float* %4
store float %57, float* %5
%58 = load float, float* %3
store float %58, float* %6
%59 = load float, float* %2
store float %59, float* %7
br label %60
60: ; preds = %56, %55
br label %61
61: ; preds = %60, %38
%62 = load float, float* %6
%63 = load float, float* %7
%64 = fadd float %62, %63
%65 = load float, float* %5
%66 = fcmp ogt float %64, %65
br i1 %66, label %67, label %78
67: ; preds = %61
%68 = load float, float* %6
%69 = load float, float* %7
%70 = fsub float %68, %69
%71 = load float, float* %5
%72 = fcmp ole float %70, %71
br i1 %72, label %73, label %75
73: ; preds = %67
%74 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0))
br label %77
75: ; preds = %67
%76 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.6, i64 0, i64 0))
br label %77
77: ; preds = %75, %73
br label %80
78: ; preds = %61
%79 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.6, i64 0, i64 0))
br label %80
80: ; preds = %78, %77
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [31 x i8] c"Inserisci il primo lato (>0): \00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [33 x i8] c"Inserisci il secondo lato (>0): \00"
@.str.4 = [31 x i8] c"Inserisci il terzo lato (>0): \00"
@.str.5 = [48 x i8] c"I lati inseriti corrispondono ad un triangolo!\0A\00"
@.str.6 = [52 x i8] c"I lati inseriti non corrispondono ad un triangolo!\0A\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 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %1)
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %3)
%13 = load float, float* %1
%14 = load float, float* %2
%15 = fcmp ogt float %13, %14
%16 = load float, float* %3
br i1 %15, label %17, label %23
17: ; preds = %0
%18 = fcmp ogt float %13, %16
br i1 %18, label %19, label %29
19: ; preds = %17
%20 = fcmp ogt float %14, %16
%21 = select i1 %20, float %14, float %16
%22 = select i1 %20, float %16, float %14
br label %29
23: ; preds = %0
%24 = fcmp ogt float %14, %16
br i1 %24, label %25, label %29
25: ; preds = %23
%26 = fcmp ogt float %13, %16
%27 = select i1 %26, float %13, float %16
%28 = select i1 %26, float %16, float %13
br label %29
29: ; preds = %23, %25, %17, %19
%30 = phi float [ %13, %19 ], [ %13, %17 ], [ %14, %25 ], [ %16, %23 ]
%31 = phi float [ %21, %19 ], [ %14, %17 ], [ %27, %25 ], [ %14, %23 ]
%32 = phi float [ %22, %19 ], [ %16, %17 ], [ %28, %25 ], [ %13, %23 ]
%33 = fadd float %31, %32
%34 = fcmp ogt float %33, %30
%35 = fsub float %31, %32
%36 = fcmp ugt float %35, %30
%37 = select i1 %36, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0)
%38 = select i1 %34, i8* %37, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.6, i64 0, i64 0)
%39 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %38)
ret i32 0
}