	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar934x_nfc_do_rw_command
_ar934x_nfc_do_rw_command:              ## @ar934x_nfc_do_rw_command
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r12d
	movl	%r8d, %r14d
	movl	%ecx, %r13d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, -64(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	movl	16(%rbp), %r15d
	movl	%ecx, %edi
	andl	$3, %edi
	callq	_WARN_ON
	xorl	%edi, %edi
	cmpl	%r13d, (%rbx)
	setl	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %ecx
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_2:
	testl	%r15d, %r15d
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %rcx
	cmoveq	%rax, %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	_AR934X_NFC_DMA_CTRL_DMA_DIR_WRITE@GOTPCREL(%rip), %rax
	cmoveq	_AR934X_NFC_DMA_CTRL_DMA_DIR_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leaq	-52(%rbp), %rcx
	leaq	-48(%rbp), %r8
	movq	%rbx, %rdi
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_ar934x_nfc_get_addr
	movq	_AR934X_NFC_DMA_CTRL_DMA_BURST_3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_AR934X_NFC_DMA_CTRL_DMA_BURST_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_AR934X_NFC_DMA_CTRL_DMA_START@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r15d
	orl	%eax, %r15d
	movq	_AR934X_NFC_CMD_INPUT_SEL_DMA@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_AR934X_NFC_CMD_ADDR_SEL_0@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_AR934X_NFC_CTRL_INT_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movl	-52(%rbp), %ecx
	movl	-48(%rbp), %r8d
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	%r13d, %r9d
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	pushq	%r12
	pushq	%r15
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	pushq	%r14
	callq	_nfc_dbg
	addq	$32, %rsp
	movl	$-1, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_AR934X_NFC_REG_INT_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_ar934x_nfc_wr
	movq	_AR934X_NFC_REG_ADDR0_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-52(%rbp), %edx
	movq	%rbx, %rdi
	callq	_ar934x_nfc_wr
	movq	_AR934X_NFC_REG_ADDR0_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-48(%rbp), %edx
	movq	%rbx, %rdi
	callq	_ar934x_nfc_wr
	movq	_AR934X_NFC_REG_DMA_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%rbx), %edx
	movq	%rbx, %rdi
	callq	_ar934x_nfc_wr
	movq	_AR934X_NFC_REG_DMA_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_ar934x_nfc_wr
	movq	_AR934X_NFC_REG_DATA_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_ar934x_nfc_wr
	movq	_AR934X_NFC_REG_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_ar934x_nfc_wr
	movq	_AR934X_NFC_REG_DMA_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_ar934x_nfc_wr
	movq	_AR934X_NFC_REG_ECC_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%rbx), %edx
	movq	%rbx, %rdi
	callq	_ar934x_nfc_wr
	movq	_AR934X_NFC_REG_ECC_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%rbx), %edx
	movq	%rbx, %rdi
	callq	_ar934x_nfc_wr
	movq	%rbx, %rdi
	callq	_ar934x_nfc_use_irq
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_AR934X_NFC_REG_INT_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_AR934X_NFC_IRQ_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_ar934x_nfc_wr
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_ar934x_nfc_rr
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_ar934x_nfc_write_cmd_reg
	movq	%rbx, %rdi
	callq	_ar934x_nfc_wait_done
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	16(%rbx), %edi
	leaq	L_.str.4(%rip), %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_dev_dbg
	movq	%rbx, %rdi
	callq	_ar934x_nfc_restart
	incl	%r14d
	movq	_AR934X_NFC_DMA_RETRIES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jl	LBB0_3
## %bb.7:
	movl	16(%rbx), %edi
	leaq	L_.str.5(%rip), %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_dev_err
LBB0_8:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"len=%d > buf_size=%d"

	.comm	_AR934X_NFC_DMA_CTRL_DMA_DIR_WRITE,4,2 ## @AR934X_NFC_DMA_CTRL_DMA_DIR_WRITE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_AR934X_NFC_DMA_CTRL_DMA_DIR_READ,4,2 ## @AR934X_NFC_DMA_CTRL_DMA_DIR_READ
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_AR934X_NFC_DMA_CTRL_DMA_START,4,2 ## @AR934X_NFC_DMA_CTRL_DMA_START
	.comm	_AR934X_NFC_DMA_CTRL_DMA_BURST_3,4,2 ## @AR934X_NFC_DMA_CTRL_DMA_BURST_3
	.comm	_AR934X_NFC_DMA_CTRL_DMA_BURST_S,4,2 ## @AR934X_NFC_DMA_CTRL_DMA_BURST_S
	.comm	_AR934X_NFC_CMD_INPUT_SEL_DMA,4,2 ## @AR934X_NFC_CMD_INPUT_SEL_DMA
	.comm	_AR934X_NFC_CMD_ADDR_SEL_0,4,2  ## @AR934X_NFC_CMD_ADDR_SEL_0
	.comm	_AR934X_NFC_CTRL_INT_EN,4,2     ## @AR934X_NFC_CTRL_INT_EN
