	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function doc_set_extra_page_mode
_doc_set_extra_page_mode:               ## @doc_set_extra_page_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_doc_dbg
	movq	_DOC_SEQ_PAGE_SIZE_532@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_doc_flash_sequence
	movq	_DOC_CMD_PAGE_SIZE_532@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_doc_flash_command
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_doc_delay
	movq	_DOC_FLASHCONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_doc_register_readb
	movq	_DOC_CTRL_PROTECTION_ERROR@GOTPCREL(%rip), %rcx
	movq	_DOC_CTRL_SEQUENCE_ERROR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	subl	(%rcx), %esi
	andl	%edx, %eax
	testl	%eax, %eax
	cmovnel	%esi, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"doc_set_extra_page_mode()\n"

	.comm	_DOC_SEQ_PAGE_SIZE_532,4,2      ## @DOC_SEQ_PAGE_SIZE_532
	.comm	_DOC_CMD_PAGE_SIZE_532,4,2      ## @DOC_CMD_PAGE_SIZE_532
	.comm	_DOC_FLASHCONTROL,4,2           ## @DOC_FLASHCONTROL
	.comm	_DOC_CTRL_PROTECTION_ERROR,4,2  ## @DOC_CTRL_PROTECTION_ERROR
	.comm	_DOC_CTRL_SEQUENCE_ERROR,4,2    ## @DOC_CTRL_SEQUENCE_ERROR
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_doc_set_extra_page_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function doc_set_extra_page_mode
_doc_set_extra_page_mode:               ; @doc_set_extra_page_mode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_doc_dbg
Lloh2:
	adrp	x8, _DOC_SEQ_PAGE_SIZE_532@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DOC_SEQ_PAGE_SIZE_532@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_doc_flash_sequence
Lloh5:
	adrp	x8, _DOC_CMD_PAGE_SIZE_532@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DOC_CMD_PAGE_SIZE_532@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_doc_flash_command
	mov	x0, x19
	mov	w1, #2
	bl	_doc_delay
Lloh8:
	adrp	x8, _DOC_FLASHCONTROL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DOC_FLASHCONTROL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_doc_register_readb
Lloh11:
	adrp	x8, _DOC_CTRL_PROTECTION_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DOC_CTRL_PROTECTION_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _DOC_CTRL_SEQUENCE_ERROR@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DOC_CTRL_SEQUENCE_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh17:
	adrp	x9, _EIO@GOTPAGE
Lloh18:
	ldr	x9, [x9, _EIO@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w8, w0
	csneg	w0, wzr, w9, eq
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"doc_set_extra_page_mode()\n"

	.comm	_DOC_SEQ_PAGE_SIZE_532,4,2      ; @DOC_SEQ_PAGE_SIZE_532
	.comm	_DOC_CMD_PAGE_SIZE_532,4,2      ; @DOC_CMD_PAGE_SIZE_532
	.comm	_DOC_FLASHCONTROL,4,2           ; @DOC_FLASHCONTROL
	.comm	_DOC_CTRL_PROTECTION_ERROR,4,2  ; @DOC_CTRL_PROTECTION_ERROR
	.comm	_DOC_CTRL_SEQUENCE_ERROR,4,2    ; @DOC_CTRL_SEQUENCE_ERROR
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_doc_set_extra_page_mode
.subsections_via_symbols
