int equal3(double *restrict a, double *restrict b) {
  return *a++ == *b++ && *a++ == *b++ && *a == *b;
}


x86 assembly (clang, -O0):
<equal3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rcx
mov    %rcx,%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
ucomisd (%rcx),%xmm0
mov    %al,-0x11(%rbp)
jne    1195 <equal3+0x95>
jp     1195 <equal3+0x95>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rcx
mov    %rcx,%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
ucomisd (%rcx),%xmm0
mov    %al,-0x11(%rbp)
jne    1195 <equal3+0x95>
jp     1195 <equal3+0x95>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomisd (%rax),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal3>:
movsd  (%rdi),%xmm0
xor    %eax,%eax
ucomisd (%rsi),%xmm0
jne    112f <equal3+0x2f>
jp     112f <equal3+0x2f>
movsd  0x8(%rdi),%xmm0
ucomisd 0x8(%rsi),%xmm0
jne    112f <equal3+0x2f>
jp     112f <equal3+0x2f>
movsd  0x10(%rsi),%xmm0
cmpeqsd 0x10(%rdi),%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @equal3(double* noalias %0, double* noalias %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, i32 1
store double* %6, double** %3
%7 = load double, double* %5
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i32 1
store double* %9, double** %4
%10 = load double, double* %8
%11 = fcmp oeq double %7, %10
br i1 %11, label %12, label %26
12: ; preds = %2
%13 = load double*, double** %3
%14 = getelementptr inbounds double, double* %13, i32 1
store double* %14, double** %3
%15 = load double, double* %13
%16 = load double*, double** %4
%17 = getelementptr inbounds double, double* %16, i32 1
store double* %17, double** %4
%18 = load double, double* %16
%19 = fcmp oeq double %15, %18
br i1 %19, label %20, label %26
20: ; preds = %12
%21 = load double*, double** %3
%22 = load double, double* %21
%23 = load double*, double** %4
%24 = load double, double* %23
%25 = fcmp oeq double %22, %24
br label %26
26: ; preds = %20, %12, %2
%27 = phi i1 [ false, %12 ], [ false, %2 ], [ %25, %20 ]
%28 = zext i1 %27 to i32
ret i32 %28
}

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