	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_nfc_hw_reset
_mtk_nfc_hw_reset:                      ## @mtk_nfc_hw_reset
	.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	%rdi, %rbx
	movq	8(%rdi), %r14
	movq	_CON_FIFO_FLUSH@GOTPCREL(%rip), %rax
	movq	_CON_NFI_RST@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	orl	(%rax), %esi
	movq	_NFI_CON@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	callq	_nfi_writel
	movq	_NFI_MASTER_STA@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	(%rbx), %rdi
	movq	_MTK_RESET_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$1, %edx
	movl	$50, %ecx
	callq	_readl_poll_timeout
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	(%r15), %rdx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
LBB0_2:
	movl	(%r12), %esi
	movq	_CON_FIFO_FLUSH@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_nfi_writel
	movq	_STAR_DE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NFI_STRDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nfi_writew                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CON_FIFO_FLUSH,4,2             ## @CON_FIFO_FLUSH
	.comm	_CON_NFI_RST,4,2                ## @CON_NFI_RST
	.comm	_NFI_CON,4,2                    ## @NFI_CON
	.comm	_NFI_MASTER_STA,8,3             ## @NFI_MASTER_STA
	.comm	_MASTER_STA_MASK,4,2            ## @MASTER_STA_MASK
	.comm	_MTK_RESET_TIMEOUT,4,2          ## @MTK_RESET_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"master active in reset [0x%x] = 0x%x\n"

	.comm	_STAR_DE,4,2                    ## @STAR_DE
	.comm	_NFI_STRDATA,4,2                ## @NFI_STRDATA
	.no_dead_strip	_mtk_nfc_hw_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_nfc_hw_reset
_mtk_nfc_hw_reset:                      ; @mtk_nfc_hw_reset
	.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	x19, x0
	ldr	x20, [x0, #8]
Lloh0:
	adrp	x21, _CON_FIFO_FLUSH@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CON_FIFO_FLUSH@GOTPAGEOFF]
Lloh2:
	adrp	x22, _CON_NFI_RST@GOTPAGE
Lloh3:
	ldr	x22, [x22, _CON_NFI_RST@GOTPAGEOFF]
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w1, w9, w8
Lloh4:
	adrp	x23, _NFI_CON@GOTPAGE
Lloh5:
	ldr	x23, [x23, _NFI_CON@GOTPAGEOFF]
	ldr	w2, [x23]
	bl	_nfi_writel
Lloh6:
	adrp	x24, _NFI_MASTER_STA@GOTPAGE
Lloh7:
	ldr	x24, [x24, _NFI_MASTER_STA@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	x9, [x24]
	add	x0, x9, x8
Lloh8:
	adrp	x8, _MTK_RESET_TIMEOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MTK_RESET_TIMEOUT@GOTPAGEOFF]
Lloh10:
	ldr	w4, [x8]
	mov	w2, #1
	mov	w3, #50
	bl	_readl_poll_timeout
	cbz	w0, LBB0_2
; %bb.1:
	ldr	x2, [x24]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
LBB0_2:
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w1, w9, w8
	ldr	w2, [x23]
	mov	x0, x19
	bl	_nfi_writel
Lloh13:
	adrp	x8, _STAR_DE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _STAR_DE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _NFI_STRDATA@GOTPAGE
Lloh17:
	ldr	x8, [x8, _NFI_STRDATA@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x19
	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
	b	_nfi_writew
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_CON_FIFO_FLUSH,4,2             ; @CON_FIFO_FLUSH
	.comm	_CON_NFI_RST,4,2                ; @CON_NFI_RST
	.comm	_NFI_CON,4,2                    ; @NFI_CON
	.comm	_NFI_MASTER_STA,8,3             ; @NFI_MASTER_STA
	.comm	_MASTER_STA_MASK,4,2            ; @MASTER_STA_MASK
	.comm	_MTK_RESET_TIMEOUT,4,2          ; @MTK_RESET_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"master active in reset [0x%x] = 0x%x\n"

	.comm	_STAR_DE,4,2                    ; @STAR_DE
	.comm	_NFI_STRDATA,4,2                ; @NFI_STRDATA
	.no_dead_strip	_mtk_nfc_hw_reset
.subsections_via_symbols
