	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nand_sp_exec_read_page_op
_nand_sp_exec_read_page_op:             ## @nand_sp_exec_read_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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r12d
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	movl	%edx, %r15d
	movl	%esi, -108(%rbp)                ## 4-byte Spill
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_nand_to_mtd
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	leaq	8(%rbx), %rdi
	callq	_nand_get_sdr_timings
	movq	%rax, %r13
	movq	_NAND_CMD_READ0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_NAND_OP_CMD
	movq	%rax, -96(%rbp)
	movl	8(%r13), %edi
	callq	_PSEC_TO_NSEC
	leaq	-64(%rbp), %rsi
	movl	$3, %edi
	movl	%eax, %edx
	callq	_NAND_OP_ADDR
	movq	%rax, -88(%rbp)
	movl	4(%r13), %edi
	callq	_PSEC_TO_MSEC
	movl	%eax, %r14d
	movl	(%r13), %edi
	callq	_PSEC_TO_NSEC
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_NAND_OP_WAIT_RDY
	movq	%rax, -80(%rbp)
	movl	%r12d, %edi
	movq	-120(%rbp), %rsi                ## 8-byte Reload
	xorl	%edx, %edx
	callq	_NAND_OP_DATA_IN
	movq	%rax, -72(%rbp)
	movl	4(%rbx), %edi
	leaq	-96(%rbp), %rsi
	callq	_NAND_OPERATION
	cmpl	$1, %r12d
	sbbl	$0, %eax
	movl	%eax, -104(%rbp)
	movq	-128(%rbp), %rax                ## 8-byte Reload
	cmpl	%r15d, (%rax)
	jbe	LBB0_1
## %bb.2:
	cmpl	$256, %r15d                     ## imm = 0x100
	jb	LBB0_6
## %bb.3:
	movq	_NAND_BUSWIDTH_16@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	jne	LBB0_6
## %bb.4:
	movq	_NAND_CMD_READ1@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_NAND_CMD_READOOB@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, -92(%rbp)
LBB0_6:
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_nand_fill_column_cycles
	testl	%eax, %eax
	js	LBB0_10
## %bb.7:
	movl	-108(%rbp), %ecx                ## 4-byte Reload
	movl	%ecx, -60(%rbp)
	movl	%ecx, %eax
	shrl	$8, %eax
	movl	%eax, -56(%rbp)
	movq	_NAND_ROW_ADDR_3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_9
## %bb.8:
	shrl	$16, %ecx
	movl	%ecx, -52(%rbp)
	incl	-88(%rbp)
LBB0_9:
	leaq	-104(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_nand_exec_op
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_12
## %bb.11:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_CMD_READ0,4,2             ## @NAND_CMD_READ0
	.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
	.comm	_NAND_ROW_ADDR_3,4,2            ## @NAND_ROW_ADDR_3
	.no_dead_strip	_nand_sp_exec_read_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_sp_exec_read_page_op
_nand_sp_exec_read_page_op:             ; @nand_sp_exec_read_page_op
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x22, x4
	mov	x24, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	bl	_nand_to_mtd
	mov	x23, x0
	add	x0, x19, #8
	bl	_nand_get_sdr_timings
	mov	x25, x0
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, #8]
	ldr	w0, [x25, #8]
	bl	_PSEC_TO_NSEC
	mov	x2, x0
	add	x1, sp, #40
	mov	w0, #3
	bl	_NAND_OP_ADDR
	str	x0, [sp, #16]
	ldr	w0, [x25, #4]
	bl	_PSEC_TO_MSEC
	mov	x26, x0
	ldr	w0, [x25]
	bl	_PSEC_TO_NSEC
	mov	x1, x0
	mov	x0, x26
	bl	_NAND_OP_WAIT_RDY
	str	x0, [sp, #24]
	mov	x0, x22
	mov	x1, x24
	mov	w2, #0
	bl	_NAND_OP_DATA_IN
	str	x0, [sp, #32]
	ldr	w0, [x19, #4]
	add	x1, sp, #8
	bl	_NAND_OPERATION
	cmp	w22, #0
	cset	w8, eq
	sub	w8, w0, w8
	str	w8, [sp]
	ldr	w8, [x23]
	cmp	w8, w21
	b.ls	LBB0_4
; %bb.1:
	cmp	w21, #256
	b.lo	LBB0_6
; %bb.2:
	ldr	w8, [x19]
Lloh6:
	adrp	x9, _NAND_BUSWIDTH_16@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NAND_BUSWIDTH_16@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_6
; %bb.3:
Lloh9:
	adrp	x8, _NAND_CMD_READ1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NAND_CMD_READ1@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x8, _NAND_CMD_READOOB@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NAND_CMD_READOOB@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	str	w8, [sp, #12]
LBB0_6:
	add	x1, sp, #40
	mov	x0, x19
	mov	x2, x21
	bl	_nand_fill_column_cycles
	tbnz	w0, #31, LBB0_10
; %bb.7:
	lsr	w8, w20, #8
	stp	w20, w8, [sp, #44]
	ldr	w8, [x19]
Lloh13:
	adrp	x9, _NAND_ROW_ADDR_3@GOTPAGE
Lloh14:
	ldr	x9, [x9, _NAND_ROW_ADDR_3@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
	lsr	w8, w20, #16
	str	w8, [sp, #52]
	ldr	w8, [sp, #16]
	add	w8, w8, #1
	str	w8, [sp, #16]
LBB0_9:
	mov	x1, sp
	mov	x0, x19
	bl	_nand_exec_op
LBB0_10:
	ldr	x8, [sp, #56]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_CMD_READ0,4,2             ; @NAND_CMD_READ0
	.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
	.comm	_NAND_ROW_ADDR_3,4,2            ; @NAND_ROW_ADDR_3
	.no_dead_strip	_nand_sp_exec_read_page_op
.subsections_via_symbols
