	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calc_block_sector
_calc_block_sector:                     ## @calc_block_sector
	.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	%rbx
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r10
	movq	%rdx, %r11
	movl	%edi, %eax
	movq	_DOC_LAYOUT_PAGES_PER_BLOCK@GOTPCREL(%rip), %rcx
	movq	_DOC_LAYOUT_NBPLANES@GOTPCREL(%rip), %r14
	movl	(%r14), %r15d
	movl	(%rcx), %edx
	imull	%r15d, %edx
	decl	%r9d
	movl	%edx, %ebx
	shrl	$31, %ebx
	addl	%edx, %ebx
	sarl	%ebx
	cmpl	$2, %r9d
	setb	%cl
	cmovael	%edx, %ebx
	movq	_DOC_LAYOUT_PAGE_SIZE@GOTPCREL(%rip), %rdi
	cltd
	idivl	(%rdi)
	movl	%eax, %edi
	cltd
	idivl	%ebx
	imull	%r15d, %eax
	movl	%eax, (%rsi)
	incl	%eax
	movl	%eax, (%r11)
	movl	%edx, (%r10)
	movl	%edx, %eax
	cltd
	idivl	(%r14)
	shll	%cl, %eax
	movl	%eax, (%r10)
	andl	$1, %edi
	negl	%edi
	movq	_DOC_LAYOUT_PAGE_OOB_SIZE@GOTPCREL(%rip), %rax
	andl	(%rax), %edi
	movl	%edi, (%r8)
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DOC_LAYOUT_PAGES_PER_BLOCK,4,2 ## @DOC_LAYOUT_PAGES_PER_BLOCK
	.comm	_DOC_LAYOUT_NBPLANES,4,2        ## @DOC_LAYOUT_NBPLANES
	.comm	_DOC_LAYOUT_PAGE_SIZE,4,2       ## @DOC_LAYOUT_PAGE_SIZE
	.comm	_DOC_LAYOUT_PAGE_OOB_SIZE,4,2   ## @DOC_LAYOUT_PAGE_OOB_SIZE
	.no_dead_strip	_calc_block_sector
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_block_sector
_calc_block_sector:                     ; @calc_block_sector
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _DOC_LAYOUT_PAGES_PER_BLOCK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DOC_LAYOUT_PAGES_PER_BLOCK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _DOC_LAYOUT_NBPLANES@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DOC_LAYOUT_NBPLANES@GOTPAGEOFF]
	ldr	w10, [x9]
	mul	w8, w10, w8
	sub	w11, w5, #1
	cmp	w8, #0
	cinc	w12, w8, lt
	asr	w12, w12, #1
	cmp	w11, #2
	csel	w8, w12, w8, lo
	cset	w11, lo
Lloh5:
	adrp	x12, _DOC_LAYOUT_PAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x12, [x12, _DOC_LAYOUT_PAGE_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w12, [x12]
	sdiv	w12, w0, w12
	sdiv	w13, w12, w8
	mul	w10, w13, w10
	str	w10, [x1]
	add	w10, w10, #1
	str	w10, [x2]
	msub	w8, w13, w8, w12
	str	w8, [x3]
	ldr	w9, [x9]
	sdiv	w8, w8, w9
	lsl	w8, w8, w11
	str	w8, [x3]
	sbfx	w8, w12, #0, #1
Lloh8:
	adrp	x9, _DOC_LAYOUT_PAGE_OOB_SIZE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DOC_LAYOUT_PAGE_OOB_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	and	w8, w8, w9
	str	w8, [x4]
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DOC_LAYOUT_PAGES_PER_BLOCK,4,2 ; @DOC_LAYOUT_PAGES_PER_BLOCK
	.comm	_DOC_LAYOUT_NBPLANES,4,2        ; @DOC_LAYOUT_NBPLANES
	.comm	_DOC_LAYOUT_PAGE_SIZE,4,2       ; @DOC_LAYOUT_PAGE_SIZE
	.comm	_DOC_LAYOUT_PAGE_OOB_SIZE,4,2   ; @DOC_LAYOUT_PAGE_OOB_SIZE
	.no_dead_strip	_calc_block_sector
.subsections_via_symbols
