#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 abs(float);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float a, b, c;
  printf("Digite o valor do lado A do triângulo:");
  scanf("%f", &a);
  printf("Digite o valor do lado B do triângulo:");
  scanf("%f", &b);
  printf("Digite o valor do lado C do triângulo:");
  scanf("%f", &c);
  if ((abs(a - b) < c && c < a + b) || (abs(a - c) < b && b < a + c) ||
      (abs(c - b) < a && a < c + b)) {
    printf("É um triângulo!");
  } else {
    printf("Não é um triângulo!");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
lea    0xed6(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
lea    0xeba(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xe9e(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
call   1030 <abs@plt>
movaps %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11cb <main+0x9b>
movss  -0x10(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
ja     123b <main+0x10b>
movss  -0x8(%rbp),%xmm0
subss  -0x10(%rbp),%xmm0
call   1030 <abs@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1203 <main+0xd3>
movss  -0xc(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
ja     123b <main+0x10b>
movss  -0x10(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
call   1030 <abs@plt>
movaps %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    124c <main+0x11c>
movss  -0x8(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    124c <main+0x11c>
lea    0xe39(%rip),%rdi
call   1040 <printf@plt>
jmp    1258 <main+0x128>
lea    0xe3a(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
lea    0xee0(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xecf(%rip),%rdi
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xede(%rip),%rdi
call   1040 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
subss  0x8(%rsp),%xmm0
call   1030 <abs@plt>
movss  0x4(%rsp),%xmm1
ucomiss %xmm0,%xmm1
movss  0xc(%rsp),%xmm0
jbe    11b8 <main+0x88>
movss  0x8(%rsp),%xmm2
addss  %xmm0,%xmm2
ucomiss %xmm1,%xmm2
ja     120e <main+0xde>
subss  %xmm1,%xmm0
call   1030 <abs@plt>
movss  0x8(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jbe    11e3 <main+0xb3>
movss  0x4(%rsp),%xmm0
movss  0xc(%rsp),%xmm2
addss  %xmm0,%xmm2
ucomiss %xmm1,%xmm2
ja     120e <main+0xde>
jmp    11e9 <main+0xb9>
movss  0x4(%rsp),%xmm0
subss  %xmm1,%xmm0
call   1030 <abs@plt>
movss  0xc(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jbe    1217 <main+0xe7>
movss  0x4(%rsp),%xmm0
addss  0x8(%rsp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1217 <main+0xe7>
lea    0xe66(%rip),%rdi
jmp    121e <main+0xee>
lea    0xe6f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"Digite o valor do lado A do tri\C3\A2ngulo:\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [40 x i8] c"Digite o valor do lado B do tri\C3\A2ngulo:\00"
@.str.3 = [40 x i8] c"Digite o valor do lado C do tri\C3\A2ngulo:\00"
@.str.4 = [18 x i8] c"\C3\89 um tri\C3\A2ngulo!\00"
@.str.5 = [23 x i8] c"N\C3\A3o \C3\A9 um tri\C3\A2ngulo!\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 ([40 x i8], [40 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 ([40 x i8], [40 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 ([40 x i8], [40 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 = load float, float* %3
%13 = fsub float %11, %12
%14 = call float @abs(float %13)
%15 = load float, float* %4
%16 = fcmp olt float %14, %15
br i1 %16, label %17, label %23
17: ; preds = %0
%18 = load float, float* %4
%19 = load float, float* %2
%20 = load float, float* %3
%21 = fadd float %19, %20
%22 = fcmp olt float %18, %21
br i1 %22, label %49, label %23
23: ; preds = %17, %0
%24 = load float, float* %2
%25 = load float, float* %4
%26 = fsub float %24, %25
%27 = call float @abs(float %26)
%28 = load float, float* %3
%29 = fcmp olt float %27, %28
br i1 %29, label %30, label %36
30: ; preds = %23
%31 = load float, float* %3
%32 = load float, float* %2
%33 = load float, float* %4
%34 = fadd float %32, %33
%35 = fcmp olt float %31, %34
br i1 %35, label %49, label %36
36: ; preds = %30, %23
%37 = load float, float* %4
%38 = load float, float* %3
%39 = fsub float %37, %38
%40 = call float @abs(float %39)
%41 = load float, float* %2
%42 = fcmp olt float %40, %41
br i1 %42, label %43, label %51
43: ; preds = %36
%44 = load float, float* %2
%45 = load float, float* %4
%46 = load float, float* %3
%47 = fadd float %45, %46
%48 = fcmp olt float %44, %47
br i1 %48, label %49, label %51
49: ; preds = %43, %30, %17
%50 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
br label %53
51: ; preds = %43, %36
%52 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
br label %53
53: ; preds = %51, %49
ret i32 0
}

LLVM IR (-O2):
@.str = [40 x i8] c"Digite o valor do lado A do tri\C3\A2ngulo:\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [40 x i8] c"Digite o valor do lado B do tri\C3\A2ngulo:\00"
@.str.3 = [40 x i8] c"Digite o valor do lado C do tri\C3\A2ngulo:\00"
@.str.4 = [18 x i8] c"\C3\89 um tri\C3\A2ngulo!\00"
@.str.5 = [23 x i8] c"N\C3\A3o \C3\A9 um tri\C3\A2ngulo!\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 ([40 x i8], [40 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 ([40 x i8], [40 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 ([40 x i8], [40 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 = load float, float* %2
%15 = fsub float %13, %14
%16 = call float @abs(float %15)
%17 = load float, float* %3
%18 = fcmp olt float %16, %17
%19 = load float, float* %1
br i1 %18, label %20, label %24
20: ; preds = %0
%21 = load float, float* %2
%22 = fadd float %19, %21
%23 = fcmp olt float %17, %22
br i1 %23, label %48, label %24
24: ; preds = %0, %20
%25 = fsub float %19, %17
%26 = call float @abs(float %25)
%27 = load float, float* %2
%28 = fcmp olt float %26, %27
br i1 %28, label %31, label %29
29: ; preds = %24
%30 = load float, float* %3
br label %36
31: ; preds = %24
%32 = load float, float* %1
%33 = load float, float* %3
%34 = fadd float %32, %33
%35 = fcmp olt float %27, %34
br i1 %35, label %48, label %36
36: ; preds = %29, %31
%37 = phi float [ %30, %29 ], [ %33, %31 ]
%38 = fsub float %37, %27
%39 = call float @abs(float %38)
%40 = load float, float* %1
%41 = fcmp olt float %39, %40
br i1 %41, label %42, label %47
42: ; preds = %36
%43 = load float, float* %3
%44 = load float, float* %2
%45 = fadd float %43, %44
%46 = fcmp olt float %40, %45
br i1 %46, label %48, label %47
47: ; preds = %42, %36
br label %48
48: ; preds = %20, %31, %42, %47
%49 = phi i8* [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), %47 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), %42 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), %31 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), %20 ]
%50 = call i32 @printf(i8* dereferenceable(1) %49)
ret i32 0
}