	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function execmd_write_page_sector
_execmd_write_page_sector:              ## @execmd_write_page_sector
	.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	%rdi, %r14
	callq	_mtd_to_flctl
	movq	%rax, %r12
	movl	(%rax), %r13d
	xorl	%eax, %eax
	cmpq	$0, 8(%r12)
	setne	%al
	leal	(%rax,%rax,2), %eax
	incl	%eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_FLCMNCR
	movl	%eax, %edi
	callq	_readl
	movl	%eax, %ebx
	movq	_ACM_SACCES_MODE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%r12, %rdi
	callq	_FLCMNCR
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_writel
	movq	_NAND_CMD_PAGEPROG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, %edx
	shll	$8, %edx
	movq	_NAND_CMD_SEQIN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r14, %rdi
	callq	_set_cmd_regs
	shll	$2, %r13d
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_empty_fifo
	movq	%r12, %rdi
	callq	_FLCMDCR
	movl	%eax, %edi
	callq	_readl
	movl	%eax, %ebx
	orl	$1, %ebx
	movq	%r12, %rdi
	callq	_FLCMDCR
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_writel
	movl	%r15d, %ebx
	orl	%r13d, %ebx
	movq	%r12, %rdi
	callq	_FLADR
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_writel
	movq	%r12, %rdi
	callq	_start_translation
	movq	%r12, %rdi
	movl	$512, %esi                      ## imm = 0x200
	movl	%r14d, %edx
	callq	_write_fiforeg
	movq	%r12, %rdi
	callq	_wait_wecfifo_ready
	movq	%r12, %rdi
	callq	_FLECFIFO
	movl	$-1, %edi
	movl	%eax, %esi
	callq	_writel
	movq	%r12, %rdi
	callq	_wait_wecfifo_ready
	movq	%r12, %rdi
	callq	_FLECFIFO
	movl	$-1, %edi
	movl	%eax, %esi
	callq	_writel
	movq	%r12, %rdi
	callq	_wait_wecfifo_ready
	movq	%r12, %rdi
	callq	_FLECFIFO
	movl	$-1, %edi
	movl	%eax, %esi
	callq	_writel
	movq	%r12, %rdi
	callq	_wait_wecfifo_ready
	movq	%r12, %rdi
	callq	_FLECFIFO
	movl	$-1, %edi
	movl	%eax, %esi
	callq	_writel
	movq	%r12, %rdi
	callq	_wait_completion
	incl	%r15d
	addl	$512, %r14d                     ## imm = 0x200
	cmpl	%r15d, -44(%rbp)                ## 4-byte Folded Reload
	jne	LBB0_1
## %bb.2:
	movq	%r12, %rdi
	callq	_FLCMNCR
	movl	%eax, %edi
	callq	_readl
	movq	_ACM_SACCES_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movq	%r12, %rdi
	callq	_FLCMNCR
	movl	%ebx, %edi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ACM_SACCES_MODE,4,2            ## @ACM_SACCES_MODE
	.comm	_NAND_CMD_PAGEPROG,4,2          ## @NAND_CMD_PAGEPROG
	.comm	_NAND_CMD_SEQIN,4,2             ## @NAND_CMD_SEQIN
	.no_dead_strip	_execmd_write_page_sector
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function execmd_write_page_sector
_execmd_write_page_sector:              ; @execmd_write_page_sector
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [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 w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
	bl	_mtd_to_flctl
	mov	x19, x0
	ldr	w25, [x0]
	ldr	x8, [x0, #8]
	cmp	x8, #0
	mov	w8, #4
	csinc	w23, w8, wzr, ne
	bl	_FLCMNCR
	bl	_readl
Lloh0:
	adrp	x22, _ACM_SACCES_MODE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ACM_SACCES_MODE@GOTPAGEOFF]
	ldr	w8, [x22]
	orr	w21, w8, w0
	mov	x0, x19
	bl	_FLCMNCR
	mov	x1, x0
	mov	x0, x21
	bl	_writel
Lloh2:
	adrp	x8, _NAND_CMD_PAGEPROG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NAND_CMD_PAGEPROG@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _NAND_CMD_SEQIN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NAND_CMD_SEQIN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w2, w8, w1, lsl #8
	mov	x0, x20
	bl	_set_cmd_regs
	mov	w20, #0
	mov	w24, #0
	lsl	w25, w25, #2
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_empty_fifo
	mov	x0, x19
	bl	_FLCMDCR
	bl	_readl
	orr	w21, w0, #0x1
	mov	x0, x19
	bl	_FLCMDCR
	mov	x1, x0
	mov	x0, x21
	bl	_writel
	orr	w21, w24, w25
	mov	x0, x19
	bl	_FLADR
	mov	x1, x0
	mov	x0, x21
	bl	_writel
	mov	x0, x19
	bl	_start_translation
	mov	x0, x19
	mov	w1, #512
	mov	x2, x20
	bl	_write_fiforeg
	mov	x0, x19
	bl	_wait_wecfifo_ready
	mov	x0, x19
	bl	_FLECFIFO
	mov	x1, x0
	mov	w0, #-1
	bl	_writel
	mov	x0, x19
	bl	_wait_wecfifo_ready
	mov	x0, x19
	bl	_FLECFIFO
	mov	x1, x0
	mov	w0, #-1
	bl	_writel
	mov	x0, x19
	bl	_wait_wecfifo_ready
	mov	x0, x19
	bl	_FLECFIFO
	mov	x1, x0
	mov	w0, #-1
	bl	_writel
	mov	x0, x19
	bl	_wait_wecfifo_ready
	mov	x0, x19
	bl	_FLECFIFO
	mov	x1, x0
	mov	w0, #-1
	bl	_writel
	mov	x0, x19
	bl	_wait_completion
	add	w24, w24, #1
	add	w20, w20, #512
	cmp	w23, w24
	b.ne	LBB0_1
; %bb.2:
	mov	x0, x19
	bl	_FLCMNCR
	bl	_readl
	ldr	w8, [x22]
	bic	w20, w0, w8
	mov	x0, x19
	bl	_FLCMNCR
	mov	x1, x0
	mov	x0, x20
	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	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_writel
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ACM_SACCES_MODE,4,2            ; @ACM_SACCES_MODE
	.comm	_NAND_CMD_PAGEPROG,4,2          ; @NAND_CMD_PAGEPROG
	.comm	_NAND_CMD_SEQIN,4,2             ; @NAND_CMD_SEQIN
	.no_dead_strip	_execmd_write_page_sector
.subsections_via_symbols
