	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pxa3xx_nand_init_mtd
_pxa3xx_nand_init_mtd:                  ## @pxa3xx_nand_init_mtd
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	80(%rsi), %rax
	xorl	%ecx, %ecx
	cmpl	$16, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_NAND_BUSWIDTH_16@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_2:
	movl	%ecx, 76(%rsi)
	movq	_pxa3xx_nand_waitfunc@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 72(%rsi)
	movq	_pxa3xx_nand_select_chip@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 68(%rsi)
	movq	_pxa3xx_nand_dev_ready@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 64(%rsi)
	movq	_pxa3xx_nand_cmdfunc@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 60(%rsi)
	movq	_pxa3xx_nand_read_word@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 56(%rsi)
	movq	_pxa3xx_nand_read_byte@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 52(%rsi)
	movq	_pxa3xx_nand_read_buf@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 48(%rsi)
	movq	_pxa3xx_nand_write_buf@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 44(%rsi)
	movq	_pxa3xx_nand_verify_buf@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 40(%rsi)
	movq	_NAND_ECC_HW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 36(%rsi)
	movq	_pxa3xx_nand_ecc_hwctl@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 32(%rsi)
	movq	_pxa3xx_nand_ecc_calculate@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 28(%rsi)
	movq	_pxa3xx_nand_ecc_correct@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 24(%rsi)
	movl	4(%rax), %eax
	movl	%eax, 8(%rsi)
	cmpl	$2048, %eax                     ## imm = 0x800
	jne	LBB0_3
## %bb.4:
	movq	_hw_largepage_ecclayout@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_hw_smallpage_ecclayout@GOTPCREL(%rip), %rax
