	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sunxi_nfc_write_buf
_sunxi_nfc_write_buf:                   ## @sunxi_nfc_write_buf
	.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	%edx, %r15d
	movq	%rsi, %r14
	callq	_to_sunxi_nand
	movl	(%rax), %edi
	callq	_to_sunxi_nfc
	movq	%rax, %r12
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r15d, %r13d
	jge	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r15d, %edi
	subl	%r13d, %edi
	movq	_NFC_SRAM_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_min
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_sunxi_nfc_wait_cmd_fifo_empty
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_NFC_REG_CNT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	_NFC_RAM0_BASE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r12), %rdi
	movslq	%r13d, %rax
	leaq	(%r14,%rax,4), %rsi
	movl	%ebx, %edx
	callq	_memcpy_toio
	movq	_NFC_DATA_SWAP_METHOD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_NFC_DATA_TRANS@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_NFC_ACCESS_DIR@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_NFC_REG_CMD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	callq	_writel
	xorl	%edx, %edx
	cmpl	$64, %ebx
	setl	%dl
	movq	_NFC_CMD_INT_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	callq	_sunxi_nfc_wait_events
	addl	%ebx, %r13d
	testl	%eax, %eax
	je	LBB0_1
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NFC_SRAM_SIZE,4,2              ## @NFC_SRAM_SIZE
	.comm	_NFC_REG_CNT,8,3                ## @NFC_REG_CNT
	.comm	_NFC_RAM0_BASE,8,3              ## @NFC_RAM0_BASE
	.comm	_NFC_DATA_TRANS,4,2             ## @NFC_DATA_TRANS
	.comm	_NFC_DATA_SWAP_METHOD,4,2       ## @NFC_DATA_SWAP_METHOD
	.comm	_NFC_ACCESS_DIR,4,2             ## @NFC_ACCESS_DIR
	.comm	_NFC_REG_CMD,8,3                ## @NFC_REG_CMD
	.comm	_NFC_CMD_INT_FLAG,4,2           ## @NFC_CMD_INT_FLAG
	.no_dead_strip	_sunxi_nfc_write_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sunxi_nfc_write_buf
_sunxi_nfc_write_buf:                   ; @sunxi_nfc_write_buf
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	bl	_to_sunxi_nand
	ldr	w0, [x0]
	bl	_to_sunxi_nfc
	mov	x21, x0
	mov	w23, #0
Lloh0:
	adrp	x24, _NFC_SRAM_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _NFC_SRAM_SIZE@GOTPAGEOFF]
Lloh2:
	adrp	x28, _NFC_DATA_SWAP_METHOD@GOTPAGE
Lloh3:
	ldr	x28, [x28, _NFC_DATA_SWAP_METHOD@GOTPAGEOFF]
Lloh4:
	adrp	x25, _NFC_ACCESS_DIR@GOTPAGE
Lloh5:
	ldr	x25, [x25, _NFC_ACCESS_DIR@GOTPAGEOFF]
Lloh6:
	adrp	x26, _NFC_REG_CMD@GOTPAGE
Lloh7:
	ldr	x26, [x26, _NFC_REG_CMD@GOTPAGEOFF]
Lloh8:
	adrp	x27, _NFC_CMD_INT_FLAG@GOTPAGE
Lloh9:
	ldr	x27, [x27, _NFC_CMD_INT_FLAG@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w23, w19
	b.ge	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	w0, w19, w23
	ldr	w1, [x24]
	bl	_min
	mov	x22, x0
	mov	x0, x21
	bl	_sunxi_nfc_wait_cmd_fifo_empty
	cbnz	w0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x21]
Lloh10:
	adrp	x9, _NFC_REG_CNT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _NFC_REG_CNT@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x22
	bl	_writel
	ldr	x8, [x21]
Lloh13:
	adrp	x9, _NFC_RAM0_BASE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _NFC_RAM0_BASE@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	add	x0, x9, x8
	add	x1, x20, w23, sxtw #2
	mov	x2, x22
	bl	_memcpy_toio
Lloh16:
	adrp	x8, _NFC_DATA_TRANS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _NFC_DATA_TRANS@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	ldr	w9, [x28]
	orr	w8, w9, w8
	ldr	w9, [x25]
	orr	w0, w8, w9
	ldr	x8, [x21]
	ldr	x9, [x26]
	add	x1, x9, x8
	bl	_writel
	cmp	w22, #64
	cset	w2, lt
	ldr	w1, [x27]
	mov	x0, x21
	mov	w3, #0
	bl	_sunxi_nfc_wait_events
	add	w23, w22, w23
	cbz	w0, LBB0_1
LBB0_4:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_NFC_SRAM_SIZE,4,2              ; @NFC_SRAM_SIZE
	.comm	_NFC_REG_CNT,8,3                ; @NFC_REG_CNT
	.comm	_NFC_RAM0_BASE,8,3              ; @NFC_RAM0_BASE
	.comm	_NFC_DATA_TRANS,4,2             ; @NFC_DATA_TRANS
	.comm	_NFC_DATA_SWAP_METHOD,4,2       ; @NFC_DATA_SWAP_METHOD
	.comm	_NFC_ACCESS_DIR,4,2             ; @NFC_ACCESS_DIR
	.comm	_NFC_REG_CMD,8,3                ; @NFC_REG_CMD
	.comm	_NFC_CMD_INT_FLAG,4,2           ; @NFC_CMD_INT_FLAG
	.no_dead_strip	_sunxi_nfc_write_buf
.subsections_via_symbols
