	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sunxi_nfc_hw_ecc_read_chunks_dma
_sunxi_nfc_hw_ecc_read_chunks_dma:      ## @sunxi_nfc_hw_ecc_read_chunks_dma
	.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
	movl	%r8d, %r12d
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, -68(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	_NAND_NEED_SCRAMBLING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rdi), %eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	28(%rdi), %edi
	callq	_to_sunxi_nfc
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_nand_to_mtd
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	$0, -60(%rbp)
	movq	%r15, %rdi
	callq	_sunxi_nfc_wait_cmd_fifo_empty
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_24
## %bb.1:
	movl	16(%r14), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-64(%rbp), %r9
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%r12d, %ecx
	callq	_sunxi_nfc_dma_op_prepare
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_24
## %bb.2:
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	%r14, %rdi
	callq	_sunxi_nfc_hw_ecc_enable
	movq	%r14, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	xorl	%edx, %edx
	callq	_sunxi_nfc_randomizer_config
	movq	%r14, %rdi
	callq	_sunxi_nfc_randomizer_enable
	movq	_NAND_CMD_RNDOUTSTART@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$16, %eax
	movq	_NAND_CMD_RNDOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	shll	$8, %edi
	orl	%eax, %edi
	movq	_NAND_CMD_READSTART@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_NFC_REG_RCMD_SET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	callq	_writel
	movl	8(%r15), %edi
	callq	_dma_async_issue_pending
	movq	_NFC_PAGE_OP@GOTPCREL(%rip), %rax
	movq	_NFC_DATA_SWAP_METHOD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_NFC_DATA_TRANS@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_NFC_REG_CMD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	callq	_writel
	movq	_NFC_CMD_INT_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_sunxi_nfc_wait_events
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	movl	8(%r15), %edi
	callq	_dmaengine_terminate_all
	movq	%r14, %rdi
	callq	_sunxi_nfc_randomizer_disable
	movq	%r14, %rdi
	callq	_sunxi_nfc_hw_ecc_disable
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movq	%r15, %rdi
	callq	_sunxi_nfc_dma_op_cleanup
	jmp	LBB0_24