LBB0_5:
	movq	%rax, 16(%rsi)
	movl	$25, (%rsi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_BUSWIDTH_16,4,2           ## @NAND_BUSWIDTH_16
	.comm	_pxa3xx_nand_waitfunc,4,2       ## @pxa3xx_nand_waitfunc
	.comm	_pxa3xx_nand_select_chip,4,2    ## @pxa3xx_nand_select_chip
	.comm	_pxa3xx_nand_dev_ready,4,2      ## @pxa3xx_nand_dev_ready
	.comm	_pxa3xx_nand_cmdfunc,4,2        ## @pxa3xx_nand_cmdfunc
	.comm	_pxa3xx_nand_read_word,4,2      ## @pxa3xx_nand_read_word
	.comm	_pxa3xx_nand_read_byte,4,2      ## @pxa3xx_nand_read_byte
	.comm	_pxa3xx_nand_read_buf,4,2       ## @pxa3xx_nand_read_buf
	.comm	_pxa3xx_nand_write_buf,4,2      ## @pxa3xx_nand_write_buf
	.comm	_pxa3xx_nand_verify_buf,4,2     ## @pxa3xx_nand_verify_buf
	.comm	_NAND_ECC_HW,4,2                ## @NAND_ECC_HW
	.comm	_pxa3xx_nand_ecc_hwctl,4,2      ## @pxa3xx_nand_ecc_hwctl
	.comm	_pxa3xx_nand_ecc_calculate,4,2  ## @pxa3xx_nand_ecc_calculate
	.comm	_pxa3xx_nand_ecc_correct,4,2    ## @pxa3xx_nand_ecc_correct
	.comm	_hw_largepage_ecclayout,4,2     ## @hw_largepage_ecclayout
	.comm	_hw_smallpage_ecclayout,4,2     ## @hw_smallpage_ecclayout
	.no_dead_strip	_pxa3xx_nand_init_mtd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pxa3xx_nand_init_mtd
_pxa3xx_nand_init_mtd:                  ; @pxa3xx_nand_init_mtd
	.cfi_startproc
; %bb.0:
	ldr	x8, [x1, #80]
Lloh0:
	adrp	x9, _NAND_BUSWIDTH_16@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NAND_BUSWIDTH_16@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ldp	w10, w8, [x8]
	cmp	w10, #16
	csel	w9, w9, wzr, eq
Lloh3:
	adrp	x10, _pxa3xx_nand_waitfunc@GOTPAGE
Lloh4:
	ldr	x10, [x10, _pxa3xx_nand_waitfunc@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	stp	w10, w9, [x1, #72]
Lloh6:
	adrp	x9, _pxa3xx_nand_select_chip@GOTPAGE
Lloh7:
	ldr	x9, [x9, _pxa3xx_nand_select_chip@GOTPAGEOFF]
Lloh8:
	adrp	x10, _pxa3xx_nand_dev_ready@GOTPAGE
Lloh9:
	ldr	x10, [x10, _pxa3xx_nand_dev_ready@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	ldr	w10, [x10]
	stp	w10, w9, [x1, #64]
Lloh12:
	adrp	x9, _pxa3xx_nand_cmdfunc@GOTPAGE
Lloh13:
	ldr	x9, [x9, _pxa3xx_nand_cmdfunc@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _pxa3xx_nand_read_word@GOTPAGE
Lloh16:
	ldr	x10, [x10, _pxa3xx_nand_read_word@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	stp	w10, w9, [x1, #56]
Lloh18:
	adrp	x9, _pxa3xx_nand_read_byte@GOTPAGE
Lloh19:
	ldr	x9, [x9, _pxa3xx_nand_read_byte@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
Lloh21:
	adrp	x10, _pxa3xx_nand_read_buf@GOTPAGE
Lloh22:
	ldr	x10, [x10, _pxa3xx_nand_read_buf@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	stp	w10, w9, [x1, #48]
Lloh24:
	adrp	x9, _pxa3xx_nand_write_buf@GOTPAGE
Lloh25:
	ldr	x9, [x9, _pxa3xx_nand_write_buf@GOTPAGEOFF]
Lloh26:
	adrp	x10, _pxa3xx_nand_verify_buf@GOTPAGE
Lloh27:
	ldr	x10, [x10, _pxa3xx_nand_verify_buf@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
Lloh29:
	ldr	w10, [x10]
	stp	w10, w9, [x1, #40]
Lloh30:
	adrp	x9, _NAND_ECC_HW@GOTPAGE
Lloh31:
	ldr	x9, [x9, _NAND_ECC_HW@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
Lloh33:
	adrp	x10, _pxa3xx_nand_ecc_hwctl@GOTPAGE
Lloh34:
	ldr	x10, [x10, _pxa3xx_nand_ecc_hwctl@GOTPAGEOFF]
Lloh35:
	ldr	w10, [x10]
	stp	w10, w9, [x1, #32]
Lloh36:
	adrp	x9, _pxa3xx_nand_ecc_calculate@GOTPAGE
Lloh37:
	ldr	x9, [x9, _pxa3xx_nand_ecc_calculate@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
Lloh39:
	adrp	x10, _pxa3xx_nand_ecc_correct@GOTPAGE
Lloh40:
	ldr	x10, [x10, _pxa3xx_nand_ecc_correct@GOTPAGEOFF]
Lloh41:
	ldr	w10, [x10]
	stp	w10, w9, [x1, #24]
Lloh42:
	adrp	x9, _hw_smallpage_ecclayout@GOTPAGE
Lloh43:
	ldr	x9, [x9, _hw_smallpage_ecclayout@GOTPAGEOFF]
Lloh44:
	adrp	x10, _hw_largepage_ecclayout@GOTPAGE
Lloh45:
	ldr	x10, [x10, _hw_largepage_ecclayout@GOTPAGEOFF]
	str	w8, [x1, #8]
	cmp	w8, #2048
	csel	x8, x10, x9, eq
	str	x8, [x1, #16]
	mov	w8, #25
	str	w8, [x1]
	ret
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh28
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_BUSWIDTH_16,4,2           ; @NAND_BUSWIDTH_16
	.comm	_pxa3xx_nand_waitfunc,4,2       ; @pxa3xx_nand_waitfunc
	.comm	_pxa3xx_nand_select_chip,4,2    ; @pxa3xx_nand_select_chip
	.comm	_pxa3xx_nand_dev_ready,4,2      ; @pxa3xx_nand_dev_ready
	.comm	_pxa3xx_nand_cmdfunc,4,2        ; @pxa3xx_nand_cmdfunc
	.comm	_pxa3xx_nand_read_word,4,2      ; @pxa3xx_nand_read_word
	.comm	_pxa3xx_nand_read_byte,4,2      ; @pxa3xx_nand_read_byte
	.comm	_pxa3xx_nand_read_buf,4,2       ; @pxa3xx_nand_read_buf
	.comm	_pxa3xx_nand_write_buf,4,2      ; @pxa3xx_nand_write_buf
	.comm	_pxa3xx_nand_verify_buf,4,2     ; @pxa3xx_nand_verify_buf
	.comm	_NAND_ECC_HW,4,2                ; @NAND_ECC_HW
	.comm	_pxa3xx_nand_ecc_hwctl,4,2      ; @pxa3xx_nand_ecc_hwctl
	.comm	_pxa3xx_nand_ecc_calculate,4,2  ; @pxa3xx_nand_ecc_calculate
	.comm	_pxa3xx_nand_ecc_correct,4,2    ; @pxa3xx_nand_ecc_correct
	.comm	_hw_largepage_ecclayout,4,2     ; @hw_largepage_ecclayout
	.comm	_hw_smallpage_ecclayout,4,2     ; @hw_smallpage_ecclayout
	.no_dead_strip	_pxa3xx_nand_init_mtd
.subsections_via_symbols
