int qd_eq_qd_dd(const double *a, const double *b) {
  return ((a[0] == b[0]) && (a[1] == b[1]) && (a[2] == 0.0) && (a[3] == 0.0))
             ? 1
             : 0;
}


x86 assembly (clang, -O0):
<qd_eq_qd_dd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
ucomisd (%rcx),%xmm0
mov    %al,-0x11(%rbp)
jne    118c <qd_eq_qd_dd+0x8c>
jp     118c <qd_eq_qd_dd+0x8c>
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
ucomisd 0x8(%rcx),%xmm0
mov    %al,-0x11(%rbp)
jne    118c <qd_eq_qd_dd+0x8c>
jp     118c <qd_eq_qd_dd+0x8c>
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jne    118c <qd_eq_qd_dd+0x8c>
jp     118c <qd_eq_qd_dd+0x8c>
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qd_eq_qd_dd>:
movsd  (%rdi),%xmm0
xor    %eax,%eax
ucomisd (%rsi),%xmm0
jne    113b <qd_eq_qd_dd+0x3b>
jp     113b <qd_eq_qd_dd+0x3b>
movsd  0x8(%rdi),%xmm0
ucomisd 0x8(%rsi),%xmm0
jne    113b <qd_eq_qd_dd+0x3b>
jp     113b <qd_eq_qd_dd+0x3b>
movsd  0x10(%rdi),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jne    113b <qd_eq_qd_dd+0x3b>
jp     113b <qd_eq_qd_dd+0x3b>
cmpeqsd 0x18(%rdi),%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @qd_eq_qd_dd(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 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = fcmp oeq double %7, %10
br i1 %11, label %12, label %30
12: ; preds = %2
%13 = load double*, double** %3
%14 = getelementptr inbounds double, double* %13, i64 1
%15 = load double, double* %14
%16 = load double*, double** %4
%17 = getelementptr inbounds double, double* %16, i64 1
%18 = load double, double* %17
%19 = fcmp oeq double %15, %18
br i1 %19, label %20, label %30
20: ; preds = %12
%21 = load double*, double** %3
%22 = getelementptr inbounds double, double* %21, i64 2
%23 = load double, double* %22
%24 = fcmp oeq double %23, 0.000000e+00
br i1 %24, label %25, label %30
25: ; preds = %20
%26 = load double*, double** %3
%27 = getelementptr inbounds double, double* %26, i64 3
%28 = load double, double* %27
%29 = fcmp oeq double %28, 0.000000e+00
br label %30
30: ; preds = %25, %20, %12, %2
%31 = phi i1 [ false, %20 ], [ false, %12 ], [ false, %2 ], [ %29, %25 ]
%32 = zext i1 %31 to i64
%33 = select i1 %31, i32 1, i32 0
ret i32 %33
}

LLVM IR (-O2):
define i32 @qd_eq_qd_dd(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fcmp oeq double %3, %4
br i1 %5, label %6, label %21
6: ; preds = %2
%7 = getelementptr inbounds double, double* %0, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %1, i64 1
%10 = load double, double* %9
%11 = fcmp oeq double %8, %10
br i1 %11, label %12, label %21
12: ; preds = %6
%13 = getelementptr inbounds double, double* %0, i64 2
%14 = load double, double* %13
%15 = fcmp oeq double %14, 0.000000e+00
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = getelementptr inbounds double, double* %0, i64 3
%18 = load double, double* %17
%19 = fcmp oeq double %18, 0.000000e+00
%20 = zext i1 %19 to i32
br label %21
21: ; preds = %16, %12, %6, %2
%22 = phi i32 [ 0, %12 ], [ 0, %6 ], [ 0, %2 ], [ %20, %16 ]
ret i32 %22
}