	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nand_exec_prog_page_op
_nand_exec_prog_page_op:                ## @nand_exec_prog_page_op
	.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
	subq	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -132(%rbp)                ## 4-byte Spill
	movl	%r8d, %ebx
	movq	%rcx, %r14
	movl	%edx, %r13d
	movl	%esi, -144(%rbp)                ## 4-byte Spill
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_nand_to_mtd
	movq	%rax, -176(%rbp)                ## 8-byte Spill
	leaq	8(%r12), %rdi
	callq	_nand_get_sdr_timings
	movq	%rax, %r15
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movl	$0, -64(%rbp)
	movq	_NAND_CMD_READ0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_NAND_OP_CMD
	movq	%rax, -128(%rbp)
	movq	_NAND_CMD_SEQIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_NAND_OP_CMD
	movq	%rax, -120(%rbp)
	movl	8(%r15), %edi
	callq	_PSEC_TO_NSEC
	leaq	-80(%rbp), %rsi
	xorl	%edi, %edi
	movl	%eax, %edx
	callq	_NAND_OP_ADDR
	movq	%rax, -112(%rbp)
	movl	%ebx, -136(%rbp)                ## 4-byte Spill
	movl	%ebx, %edi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_NAND_OP_DATA_OUT
	movq	%rax, -104(%rbp)
	movq	_NAND_CMD_PAGEPROG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	4(%r15), %edi
	callq	_PSEC_TO_NSEC
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_NAND_OP_CMD
	movq	%rax, -96(%rbp)
	movl	(%r15), %edi
	callq	_PSEC_TO_MSEC
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_NAND_OP_WAIT_RDY
	movq	%rax, -88(%rbp)
	movl	4(%r12), %edi
	leaq	-128(%rbp), %rsi
	callq	_NAND_OPERATION
	movq	%rax, %rbx
	movl	%edx, %r14d
	movq	%rax, -168(%rbp)
	movl	%edx, -160(%rbp)
	movq	%r12, %rdi
	leaq	-80(%rbp), %rsi
	movl	%r13d, -140(%rbp)               ## 4-byte Spill
	movl	%r13d, %edx
	callq	_nand_fill_column_cycles
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	js	LBB0_18
## %bb.1:
	movl	%eax, %ecx
	movl	-144(%rbp), %edi                ## 4-byte Reload
	movl	%edi, -80(%rbp,%rcx,4)
	movl	%edi, %esi
	shrl	$8, %esi
	leal	2(%rax), %edx
	movl	%esi, -76(%rbp,%rcx,4)
	movl	(%r12), %ecx
	movq	_NAND_ROW_ADDR_3@GOTPCREL(%rip), %rsi
	testl	%ecx, (%rsi)
	je	LBB0_3
## %bb.2:
	shrl	$16, %edi
	addl	$3, %eax
	movl	%edx, %edx
	movl	%edi, -80(%rbp,%rdx,4)
	movl	%eax, %edx
LBB0_3:
	movl	-132(%rbp), %r15d               ## 4-byte Reload
	movl	%edx, -108(%rbp)
	movq	%rbx, %rax
	testl	%r15d, %r15d
	jne	LBB0_6
## %bb.4:
	leaq	-2(%rbx), %rax
	movq	%rax, -168(%rbp)
	cmpl	$0, -136(%rbp)                  ## 4-byte Folded Reload
	jne	LBB0_6
## %bb.5:
	addq	$-3, %rbx
	movq	%rbx, -168(%rbp)
	movq	%rbx, %rax
LBB0_6:
	movq	-176(%rbp), %rdx                ## 8-byte Reload
	movl	(%rdx), %edx
	cmpl	$512, %edx                      ## imm = 0x200
	jg	LBB0_13
## %bb.7:
	movl	-140(%rbp), %eax                ## 4-byte Reload
	cmpl	%eax, %edx
	jbe	LBB0_8
## %bb.10:
	cmpl	$256, %eax                      ## imm = 0x100
	jb	LBB0_14
## %bb.11:
	movq	_NAND_BUSWIDTH_16@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	jne	LBB0_14
## %bb.12:
	movq	_NAND_CMD_READ1@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_13:
	incl	%r14d
	movl	%r14d, -160(%rbp)
	decq	%rax
	movq	%rax, -168(%rbp)
	jmp	LBB0_14
LBB0_8:
	movq	_NAND_CMD_READOOB@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	movl	%eax, -128(%rbp)
LBB0_14:
	leaq	-168(%rbp), %rsi
	movq	%r12, %rdi
	callq	_nand_exec_op
                                        ## kill: def $eax killed $eax def $rax
	testl	%r15d, %r15d
	je	LBB0_18
## %bb.15:
	testl	%eax, %eax
	jne	LBB0_18
