	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pl353_smc_init_nand_interface
_pl353_smc_init_nand_interface:         ## @pl353_smc_init_nand_interface
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_PL353_SMC_MEM_WIDTH_8@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_pl353_smc_set_buswidth
	movq	_PL353_SMC_CFG_CLR_INT_CLR_1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_pl353_smc_base@GOTPCREL(%rip), %r14
	movq	_PL353_SMC_CFG_CLR_OFFS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	callq	_writel
	movq	_PL353_SMC_DC_UPT_NAND_REGS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PL353_SMC_DIRECT_CMD_OFFS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	callq	_writel
	movq	_jiffies@GOTPCREL(%rip), %r15
	movq	_PL353_NAND_ECC_BUSY_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	addq	(%r15), %rbx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_pl353_smc_ecc_is_busy
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	movq	(%r15), %rdi
	movq	%rbx, %rsi
	callq	_time_after_eq
	testq	%rax, %rax
	je	LBB0_1
LBB0_3:
	movq	(%r15), %rdi
	movq	%rbx, %rsi
	callq	_time_after_eq
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_PL353_NAND_ECC_CMD1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PL353_SMC_ECC_MEMCMD1_OFFS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	callq	_writel
	movq	_PL353_NAND_ECC_CMD2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PL353_SMC_ECC_MEMCMD2_OFFS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PL353_SMC_MEM_WIDTH_8,4,2      ## @PL353_SMC_MEM_WIDTH_8
	.comm	_PL353_SMC_CFG_CLR_INT_CLR_1,4,2 ## @PL353_SMC_CFG_CLR_INT_CLR_1
	.comm	_pl353_smc_base,8,3             ## @pl353_smc_base
	.comm	_PL353_SMC_CFG_CLR_OFFS,8,3     ## @PL353_SMC_CFG_CLR_OFFS
	.comm	_PL353_SMC_DC_UPT_NAND_REGS,4,2 ## @PL353_SMC_DC_UPT_NAND_REGS
	.comm	_PL353_SMC_DIRECT_CMD_OFFS,8,3  ## @PL353_SMC_DIRECT_CMD_OFFS
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_PL353_NAND_ECC_BUSY_TIMEOUT,8,3 ## @PL353_NAND_ECC_BUSY_TIMEOUT
	.comm	_PL353_NAND_ECC_CMD1,4,2        ## @PL353_NAND_ECC_CMD1
	.comm	_PL353_SMC_ECC_MEMCMD1_OFFS,8,3 ## @PL353_SMC_ECC_MEMCMD1_OFFS
	.comm	_PL353_NAND_ECC_CMD2,4,2        ## @PL353_NAND_ECC_CMD2
	.comm	_PL353_SMC_ECC_MEMCMD2_OFFS,8,3 ## @PL353_SMC_ECC_MEMCMD2_OFFS
	.no_dead_strip	_pl353_smc_init_nand_interface
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pl353_smc_init_nand_interface
_pl353_smc_init_nand_interface:         ; @pl353_smc_init_nand_interface
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _PL353_SMC_MEM_WIDTH_8@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PL353_SMC_MEM_WIDTH_8@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_pl353_smc_set_buswidth
Lloh3:
	adrp	x8, _PL353_SMC_CFG_CLR_INT_CLR_1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PL353_SMC_CFG_CLR_INT_CLR_1@GOTPAGEOFF]
Lloh5:
	adrp	x20, _pl353_smc_base@GOTPAGE
Lloh6:
	ldr	x20, [x20, _pl353_smc_base@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	x8, [x20]
Lloh8:
	adrp	x9, _PL353_SMC_CFG_CLR_OFFS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PL353_SMC_CFG_CLR_OFFS@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh11:
	adrp	x8, _PL353_SMC_DC_UPT_NAND_REGS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PL353_SMC_DC_UPT_NAND_REGS@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	x8, [x20]
Lloh14:
	adrp	x9, _PL353_SMC_DIRECT_CMD_OFFS@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PL353_SMC_DIRECT_CMD_OFFS@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh17:
	adrp	x21, _jiffies@GOTPAGE
Lloh18:
	ldr	x21, [x21, _jiffies@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh19:
	adrp	x9, _PL353_NAND_ECC_BUSY_TIMEOUT@GOTPAGE
Lloh20:
	ldr	x9, [x9, _PL353_NAND_ECC_BUSY_TIMEOUT@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	add	x19, x9, x8
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	bl	_pl353_smc_ecc_is_busy
	cbz	x0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_cpu_relax
	ldr	x0, [x21]
	mov	x1, x19
	bl	_time_after_eq
	cbz	x0, LBB0_1
LBB0_3:
	ldr	x0, [x21]
	mov	x1, x19
	bl	_time_after_eq
	cbz	x0, LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh22:
	adrp	x8, _PL353_NAND_ECC_CMD1@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PL353_NAND_ECC_CMD1@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	ldr	x8, [x20]
Lloh25:
	adrp	x9, _PL353_SMC_ECC_MEMCMD1_OFFS@GOTPAGE
Lloh26:
	ldr	x9, [x9, _PL353_SMC_ECC_MEMCMD1_OFFS@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh28:
	adrp	x8, _PL353_NAND_ECC_CMD2@GOTPAGE
Lloh29:
	ldr	x8, [x8, _PL353_NAND_ECC_CMD2@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	ldr	x8, [x20]
Lloh31:
	adrp	x9, _PL353_SMC_ECC_MEMCMD2_OFFS@GOTPAGE
Lloh32:
	ldr	x9, [x9, _PL353_SMC_ECC_MEMCMD2_OFFS@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	add	x1, x9, x8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_writel
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_PL353_SMC_MEM_WIDTH_8,4,2      ; @PL353_SMC_MEM_WIDTH_8
	.comm	_PL353_SMC_CFG_CLR_INT_CLR_1,4,2 ; @PL353_SMC_CFG_CLR_INT_CLR_1
	.comm	_pl353_smc_base,8,3             ; @pl353_smc_base
	.comm	_PL353_SMC_CFG_CLR_OFFS,8,3     ; @PL353_SMC_CFG_CLR_OFFS
	.comm	_PL353_SMC_DC_UPT_NAND_REGS,4,2 ; @PL353_SMC_DC_UPT_NAND_REGS
	.comm	_PL353_SMC_DIRECT_CMD_OFFS,8,3  ; @PL353_SMC_DIRECT_CMD_OFFS
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_PL353_NAND_ECC_BUSY_TIMEOUT,8,3 ; @PL353_NAND_ECC_BUSY_TIMEOUT
	.comm	_PL353_NAND_ECC_CMD1,4,2        ; @PL353_NAND_ECC_CMD1
	.comm	_PL353_SMC_ECC_MEMCMD1_OFFS,8,3 ; @PL353_SMC_ECC_MEMCMD1_OFFS
	.comm	_PL353_NAND_ECC_CMD2,4,2        ; @PL353_NAND_ECC_CMD2
	.comm	_PL353_SMC_ECC_MEMCMD2_OFFS,8,3 ; @PL353_SMC_ECC_MEMCMD2_OFFS
	.no_dead_strip	_pl353_smc_init_nand_interface
.subsections_via_symbols
