	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function doc_reload_bbt
_doc_reload_bbt:                        ## @doc_reload_bbt
	.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	%rdi, %r15
	movq	_DOC_LAYOUT_BLOCK_BBT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	(%rdi), %rdi
	movq	8(%r15), %r13
	incq	%rdi
	movq	_DOC_LAYOUT_PAGE_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	shll	$3, %esi
	callq	_DIV_ROUND_UP
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	leal	1(%rbx), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_DOC_LAYOUT_PAGE_BBT@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	addq	%r12, %rcx
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	xorl	%r8d, %r8d
	callq	_doc_read_page_prepare
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_doc_read_page_ecc_init
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %esi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_doc_read_page_getbytes
	movslq	(%r14), %rax
	leaq	(%r13,%rax,4), %r13
	incq	%r12
	cmpq	-56(%rbp), %r12                 ## 8-byte Folded Reload
	jb	LBB0_2
	jmp	LBB0_8
LBB0_7:
	movl	%eax, %ebx
	jmp	LBB0_8
LBB0_5:
	xorl	%ebx, %ebx
LBB0_8:
	movq	%r15, %rdi
	callq	_doc_read_page_finish
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DOC_LAYOUT_BLOCK_BBT,4,2       ## @DOC_LAYOUT_BLOCK_BBT
	.comm	_DOC_LAYOUT_PAGE_SIZE,4,2       ## @DOC_LAYOUT_PAGE_SIZE
	.comm	_DOC_LAYOUT_PAGE_BBT,8,3        ## @DOC_LAYOUT_PAGE_BBT
	.no_dead_strip	_doc_reload_bbt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function doc_reload_bbt
_doc_reload_bbt:                        ; @doc_reload_bbt
	.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	x19, x0
Lloh0:
	adrp	x8, _DOC_LAYOUT_BLOCK_BBT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DOC_LAYOUT_BLOCK_BBT@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	ldp	x8, x21, [x0]
	add	x0, x8, #1
Lloh3:
	adrp	x24, _DOC_LAYOUT_PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _DOC_LAYOUT_PAGE_SIZE@GOTPAGEOFF]
	ldr	w8, [x24]
	lsl	w1, w8, #3
	bl	_DIV_ROUND_UP
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x25, #0
	add	w22, w20, #1
Lloh5:
	adrp	x26, _DOC_LAYOUT_PAGE_BBT@GOTPAGE
Lloh6:
	ldr	x26, [x26, _DOC_LAYOUT_PAGE_BBT@GOTPAGEOFF]
	mov	w27, w0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26]
	add	x3, x25, x8
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	mov	w4, #0
	bl	_doc_read_page_prepare
	cbnz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	bl	_doc_read_page_ecc_init
	cbnz	w0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x21
	mov	w3, #1
	mov	w4, #0
	bl	_doc_read_page_getbytes
	ldrsw	x8, [x24]
	add	x21, x21, x8, lsl #2
	add	x25, x25, #1
	cmp	x25, x27
	b.lo	LBB0_2
LBB0_5:
	mov	w23, #0
	b	LBB0_7
LBB0_6:
	mov	x23, x0
LBB0_7:
	mov	x0, x19
	bl	_doc_read_page_finish
	mov	x0, x23
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_DOC_LAYOUT_BLOCK_BBT,4,2       ; @DOC_LAYOUT_BLOCK_BBT
	.comm	_DOC_LAYOUT_PAGE_SIZE,4,2       ; @DOC_LAYOUT_PAGE_SIZE
	.comm	_DOC_LAYOUT_PAGE_BBT,8,3        ; @DOC_LAYOUT_PAGE_BBT
	.no_dead_strip	_doc_reload_bbt
.subsections_via_symbols
