#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 *);
int main() {
  float l1, l2, l3;
  printf("Introduce el primer lado del triángulo: ");
  scanf("%f", &l1);
  printf("Introduce el segundo lado del triángulo: ");
  scanf("%f", &l2);
  printf("Introduce el tercer lado del triángulo: ");
  scanf("%f", &l3);
  if (l1 < 1 || l2 < 1 || l3 < 1) {
    printf("\nUno o más lados ingresados no tienen longitud positiva, por lo "
           "tanto no puede formarse un triángulo.\n");
    return 0;
  } else {
    if (l1 == l2) {
      if (l2 == l3) {
        printf("\nEl triángulo es equilátero.");
      } else {
        printf("\nEl triángulo es isósceles.");
      }
    } else if (l2 == l3) {
      printf("\nEl triángulo es isósceles.");
    } else {
      printf("\nEl triángulo es escaleno.");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeee(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb4(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movss  0xe75(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
ja     11b9 <main+0x99>
movss  0xe63(%rip),%xmm0
ucomiss -0xc(%rbp),%xmm0
ja     11b9 <main+0x99>
movss  0xe51(%rip),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    11d1 <main+0xb1>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1260 <main+0x140>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jne    121d <main+0xfd>
jp     121d <main+0xfd>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jne    120c <main+0xec>
jp     120c <main+0xec>
lea    0xeed(%rip),%rdi
call   1030 <printf@plt>
jmp    1218 <main+0xf8>
lea    0xefb(%rip),%rdi
call   1030 <printf@plt>
jmp    1254 <main+0x134>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jne    1243 <main+0x123>
jp     1243 <main+0x123>
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
jmp    124f <main+0x12f>
lea    0xee2(%rip),%rdi
call   1030 <printf@plt>
jmp    1254 <main+0x134>
jmp    1259 <main+0x139>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xee6(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xee7(%rip),%rdi
call   1040 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm1
movss  0xe6b(%rip),%xmm3
ucomiss %xmm1,%xmm3
ja     11c7 <main+0x97>
movss  0x8(%rsp),%xmm0
ucomiss %xmm0,%xmm3
ja     11c7 <main+0x97>
movss  0x4(%rsp),%xmm2
ucomiss %xmm2,%xmm3
ja     11c7 <main+0x97>
ucomiss %xmm0,%xmm1
jne    11d5 <main+0xa5>
jp     11d5 <main+0xa5>
ucomiss %xmm2,%xmm0
jne    11dc <main+0xac>
jp     11dc <main+0xac>
lea    0xec1(%rip),%rdi
jmp    11ec <main+0xbc>
lea    0xf11(%rip),%rdi
call   1030 <puts@plt>
jmp    11f1 <main+0xc1>
ucomiss %xmm2,%xmm0
jne    11e5 <main+0xb5>
jp     11e5 <main+0xb5>
lea    0xec2(%rip),%rdi
jmp    11ec <main+0xbc>
lea    0xed7(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [42 x i8] c"Introduce el primer lado del tri\C3\A1ngulo: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [43 x i8] c"Introduce el segundo lado del tri\C3\A1ngulo: \00"
@.str.3 = [42 x i8] c"Introduce el tercer lado del tri\C3\A1ngulo: \00"
@.str.4 = [105 x i8] c"\0AUno o m\C3\A1s lados ingresados no tienen longitud positiva, por lo tanto no puede formarse un tri\C3\A1ngulo.\0A\00"
@.str.5 = [31 x i8] c"\0AEl tri\C3\A1ngulo es equil\C3\A1tero.\00"
@.str.6 = [30 x i8] c"\0AEl tri\C3\A1ngulo es is\C3\B3sceles.\00"
@.str.7 = [28 x i8] c"\0AEl tri\C3\A1ngulo es escaleno.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%9 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%11 = load float, float* %2
%12 = fcmp olt float %11, 1.000000e+00
br i1 %12, label %19, label %13
13: ; preds = %0
%14 = load float, float* %3
%15 = fcmp olt float %14, 1.000000e+00
br i1 %15, label %19, label %16
16: ; preds = %13
%17 = load float, float* %4
%18 = fcmp olt float %17, 1.000000e+00
br i1 %18, label %19, label %21
19: ; preds = %16, %13, %0
%20 = call i32 @printf(i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %1
br label %45
21: ; preds = %16
%22 = load float, float* %2
%23 = load float, float* %3
%24 = fcmp oeq float %22, %23
br i1 %24, label %25, label %34
25: ; preds = %21
%26 = load float, float* %3
%27 = load float, float* %4
%28 = fcmp oeq float %26, %27
br i1 %28, label %29, label %31
29: ; preds = %25
%30 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
br label %33
31: ; preds = %25
%32 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
br label %33
33: ; preds = %31, %29
br label %43
34: ; preds = %21
%35 = load float, float* %3
%36 = load float, float* %4
%37 = fcmp oeq float %35, %36
br i1 %37, label %38, label %40
38: ; preds = %34
%39 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
br label %42
40: ; preds = %34
%41 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0))
br label %42
42: ; preds = %40, %38
br label %43
43: ; preds = %42, %33
br label %44
44: ; preds = %43
store i32 0, i32* %1
br label %45
45: ; preds = %44, %19
%46 = load i32, i32* %1
ret i32 %46
}

LLVM IR (-O2):
@.str = [42 x i8] c"Introduce el primer lado del tri\C3\A1ngulo: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [43 x i8] c"Introduce el segundo lado del tri\C3\A1ngulo: \00"
@.str.3 = [42 x i8] c"Introduce el tercer lado del tri\C3\A1ngulo: \00"
@.str.5 = [31 x i8] c"\0AEl tri\C3\A1ngulo es equil\C3\A1tero.\00"
@.str.6 = [30 x i8] c"\0AEl tri\C3\A1ngulo es is\C3\B3sceles.\00"
@.str.7 = [28 x i8] c"\0AEl tri\C3\A1ngulo es escaleno.\00"
@str = [104 x i8] c"\0AUno o m\C3\A1s lados ingresados no tienen longitud positiva, por lo tanto no puede formarse un tri\C3\A1ngulo.\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* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%9 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%11 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%13 = load float, float* %1
%14 = fcmp olt float %13, 1.000000e+00
%15 = load float, float* %2
%16 = fcmp olt float %15, 1.000000e+00
%17 = select i1 %14, i1 true, i1 %16
%18 = load float, float* %3
%19 = fcmp olt float %18, 1.000000e+00
%20 = select i1 %17, i1 true, i1 %19
br i1 %20, label %21, label %23
21: ; preds = %0
%22 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([104 x i8], [104 x i8]* @str, i64 0, i64 0))
br label %36
23: ; preds = %0
%24 = fcmp oeq float %13, %15
%25 = fcmp oeq float %15, %18
br i1 %24, label %26, label %31
26: ; preds = %23
br i1 %25, label %27, label %29
27: ; preds = %26
%28 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
br label %36
29: ; preds = %26
%30 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
br label %36
31: ; preds = %23
br i1 %25, label %32, label %34
32: ; preds = %31
%33 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
br label %36
34: ; preds = %31
%35 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0))
br label %36
36: ; preds = %32, %34, %27, %29, %21
ret i32 0
}