	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sunxi_nfc_rst
_sunxi_nfc_rst:                         ## @sunxi_nfc_rst
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_NFC_REG_ECC_CTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rdi), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	_NFC_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_NFC_REG_CTL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	addq	8(%r14), %rsi
	callq	_writel
	movq	(%rbx), %rdi
	addq	8(%r14), %rdi
	movq	_NFC_DEFAULT_TIMEOUT_MS@GOTPCREL(%rip), %rax
	imull	$1000, (%rax), %r8d             ## imm = 0x3E8
	movl	$1, %edx
	movl	$1, %ecx
	callq	_readl_poll_timeout
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_2:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NFC_REG_ECC_CTL,8,3            ## @NFC_REG_ECC_CTL
	.comm	_NFC_RESET,4,2                  ## @NFC_RESET
	.comm	_NFC_REG_CTL,8,3                ## @NFC_REG_CTL
	.comm	_NFC_DEFAULT_TIMEOUT_MS,4,2     ## @NFC_DEFAULT_TIMEOUT_MS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wait for NAND controller reset timedout\n"

	.no_dead_strip	_sunxi_nfc_rst
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sunxi_nfc_rst
_sunxi_nfc_rst:                         ; @sunxi_nfc_rst
	.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	x19, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _NFC_REG_ECC_CTL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NFC_REG_ECC_CTL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
Lloh3:
	adrp	x8, _NFC_RESET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NFC_RESET@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x20, _NFC_REG_CTL@GOTPAGE
Lloh7:
	ldr	x20, [x20, _NFC_REG_CTL@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x0, x9, x8
Lloh8:
	adrp	x8, _NFC_DEFAULT_TIMEOUT_MS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NFC_DEFAULT_TIMEOUT_MS@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	mov	w9, #1000
	mul	w4, w8, w9
	mov	w2, #1
	mov	w3, #1
	bl	_readl_poll_timeout
	mov	x20, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_2:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_NFC_REG_ECC_CTL,8,3            ; @NFC_REG_ECC_CTL
	.comm	_NFC_RESET,4,2                  ; @NFC_RESET
	.comm	_NFC_REG_CTL,8,3                ; @NFC_REG_CTL
	.comm	_NFC_DEFAULT_TIMEOUT_MS,4,2     ; @NFC_DEFAULT_TIMEOUT_MS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wait for NAND controller reset timedout\n"

	.no_dead_strip	_sunxi_nfc_rst
.subsections_via_symbols
