	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsmc_read_hwecc_ecc4
_fsmc_read_hwecc_ecc4:                  ## @fsmc_read_hwecc_ecc4
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	callq	_nand_to_fsmc
	movq	%rax, %r15
	movq	_jiffies@GOTPCREL(%rip), %r13
	movq	_FSMC_BUSY_WAIT_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	addq	(%r13), %rbx
	movq	_STS@GOTPCREL(%rip), %r12
	movq	_FSMC_CODE_RDY@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	addq	(%r15), %rdi
	callq	_readl_relaxed
	testl	%eax, (%r14)
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_cond_resched
	movq	(%r13), %rdi
	movq	%rbx, %rsi
	callq	_time_after_eq
	testq	%rax, %rax
	je	LBB0_1
LBB0_3:
	movq	(%r13), %rdi
	movq	%rbx, %rsi
	callq	_time_after_eq
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_5:
	movq	_ECC1@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r15), %rdi
	callq	_readl_relaxed
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, (%rbx)
	movl	%eax, %ecx
	sarl	$8, %ecx
	movl	%ecx, 4(%rbx)
	movl	%eax, %ecx
	sarl	$16, %ecx
	movl	%ecx, 8(%rbx)
	sarl	$24, %eax
	movl	%eax, 12(%rbx)
	movq	_ECC2@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r15), %rdi
	callq	_readl_relaxed
	movl	%eax, 16(%rbx)
	movl	%eax, %ecx
	sarl	$8, %ecx
	movl	%ecx, 20(%rbx)
	movl	%eax, %ecx
	sarl	$16, %ecx
	movl	%ecx, 24(%rbx)
	sarl	$24, %eax
	movl	%eax, 28(%rbx)
	movq	_ECC3@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r15), %rdi
	callq	_readl_relaxed
	movl	%eax, 32(%rbx)
	movl	%eax, %ecx
	sarl	$8, %ecx
	movl	%ecx, 36(%rbx)
	movl	%eax, %ecx
	sarl	$16, %ecx
	movl	%ecx, 40(%rbx)
	sarl	$24, %eax
	movl	%eax, 44(%rbx)
	movq	(%r12), %rdi
	addq	(%r15), %rdi
	callq	_readl_relaxed
	sarl	$16, %eax
	movl	%eax, 48(%rbx)
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_FSMC_BUSY_WAIT_TIMEOUT,8,3     ## @FSMC_BUSY_WAIT_TIMEOUT
	.comm	_STS,8,3                        ## @STS
	.comm	_FSMC_CODE_RDY,4,2              ## @FSMC_CODE_RDY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"calculate ecc timed out\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_ECC1,8,3                       ## @ECC1
	.comm	_ECC2,8,3                       ## @ECC2
	.comm	_ECC3,8,3                       ## @ECC3
	.no_dead_strip	_fsmc_read_hwecc_ecc4
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function fsmc_read_hwecc_ecc4
lCPI0_0:
	.long	4294967288                      ; 0xfffffff8
	.long	4294967280                      ; 0xfffffff0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_fsmc_read_hwecc_ecc4:                  ; @fsmc_read_hwecc_ecc4
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-80]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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 b8, -72
	.cfi_offset b9, -80
	mov	x19, x2
	bl	_nand_to_fsmc
	mov	x20, x0
Lloh0:
	adrp	x23, _jiffies@GOTPAGE
Lloh1:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh2:
	adrp	x9, _FSMC_BUSY_WAIT_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _FSMC_BUSY_WAIT_TIMEOUT@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x21, x9, x8
Lloh5:
	adrp	x22, _STS@GOTPAGE
Lloh6:
	ldr	x22, [x22, _STS@GOTPAGEOFF]
Lloh7:
	adrp	x24, _FSMC_CODE_RDY@GOTPAGE
Lloh8:
	ldr	x24, [x24, _FSMC_CODE_RDY@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl_relaxed
	ldr	w8, [x24]
	tst	w8, w0
	b.ne	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_cond_resched
	ldr	x0, [x23]
	mov	x1, x21
	bl	_time_after_eq
	cbz	x0, LBB0_1
LBB0_3:
	ldr	x0, [x23]
	mov	x1, x21
	bl	_time_after_eq
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w0, [x20, #8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh11:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	ldr	x8, [x20]
Lloh14:
	adrp	x9, _ECC1@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ECC1@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl_relaxed
	dup.2s	v0, w0
	str	w0, [x19]
Lloh17:
	adrp	x8, lCPI0_0@PAGE
Lloh18:
	ldr	d8, [x8, lCPI0_0@PAGEOFF]
	sshl.2s	v0, v0, v8
	stur	d0, [x19, #4]
	asr	w8, w0, #24
	str	w8, [x19, #12]
	ldr	x8, [x20]
Lloh19:
	adrp	x9, _ECC2@GOTPAGE
Lloh20:
	ldr	x9, [x9, _ECC2@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl_relaxed
	str	w0, [x19, #16]
	dup.2s	v0, w0
	sshl.2s	v0, v0, v8
	stur	d0, [x19, #20]
	asr	w8, w0, #24
	str	w8, [x19, #28]
	ldr	x8, [x20]
Lloh22:
	adrp	x9, _ECC3@GOTPAGE
Lloh23:
	ldr	x9, [x9, _ECC3@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl_relaxed
	str	w0, [x19, #32]
	dup.2s	v0, w0
	sshl.2s	v0, v0, v8
	stur	d0, [x19, #36]
	asr	w8, w0, #24
	str	w8, [x19, #44]
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl_relaxed
	mov	x8, x0
	mov	w0, #0
	asr	w8, w8, #16
	str	w8, [x19, #48]
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #80               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdr	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_FSMC_BUSY_WAIT_TIMEOUT,8,3     ; @FSMC_BUSY_WAIT_TIMEOUT
	.comm	_STS,8,3                        ; @STS
	.comm	_FSMC_CODE_RDY,4,2              ; @FSMC_CODE_RDY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"calculate ecc timed out\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_ECC1,8,3                       ; @ECC1
	.comm	_ECC2,8,3                       ; @ECC2
	.comm	_ECC3,8,3                       ; @ECC3
	.no_dead_strip	_fsmc_read_hwecc_ecc4
.subsections_via_symbols