L_.str.1:                               ## @.str.1
	.asciz	"%s a0:%08x a1:%08x len:%x cmd:%08x dma:%08x ctrl:%08x\n"

L_.str.2:                               ## @.str.2
	.asciz	"write"

L_.str.3:                               ## @.str.3
	.asciz	"read"

	.comm	_AR934X_NFC_REG_INT_STATUS,4,2  ## @AR934X_NFC_REG_INT_STATUS
	.comm	_AR934X_NFC_REG_ADDR0_0,4,2     ## @AR934X_NFC_REG_ADDR0_0
	.comm	_AR934X_NFC_REG_ADDR0_1,4,2     ## @AR934X_NFC_REG_ADDR0_1
	.comm	_AR934X_NFC_REG_DMA_ADDR,4,2    ## @AR934X_NFC_REG_DMA_ADDR
	.comm	_AR934X_NFC_REG_DMA_COUNT,4,2   ## @AR934X_NFC_REG_DMA_COUNT
	.comm	_AR934X_NFC_REG_DATA_SIZE,4,2   ## @AR934X_NFC_REG_DATA_SIZE
	.comm	_AR934X_NFC_REG_CTRL,4,2        ## @AR934X_NFC_REG_CTRL
	.comm	_AR934X_NFC_REG_DMA_CTRL,4,2    ## @AR934X_NFC_REG_DMA_CTRL
	.comm	_AR934X_NFC_REG_ECC_CTRL,4,2    ## @AR934X_NFC_REG_ECC_CTRL
	.comm	_AR934X_NFC_REG_ECC_OFFSET,4,2  ## @AR934X_NFC_REG_ECC_OFFSET
	.comm	_AR934X_NFC_REG_INT_MASK,4,2    ## @AR934X_NFC_REG_INT_MASK
	.comm	_AR934X_NFC_IRQ_MASK,4,2        ## @AR934X_NFC_IRQ_MASK
L_.str.4:                               ## @.str.4
	.asciz	"%s operation stuck at page %d\n"

	.comm	_AR934X_NFC_DMA_RETRIES,4,2     ## @AR934X_NFC_DMA_RETRIES
L_.str.5:                               ## @.str.5
	.asciz	"%s operation failed on page %d\n"

	.no_dead_strip	_ar934x_nfc_do_rw_command
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar934x_nfc_do_rw_command
_ar934x_nfc_do_rw_command:              ; @ar934x_nfc_do_rw_command
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x22, x6
	mov	x25, x5
	mov	x24, x4
	mov	x20, x3
	mov	x19, x2
	mov	x23, x1
	mov	x21, x0
	and	w0, w3, #0x3
	bl	_WARN_ON
	ldr	w8, [x21]
	cmp	w8, w20
	cset	w0, lt
	bl	_WARN_ON
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x21, #16]
	ldr	w8, [x21]
	stp	x20, x8, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_2:
Lloh2:
	adrp	x8, l_.str.2@PAGE
Lloh3:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh4:
	adrp	x9, l_.str.3@PAGE
Lloh5:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	w22, #0
	csel	x22, x9, x8, eq
Lloh6:
	adrp	x8, _AR934X_NFC_DMA_CTRL_DMA_DIR_READ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AR934X_NFC_DMA_CTRL_DMA_DIR_READ@GOTPAGEOFF]
Lloh8:
	adrp	x9, _AR934X_NFC_DMA_CTRL_DMA_DIR_WRITE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AR934X_NFC_DMA_CTRL_DMA_DIR_WRITE@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w26, [x8]
	add	x3, sp, #28
	add	x4, sp, #24
	mov	x0, x21
	mov	x1, x23
	mov	x2, x19
	bl	_ar934x_nfc_get_addr
Lloh10:
	adrp	x8, _AR934X_NFC_DMA_CTRL_DMA_START@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AR934X_NFC_DMA_CTRL_DMA_START@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _AR934X_NFC_DMA_CTRL_DMA_BURST_3@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AR934X_NFC_DMA_CTRL_DMA_BURST_3@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x10, _AR934X_NFC_DMA_CTRL_DMA_BURST_S@GOTPAGE
