	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nand_read_subpage
_nand_read_subpage:                     ## @nand_read_subpage
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $ecx killed $ecx def $rcx
	movl	%edx, %ebx
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	40(%rsi), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_NAND_BUSWIDTH_16@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rsi), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	16(%rsi), %r15d
	movl	%edx, %eax
	cltd
	idivl	%r15d
	movl	%eax, %esi
	leal	(%rbx,%rcx), %eax
	decl	%eax
	cltd
	idivl	%r15d
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	%eax, %r13d
	subl	%esi, %r13d
	incl	%r13d
	movl	%r13d, %ebx
	imull	%r15d, %ebx
	imull	20(%r12), %r13d
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	imull	%esi, %r15d
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.1:
	movq	_NAND_CMD_RNDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	movl	$-1, %ecx
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	callq	*64(%r12)
	movq	-48(%rbp), %r8                  ## 8-byte Reload
LBB0_2:
	movslq	%r15d, %rax
	leaq	(%r8,%rax,4), %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	*56(%r12)
	testl	%r13d, %r13d
	jle	LBB0_6
## %bb.3:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %r14
	xorl	%r13d, %r13d
	movq	%r15, %rbx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movslq	%r13d, %r13
	leaq	(,%r13,4), %rdx
	addq	(%rax), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	*32(%r12)
	movl	20(%r12), %eax
	addl	%eax, %r13d
	movslq	16(%r12), %rcx
	leaq	(%rbx,%rcx,4), %rbx
	cmpl	%r14d, %r13d
	jl	LBB0_4
## %bb.5:
	cmpl	$1, %r14d
	movq	%r14, %r13
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jle	LBB0_6
## %bb.9:
	leal	-1(%r13), %edx
	movl	%eax, %ecx
	imull	-56(%rbp), %ecx                 ## 4-byte Folded Reload
	movslq	%ecx, %rcx
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	leaq	(%r8,%rcx,4), %rsi
	addq	$4, %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	-4(%rsi,%rdi,4), %ebx
	incl	%ebx
	cmpl	(%rsi,%rdi,4), %ebx
	jne	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_10 Depth=1
	incq	%rdi
	cmpq	%rdi, %rdx
	jne	LBB0_10
	jmp	LBB0_7
LBB0_6:
	movl	20(%r12), %eax
	movl	%eax, %ecx
	imull	-56(%rbp), %ecx                 ## 4-byte Folded Reload
	movslq	%ecx, %rcx
	movq	-64(%rbp), %r8                  ## 8-byte Reload
LBB0_7:
	xorl	%ebx, %ebx
	cmpl	$0, -68(%rbp)                   ## 4-byte Folded Reload
	setne	%bl
	movl	(%r8,%rcx,4), %ecx
	movl	%ebx, %edx
	notl	%edx
	andl	%ecx, %edx
	movl	%edx, %edi
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	andl	%ebx, %ecx
	addl	%r13d, %ecx
	movl	-72(%rbp), %edx                 ## 4-byte Reload
	incl	%edx
	imull	%eax, %edx
	movslq	%edx, %rax
	andl	(%r8,%rax,4), %ebx
	addl	%ecx, %ebx
	movq	_NAND_CMD_RNDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	addl	%edi, %edx
	movq	%r14, %rdi
	movl	$-1, %ecx
	callq	*64(%r12)
	movslq	-48(%rbp), %rsi                 ## 4-byte Folded Reload
	shlq	$2, %rsi
	addq	48(%r12), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
LBB0_12:
	callq	*56(%r12)
	testl	%r13d, %r13d
	jle	LBB0_19
## %bb.13:
	movq	8(%r12), %rcx
	movq	48(%r12), %rax
	movq	8(%rcx), %rcx
	movl	%r13d, %r8d
	cmpl	$1, %r13d
	jne	LBB0_20
