#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 */
scalar_t__ feq(double, double);
int rpyeq(double roll, double pitch, double yaw, double r, double p, double y) {
  return feq(roll, r) && feq(pitch, p) && feq(yaw, y);
}


x86 assembly (clang, -O0):
<rpyeq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1030 <feq@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x31(%rbp)
je     1191 <rpyeq+0x81>
movsd  -0x10(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
call   1030 <feq@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x31(%rbp)
je     1191 <rpyeq+0x81>
movsd  -0x18(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
call   1030 <feq@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x31(%rbp)
mov    -0x31(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpyeq>:
push   %rbx
sub    $0x20,%rsp
movsd  %xmm5,0x8(%rsp)
movsd  %xmm4,0x18(%rsp)
movsd  %xmm2,(%rsp)
movsd  %xmm1,0x10(%rsp)
movaps %xmm3,%xmm1
call   1030 <feq@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     1169 <rpyeq+0x59>
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
call   1030 <feq@plt>
test   %rax,%rax
je     1169 <rpyeq+0x59>
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1030 <feq@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rpyeq(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%13 = load double, double* %7
%14 = load double, double* %10
%15 = call i64 @feq(double %13, double %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %27
17: ; preds = %6
%18 = load double, double* %8
%19 = load double, double* %11
%20 = call i64 @feq(double %18, double %19)
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %27
22: ; preds = %17
%23 = load double, double* %9
%24 = load double, double* %12
%25 = call i64 @feq(double %23, double %24)
%26 = icmp ne i64 %25, 0
br label %27
27: ; preds = %22, %17, %6
%28 = phi i1 [ false, %17 ], [ false, %6 ], [ %26, %22 ]
%29 = zext i1 %28 to i32
ret i32 %29
}

LLVM IR (-O2):
define i32 @rpyeq(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = tail call i64 @feq(double %0, double %3)
%8 = icmp eq i64 %7, 0
br i1 %8, label %16, label %9
9: ; preds = %6
%10 = tail call i64 @feq(double %1, double %4)
%11 = icmp eq i64 %10, 0
br i1 %11, label %16, label %12
12: ; preds = %9
%13 = tail call i64 @feq(double %2, double %5)
%14 = icmp ne i64 %13, 0
%15 = zext i1 %14 to i32
br label %16
16: ; preds = %12, %9, %6
%17 = phi i32 [ 0, %9 ], [ 0, %6 ], [ %15, %12 ]
ret i32 %17
}