LBB0_4:
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	movq	%r14, %rdi
	callq	_sunxi_nfc_randomizer_disable
	movq	%r14, %rdi
	callq	_sunxi_nfc_hw_ecc_disable
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movq	%r15, %rdi
	callq	_sunxi_nfc_dma_op_cleanup
	movq	_NFC_REG_ECC_ST@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r15), %rdi
	callq	_readl
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_21
## %bb.5:
	xorl	%r15d, %r15d
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	incl	%r15d
	cmpl	%r15d, %ebx
	je	LBB0_14
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movslq	16(%r14), %rax
	movslq	%r15d, %rcx
	imulq	%rcx, %rax
	movslq	20(%r14), %r12
	addq	$4, %r12
	imulq	%rcx, %r12
	leaq	(,%r12,4), %r13
	addq	8(%r14), %r13
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	leaq	(%rdx,%rax,4), %rsi
	movl	$0, %eax
	cmoveq	%rax, %rsi
	movl	-68(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, %ebx
	movq	%r13, %rdx
	cmoveq	%rax, %rdx
	movq	%r14, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	-56(%rbp), %r8d                 ## 4-byte Reload
	leaq	-76(%rbp), %r9
	callq	_sunxi_nfc_hw_ecc_correct
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%eax, %edx
	movl	-76(%rbp), %eax
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	testl	%eax, %eax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	addl	(%rax), %r12d
	movl	20(%r14), %ecx
	addl	$4, %ecx
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%edx, %r12d
	movq	%r13, %rdx
	xorl	%r8d, %r8d
	callq	_nand_change_read_column_op
	xorl	%ecx, %ecx
	testl	%r15d, %r15d
	sete	%cl
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	%r15d, %edx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	callq	_sunxi_nfc_hw_ecc_get_prot_oob_bytes
	movl	%r12d, %edx
	movl	-76(%rbp), %eax
	jmp	LBB0_12
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	testl	%eax, %eax
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	$1, %ecx
	cmovnel	%ecx, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	leaq	-60(%rbp), %rsi
	callq	_sunxi_nfc_hw_ecc_update_stats
	jmp	LBB0_13
LBB0_14:
	movq	_NFC_ECC_ERR_MSK@GOTPCREL(%rip), %rax
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, (%rax)
	je	LBB0_21
## %bb.15:
	xorl	%r13d, %r13d
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	addl	(%rax), %ebx
	movl	20(%r14), %ecx
	addl	$4, %ecx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdx
	xorl	%r8d, %r8d
	callq	_nand_change_read_column_op
	movl	16(%r14), %esi
	movl	20(%r14), %ecx
	addl	$4, %ecx
	movl	24(%r14), %eax
	movl	%eax, (%rsp)
	movq	%r12, %rdi
	movq	%rbx, %rdx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_nand_check_erased_ecc_chunk
	testl	%eax, %eax
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	$1, %edx
	cmovnsl	%edx, %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	leaq	-60(%rbp), %rsi
	movl	%eax, %edx
	callq	_sunxi_nfc_hw_ecc_update_stats
LBB0_20:                                ##   in Loop: Header=BB0_16 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	incl	%r13d
	cmpl	%r13d, %eax
	je	LBB0_21
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movslq	16(%r14), %r15
	movslq	%r13d, %r12
	movslq	20(%r14), %rbx
	addq	$4, %rbx
	imulq	%r12, %rbx
	leaq	(,%rbx,4), %rax
	addq	8(%r14), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movl	%r12d, %edi
	callq	_NFC_ECC_ERR
	testl	%eax, -56(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	imulq	%r12, %r15
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15,4), %r12
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	16(%r14), %ecx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%r12, %rdx
	xorl	%r8d, %r8d
	callq	_nand_change_read_column_op
	jmp	LBB0_19
LBB0_21:
	cmpl	$0, -68(%rbp)                   ## 4-byte Folded Reload
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	je	LBB0_23
## %bb.22:
	movq	8(%r14), %rsi
	xorl	%ecx, %ecx
	testl	%eax, %eax
	sete	%cl
	movq	%r14, %rdi
	xorl	%edx, %edx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	callq	_sunxi_nfc_hw_ecc_read_extra_oob
LBB0_23:
	movl	-60(%rbp), %ebx
LBB0_24:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_NEED_SCRAMBLING,4,2       ## @NAND_NEED_SCRAMBLING
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_NAND_CMD_RNDOUTSTART,4,2       ## @NAND_CMD_RNDOUTSTART
	.comm	_NAND_CMD_RNDOUT,4,2            ## @NAND_CMD_RNDOUT
	.comm	_NAND_CMD_READSTART,4,2         ## @NAND_CMD_READSTART
	.comm	_NFC_REG_RCMD_SET,8,3           ## @NFC_REG_RCMD_SET
	.comm	_NFC_PAGE_OP,4,2                ## @NFC_PAGE_OP
	.comm	_NFC_DATA_SWAP_METHOD,4,2       ## @NFC_DATA_SWAP_METHOD
	.comm	_NFC_DATA_TRANS,4,2             ## @NFC_DATA_TRANS
	.comm	_NFC_REG_CMD,8,3                ## @NFC_REG_CMD
	.comm	_NFC_CMD_INT_FLAG,4,2           ## @NFC_CMD_INT_FLAG
	.comm	_NFC_REG_ECC_ST,8,3             ## @NFC_REG_ECC_ST
	.comm	_NFC_ECC_ERR_MSK,4,2            ## @NFC_ECC_ERR_MSK
	.no_dead_strip	_sunxi_nfc_hw_ecc_read_chunks_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sunxi_nfc_hw_ecc_read_chunks_dma
_sunxi_nfc_hw_ecc_read_chunks_dma:      ; @sunxi_nfc_hw_ecc_read_chunks_dma
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x22, x4
	str	w3, [sp, #16]                   ; 4-byte Folded Spill
	mov	x21, x2
	mov	x23, x1
	mov	x19, x0
	ldr	w24, [x0]
Lloh0:
	adrp	x8, _NAND_NEED_SCRAMBLING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_NEED_SCRAMBLING@GOTPAGEOFF]
Lloh2:
	ldr	w27, [x8]
	ldr	w0, [x0, #28]
	bl	_to_sunxi_nfc
	mov	x25, x0
	mov	x0, x19
	bl	_nand_to_mtd
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	str	wzr, [sp, #28]
	mov	x0, x25
	bl	_sunxi_nfc_wait_cmd_fifo_empty
	mov	x26, x0
	cbnz	w0, LBB0_23
; %bb.1:
	ldr	w2, [x19, #16]
Lloh3:
	adrp	x20, _DMA_FROM_DEVICE@GOTPAGE
Lloh4:
	ldr	x20, [x20, _DMA_FROM_DEVICE@GOTPAGEOFF]
	ldr	w4, [x20]
	add	x5, sp, #24
	mov	x0, x25
	mov	x1, x23
	mov	x3, x22
	bl	_sunxi_nfc_dma_op_prepare
	mov	x26, x0
	cbnz	w0, LBB0_23
; %bb.2:
	mov	x0, x19
	bl	_sunxi_nfc_hw_ecc_enable
	mov	x0, x19
	ldr	w1, [sp, #16]                   ; 4-byte Folded Reload
	mov	w2, #0
	bl	_sunxi_nfc_randomizer_config
	mov	x0, x19
	bl	_sunxi_nfc_randomizer_enable
Lloh5:
	adrp	x8, _NAND_CMD_RNDOUTSTART@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NAND_CMD_RNDOUTSTART@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _NAND_CMD_RNDOUT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _NAND_CMD_RNDOUT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	lsl	w9, w9, #8
	orr	w8, w9, w8, lsl #16
Lloh11:
	adrp	x9, _NAND_CMD_READSTART@GOTPAGE
Lloh12:
	ldr	x9, [x9, _NAND_CMD_READSTART@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w0, w8, w9
	ldr	x8, [x25]
Lloh14:
	adrp	x9, _NFC_REG_RCMD_SET@GOTPAGE
Lloh15:
	ldr	x9, [x9, _NFC_REG_RCMD_SET@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w0, [x25, #8]
	bl	_dma_async_issue_pending
Lloh17:
	adrp	x8, _NFC_PAGE_OP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _NFC_PAGE_OP@GOTPAGEOFF]
Lloh19:
	adrp	x9, _NFC_DATA_SWAP_METHOD@GOTPAGE
Lloh20:
	ldr	x9, [x9, _NFC_DATA_SWAP_METHOD@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh23:
	adrp	x9, _NFC_DATA_TRANS@GOTPAGE
Lloh24:
	ldr	x9, [x9, _NFC_DATA_TRANS@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w0, w8, w9
	ldr	x8, [x25]
Lloh26:
	adrp	x9, _NFC_REG_CMD@GOTPAGE
Lloh27:
	ldr	x9, [x9, _NFC_REG_CMD@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh29:
	adrp	x8, _NFC_CMD_INT_FLAG@GOTPAGE
Lloh30:
	ldr	x8, [x8, _NFC_CMD_INT_FLAG@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x25
	mov	w2, #0
	mov	w3, #0
	bl	_sunxi_nfc_wait_events
	cbz	w0, LBB0_4
; %bb.3:
	mov	x26, x0
	ldr	w0, [x25, #8]
	bl	_dmaengine_terminate_all
	mov	x0, x19
	bl	_sunxi_nfc_randomizer_disable
	mov	x0, x19
	bl	_sunxi_nfc_hw_ecc_disable
	ldr	w1, [x20]
	add	x2, sp, #24
	mov	x0, x25
	bl	_sunxi_nfc_dma_op_cleanup
	b	LBB0_23
LBB0_4:
	mov	x0, x19
	bl	_sunxi_nfc_randomizer_disable
	mov	x0, x19
	bl	_sunxi_nfc_hw_ecc_disable
	ldr	w1, [x20]
	add	x2, sp, #24
	mov	x0, x25
	bl	_sunxi_nfc_dma_op_cleanup
	ldr	x8, [x25]
Lloh32:
	adrp	x9, _NFC_REG_ECC_ST@GOTPAGE
Lloh33:
	ldr	x9, [x9, _NFC_REG_ECC_ST@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	cmp	w22, #1
	b.lt	LBB0_19
; %bb.5:
	mov	x25, x0
	mov	w26, #0
	mov	w20, #0
	and	w8, w27, w24
	str	w8, [sp, #4]                    ; 4-byte Folded Spill
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	cmp	w8, #0
	csinc	w20, w20, wzr, eq
	add	x1, sp, #28
	mov	x0, x19
	mov	x2, x27
	bl	_sunxi_nfc_hw_ecc_update_stats
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	w26, w26, #1
	cmp	w22, w26
	b.eq	LBB0_12
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w8, w9, [x19, #16]
	mul	w8, w8, w26
	add	w9, w9, #4
	mul	w24, w9, w26
	add	x8, x23, w8, sxtw #2
	ldr	x9, [x19, #8]
	add	x28, x9, w24, sxtw #2
	ldr	w9, [sp, #4]                    ; 4-byte Folded Reload
	cmp	w9, #0
	csel	x1, xzr, x8, eq
	cmp	w21, #0
	csel	x2, xzr, x28, eq
	add	x5, sp, #20
	mov	x0, x19
	mov	x3, x26
	mov	x4, x25
	bl	_sunxi_nfc_hw_ecc_correct
	tbnz	w0, #31, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x27, x0
	ldr	w8, [sp, #20]
	cbz	w21, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	cbnz	w8, LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w8, [x8]
	add	w1, w8, w24
	ldr	w8, [x19, #20]
	add	w3, w8, #4
	mov	x0, x19
	mov	x2, x28
	mov	w4, #0
	bl	_nand_change_read_column_op
	cmp	w26, #0
	cset	w3, eq
	mov	x0, x19
	mov	x1, x28
	mov	x2, x26
	ldr	w4, [sp, #16]                   ; 4-byte Folded Reload
	bl	_sunxi_nfc_hw_ecc_get_prot_oob_bytes
	ldr	w8, [sp, #20]
	b	LBB0_6
LBB0_12:
Lloh35:
	adrp	x8, _NFC_ECC_ERR_MSK@GOTPAGE
Lloh36:
	ldr	x8, [x8, _NFC_ECC_ERR_MSK@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	tst	w8, w25
	ldr	w4, [sp, #16]                   ; 4-byte Folded Reload
	b.eq	LBB0_20
; %bb.13:
	mov	w26, #0
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_16 Depth=1
	add	w8, w28, #4
	mul	w8, w8, w26
	add	x28, x24, w8, sxtw #2
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w9, [x9]
	add	w1, w9, w8
	ldr	w8, [x19, #20]
	add	w3, w8, #4
	mov	x0, x19
	mov	x2, x28
	mov	w4, #0
	bl	_nand_change_read_column_op
	ldp	w1, w8, [x19, #16]
	add	w3, w8, #4
	ldr	w6, [x19, #24]
	mov	x0, x27
	mov	x2, x28
	mov	x4, #0
	mov	w5, #0
	bl	_nand_check_erased_ecc_chunk
	mov	x2, x0
	cmp	w0, #0
	csinc	w20, w20, wzr, lt
	add	x1, sp, #28
	mov	x0, x19
	bl	_sunxi_nfc_hw_ecc_update_stats
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	w4, [sp, #16]                   ; 4-byte Folded Reload
	add	w26, w26, #1
	cmp	w22, w26
	b.eq	LBB0_20
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldp	w27, w28, [x19, #16]
	ldr	x24, [x19, #8]
	mov	x0, x26
	bl	_NFC_ECC_ERR
	tst	w0, w25
	b.eq	LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	mul	w1, w27, w26
	add	x27, x23, w1, sxtw #2
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	cbz	w8, LBB0_14
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	w3, [x19, #16]
	mov	x0, x19
	mov	x2, x27
	mov	w4, #0
	bl	_nand_change_read_column_op
	b	LBB0_14
LBB0_19:
	mov	w20, #0
	ldr	w4, [sp, #16]                   ; 4-byte Folded Reload
LBB0_20:
	cbz	w21, LBB0_22
; %bb.21:
	ldr	x1, [x19, #8]
	cmp	w20, #0
	cset	w3, eq
	mov	x0, x19
	mov	x2, #0
	bl	_sunxi_nfc_hw_ecc_read_extra_oob
LBB0_22:
	ldr	w26, [sp, #28]
LBB0_23:
	mov	x0, x26
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_NEED_SCRAMBLING,4,2       ; @NAND_NEED_SCRAMBLING
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_NAND_CMD_RNDOUTSTART,4,2       ; @NAND_CMD_RNDOUTSTART
	.comm	_NAND_CMD_RNDOUT,4,2            ; @NAND_CMD_RNDOUT
	.comm	_NAND_CMD_READSTART,4,2         ; @NAND_CMD_READSTART
	.comm	_NFC_REG_RCMD_SET,8,3           ; @NFC_REG_RCMD_SET
	.comm	_NFC_PAGE_OP,4,2                ; @NFC_PAGE_OP
	.comm	_NFC_DATA_SWAP_METHOD,4,2       ; @NFC_DATA_SWAP_METHOD
	.comm	_NFC_DATA_TRANS,4,2             ; @NFC_DATA_TRANS
	.comm	_NFC_REG_CMD,8,3                ; @NFC_REG_CMD
	.comm	_NFC_CMD_INT_FLAG,4,2           ; @NFC_CMD_INT_FLAG
	.comm	_NFC_REG_ECC_ST,8,3             ; @NFC_REG_ECC_ST
	.comm	_NFC_ECC_ERR_MSK,4,2            ; @NFC_ECC_ERR_MSK
	.no_dead_strip	_sunxi_nfc_hw_ecc_read_chunks_dma
.subsections_via_symbols