## %bb.16:
	leaq	-148(%rbp), %rsi
	movq	%r12, %rdi
	callq	_nand_status_op
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	jne	LBB0_18
## %bb.17:
	movl	-148(%rbp), %eax
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_20
## %bb.19:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_CMD_READ0,4,2             ## @NAND_CMD_READ0
	.comm	_NAND_CMD_SEQIN,4,2             ## @NAND_CMD_SEQIN
	.comm	_NAND_CMD_PAGEPROG,4,2          ## @NAND_CMD_PAGEPROG
	.comm	_NAND_ROW_ADDR_3,4,2            ## @NAND_ROW_ADDR_3
	.comm	_NAND_CMD_READOOB,4,2           ## @NAND_CMD_READOOB
	.comm	_NAND_BUSWIDTH_16,4,2           ## @NAND_BUSWIDTH_16
	.comm	_NAND_CMD_READ1,4,2             ## @NAND_CMD_READ1
	.no_dead_strip	_nand_exec_prog_page_op
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nand_exec_prog_page_op
_nand_exec_prog_page_op:                ; @nand_exec_prog_page_op
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x5
	mov	x22, x4
	mov	x26, x3
	mov	x21, x2
	mov	x24, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	bl	_nand_to_mtd
	mov	x23, x0
	add	x0, x19, #8
	bl	_nand_get_sdr_timings
	mov	x25, x0
	stp	xzr, xzr, [sp, #80]
	str	wzr, [sp, #96]
Lloh3:
	adrp	x8, _NAND_CMD_READ0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NAND_CMD_READ0@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_NAND_OP_CMD
	str	x0, [sp, #32]
Lloh6:
	adrp	x8, _NAND_CMD_SEQIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NAND_CMD_SEQIN@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_NAND_OP_CMD
	str	x0, [sp, #40]
	ldr	w0, [x25, #8]
	bl	_PSEC_TO_NSEC
	mov	x2, x0
	add	x27, sp, #80
	add	x1, sp, #80
	mov	w0, #0
	bl	_NAND_OP_ADDR
	str	x0, [sp, #48]
	mov	x0, x22
	mov	x1, x26
	mov	w2, #0
	bl	_NAND_OP_DATA_OUT
	str	x0, [sp, #56]
Lloh9:
	adrp	x8, _NAND_CMD_PAGEPROG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NAND_CMD_PAGEPROG@GOTPAGEOFF]
Lloh11:
	ldr	w26, [x8]
	ldr	w0, [x25, #4]
	bl	_PSEC_TO_NSEC
	mov	x1, x0
	mov	x0, x26
	bl	_NAND_OP_CMD
	str	x0, [sp, #64]
	ldr	w0, [x25]
	bl	_PSEC_TO_MSEC
	mov	w1, #0
	bl	_NAND_OP_WAIT_RDY
	str	x0, [sp, #72]
	ldr	w0, [x19, #4]
	add	x1, sp, #32
	bl	_NAND_OPERATION
	mov	x26, x0
	mov	x25, x1
	stp	x0, x1, [sp, #16]
	add	x1, sp, #80
	mov	x0, x19
	mov	x2, x21
	bl	_nand_fill_column_cycles
	tbnz	w0, #31, LBB0_17
; %bb.1:
	add	w8, w0, #1
	str	w24, [x27, w0, uxtw #2]
	lsr	w9, w24, #8
	str	w9, [x27, w8, uxtw #2]
	add	w9, w0, #2
	ldr	w8, [x19]
Lloh12:
	adrp	x10, _NAND_ROW_ADDR_3@GOTPAGE
Lloh13:
	ldr	x10, [x10, _NAND_ROW_ADDR_3@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	tst	w10, w8
	b.eq	LBB0_3
; %bb.2:
	lsr	w10, w24, #16
	add	x11, sp, #80
	str	w10, [x11, w9, uxtw #2]
	add	w9, w0, #3
LBB0_3:
	str	w9, [sp, #52]
	mov	x9, x26
	cbnz	w20, LBB0_6
; %bb.4:
	sub	x9, x26, #2
	str	x9, [sp, #16]
	cbnz	w22, LBB0_6
; %bb.5:
	sub	x9, x26, #3
	str	x9, [sp, #16]
LBB0_6:
	ldr	w10, [x23]
	cmp	w10, #512
	b.gt	LBB0_11
; %bb.7:
	cmp	w10, w21
	b.ls	LBB0_12
; %bb.8:
	cmp	w21, #256
	b.lo	LBB0_14
; %bb.9:
Lloh15:
	adrp	x9, _NAND_BUSWIDTH_16@GOTPAGE
Lloh16:
	ldr	x9, [x9, _NAND_BUSWIDTH_16@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_14
; %bb.10:
Lloh18:
	adrp	x8, _NAND_CMD_READ1@GOTPAGE
Lloh19:
	ldr	x8, [x8, _NAND_CMD_READ1@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
	add	w8, w25, #1
	str	w8, [sp, #24]
	sub	x8, x9, #1
	str	x8, [sp, #16]
	b	LBB0_14
LBB0_12:
Lloh20:
	adrp	x8, _NAND_CMD_READOOB@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NAND_CMD_READOOB@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	str	w8, [sp, #32]
LBB0_14:
	add	x1, sp, #16
	mov	x0, x19
	bl	_nand_exec_op
	cbz	w20, LBB0_17
; %bb.15:
	cbnz	w0, LBB0_17
; %bb.16:
	add	x1, sp, #12
	mov	x0, x19
	bl	_nand_status_op
	ldr	w8, [sp, #12]
	cmp	w0, #0
	csel	w0, w8, w0, eq
LBB0_17:
	ldur	x8, [x29, #-88]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_CMD_READ0,4,2             ; @NAND_CMD_READ0
	.comm	_NAND_CMD_SEQIN,4,2             ; @NAND_CMD_SEQIN
	.comm	_NAND_CMD_PAGEPROG,4,2          ; @NAND_CMD_PAGEPROG
	.comm	_NAND_ROW_ADDR_3,4,2            ; @NAND_ROW_ADDR_3
	.comm	_NAND_CMD_READOOB,4,2           ; @NAND_CMD_READOOB
	.comm	_NAND_BUSWIDTH_16,4,2           ; @NAND_BUSWIDTH_16
	.comm	_NAND_CMD_READ1,4,2             ; @NAND_CMD_READ1
	.no_dead_strip	_nand_exec_prog_page_op
.subsections_via_symbols