## %bb.14:
	xorl	%edx, %edx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_20:
	movl	%r8d, %r9d
	andl	$-2, %r9d
	xorl	%edx, %edx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movl	20(%r12), %ebx
	imull	%esi, %ebx
	addl	%edx, %ebx
	movslq	%ebx, %rbx
	movslq	(%rdi,%rbx,4), %rbx
	movl	(%rax,%rbx,4), %ebx
	movl	%ebx, (%rcx,%rdx,4)
	movl	20(%r12), %ebx
	imull	%esi, %ebx
	addl	%edx, %ebx
	incl	%ebx
	movslq	%ebx, %rbx
	movslq	(%rdi,%rbx,4), %rbx
	movl	(%rax,%rbx,4), %ebx
	movl	%ebx, 4(%rcx,%rdx,4)
	addq	$2, %rdx
	cmpq	%rdx, %r9
	jne	LBB0_21
LBB0_15:
	testb	$1, %r8b
	je	LBB0_17
## %bb.16:
	imull	20(%r12), %esi
	addl	%edx, %esi
	movslq	%esi, %rsi
	movslq	(%rdi,%rsi,4), %rsi
	movl	(%rax,%rsi,4), %eax
	movl	%eax, (%rcx,%rdx,4)
LBB0_17:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movslq	%ebx, %rbx
	leaq	(,%rbx,4), %rcx
	movq	8(%rax), %rdx
	addq	%rcx, %rdx
	addq	(%rax), %rcx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	*24(%r12)
	xorl	%ecx, %ecx
	cmpl	$-1, %eax
	movl	$1, %edx
	cmovel	%edx, %eax
	sete	%cl
	addl	%eax, 8(%r14,%rcx,4)
	addl	20(%r12), %ebx
	movslq	16(%r12), %rax
	leaq	(%r15,%rax,4), %r15
	cmpl	%r13d, %ebx
	jl	LBB0_18
LBB0_19:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_NAND_CMD_RNDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	%r14, %rdi
	movl	$-1, %ecx
	callq	*64(%r12)
	movq	48(%r12), %rsi
	movl	4(%r14), %edx
	movq	%r14, %rdi
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_BUSWIDTH_16,4,2           ## @NAND_BUSWIDTH_16
	.comm	_NAND_CMD_RNDOUT,4,2            ## @NAND_CMD_RNDOUT
	.no_dead_strip	_nand_read_subpage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nand_read_subpage
_nand_read_subpage:                     ; @nand_read_subpage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x4
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x1, #40]
	ldr	x25, [x8]
	ldr	w8, [x1]
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
Lloh0:
	adrp	x8, _NAND_BUSWIDTH_16@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_BUSWIDTH_16@GOTPAGEOFF]
Lloh2:
	ldr	w28, [x8]
	ldp	w8, w9, [x1, #16]
	sdiv	w26, w2, w8
	add	w10, w2, w3
	sub	w10, w10, #1
	sdiv	w27, w10, w8
	sub	w10, w27, w26
	add	w10, w10, #1
	mul	w22, w10, w8
	mul	w24, w10, w9
	mul	w23, w26, w8
Lloh3:
	adrp	x9, _NAND_CMD_RNDOUT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NAND_CMD_RNDOUT@GOTPAGEOFF]
	cbz	w23, LBB0_2
