	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_nfc_send_address
_mtk_nfc_send_address:                  ## @mtk_nfc_send_address
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movq	_NFI_COLADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_nfi_writel
	movq	_NFI_ROWADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_nfi_writel
	movq	_NFI_ADDRNOB@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_nfi_writew
	movq	_NFI_STA@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	movq	_MTK_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$1, %edx
	movl	$10, %ecx
	callq	_readl_poll_timeout_atomic
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_2:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NFI_COLADDR,4,2                ## @NFI_COLADDR
	.comm	_NFI_ROWADDR,4,2                ## @NFI_ROWADDR
	.comm	_NFI_ADDRNOB,4,2                ## @NFI_ADDRNOB
	.comm	_NFI_STA,8,3                    ## @NFI_STA
	.comm	_STA_ADDR,4,2                   ## @STA_ADDR
	.comm	_MTK_TIMEOUT,4,2                ## @MTK_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"nfi core timed out entering address mode\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_mtk_nfc_send_address
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_nfc_send_address
_mtk_nfc_send_address:                  ; @mtk_nfc_send_address
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x8, _NFI_COLADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NFI_COLADDR@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_nfi_writel
Lloh3:
	adrp	x8, _NFI_ROWADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NFI_ROWADDR@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #0
	bl	_nfi_writel
Lloh6:
	adrp	x8, _NFI_ADDRNOB@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NFI_ADDRNOB@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #1
	bl	_nfi_writew
Lloh9:
	adrp	x8, _NFI_STA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NFI_STA@GOTPAGEOFF]
	ldr	x9, [x20]
Lloh11:
	ldr	x8, [x8]
	add	x0, x8, x9
Lloh12:
	adrp	x8, _MTK_TIMEOUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MTK_TIMEOUT@GOTPAGEOFF]
Lloh14:
	ldr	w4, [x8]
	mov	w2, #1
	mov	w3, #10
	bl	_readl_poll_timeout_atomic
	cbz	w0, LBB0_2
; %bb.1:
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
Lloh17:
	adrp	x8, _EIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_NFI_COLADDR,4,2                ; @NFI_COLADDR
	.comm	_NFI_ROWADDR,4,2                ; @NFI_ROWADDR
	.comm	_NFI_ADDRNOB,4,2                ; @NFI_ADDRNOB
	.comm	_NFI_STA,8,3                    ; @NFI_STA
	.comm	_STA_ADDR,4,2                   ; @STA_ADDR
	.comm	_MTK_TIMEOUT,4,2                ; @MTK_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nfi core timed out entering address mode\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_mtk_nfc_send_address
.subsections_via_symbols
