	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function execmd_write_oob
_execmd_write_oob:                      ## @execmd_write_oob
	.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), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	cmpq	$0, 8(%r12)
	setne	%al
	leal	(%rax,%rax,2), %r13d
	leal	(%rax,%rax,2), %r15d
	incl	%r15d
	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
	cmpl	%r15d, %r13d
	jae	LBB0_3
## %bb.1:
	subl	%r13d, %r15d
	imull	$528, %r13d, %ebx               ## imm = 0x210
	addl	$512, %ebx                      ## imm = 0x200
	shll	$4, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_empty_fifo
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_set_addr
	movq	%r12, %rdi
	callq	_FLDTCNTR
	movl	$16, %edi
	movl	%eax, %esi
	callq	_writel
	movq	%r12, %rdi
	callq	_start_translation
	movq	%r12, %rdi
	movl	$16, %esi
	movl	%r13d, %edx
	callq	_write_fiforeg
	movq	%r12, %rdi
	callq	_wait_completion
	addl	$528, %ebx                      ## imm = 0x210
	addl	$16, %r13d
	decl	%r15d
	jne	LBB0_2
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_CMD_PAGEPROG,4,2          ## @NAND_CMD_PAGEPROG
	.comm	_NAND_CMD_SEQIN,4,2             ## @NAND_CMD_SEQIN
	.no_dead_strip	_execmd_write_oob
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function execmd_write_oob
_execmd_write_oob:                      ; @execmd_write_oob
	.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	x19, x0
	bl	_mtd_to_flctl
	mov	x20, x0
	ldr	w21, [x0]
	ldr	x8, [x0, #8]
	cmp	x8, #0
	mov	w8, #3
	csel	w23, wzr, w8, eq
	mov	w8, #4
Lloh0:
	adrp	x9, _NAND_CMD_PAGEPROG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NAND_CMD_PAGEPROG@GOTPAGEOFF]
	csinc	w22, w8, wzr, ne
Lloh2:
	ldr	w1, [x9]
Lloh3:
	adrp	x8, _NAND_CMD_SEQIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NAND_CMD_SEQIN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	orr	w2, w8, w1, lsl #8
	mov	x0, x19
	bl	_set_cmd_regs
	cmp	w23, w22
	b.hs	LBB0_3
; %bb.1:
	sub	w24, w22, w23
	mov	w8, #528
	orr	w9, wzr, #0x200
	madd	w22, w23, w8, w9
	lsl	w23, w23, #4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_empty_fifo
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_set_addr
	mov	x0, x20
	bl	_FLDTCNTR
	mov	x1, x0
	mov	w0, #16
	bl	_writel
	mov	x0, x20
	bl	_start_translation
	mov	x0, x20
	mov	w1, #16
	mov	x2, x23
	bl	_write_fiforeg
	mov	x0, x20
	bl	_wait_completion
	add	w22, w22, #528
	add	w23, w23, #16
	subs	w24, w24, #1
	b.ne	LBB0_2
LBB0_3:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_CMD_PAGEPROG,4,2          ; @NAND_CMD_PAGEPROG
	.comm	_NAND_CMD_SEQIN,4,2             ; @NAND_CMD_SEQIN
	.no_dead_strip	_execmd_write_oob
.subsections_via_symbols
