	.file	"extr_ar934x_nand.c_ar934x_nfc_write_page.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"write_page: page:%d oob:%d\n"
	.text
	.p2align 4
	.type	ar934x_nfc_write_page, @function
ar934x_nfc_write_page:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, r8d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	mtd_to_ar934x_nfc@PLT
	mov	ecx, r13d
	mov	edx, r12d
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	rbp, rax
	call	nfc_dbg@PLT
	test	r13d, r13d
	je	.L4
	mov	esi, DWORD PTR 4[rbx]
	mov	edi, DWORD PTR [r15]
	call	is_all_ff@PLT
	test	eax, eax
	je	.L10
.L4:
	mov	edx, DWORD PTR [rbx]
	mov	edi, DWORD PTR 0[rbp]
	mov	rsi, r14
	call	memcpy@PLT
	mov	rdi, rbp
	call	ar934x_nfc_enable_hwecc@PLT
	mov	r8d, DWORD PTR [rbx]
	mov	esi, DWORD PTR NAND_CMD_PAGEPROG[rip]
	xor	edx, edx
	mov	rdi, rbp
	mov	ecx, r12d
	call	ar934x_nfc_send_write@PLT
	mov	rdi, rbp
	mov	r13d, eax
	call	ar934x_nfc_disable_hwecc@PLT
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	edx, r12d
	mov	rsi, r15
	mov	rdi, rbx
	call	ar934x_nfc_write_oob@PLT
	mov	r13d, eax
	test	eax, eax
	je	.L4
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ar934x_nfc_write_page, .-ar934x_nfc_write_page
	.comm	NAND_CMD_PAGEPROG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ar934x_nand.c_ar934x_nfc_write_page.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"write_page: page:%d oob:%d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ar934x_nfc_write_page, %function
ar934x_nfc_write_page:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r6, r3
	sub	sp, sp, #12
	mov	r8, r1
	mov	r7, r2
	ldr	r9, [sp, #40]
	mov	r5, r0
	bl	mtd_to_ar934x_nfc
	mov	r3, r6
	mov	r2, r9
	ldr	r1, .L11
	mov	r4, r0
	bl	nfc_dbg
	cmp	r6, #0
	beq	.L4
	ldr	r1, [r5, #4]
	ldr	r0, [r8]
	bl	is_all_ff
	cmp	r0, #0
	beq	.L10
.L4:
	mov	r1, r7
	ldr	r2, [r5]
	ldr	r0, [r4]
	bl	memcpy
	mov	r0, r4
	bl	ar934x_nfc_enable_hwecc
	ldr	r3, [r5]
	ldr	r2, .L11+4
	str	r3, [sp]
	ldr	r1, [r2]
	mov	r3, r9
	mov	r2, #0
	mov	r0, r4
	bl	ar934x_nfc_send_write
	mov	r6, r0
	mov	r0, r4
	bl	ar934x_nfc_disable_hwecc
.L1:
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L10:
	mov	r1, r8
	mov	r2, r9
	mov	r0, r5
	bl	ar934x_nfc_write_oob
	subs	r6, r0, #0
	beq	.L4
	b	.L1
.L12:
	.align	2
.L11:
	.word	.LC0
	.word	NAND_CMD_PAGEPROG
	.size	ar934x_nfc_write_page, .-ar934x_nfc_write_page
	.comm	NAND_CMD_PAGEPROG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
