	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar934x_nfc_read_status
_ar934x_nfc_read_status:                ## @ar934x_nfc_read_status
	.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	_NAND_CMD_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_AR934X_NFC_CMD_CMD0_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r14d
	movq	_AR934X_NFC_CMD_SEQ_S@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_AR934X_NFC_REG_INT_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_ar934x_nfc_wr
	movq	_AR934X_NFC_REG_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%rbx), %edx
	movq	%rbx, %rdi
	callq	_ar934x_nfc_wr
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_ar934x_nfc_write_cmd_reg
	movq	%rbx, %rdi
	callq	_ar934x_nfc_wait_dev_ready
	movq	_AR934X_NFC_REG_READ_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ar934x_nfc_rr
	movl	%eax, %r15d
	movzbl	%r15b, %ecx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_nfc_dbg
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	testq	%rcx, %rcx
	movl	$12, %edx
	cmoveq	%rcx, %rdx
	movl	%r15d, (%rax,%rdx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_CMD_STATUS,4,2            ## @NAND_CMD_STATUS
	.comm	_AR934X_NFC_CMD_CMD0_S,4,2      ## @AR934X_NFC_CMD_CMD0_S
	.comm	_AR934X_NFC_CMD_SEQ_S,4,2       ## @AR934X_NFC_CMD_SEQ_S
	.comm	_AR934X_NFC_REG_INT_STATUS,4,2  ## @AR934X_NFC_REG_INT_STATUS
	.comm	_AR934X_NFC_REG_CTRL,4,2        ## @AR934X_NFC_REG_CTRL
	.comm	_AR934X_NFC_REG_READ_STATUS,4,2 ## @AR934X_NFC_REG_READ_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read status, cmd:%08x status:%02x\n"

	.no_dead_strip	_ar934x_nfc_read_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar934x_nfc_read_status
_ar934x_nfc_read_status:                ; @ar934x_nfc_read_status
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _NAND_CMD_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_CMD_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _AR934X_NFC_CMD_CMD0_S@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AR934X_NFC_CMD_CMD0_S@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _AR934X_NFC_CMD_SEQ_S@GOTPAGE
Lloh7:
	ldr	x10, [x10, _AR934X_NFC_CMD_SEQ_S@GOTPAGEOFF]
	lsl	w8, w8, w9
Lloh8:
	ldr	w9, [x10]
	orr	w20, w8, w9
Lloh9:
	adrp	x8, _AR934X_NFC_REG_INT_STATUS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AR934X_NFC_REG_INT_STATUS@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_ar934x_nfc_wr
Lloh12:
	adrp	x8, _AR934X_NFC_REG_CTRL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AR934X_NFC_REG_CTRL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w2, [x19, #16]
	mov	x0, x19
	bl	_ar934x_nfc_wr
	mov	x0, x19
	mov	x1, x20
	bl	_ar934x_nfc_write_cmd_reg
	mov	x0, x19
	bl	_ar934x_nfc_wait_dev_ready
Lloh15:
	adrp	x8, _AR934X_NFC_REG_READ_STATUS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AR934X_NFC_REG_READ_STATUS@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ar934x_nfc_rr
	mov	x21, x0
	and	w3, w0, #0xff
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_nfc_dbg
	ldp	x9, x8, [x19]
	mov	w10, #12
	cmp	x8, #0
	csel	x8, xzr, x10, eq
	str	w21, [x9, x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.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
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_CMD_STATUS,4,2            ; @NAND_CMD_STATUS
	.comm	_AR934X_NFC_CMD_CMD0_S,4,2      ; @AR934X_NFC_CMD_CMD0_S
	.comm	_AR934X_NFC_CMD_SEQ_S,4,2       ; @AR934X_NFC_CMD_SEQ_S
	.comm	_AR934X_NFC_REG_INT_STATUS,4,2  ; @AR934X_NFC_REG_INT_STATUS
	.comm	_AR934X_NFC_REG_CTRL,4,2        ; @AR934X_NFC_REG_CTRL
	.comm	_AR934X_NFC_REG_READ_STATUS,4,2 ; @AR934X_NFC_REG_READ_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read status, cmd:%08x status:%02x\n"

	.no_dead_strip	_ar934x_nfc_read_status
.subsections_via_symbols
