	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxc_nand_write_page
_mxc_nand_write_page:                   ## @mxc_nand_write_page
	.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
	movl	%ecx, %r14d
	movl	%edx, %r13d
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	callq	_nand_to_mtd
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_nand_get_controller_data
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	*16(%rax)
	movq	(%rbx), %rax
	movq	_NAND_CMD_SEQIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	*(%rax)
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_mxc_do_addr_cycle
	movl	8(%rbx), %edi
	movl	(%r15), %edx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_memcpy32_toio
	movl	(%r12), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_copy_spare
	movq	(%rbx), %rax
	movq	_NFC_INPUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r15, %rdi
	callq	*8(%rax)
	movq	(%rbx), %rax
	movq	_NAND_CMD_PAGEPROG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	*(%rax)
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_mxc_do_addr_cycle
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_CMD_SEQIN,4,2             ## @NAND_CMD_SEQIN
	.comm	_NFC_INPUT,4,2                  ## @NFC_INPUT
	.comm	_NAND_CMD_PAGEPROG,4,2          ## @NAND_CMD_PAGEPROG
	.no_dead_strip	_mxc_nand_write_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxc_nand_write_page
_mxc_nand_write_page:                   ; @mxc_nand_write_page
	.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, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	bl	_nand_to_mtd
	mov	x20, x0
	mov	x0, x23
	bl	_nand_get_controller_data
	mov	x24, x0
	ldr	x8, [x0]
	ldr	x8, [x8, #16]
	mov	x0, x23
	mov	x1, x21
	blr	x8
	ldr	x8, [x24]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _NAND_CMD_SEQIN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NAND_CMD_SEQIN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	mov	x0, x24
	mov	w2, #0
	blr	x8
	mov	x0, x20
	mov	w1, #0
	mov	x2, x19
	bl	_mxc_do_addr_cycle
	ldr	w0, [x24, #8]
	ldr	w2, [x20]
	mov	x1, x22
	bl	_memcpy32_toio
	ldr	w2, [x23]
	mov	x0, x20
	mov	w1, #0
	bl	_copy_spare
	ldr	x8, [x24]
	ldr	x8, [x8, #8]
Lloh3:
	adrp	x9, _NFC_INPUT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NFC_INPUT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x9]
	mov	x0, x20
	blr	x8
	ldr	x8, [x24]
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _NAND_CMD_PAGEPROG@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NAND_CMD_PAGEPROG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
	mov	x0, x24
	mov	w2, #1
	blr	x8
	mov	x0, x20
	mov	w1, #0
	mov	x2, x19
	bl	_mxc_do_addr_cycle
	mov	w0, #0
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_CMD_SEQIN,4,2             ; @NAND_CMD_SEQIN
	.comm	_NFC_INPUT,4,2                  ; @NFC_INPUT
	.comm	_NAND_CMD_PAGEPROG,4,2          ; @NAND_CMD_PAGEPROG
	.no_dead_strip	_mxc_nand_write_page
.subsections_via_symbols
