	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nand_read_page_hwecc
_nand_read_page_hwecc:                  ## @nand_read_page_hwecc
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movslq	(%rsi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movslq	4(%rsi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	8(%rsi), %r15d
	movq	64(%rsi), %rax
	movq	(%rax), %rcx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	40(%rsi), %rax
	movq	(%rax), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.1:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(,%rax,4), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	(,%rax,4), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_NAND_ECC_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	*32(%r14)
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	*56(%r14)
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	*24(%r14)
	addq	-56(%rbp), %r12                 ## 8-byte Folded Reload
	addq	-104(%rbp), %r13                ## 8-byte Folded Reload
	decl	%r15d
	jne	LBB0_2
LBB0_3:
	movq	48(%r14), %rsi
	movl	(%rbx), %edx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	*56(%r14)
	cmpl	$0, 12(%r14)
	movq	%r14, %r13
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	jle	LBB0_6
## %bb.4:
	movq	48(%r13), %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdi,%rcx,8), %rsi
	movl	(%rax,%rsi,4), %esi
	movl	%esi, (%r15,%rcx,4)
	incq	%rcx
	movslq	12(%r13), %rsi
	cmpq	%rsi, %rcx
	jl	LBB0_5
LBB0_6:
	movl	8(%r13), %r12d
	testl	%r12d, %r12d
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_9
## %bb.7:
	shlq	$2, %rax
	shlq	$2, %r9
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	*16(%r13)
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %ecx
	shrl	$31, %ecx
	testl	%eax, %eax
	movl	$1, %esi
	cmovsl	%esi, %eax
	addl	%eax, 4(%rdi,%rcx,4)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addq	%rax, %r15
	addq	%rax, %r14
	addq	%r9, %rbx
	decl	%r12d
	jne	LBB0_8
LBB0_9:
	xorl	%eax, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_ECC_READ,4,2              ## @NAND_ECC_READ
	.no_dead_strip	_nand_read_page_hwecc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nand_read_page_hwecc
_nand_read_page_hwecc:                  ; @nand_read_page_hwecc
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldpsw	x28, x8, [x1]
	ldr	w25, [x1, #8]
	ldr	x9, [x1, #64]
	ldp	x26, x10, [x9]
	ldr	x9, [x1, #40]
	ldr	x9, [x9]
	stp	x9, x10, [sp]                   ; 16-byte Folded Spill
	lsl	x27, x8, #2
	cbz	w25, LBB0_3
; %bb.1:
	lsl	x22, x28, #2
	mov	x23, x19
	ldr	x24, [sp, #8]                   ; 8-byte Folded Reload
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #32]
Lloh0:
	adrp	x9, _NAND_ECC_READ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NAND_ECC_READ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	mov	x0, x21
	blr	x8
	ldr	x8, [x20, #56]
	mov	x0, x21
	mov	x1, x23
	mov	x2, x28
	blr	x8
	ldr	x8, [x20, #24]
	mov	x0, x21
	mov	x1, x23
	mov	x2, x24
	blr	x8
	add	x24, x24, x27
	add	x23, x23, x22
	subs	w25, w25, #1
	b.ne	LBB0_2
LBB0_3:
	ldp	x1, x8, [x20, #48]
	ldr	w2, [x21]
	mov	x0, x21
	blr	x8
	ldr	w8, [x20, #12]
	cmp	w8, #1
	ldr	x11, [sp]                       ; 8-byte Folded Reload
	b.lt	LBB0_6
; %bb.4:
	mov	x8, #0
	ldr	x9, [x20, #48]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x11, x8, lsl #3]
	ldr	w10, [x9, x10, lsl #2]
	str	w10, [x26, x8, lsl #2]
	add	x8, x8, #1
	ldrsw	x10, [x20, #12]
	cmp	x8, x10
	b.lt	LBB0_5
LBB0_6:
	ldr	w23, [x20, #8]
	ldr	x25, [sp, #8]                   ; 8-byte Folded Reload
	cbz	w23, LBB0_9
; %bb.7:
	mov	x24, #0
	lsl	x22, x28, #2
	mov	w28, #8
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	add	x2, x26, x24
	add	x3, x25, x24
	mov	x0, x21
	mov	x1, x19
	blr	x8
	cmp	w0, #0
	mov	w8, #4
	csel	x8, x28, x8, lt
	csinc	w9, w0, wzr, ge
	ldr	w10, [x21, x8]
	add	w9, w10, w9
	str	w9, [x21, x8]
	add	x24, x24, x27
	add	x19, x19, x22
	subs	w23, w23, #1
	b.ne	LBB0_8
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_ECC_READ,4,2              ; @NAND_ECC_READ
	.no_dead_strip	_nand_read_page_hwecc
.subsections_via_symbols
