	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sunxi_nfc_hw_ecc_write_extra_oob
_sunxi_nfc_hw_ecc_write_extra_oob:      ## @sunxi_nfc_hw_ecc_write_extra_oob
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r12
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	callq	_nand_to_mtd
	movq	%rax, %r14
	movslq	(%rbx), %rax
	addq	$4, %rax
	movslq	4(%rbx), %r15
	imulq	%rax, %r15
	movl	(%r14), %r13d
	subl	%r15d, %r13d
	jle	LBB0_5
## %bb.1:
	testq	%r12, %r12
	je	LBB0_6
## %bb.2:
	cmpl	%r15d, (%r12)
	je	LBB0_4
## %bb.3:
	movl	4(%r14), %esi
	addl	%r15d, %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_nand_change_write_column_op
LBB0_4:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15,4), %rsi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	xorl	%ecx, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_sunxi_nfc_randomizer_write_buf
	movl	4(%r14), %eax
	addl	(%r14), %eax
	movl	%eax, (%r12)
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	4(%r14), %esi
	addl	%r15d, %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_nand_change_write_column_op
	movslq	%r15d, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rsi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	xorl	%ecx, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sunxi_nfc_randomizer_write_buf ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_sunxi_nfc_hw_ecc_write_extra_oob
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sunxi_nfc_hw_ecc_write_extra_oob
_sunxi_nfc_hw_ecc_write_extra_oob:      ; @sunxi_nfc_hw_ecc_write_extra_oob
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	bl	_nand_to_mtd
	ldp	w8, w9, [x20]
	add	w8, w8, #4
	mul	w25, w8, w9
	ldr	w8, [x0]
	sub	w23, w8, w25
	cmp	w23, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x24, x0
	cbz	x21, LBB0_6
; %bb.2:
	ldr	w8, [x21]
	cmp	w8, w25
	b.eq	LBB0_4
; %bb.3:
	ldr	w8, [x24, #4]
	add	w1, w8, w25
	mov	x0, x20
	mov	x2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_nand_change_write_column_op
LBB0_4:
	add	x1, x22, w25, sxtw #2
	mov	x0, x20
	mov	x2, x23
	mov	w3, #0
	mov	x4, x19
	bl	_sunxi_nfc_randomizer_write_buf
	ldp	w8, w9, [x24]
	add	w8, w9, w8
	str	w8, [x21]
LBB0_5:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	w8, [x24, #4]
	add	w1, w8, w25
	mov	x0, x20
	mov	x2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_nand_change_write_column_op
	add	x1, x22, w25, sxtw #2
	mov	x0, x20
	mov	x2, x23
	mov	w3, #0
	mov	x4, x19
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_sunxi_nfc_randomizer_write_buf
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_sunxi_nfc_hw_ecc_write_extra_oob
.subsections_via_symbols