Lloh17:
	ldr	x10, [x10, _AR934X_NFC_DMA_CTRL_DMA_BURST_S@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w8, w26
	orr	w23, w8, w9
Lloh19:
	adrp	x8, _AR934X_NFC_CMD_INPUT_SEL_DMA@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AR934X_NFC_CMD_INPUT_SEL_DMA@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _AR934X_NFC_CMD_ADDR_SEL_0@GOTPAGE
Lloh23:
	ldr	x9, [x9, _AR934X_NFC_CMD_ADDR_SEL_0@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w8, w8, w24
	orr	w24, w8, w9
Lloh25:
	adrp	x8, _AR934X_NFC_CTRL_INT_EN@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AR934X_NFC_CTRL_INT_EN@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	orr	w25, w8, w25
	ldp	w4, w3, [sp, #24]
	str	w25, [sp]
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	mov	x5, x20
	mov	x6, x24
	mov	x7, x23
	bl	_nfc_dbg
	mov	w28, #-1
Lloh30:
	adrp	x26, _AR934X_NFC_REG_INT_MASK@GOTPAGE
Lloh31:
	ldr	x26, [x26, _AR934X_NFC_REG_INT_MASK@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
Lloh32:
	adrp	x8, _AR934X_NFC_REG_INT_STATUS@GOTPAGE
Lloh33:
	ldr	x8, [x8, _AR934X_NFC_REG_INT_STATUS@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_ar934x_nfc_wr
Lloh35:
	adrp	x8, _AR934X_NFC_REG_ADDR0_0@GOTPAGE
Lloh36:
	ldr	x8, [x8, _AR934X_NFC_REG_ADDR0_0@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	ldr	w2, [sp, #28]
	mov	x0, x21
	bl	_ar934x_nfc_wr
Lloh38:
	adrp	x8, _AR934X_NFC_REG_ADDR0_1@GOTPAGE
Lloh39:
	ldr	x8, [x8, _AR934X_NFC_REG_ADDR0_1@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	ldr	w2, [sp, #24]
	mov	x0, x21
	bl	_ar934x_nfc_wr
Lloh41:
	adrp	x8, _AR934X_NFC_REG_DMA_ADDR@GOTPAGE
Lloh42:
	ldr	x8, [x8, _AR934X_NFC_REG_DMA_ADDR@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
	ldr	w2, [x21, #4]
	mov	x0, x21
	bl	_ar934x_nfc_wr
Lloh44:
	adrp	x8, _AR934X_NFC_REG_DMA_COUNT@GOTPAGE
Lloh45:
	ldr	x8, [x8, _AR934X_NFC_REG_DMA_COUNT@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x20
	bl	_ar934x_nfc_wr
Lloh47:
	adrp	x8, _AR934X_NFC_REG_DATA_SIZE@GOTPAGE
Lloh48:
	ldr	x8, [x8, _AR934X_NFC_REG_DATA_SIZE@GOTPAGEOFF]
Lloh49:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x20
	bl	_ar934x_nfc_wr
Lloh50:
	adrp	x8, _AR934X_NFC_REG_CTRL@GOTPAGE
Lloh51:
	ldr	x8, [x8, _AR934X_NFC_REG_CTRL@GOTPAGEOFF]
Lloh52:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x25
	bl	_ar934x_nfc_wr
Lloh53:
	adrp	x8, _AR934X_NFC_REG_DMA_CTRL@GOTPAGE
Lloh54:
	ldr	x8, [x8, _AR934X_NFC_REG_DMA_CTRL@GOTPAGEOFF]
Lloh55:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x23
	bl	_ar934x_nfc_wr
Lloh56:
	adrp	x8, _AR934X_NFC_REG_ECC_CTRL@GOTPAGE
Lloh57:
	ldr	x8, [x8, _AR934X_NFC_REG_ECC_CTRL@GOTPAGEOFF]
Lloh58:
	ldr	w1, [x8]
	ldr	w2, [x21, #8]
	mov	x0, x21
	bl	_ar934x_nfc_wr
Lloh59:
	adrp	x8, _AR934X_NFC_REG_ECC_OFFSET@GOTPAGE
Lloh60:
	ldr	x8, [x8, _AR934X_NFC_REG_ECC_OFFSET@GOTPAGEOFF]
Lloh61:
	ldr	w1, [x8]
	ldr	w2, [x21, #12]
	mov	x0, x21
	bl	_ar934x_nfc_wr
	mov	x0, x21
	bl	_ar934x_nfc_use_irq
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x26]
Lloh62:
	adrp	x8, _AR934X_NFC_IRQ_MASK@GOTPAGE
Lloh63:
	ldr	x8, [x8, _AR934X_NFC_IRQ_MASK@GOTPAGEOFF]
Lloh64:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_ar934x_nfc_wr
	ldr	w1, [x26]
	mov	x0, x21
	bl	_ar934x_nfc_rr
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	mov	x1, x24
	bl	_ar934x_nfc_write_cmd_reg
	mov	x0, x21
	bl	_ar934x_nfc_wait_done
	mov	x27, x0
	cbz	w0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x21, #16]
Lloh65:
	adrp	x1, l_.str.4@PAGE
Lloh66:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x2, x22
	mov	x3, x19
	bl	_dev_dbg
	mov	x0, x21
	bl	_ar934x_nfc_restart
Lloh67:
	adrp	x8, _AR934X_NFC_DMA_RETRIES@GOTPAGE
Lloh68:
	ldr	x8, [x8, _AR934X_NFC_DMA_RETRIES@GOTPAGEOFF]
Lloh69:
	ldr	w8, [x8]
	add	w28, w28, #1
	cmp	w28, w8
	b.lt	LBB0_3
; %bb.7:
	ldr	w0, [x21, #16]
	stp	x22, x19, [sp]
Lloh70:
	adrp	x1, l_.str.5@PAGE
Lloh71:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
LBB0_8:
	mov	x0, x27
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpAdd	Lloh65, Lloh66
	.loh AdrpAdd	Lloh70, Lloh71
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"len=%d > buf_size=%d"

	.comm	_AR934X_NFC_DMA_CTRL_DMA_DIR_WRITE,4,2 ; @AR934X_NFC_DMA_CTRL_DMA_DIR_WRITE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_AR934X_NFC_DMA_CTRL_DMA_DIR_READ,4,2 ; @AR934X_NFC_DMA_CTRL_DMA_DIR_READ
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_AR934X_NFC_DMA_CTRL_DMA_START,4,2 ; @AR934X_NFC_DMA_CTRL_DMA_START
	.comm	_AR934X_NFC_DMA_CTRL_DMA_BURST_3,4,2 ; @AR934X_NFC_DMA_CTRL_DMA_BURST_3
	.comm	_AR934X_NFC_DMA_CTRL_DMA_BURST_S,4,2 ; @AR934X_NFC_DMA_CTRL_DMA_BURST_S
	.comm	_AR934X_NFC_CMD_INPUT_SEL_DMA,4,2 ; @AR934X_NFC_CMD_INPUT_SEL_DMA
	.comm	_AR934X_NFC_CMD_ADDR_SEL_0,4,2  ; @AR934X_NFC_CMD_ADDR_SEL_0
	.comm	_AR934X_NFC_CTRL_INT_EN,4,2     ; @AR934X_NFC_CTRL_INT_EN
l_.str.1:                               ; @.str.1
	.asciz	"%s a0:%08x a1:%08x len:%x cmd:%08x dma:%08x ctrl:%08x\n"

l_.str.2:                               ; @.str.2
	.asciz	"write"

l_.str.3:                               ; @.str.3
	.asciz	"read"

	.comm	_AR934X_NFC_REG_INT_STATUS,4,2  ; @AR934X_NFC_REG_INT_STATUS
	.comm	_AR934X_NFC_REG_ADDR0_0,4,2     ; @AR934X_NFC_REG_ADDR0_0
	.comm	_AR934X_NFC_REG_ADDR0_1,4,2     ; @AR934X_NFC_REG_ADDR0_1
	.comm	_AR934X_NFC_REG_DMA_ADDR,4,2    ; @AR934X_NFC_REG_DMA_ADDR
	.comm	_AR934X_NFC_REG_DMA_COUNT,4,2   ; @AR934X_NFC_REG_DMA_COUNT
	.comm	_AR934X_NFC_REG_DATA_SIZE,4,2   ; @AR934X_NFC_REG_DATA_SIZE
	.comm	_AR934X_NFC_REG_CTRL,4,2        ; @AR934X_NFC_REG_CTRL
	.comm	_AR934X_NFC_REG_DMA_CTRL,4,2    ; @AR934X_NFC_REG_DMA_CTRL
	.comm	_AR934X_NFC_REG_ECC_CTRL,4,2    ; @AR934X_NFC_REG_ECC_CTRL
	.comm	_AR934X_NFC_REG_ECC_OFFSET,4,2  ; @AR934X_NFC_REG_ECC_OFFSET
	.comm	_AR934X_NFC_REG_INT_MASK,4,2    ; @AR934X_NFC_REG_INT_MASK
	.comm	_AR934X_NFC_IRQ_MASK,4,2        ; @AR934X_NFC_IRQ_MASK
l_.str.4:                               ; @.str.4
	.asciz	"%s operation stuck at page %d\n"

	.comm	_AR934X_NFC_DMA_RETRIES,4,2     ; @AR934X_NFC_DMA_RETRIES
l_.str.5:                               ; @.str.5
	.asciz	"%s operation failed on page %d\n"

	.no_dead_strip	_ar934x_nfc_do_rw_command
.subsections_via_symbols
