	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nand_prog_page_end_op          ## -- Begin function nand_prog_page_end_op
	.p2align	4, 0x90
_nand_prog_page_end_op:                 ## @nand_prog_page_end_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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	callq	_nand_has_exec_op
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	leaq	20(%rbx), %rdi
	callq	_nand_get_sdr_timings
	movq	%rax, %r14
	movq	_NAND_CMD_PAGEPROG@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	4(%r14), %edi
	callq	_PSEC_TO_NSEC
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_NAND_OP_CMD
	movl	%eax, -40(%rbp)
	movl	(%r14), %edi
	callq	_PSEC_TO_MSEC
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_NAND_OP_WAIT_RDY
	movl	%eax, -36(%rbp)
	movl	16(%rbx), %edi
	leaq	-40(%rbp), %rsi
	callq	_NAND_OPERATION
	movl	%eax, -48(%rbp)
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_nand_exec_op
	testl	%eax, %eax
	jne	LBB0_8
## %bb.2:
	leaq	-52(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_nand_status_op
	testl	%eax, %eax
	jne	LBB0_8
## %bb.3:
	movl	-52(%rbp), %eax
	jmp	LBB0_5
LBB0_4:
	movq	_NAND_CMD_PAGEPROG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$-1, %edx
	movl	$-1, %ecx
	callq	*8(%rbx)
	movq	%rbx, %rdi
	callq	*(%rbx)
	testl	%eax, %eax
	js	LBB0_8
LBB0_5:
	movq	_NAND_STATUS_FAIL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.7:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_6:
	xorl	%eax, %eax
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_10
## %bb.9:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_CMD_PAGEPROG,4,2          ## @NAND_CMD_PAGEPROG
	.comm	_NAND_STATUS_FAIL,4,2           ## @NAND_STATUS_FAIL
	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nand_prog_page_end_op          ; -- Begin function nand_prog_page_end_op
	.p2align	2
_nand_prog_page_end_op:                 ; @nand_prog_page_end_op
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	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, #24]
	bl	_nand_has_exec_op
	cbz	x0, LBB0_4
; %bb.1:
	add	x0, x19, #20
	bl	_nand_get_sdr_timings
	mov	x20, x0
Lloh3:
	adrp	x8, _NAND_CMD_PAGEPROG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NAND_CMD_PAGEPROG@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	ldr	w0, [x0, #4]
	bl	_PSEC_TO_NSEC
	mov	x1, x0
	mov	x0, x21
	bl	_NAND_OP_CMD
	str	w0, [sp, #16]
	ldr	w0, [x20]
	bl	_PSEC_TO_MSEC
	mov	w1, #0
	bl	_NAND_OP_WAIT_RDY
	str	w0, [sp, #20]
	ldr	w0, [x19, #16]
	add	x1, sp, #16
	bl	_NAND_OPERATION
	str	w0, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_nand_exec_op
	cbnz	w0, LBB0_8
; %bb.2:
	add	x1, sp, #12
	mov	x0, x19
	bl	_nand_status_op
	cbnz	w0, LBB0_8
; %bb.3:
	ldr	w0, [sp, #12]
	b	LBB0_5
LBB0_4:
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x9, _NAND_CMD_PAGEPROG@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NAND_CMD_PAGEPROG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
	mov	x0, x19
	mov	w2, #-1
	mov	w3, #-1
	blr	x8
	ldr	x8, [x19]
	mov	x0, x19
	blr	x8
	tbnz	w0, #31, LBB0_8
LBB0_5:
Lloh9:
	adrp	x8, _NAND_STATUS_FAIL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NAND_STATUS_FAIL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_7
; %bb.6:
Lloh12:
	adrp	x8, _EIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldr	x8, [sp, #24]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	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
	add	sp, sp, #80
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_CMD_PAGEPROG,4,2          ; @NAND_CMD_PAGEPROG
	.comm	_NAND_STATUS_FAIL,4,2           ; @NAND_STATUS_FAIL
	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
