	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5pcxx_nand_read_page_hwecc
_s5pcxx_nand_read_page_hwecc:           ## @s5pcxx_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, %r13
	movq	%rdi, %r15
	movl	$0, -48(%rbp)
	movslq	(%rsi), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movslq	4(%rsi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	8(%rsi), %ebx
	movl	%r8d, %edx
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	callq	*40(%rsi)
	xorl	%r14d, %r14d
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_mtd_ooblayout_ecc
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.1:
	movslq	-48(%rbp), %r12
	shlq	$2, %r12
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	addq	72(%rax), %r12
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(,%rax,4), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	leaq	(,%rax,4), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	_NAND_CMD_RNDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	movl	$-1, %ecx
	movq	%r15, %rbx
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	callq	*64(%r15)
	movq	_NAND_ECC_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	*32(%r15)
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r14, %r13
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	*56(%r15)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	*48(%r15)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	*24(%r15)
	movq	%rbx, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	*16(%r15)
	movq	%rbx, %r15
	movl	%eax, %ecx
	shrl	$31, %ecx
	testl	%eax, %eax
	movl	$1, %edx
	cmovsl	%edx, %eax
	addl	%eax, (%rbx,%rcx,4)
	addl	%r14d, %r13d
	movq	%r13, %r14
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	addq	-104(%rbp), %r12                ## 8-byte Folded Reload
	addq	-96(%rbp), %r13                 ## 8-byte Folded Reload
	decl	%ebx
	jne	LBB0_2
LBB0_3:
	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_CMD_RNDOUT,4,2            ## @NAND_CMD_RNDOUT
	.comm	_NAND_ECC_READ,4,2              ## @NAND_ECC_READ
	.no_dead_strip	_s5pcxx_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 s5pcxx_nand_read_page_hwecc
_s5pcxx_nand_read_page_hwecc:           ; @s5pcxx_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
	str	wzr, [sp, #8]
	ldpsw	x22, x23, [x1]
	ldr	w26, [x1, #8]
	ldr	x8, [x1, #40]
	mov	x2, x4
	blr	x8
	add	x2, sp, #8
	mov	x0, x21
	mov	w1, #0
	bl	_mtd_ooblayout_ecc
	cbz	w26, LBB0_3
; %bb.1:
	mov	w24, #0
	ldr	x8, [x20, #72]
	ldrsw	x9, [sp, #8]
	add	x25, x8, x9, lsl #2
	lsl	x27, x23, #2
	lsl	x28, x22, #2
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #64]
Lloh0:
	adrp	x9, _NAND_CMD_RNDOUT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NAND_CMD_RNDOUT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	mov	x0, x21
	mov	x2, x24
	mov	w3, #-1
	blr	x8
	ldr	x8, [x20, #32]
Lloh3:
	adrp	x9, _NAND_ECC_READ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NAND_ECC_READ@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x9]
	mov	x0, x21
	blr	x8
	ldr	x8, [x20, #56]
	mov	x0, x21
	mov	x1, x19
	mov	x2, x22
	blr	x8
	ldr	x8, [x20, #48]
	mov	x0, x21
	mov	x1, x25
	mov	x2, x23
	blr	x8
	ldr	x8, [x20, #24]
	mov	x0, x21
	mov	x1, #0
	mov	x2, #0
	blr	x8
	ldr	x8, [x20, #16]
	mov	x0, x21
	mov	x1, x19
	mov	x2, #0
	mov	x3, #0
	blr	x8
	lsr	w8, w0, #31
	lsl	x8, x8, #2
	cmp	w0, #0
	csinc	w9, w0, wzr, ge
	ldr	w10, [x21, x8]
	add	w9, w10, w9
	str	w9, [x21, x8]
	add	w24, w24, w22
	add	x25, x25, x27
	add	x19, x19, x28
	subs	w26, w26, #1
	b.ne	LBB0_2
LBB0_3:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_CMD_RNDOUT,4,2            ; @NAND_CMD_RNDOUT
	.comm	_NAND_ECC_READ,4,2              ; @NAND_ECC_READ
	.no_dead_strip	_s5pcxx_nand_read_page_hwecc
.subsections_via_symbols
