#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 */
typedef double *__m128d;

/* Variables and functions */
long vec_nle(__m128d *v, double f) {
  return (v[0][0] <= f || v[0][1] <= f || v[1][0] <= f || v[1][1] <= f ||
          v[2][0] <= f || v[2][1] <= f || v[3][0] <= f || v[3][1] <= f)
             ? 0
             : -1;
}


x86 assembly (clang, -O0):
<vec_nle>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jae    120a <vec_nle+0x10a>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsd  0x8(%rax),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jae    120a <vec_nle+0x10a>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movsd  (%rax),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jae    120a <vec_nle+0x10a>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movsd  0x8(%rax),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jae    120a <vec_nle+0x10a>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
movsd  (%rax),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jae    120a <vec_nle+0x10a>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
movsd  0x8(%rax),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jae    120a <vec_nle+0x10a>
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
movsd  (%rax),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jae    120a <vec_nle+0x10a>
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
movsd  0x8(%rax),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%dl
mov    $0xffffffff,%eax
xor    %ecx,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec_nle>:
mov    (%rdi),%rax
ucomisd (%rax),%xmm0
jae    1145 <vec_nle+0x45>
ucomisd 0x8(%rax),%xmm0
jae    1145 <vec_nle+0x45>
mov    0x8(%rdi),%rax
ucomisd (%rax),%xmm0
jae    1145 <vec_nle+0x45>
ucomisd 0x8(%rax),%xmm0
jae    1145 <vec_nle+0x45>
mov    0x10(%rdi),%rax
ucomisd (%rax),%xmm0
jae    1145 <vec_nle+0x45>
ucomisd 0x8(%rax),%xmm0
jae    1145 <vec_nle+0x45>
mov    0x18(%rdi),%rax
ucomisd (%rax),%xmm0
jae    1145 <vec_nle+0x45>
ucomisd 0x8(%rax),%xmm0
sbb    %rax,%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @vec_nle(double** %0, double %1) {
%3 = alloca double**
%4 = alloca double
store double** %0, double*** %3
store double %1, double* %4
%5 = load double**, double*** %3
%6 = getelementptr inbounds double*, double** %5, i64 0
%7 = load double*, double** %6
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double, double* %4
%11 = fcmp ole double %9, %10
br i1 %11, label %68, label %12
12: ; preds = %2
%13 = load double**, double*** %3
%14 = getelementptr inbounds double*, double** %13, i64 0
%15 = load double*, double** %14
%16 = getelementptr inbounds double, double* %15, i64 1
%17 = load double, double* %16
%18 = load double, double* %4
%19 = fcmp ole double %17, %18
br i1 %19, label %68, label %20
20: ; preds = %12
%21 = load double**, double*** %3
%22 = getelementptr inbounds double*, double** %21, i64 1
%23 = load double*, double** %22
%24 = getelementptr inbounds double, double* %23, i64 0
%25 = load double, double* %24
%26 = load double, double* %4
%27 = fcmp ole double %25, %26
br i1 %27, label %68, label %28
28: ; preds = %20
%29 = load double**, double*** %3
%30 = getelementptr inbounds double*, double** %29, i64 1
%31 = load double*, double** %30
%32 = getelementptr inbounds double, double* %31, i64 1
%33 = load double, double* %32
%34 = load double, double* %4
%35 = fcmp ole double %33, %34
br i1 %35, label %68, label %36
36: ; preds = %28
%37 = load double**, double*** %3
%38 = getelementptr inbounds double*, double** %37, i64 2
%39 = load double*, double** %38
%40 = getelementptr inbounds double, double* %39, i64 0
%41 = load double, double* %40
%42 = load double, double* %4
%43 = fcmp ole double %41, %42
br i1 %43, label %68, label %44
44: ; preds = %36
%45 = load double**, double*** %3
%46 = getelementptr inbounds double*, double** %45, i64 2
%47 = load double*, double** %46
%48 = getelementptr inbounds double, double* %47, i64 1
%49 = load double, double* %48
%50 = load double, double* %4
%51 = fcmp ole double %49, %50
br i1 %51, label %68, label %52
52: ; preds = %44
%53 = load double**, double*** %3
%54 = getelementptr inbounds double*, double** %53, i64 3
%55 = load double*, double** %54
%56 = getelementptr inbounds double, double* %55, i64 0
%57 = load double, double* %56
%58 = load double, double* %4
%59 = fcmp ole double %57, %58
br i1 %59, label %68, label %60
60: ; preds = %52
%61 = load double**, double*** %3
%62 = getelementptr inbounds double*, double** %61, i64 3
%63 = load double*, double** %62
%64 = getelementptr inbounds double, double* %63, i64 1
%65 = load double, double* %64
%66 = load double, double* %4
%67 = fcmp ole double %65, %66
br label %68
68: ; preds = %60, %52, %44, %36, %28, %20, %12, %2
%69 = phi i1 [ true, %52 ], [ true, %44 ], [ true, %36 ], [ true, %28 ], [ true, %20 ], [ true, %12 ], [ true, %2 ], [ %67, %60 ]
%70 = zext i1 %69 to i64
%71 = select i1 %69, i32 0, i32 -1
%72 = sext i32 %71 to i64
ret i64 %72
}

LLVM IR (-O2):
define i64 @vec_nle(double** nocapture %0, double %1) {
%3 = load double*, double** %0
%4 = load double, double* %3
%5 = fcmp ugt double %4, %1
br i1 %5, label %6, label %38
6: ; preds = %2
%7 = getelementptr inbounds double, double* %3, i64 1
%8 = load double, double* %7
%9 = fcmp ugt double %8, %1
br i1 %9, label %10, label %38
10: ; preds = %6
%11 = getelementptr inbounds double*, double** %0, i64 1
%12 = load double*, double** %11
%13 = load double, double* %12
%14 = fcmp ugt double %13, %1
br i1 %14, label %15, label %38
15: ; preds = %10
%16 = getelementptr inbounds double, double* %12, i64 1
%17 = load double, double* %16
%18 = fcmp ugt double %17, %1
br i1 %18, label %19, label %38
19: ; preds = %15
%20 = getelementptr inbounds double*, double** %0, i64 2
%21 = load double*, double** %20
%22 = load double, double* %21
%23 = fcmp ugt double %22, %1
br i1 %23, label %24, label %38
24: ; preds = %19
%25 = getelementptr inbounds double, double* %21, i64 1
%26 = load double, double* %25
%27 = fcmp ugt double %26, %1
br i1 %27, label %28, label %38
28: ; preds = %24
%29 = getelementptr inbounds double*, double** %0, i64 3
%30 = load double*, double** %29
%31 = load double, double* %30
%32 = fcmp ugt double %31, %1
br i1 %32, label %33, label %38
33: ; preds = %28
%34 = getelementptr inbounds double, double* %30, i64 1
%35 = load double, double* %34
%36 = fcmp ugt double %35, %1
%37 = sext i1 %36 to i64
br label %38
38: ; preds = %33, %28, %24, %19, %15, %10, %6, %2
%39 = phi i64 [ 0, %28 ], [ 0, %24 ], [ 0, %19 ], [ 0, %15 ], [ 0, %10 ], [ 0, %6 ], [ 0, %2 ], [ %37, %33 ]
ret i64 %39
}