	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function config_nand_cw_write
_config_nand_cw_write:                  ## @config_nand_cw_write
	.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	%rdi, %rbx
	movq	_NAND_FLASH_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NAND_BAM_NEXT_SGL@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	movl	$1, %edx
	callq	_write_reg_dma
	movq	_NAND_EXEC_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %ecx
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_write_reg_dma
	movq	_NAND_FLASH_STATUS@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	(%r14), %ecx
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_read_reg_dma
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_write_reg_dma
	movq	_NAND_READ_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %ecx
	movq	%rbx, %rdi
	movl	$1, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_write_reg_dma                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_FLASH_CMD,4,2             ## @NAND_FLASH_CMD
	.comm	_NAND_BAM_NEXT_SGL,4,2          ## @NAND_BAM_NEXT_SGL
	.comm	_NAND_EXEC_CMD,4,2              ## @NAND_EXEC_CMD
	.comm	_NAND_FLASH_STATUS,4,2          ## @NAND_FLASH_STATUS
	.comm	_NAND_READ_STATUS,4,2           ## @NAND_READ_STATUS
	.no_dead_strip	_config_nand_cw_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function config_nand_cw_write
_config_nand_cw_write:                  ; @config_nand_cw_write
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _NAND_FLASH_CMD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_FLASH_CMD@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x20, _NAND_BAM_NEXT_SGL@GOTPAGE
Lloh4:
	ldr	x20, [x20, _NAND_BAM_NEXT_SGL@GOTPAGEOFF]
	ldr	w3, [x20]
	mov	w2, #1
	bl	_write_reg_dma
Lloh5:
	adrp	x8, _NAND_EXEC_CMD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NAND_EXEC_CMD@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	w3, [x20]
	mov	x0, x19
	mov	w2, #1
	bl	_write_reg_dma
Lloh8:
	adrp	x21, _NAND_FLASH_STATUS@GOTPAGE
Lloh9:
	ldr	x21, [x21, _NAND_FLASH_STATUS@GOTPAGEOFF]
	ldr	w1, [x21]
	ldr	w3, [x20]
	mov	x0, x19
	mov	w2, #1
	bl	_read_reg_dma
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #1
	mov	w3, #0
	bl	_write_reg_dma
Lloh10:
	adrp	x8, _NAND_READ_STATUS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NAND_READ_STATUS@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	w3, [x20]
	mov	x0, x19
	mov	w2, #1
	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	_write_reg_dma
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_FLASH_CMD,4,2             ; @NAND_FLASH_CMD
	.comm	_NAND_BAM_NEXT_SGL,4,2          ; @NAND_BAM_NEXT_SGL
	.comm	_NAND_EXEC_CMD,4,2              ; @NAND_EXEC_CMD
	.comm	_NAND_FLASH_STATUS,4,2          ; @NAND_FLASH_STATUS
	.comm	_NAND_READ_STATUS,4,2           ; @NAND_READ_STATUS
	.no_dead_strip	_config_nand_cw_write
.subsections_via_symbols
