	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bms_intersect                  ## -- Begin function bms_intersect
	.p2align	4, 0x90
_bms_intersect:                         ## @bms_intersect
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.1:
	movq	%rsi, %rbx
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.2:
	movq	%rdi, %r14
	movq	(%rdi), %r15
	movq	(%rbx), %r12
	cmpq	%r12, %r15
	cmovgq	%rbx, %rdi
	callq	_bms_copy
	movq	(%rax), %rdi
	testl	%edi, %edi
	jle	LBB0_15
## %bb.3:
	cmpq	%r12, %r15
	cmovgq	%r14, %rbx
	movq	8(%rbx), %rcx
	movq	8(%rax), %rdx
	movl	%edi, %r9d
	cmpq	$8, %r9
	jb	LBB0_4
## %bb.5:
	leaq	(%rcx,%r9,4), %rsi
	cmpq	%rsi, %rdx
	jae	LBB0_8
## %bb.6:
	leaq	(%rdx,%r9,4), %rsi
	cmpq	%rsi, %rcx
	jae	LBB0_8
LBB0_4:
	xorl	%esi, %esi
LBB0_11:
	subl	%esi, %edi
	movq	%rsi, %r8
	notq	%r8
	addq	%r9, %r8
	andq	$3, %rdi
	je	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rsi,4), %ebx
	andl	%ebx, (%rdx,%rsi,4)
	incq	%rsi
	decq	%rdi
	jne	LBB0_12
LBB0_13:
	cmpq	$3, %r8
	jb	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rsi,4), %edi
	andl	%edi, (%rdx,%rsi,4)
	movl	4(%rcx,%rsi,4), %edi
	andl	%edi, 4(%rdx,%rsi,4)
	movl	8(%rcx,%rsi,4), %edi
	andl	%edi, 8(%rdx,%rsi,4)
	movl	12(%rcx,%rsi,4), %edi
	andl	%edi, 12(%rdx,%rsi,4)
	addq	$4, %rsi
	cmpq	%rsi, %r9
	jne	LBB0_14
	jmp	LBB0_15
LBB0_8:
	movl	%edi, %r8d
	andl	$7, %r8d
	movq	%r9, %rsi
	subq	%r8, %rsi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movups	(%rcx,%rbx,4), %xmm0
	movups	16(%rcx,%rbx,4), %xmm1
	movups	(%rdx,%rbx,4), %xmm2
	andps	%xmm0, %xmm2
	movups	16(%rdx,%rbx,4), %xmm0
	andps	%xmm1, %xmm0
	movups	%xmm2, (%rdx,%rbx,4)
	movups	%xmm0, 16(%rdx,%rbx,4)
	addq	$8, %rbx
	cmpq	%rbx, %rsi
	jne	LBB0_9
## %bb.10:
	testq	%r8, %r8
	jne	LBB0_11
LBB0_15:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bms_intersect                  ; -- Begin function bms_intersect
	.p2align	2
_bms_intersect:                         ; @bms_intersect
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	mov	x0, #0
	cbz	x20, LBB0_11
; %bb.1:
	mov	x19, x1
	cbz	x1, LBB0_11
; %bb.2:
	ldr	x21, [x20]
	ldr	x22, [x19]
	cmp	x21, x22
	csel	x0, x19, x20, gt
	bl	_bms_copy
	ldr	x8, [x0]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.3:
	and	x8, x8, #0xffffffff
	cmp	x21, x22
	csel	x9, x20, x19, gt
	ldr	x9, [x9, #8]
	ldr	x10, [x0, #8]
	cmp	x8, #16
	b.lo	LBB0_8
; %bb.4:
	lsl	x11, x8, #2
	add	x12, x10, x11
	add	x11, x9, x11
	cmp	x10, x11
	ccmp	x9, x12, #2, lo
	b.lo	LBB0_8
; %bb.5:
	and	x12, x8, #0xf
	and	x11, x8, #0xfffffff0
	add	x13, x10, #32
	add	x14, x9, #32
	mov	x15, x11
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x14, #-32]
	ldp	q2, q3, [x14], #64
	ldp	q4, q5, [x13, #-32]
	ldp	q6, q7, [x13]
	and.16b	v0, v4, v0
	and.16b	v1, v5, v1
	and.16b	v2, v6, v2
	and.16b	v3, v7, v3
	stp	q0, q1, [x13, #-32]
	stp	q2, q3, [x13], #64
	subs	x15, x15, #16
	b.ne	LBB0_6
; %bb.7:
	cbnz	x12, LBB0_9
	b	LBB0_11
LBB0_8:
	mov	x11, #0
LBB0_9:
	lsl	x12, x11, #2
	add	x10, x10, x12
	add	x9, x9, x12
	sub	x8, x8, x11
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9], #4
	ldr	w12, [x10]
	and	w11, w12, w11
	str	w11, [x10], #4
	subs	x8, x8, #1
	b.ne	LBB0_10
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
