	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tbm_intersect_page
_tbm_intersect_page:                    ## @tbm_intersect_page
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r13
	cmpq	$0, 16(%rsi)
	je	LBB0_12
## %bb.1:
	movq	_WORDS_PER_CHUNK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_14
## %bb.2:
	movq	(%r13), %rsi
	movl	$1, %eax
	xorl	%edi, %edi
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	(%r13), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rsi,%rdi,4)
	testl	%eax, %eax
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	$0, %ecx
	cmovnel	%ecx, %eax
	movq	_WORDS_PER_CHUNK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rdi
	movslq	%ecx, %rdx
	cmpq	%rdx, %rdi
	jge	LBB0_22
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movl	(%rsi,%rdi,4), %edx
	testl	%edx, %edx
	je	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_BITS_PER_BITMAPWORD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	imull	%edi, %eax
	movslq	%eax, %r15
	addq	24(%r13), %r15
	movl	%edx, %r13d
	xorl	%r14d, %r14d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=2
	movl	%r13d, %eax
	sarl	%eax
	incq	%r14
	cmpl	$1, %r13d
	movl	%eax, %r13d
	jbe	LBB0_3
LBB0_8:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testb	$1, %r13b
	je	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	leaq	(%r15,%r14), %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_tbm_page_is_lossy
	testq	%rax, %rax
	jne	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=2
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_tbm_find_pageentry
	testq	%rax, %rax
	jne	LBB0_7
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=2
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	btrl	%r14d, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_7
LBB0_12:
	movq	24(%r13), %rsi
	movq	%r12, %rdi
	callq	_tbm_page_is_lossy
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	movl	$1, 8(%r13)
	xorl	%eax, %eax
	jmp	LBB0_22
LBB0_15:
	movq	24(%r13), %rsi
	movq	%r12, %rdi
	callq	_tbm_find_pageentry
	testq	%rax, %rax
	je	LBB0_14
## %bb.16:
	movq	%rax, %r14
	xorl	%edi, %edi
	cmpq	$0, 16(%rax)
	sete	%dil
	callq	_Assert
	movq	_WORDS_PER_PAGE@GOTPCREL(%rip), %r8
	cmpl	$0, (%r8)
	jle	LBB0_20
## %bb.17:
	movq	(%r14), %rcx
	movq	(%r13), %rdx
	movl	$1, %eax
	xorl	%esi, %esi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rdi,4), %ebx
	andl	%ebx, (%rdx,%rdi,4)
	cmovnel	%esi, %eax
	incq	%rdi
	movslq	(%r8), %rbx
	cmpq	%rbx, %rdi
	jl	LBB0_18
	jmp	LBB0_21
LBB0_14:
	movl	$1, %eax
	jmp	LBB0_22
LBB0_20:
	movl	$1, %eax
LBB0_21:
	movl	8(%r14), %ecx
	orl	%ecx, 8(%r13)
LBB0_22:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WORDS_PER_CHUNK,4,2            ## @WORDS_PER_CHUNK
	.comm	_BITS_PER_BITMAPWORD,4,2        ## @BITS_PER_BITMAPWORD
	.comm	_WORDS_PER_PAGE,4,2             ## @WORDS_PER_PAGE
	.no_dead_strip	_tbm_intersect_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tbm_intersect_page
_tbm_intersect_page:                    ; @tbm_intersect_page
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x19, x1
	ldr	x8, [x1, #16]
	cbz	x8, LBB0_11
; %bb.1:
Lloh0:
	adrp	x8, _WORDS_PER_CHUNK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WORDS_PER_CHUNK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	mov	w24, #1
	cmp	w9, #1
	b.lt	LBB0_17
; %bb.2:
	mov	x25, #0
	ldr	x8, [x19]
	mov	w20, #1
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19]
	str	w23, [x8, x25, lsl #2]
	cmp	w23, #0
	csel	w20, w20, wzr, eq
Lloh3:
	adrp	x9, _WORDS_PER_CHUNK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WORDS_PER_CHUNK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x25, x25, #1
	cmp	x25, w9, sxtw
	b.ge	LBB0_21
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	w23, [x8, x25, lsl #2]
	cbz	w23, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x28, #0
	ldr	x8, [x19, #24]
Lloh6:
	adrp	x9, _BITS_PER_BITMAPWORD@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BITS_PER_BITMAPWORD@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	mul	w9, w9, w25
	add	x26, x8, w9, sxtw
	mov	x27, x23
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	asr	w8, w27, #1
	add	x28, x28, #1
	cmp	w27, #1
	mov	x27, x8
	b.ls	LBB0_3
LBB0_8:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	tbz	w27, #0, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	add	x22, x26, x28
	mov	x0, x21
	mov	x1, x22
	bl	_tbm_page_is_lossy
	cbnz	x0, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x21
	mov	x1, x22
	bl	_tbm_find_pageentry
	lsl	w8, w24, w28
	bic	w8, w23, w8
	cmp	x0, #0
	csel	w23, w23, w8, ne
	b	LBB0_7
LBB0_11:
	ldr	x1, [x19, #24]
	mov	x0, x21
	bl	_tbm_page_is_lossy
	cbz	x0, LBB0_13
; %bb.12:
	mov	w20, #0
	mov	w8, #1
	b	LBB0_20
LBB0_13:
	ldr	x1, [x19, #24]
	mov	x0, x21
	bl	_tbm_find_pageentry
	cbz	x0, LBB0_17
; %bb.14:
	mov	x21, x0
	ldr	x8, [x0, #16]
	cmp	x8, #0
	cset	w0, eq
	bl	_Assert
Lloh9:
	adrp	x8, _WORDS_PER_PAGE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WORDS_PER_PAGE@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_18
; %bb.15:
	mov	x9, #0
	ldr	x10, [x21]
	ldr	x11, [x19]
	mov	w20, #1
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	lsl	x12, x9, #2
	ldr	w13, [x10, x12]
	ldr	w14, [x11, x12]
	ands	w13, w14, w13
	str	w13, [x11, x12]
	csel	w20, w20, wzr, eq
	add	x9, x9, #1
	ldrsw	x12, [x8]
	cmp	x9, x12
	b.lt	LBB0_16
	b	LBB0_19
LBB0_17:
	mov	w20, #1
	b	LBB0_21
LBB0_18:
	mov	w20, #1
LBB0_19:
	ldr	w8, [x21, #8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
LBB0_20:
	str	w8, [x19, #8]
LBB0_21:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_WORDS_PER_CHUNK,4,2            ; @WORDS_PER_CHUNK
	.comm	_BITS_PER_BITMAPWORD,4,2        ; @BITS_PER_BITMAPWORD
	.comm	_WORDS_PER_PAGE,4,2             ; @WORDS_PER_PAGE
	.no_dead_strip	_tbm_intersect_page
.subsections_via_symbols
