	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function marvell_nfc_end_cmd
_marvell_nfc_end_cmd:                   ## @marvell_nfc_end_cmd
	.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
	movq	%rdx, %r12
	movl	%esi, %r14d
	movl	(%rdi), %edi
	callq	_to_marvell_nfc
	movq	%rax, %rbx
	movq	_NDSR@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	(%rax), %rdi
	movq	_POLL_PERIOD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_POLL_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%edx, %edx
	callq	_readl_relaxed_poll_timeout
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	24(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	callq	_dev_err
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.2:
	callq	_dmaengine_terminate_all
	jmp	LBB0_6
LBB0_3:
	cmpq	$0, 8(%rbx)
	je	LBB0_5
## %bb.4:
	movq	_NDCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_readl_relaxed
	movq	_NDCR_DMA_EN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_6
LBB0_5:
	movq	(%r13), %rsi
	addq	(%rbx), %rsi
	movl	%r14d, %edi
	callq	_writel_relaxed
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NDSR,8,3                       ## @NDSR
	.comm	_POLL_PERIOD,4,2                ## @POLL_PERIOD
	.comm	_POLL_TIMEOUT,4,2               ## @POLL_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout on %s (NDSR: 0x%08x)\n"

	.comm	_NDCR,8,3                       ## @NDCR
	.comm	_NDCR_DMA_EN,4,2                ## @NDCR_DMA_EN
	.no_dead_strip	_marvell_nfc_end_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function marvell_nfc_end_cmd
_marvell_nfc_end_cmd:                   ; @marvell_nfc_end_cmd
	.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	x22, x2
	mov	x19, x1
	ldr	w0, [x0]
	bl	_to_marvell_nfc
	mov	x21, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x23, _NDSR@GOTPAGE
Lloh1:
	ldr	x23, [x23, _NDSR@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x0, x9, x8
Lloh2:
	adrp	x8, _POLL_PERIOD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _POLL_PERIOD@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
Lloh5:
	adrp	x8, _POLL_TIMEOUT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _POLL_TIMEOUT@GOTPAGEOFF]
Lloh7:
	ldr	w4, [x8]
	mov	w2, #0
	bl	_readl_relaxed_poll_timeout
	mov	x20, x0
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w0, [x21, #24]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_dev_err
	ldr	x0, [x21, #16]
	cbz	x0, LBB0_6
; %bb.2:
	bl	_dmaengine_terminate_all
	b	LBB0_6
LBB0_3:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	x8, [x21]
Lloh10:
	adrp	x9, _NDCR@GOTPAGE
Lloh11:
	ldr	x9, [x9, _NDCR@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl_relaxed
Lloh13:
	adrp	x8, _NDCR_DMA_EN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _NDCR_DMA_EN@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_6
LBB0_5:
	ldr	x8, [x21]
	ldr	x9, [x23]
	add	x1, x9, x8
	mov	x0, x19
	bl	_writel_relaxed
LBB0_6:
	mov	x0, x20
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_NDSR,8,3                       ; @NDSR
	.comm	_POLL_PERIOD,4,2                ; @POLL_PERIOD
	.comm	_POLL_TIMEOUT,4,2               ; @POLL_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout on %s (NDSR: 0x%08x)\n"

	.comm	_NDCR,8,3                       ; @NDCR
	.comm	_NDCR_DMA_EN,4,2                ; @NDCR_DMA_EN
	.no_dead_strip	_marvell_nfc_end_cmd
.subsections_via_symbols
