	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmnand_init_cs
_brcmnand_init_cs:                      ## @brcmnand_init_cs
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	80(%rdi), %r13
	movq	88(%rdi), %r12
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_of_property_read_u32
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_err
	movq	_ENXIO@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_nand_to_mtd
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%rax, %r14
	callq	_nand_set_flash_node
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_nand_set_controller_data
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %ecx
	leaq	L_.str.2(%rip), %rdx
	movq	%r13, %rdi
	callq	_devm_kasprintf
	movl	%eax, 12(%r14)
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	%r13, (%r14)
	movq	_brcmnand_cmd_ctrl@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 72(%rbx)
	movq	_brcmnand_cmdfunc@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 68(%rbx)
	movq	_brcmnand_waitfunc@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%rbx)
	movq	_brcmnand_read_byte@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 60(%rbx)
	movq	_brcmnand_read_buf@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rbx)
	movq	_brcmnand_write_buf@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%rbx)
	movq	_NAND_ECC_HW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	_brcmnand_read_page@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movq	_brcmnand_write_page@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movq	_brcmnand_read_page_raw@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rbx)
	movq	_brcmnand_write_page_raw@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_brcmnand_write_oob_raw@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	_brcmnand_read_oob_raw@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_brcmnand_read_oob@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_brcmnand_write_oob@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	%r12, 8(%rbx)
	movl	(%rbx), %esi
	movq	_BRCMNAND_CS_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_brcmnand_cs_offset
	movl	%eax, %ebx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_nand_readreg
	movq	_CFG_BUS_WIDTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_nand_writereg
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_nand_scan
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_mtd_device_register
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_nand_cleanup
	movl	%r14d, %ebx
	jmp	LBB0_8
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reg"

L_.str.1:                               ## @.str.1
	.asciz	"can't get chip-select\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.2:                               ## @.str.2
	.asciz	"brcmnand.%d"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
	.comm	_brcmnand_cmd_ctrl,4,2          ## @brcmnand_cmd_ctrl
	.comm	_brcmnand_cmdfunc,4,2           ## @brcmnand_cmdfunc
	.comm	_brcmnand_waitfunc,4,2          ## @brcmnand_waitfunc
	.comm	_brcmnand_read_byte,4,2         ## @brcmnand_read_byte
	.comm	_brcmnand_read_buf,4,2          ## @brcmnand_read_buf
	.comm	_brcmnand_write_buf,4,2         ## @brcmnand_write_buf
	.comm	_NAND_ECC_HW,4,2                ## @NAND_ECC_HW
	.comm	_brcmnand_read_page,4,2         ## @brcmnand_read_page
	.comm	_brcmnand_write_page,4,2        ## @brcmnand_write_page
	.comm	_brcmnand_read_page_raw,4,2     ## @brcmnand_read_page_raw
	.comm	_brcmnand_write_page_raw,4,2    ## @brcmnand_write_page_raw
	.comm	_brcmnand_write_oob_raw,4,2     ## @brcmnand_write_oob_raw
	.comm	_brcmnand_read_oob_raw,4,2      ## @brcmnand_read_oob_raw
	.comm	_brcmnand_read_oob,4,2          ## @brcmnand_read_oob
	.comm	_brcmnand_write_oob,4,2         ## @brcmnand_write_oob
	.comm	_BRCMNAND_CS_CFG,4,2            ## @BRCMNAND_CS_CFG
	.comm	_CFG_BUS_WIDTH,4,2              ## @CFG_BUS_WIDTH
	.no_dead_strip	_brcmnand_init_cs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmnand_init_cs