; %bb.1:
	ldr	x8, [x19, #64]
	ldr	w1, [x9]
	mov	x0, x20
	mov	x2, x23
	mov	w3, #-1
	blr	x8
LBB0_2:
	add	x21, x21, w23, sxtw #2
	ldr	x8, [x19, #56]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	blr	x8
	cmp	w24, #1
	b.lt	LBB0_9
; %bb.3:
	mov	w23, #0
	mov	x22, x21
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	ldr	x9, [x19, #8]
	ldr	x9, [x9]
	add	x2, x9, w23, sxtw #2
	mov	x0, x20
	mov	x1, x22
	blr	x8
	ldp	w9, w8, [x19, #16]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	add	x22, x22, x9, lsl #2
	add	w23, w8, w23
	cmp	w23, w24
	b.lt	LBB0_4
; %bb.5:
	subs	w10, w24, #1
	b.le	LBB0_9
; %bb.6:
	mul	w11, w8, w26
	sxtw	x9, w11
	add	x11, x25, w11, sxtw #2
	add	x11, x11, #4
Lloh5:
	adrp	x14, _NAND_CMD_RNDOUT@GOTPAGE
Lloh6:
	ldr	x14, [x14, _NAND_CMD_RNDOUT@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w12, w13, [x11, #-4]
	add	w12, w12, #1
	cmp	w12, w13
	b.ne	LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x11, x11, #4
	subs	x10, x10, #1
	b.ne	LBB0_7
	b	LBB0_10
LBB0_9:
	ldr	w8, [x19, #20]
	mul	w9, w8, w26
	sxtw	x9, w9
Lloh7:
	adrp	x14, _NAND_CMD_RNDOUT@GOTPAGE
Lloh8:
	ldr	x14, [x14, _NAND_CMD_RNDOUT@GOTPAGEOFF]
LBB0_10:
	ldr	w10, [sp, #12]                  ; 4-byte Folded Reload
	and	w10, w28, w10
	cmp	w10, #0
	cset	w10, ne
	ldr	w9, [x25, x9, lsl #2]
	bic	w23, w9, w10
	and	w9, w9, w10
	madd	w8, w8, w27, w8
	ldr	w8, [x25, w8, sxtw #2]
	and	w8, w8, w10
	add	w9, w9, w24
	add	w22, w9, w8
	ldr	x8, [x19, #64]
	ldr	w1, [x14]
	ldr	w9, [x20]
	add	w2, w9, w23
	mov	x0, x20
	mov	w3, #-1
	blr	x8
	ldp	x9, x8, [x19, #48]
	add	x1, x9, w23, sxtw #2
	mov	x0, x20
	mov	x2, x22
LBB0_11:
	blr	x8
	cmp	w24, #1
	b.lt	LBB0_16
; %bb.12:
	mov	x8, #0
	ldr	x9, [x19, #48]
	ldr	x10, [x19, #8]
	ldr	x10, [x10, #8]
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x19, #20]
	madd	w11, w11, w26, w8
	ldrsw	x11, [x25, w11, sxtw #2]
	ldr	w11, [x9, x11, lsl #2]
	str	w11, [x10, x8, lsl #2]
	add	x8, x8, #1
	cmp	x24, x8
	b.ne	LBB0_13
; %bb.14:
	mov	w22, #0
	mov	w23, #8
	mov	w25, #12
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	x9, [x19, #8]
	sbfiz	x10, x22, #2, #32
	ldp	x9, x11, [x9]
	add	x2, x11, x10
	add	x3, x9, x10
	mov	x0, x20
	mov	x1, x21
	blr	x8
	cmn	w0, #1
	csel	x8, x25, x23, eq
	csinc	w9, w0, wzr, ne
	ldr	w10, [x20, x8]
	add	w9, w10, w9
	str	w9, [x20, x8]
	ldp	w9, w8, [x19, #16]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	add	x21, x21, x9, lsl #2
	add	w22, w8, w22
	cmp	w22, w24
	b.lt	LBB0_15
LBB0_16:
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_17:
	ldr	x8, [x19, #64]
	ldr	w1, [x14]
	ldr	w2, [x20]
	mov	x0, x20
	mov	w3, #-1
	blr	x8
	ldp	x1, x8, [x19, #48]
	ldr	w2, [x20, #4]
	mov	x0, x20
	b	LBB0_11
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_BUSWIDTH_16,4,2           ; @NAND_BUSWIDTH_16
	.comm	_NAND_CMD_RNDOUT,4,2            ; @NAND_CMD_RNDOUT
	.no_dead_strip	_nand_read_subpage
.subsections_via_symbols
