#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, char *);
scalar_t__ validTriangle(double *);
int main(int argc, char **argv) {
  double case_a[] = {1.0, 1.0, 4.0};
  double case_b[] = {1.0, 1.0, 1.0};
  double case_c[] = {3.0, 4.0, 5.0};
  printf("[1, 1, 4]::%s\n", (validTriangle(case_a)) ? "True" : "False");
  printf("[1, 1, 1]::%s\n", (validTriangle(case_b)) ? "True" : "False");
  printf("[3, 4, 5]::%s\n", (validTriangle(case_c)) ? "True" : "False");
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xebd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec2(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xebf(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xebc(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xec1(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xebb(%rip),%rax
mov    %rax,-0x60(%rbp)
lea    -0x30(%rbp),%rdi
call   1040 <validTriangle@plt>
mov    %rax,%rcx
lea    0xec0(%rip),%rsi
lea    0xeb4(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rsi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
lea    -0x50(%rbp),%rdi
call   1040 <validTriangle@plt>
mov    %rax,%rcx
lea    0xe92(%rip),%rsi
lea    0xe86(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rsi
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
lea    -0x70(%rbp),%rdi
call   1040 <validTriangle@plt>
mov    %rax,%rcx
lea    0xe64(%rip),%rsi
lea    0xe58(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rsi
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
mov    0x2db6(%rip),%rax
mov    (%rax),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    0xee2(%rip),%rax
mov    %rax,0x50(%rsp)
movaps 0xec6(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
mov    0xeea(%rip),%rax
mov    %rax,0x30(%rsp)
movaps 0xece(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
mov    0xef2(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xed6(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x40(%rsp),%rdi
call   1040 <validTriangle@plt>
test   %rax,%rax
lea    0xeea(%rip),%r14
lea    0xede(%rip),%rbx
mov    %rbx,%rsi
cmove  %r14,%rsi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
lea    0x20(%rsp),%rdi
call   1040 <validTriangle@plt>
test   %rax,%rax
mov    %rbx,%rsi
cmove  %r14,%rsi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    %rsp,%rdi
call   1040 <validTriangle@plt>
test   %rax,%rax
cmove  %r14,%rbx
lea    0xeaf(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    0x2dff(%rip),%rax
mov    (%rax),%eax
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.case_a = [3 x double] [double 1.000000e+00, double 1.000000e+00, double 4.000000e+00]
@__const.main.case_b = [3 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.main.case_c = [3 x double] [double 3.000000e+00, double 4.000000e+00, double 5.000000e+00]
@.str = [15 x i8] c"[1, 1, 4]::%s\0A\00"
@.str.1 = [5 x i8] c"True\00"
@.str.2 = [6 x i8] c"False\00"
@.str.3 = [15 x i8] c"[1, 1, 1]::%s\0A\00"
@.str.4 = [15 x i8] c"[3, 4, 5]::%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [3 x double]
%7 = alloca [3 x double]
%8 = alloca [3 x double]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = bitcast [3 x double]* %6 to i8*
%10 = bitcast [3 x double]* %7 to i8*
%11 = bitcast [3 x double]* %8 to i8*
%12 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 0
%13 = call i64 @validTriangle(double* %12)
%14 = icmp ne i64 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%17 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %16)
%18 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%19 = call i64 @validTriangle(double* %18)
%20 = icmp ne i64 %19, 0
%21 = zext i1 %20 to i64
%22 = select i1 %20, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%23 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8* %22)
%24 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%25 = call i64 @validTriangle(double* %24)
%26 = icmp ne i64 %25, 0
%27 = zext i1 %26 to i64
%28 = select i1 %26, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%29 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i8* %28)
%30 = load i32, i32* @EXIT_SUCCESS
ret i32 %30
}

LLVM IR (-O2):
@__const.main.case_a = [3 x double] [double 1.000000e+00, double 1.000000e+00, double 4.000000e+00]
@__const.main.case_b = [3 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.main.case_c = [3 x double] [double 3.000000e+00, double 4.000000e+00, double 5.000000e+00]
@.str = [15 x i8] c"[1, 1, 4]::%s\0A\00"
@.str.1 = [5 x i8] c"True\00"
@.str.2 = [6 x i8] c"False\00"
@.str.3 = [15 x i8] c"[1, 1, 1]::%s\0A\00"
@.str.4 = [15 x i8] c"[3, 4, 5]::%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [3 x double]
%4 = alloca [3 x double]
%5 = alloca [3 x double]
%6 = bitcast [3 x double]* %3 to i8*
%7 = bitcast [3 x double]* %4 to i8*
%8 = bitcast [3 x double]* %5 to i8*
%9 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
%10 = call i64 @validTriangle(double* %9)
%11 = icmp eq i64 %10, 0
%12 = select i1 %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%13 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%15 = call i64 @validTriangle(double* %14)
%16 = icmp eq i64 %15, 0
%17 = select i1 %16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%18 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8* %17)
%19 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 0
%20 = call i64 @validTriangle(double* %19)
%21 = icmp eq i64 %20, 0
%22 = select i1 %21, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%23 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i8* %22)
%24 = load i32, i32* @EXIT_SUCCESS
ret i32 %24
}