_brcmnand_init_cs:                      ; @brcmnand_init_cs
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x24, x1
	mov	x22, x0
	ldp	x23, x21, [x0, #80]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	mov	x2, x22
	bl	_of_property_read_u32
	cbz	w0, LBB0_4
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	bl	_dev_err
Lloh4:
	adrp	x8, _ENXIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_3:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_4:
	add	x19, x22, #8
	mov	x0, x19
	bl	_nand_to_mtd
	mov	x20, x0
	mov	x0, x19
	mov	x1, x24
	bl	_nand_set_flash_node
	mov	x0, x19
	mov	x1, x22
	bl	_nand_set_controller_data
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w3, [x22]
Lloh9:
	adrp	x2, l_.str.2@PAGE
Lloh10:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x23
	bl	_devm_kasprintf
	str	w0, [x20, #12]
	cbz	w0, LBB0_8
; %bb.5:
Lloh11:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	str	x23, [x20]
Lloh14:
	adrp	x8, _brcmnand_cmd_ctrl@GOTPAGE
Lloh15:
	ldr	x8, [x8, _brcmnand_cmd_ctrl@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _brcmnand_cmdfunc@GOTPAGE
Lloh18:
	ldr	x9, [x9, _brcmnand_cmdfunc@GOTPAGEOFF]
	str	w8, [x22, #72]
Lloh19:
	ldr	w8, [x9]
Lloh20:
	adrp	x9, _brcmnand_waitfunc@GOTPAGE
Lloh21:
	ldr	x9, [x9, _brcmnand_waitfunc@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	stp	w9, w8, [x22, #64]
Lloh23:
	adrp	x8, _brcmnand_read_byte@GOTPAGE
Lloh24:
	ldr	x8, [x8, _brcmnand_read_byte@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _brcmnand_read_buf@GOTPAGE
Lloh27:
	ldr	x9, [x9, _brcmnand_read_buf@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	stp	w9, w8, [x22, #56]
Lloh29:
	adrp	x8, _brcmnand_write_buf@GOTPAGE
Lloh30:
	ldr	x8, [x8, _brcmnand_write_buf@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
Lloh32:
	adrp	x9, _NAND_ECC_HW@GOTPAGE
Lloh33:
	ldr	x9, [x9, _NAND_ECC_HW@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
Lloh35:
	adrp	x10, _brcmnand_read_page@GOTPAGE
Lloh36:
	ldr	x10, [x10, _brcmnand_read_page@GOTPAGEOFF]
	stp	w9, w8, [x22, #48]
Lloh37:
	ldr	w8, [x10]
Lloh38:
	adrp	x9, _brcmnand_write_page@GOTPAGE
Lloh39:
	ldr	x9, [x9, _brcmnand_write_page@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	stp	w9, w8, [x22, #40]
Lloh41:
	adrp	x8, _brcmnand_read_page_raw@GOTPAGE
Lloh42:
	ldr	x8, [x8, _brcmnand_read_page_raw@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
Lloh44:
	adrp	x9, _brcmnand_write_page_raw@GOTPAGE
Lloh45:
	ldr	x9, [x9, _brcmnand_write_page_raw@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
	stp	w9, w8, [x22, #32]
Lloh47:
	adrp	x8, _brcmnand_write_oob_raw@GOTPAGE
Lloh48:
	ldr	x8, [x8, _brcmnand_write_oob_raw@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
Lloh50:
	adrp	x9, _brcmnand_read_oob_raw@GOTPAGE
Lloh51:
	ldr	x9, [x9, _brcmnand_read_oob_raw@GOTPAGEOFF]
Lloh52:
	ldr	w9, [x9]
Lloh53:
	adrp	x10, _brcmnand_read_oob@GOTPAGE
Lloh54:
	ldr	x10, [x10, _brcmnand_read_oob@GOTPAGEOFF]
	stp	w9, w8, [x22, #24]
Lloh55:
	ldr	w8, [x10]
Lloh56:
	adrp	x9, _brcmnand_write_oob@GOTPAGE
Lloh57:
	ldr	x9, [x9, _brcmnand_write_oob@GOTPAGEOFF]
Lloh58:
	ldr	w9, [x9]
	stp	w9, w8, [x22, #16]
	str	x21, [x22, #8]
	ldr	w1, [x22]
Lloh59:
	adrp	x8, _BRCMNAND_CS_CFG@GOTPAGE
Lloh60:
	ldr	x8, [x8, _BRCMNAND_CS_CFG@GOTPAGEOFF]
Lloh61:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_brcmnand_cs_offset
	mov	x22, x0
	mov	x0, x21
	mov	x1, x22
	bl	_nand_readreg
Lloh62:
	adrp	x8, _CFG_BUS_WIDTH@GOTPAGE
Lloh63:
	ldr	x8, [x8, _CFG_BUS_WIDTH@GOTPAGEOFF]
Lloh64:
	ldr	w8, [x8]
	bic	w2, w0, w8
	mov	x0, x21
	mov	x1, x22
	bl	_nand_writereg
	mov	x0, x19
	mov	w1, #1
	bl	_nand_scan
	mov	x21, x0
	cbnz	w0, LBB0_3
; %bb.6:
	mov	x0, x20
	mov	x1, #0
	mov	w2, #0
	bl	_mtd_device_register
	mov	x21, x0
	cbz	w0, LBB0_3
; %bb.7:
	mov	x0, x19
	bl	_nand_cleanup
	b	LBB0_3
LBB0_8:
Lloh65:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh66:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh65, Lloh66
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reg"

l_.str.1:                               ; @.str.1
	.asciz	"can't get chip-select\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.2:                               ; @.str.2
	.asciz	"brcmnand.%d"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
	.comm	_brcmnand_cmd_ctrl,4,2          ; @brcmnand_cmd_ctrl
	.comm	_brcmnand_cmdfunc,4,2           ; @brcmnand_cmdfunc
	.comm	_brcmnand_waitfunc,4,2          ; @brcmnand_waitfunc
	.comm	_brcmnand_read_byte,4,2         ; @brcmnand_read_byte
	.comm	_brcmnand_read_buf,4,2          ; @brcmnand_read_buf
	.comm	_brcmnand_write_buf,4,2         ; @brcmnand_write_buf
	.comm	_NAND_ECC_HW,4,2                ; @NAND_ECC_HW
	.comm	_brcmnand_read_page,4,2         ; @brcmnand_read_page
	.comm	_brcmnand_write_page,4,2        ; @brcmnand_write_page
	.comm	_brcmnand_read_page_raw,4,2     ; @brcmnand_read_page_raw
	.comm	_brcmnand_write_page_raw,4,2    ; @brcmnand_write_page_raw
	.comm	_brcmnand_write_oob_raw,4,2     ; @brcmnand_write_oob_raw
	.comm	_brcmnand_read_oob_raw,4,2      ; @brcmnand_read_oob_raw
	.comm	_brcmnand_read_oob,4,2          ; @brcmnand_read_oob
	.comm	_brcmnand_write_oob,4,2         ; @brcmnand_write_oob
	.comm	_BRCMNAND_CS_CFG,4,2            ; @BRCMNAND_CS_CFG
	.comm	_CFG_BUS_WIDTH,4,2              ; @CFG_BUS_WIDTH
	.no_dead_strip	_brcmnand_init_cs
.subsections_via_symbols
