	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hisi_nfc_send_cmd_readstart
_hisi_nfc_send_cmd_readstart:           ## @hisi_nfc_send_cmd_readstart
	.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, %rbx
	addq	$16, %rdi
	callq	_nand_to_mtd
	movq	%rax, %r14
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	movl	(%rax), %esi
	cmpl	(%rcx), %esi
	jne	LBB0_2
## %bb.1:
	movl	4(%rax), %edx
	cmpl	4(%rcx), %edx
	je	LBB0_3
LBB0_2:
	andl	$-65536, %esi                   ## imm = 0xFFFF0000
	movl	%esi, (%rax)
	movq	_HINFC504_ADDRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_hinfc_write
	movq	(%rbx), %rax
	movl	4(%rax), %esi
	movq	_HINFC504_ADDRH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_hinfc_write
	movq	_NAND_CMD_READSTART@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$8, %esi
	movq	_NAND_CMD_READ0@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_HINFC504_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_hinfc_write
	movq	_HINFC504_LOG_READ_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_hinfc_write
	movl	4(%r14), %esi
	addl	(%r14), %esi
	movq	_HINFC504_LOG_READ_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_hinfc_write
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_hisi_nfc_dma_transfer
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	movl	(%rax), %edx
	movl	%edx, (%rcx)
	movl	4(%rax), %eax
	movl	%eax, 4(%rcx)
LBB0_3:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HINFC504_ADDRL,4,2             ## @HINFC504_ADDRL
	.comm	_HINFC504_ADDRH,4,2             ## @HINFC504_ADDRH
	.comm	_NAND_CMD_READSTART,4,2         ## @NAND_CMD_READSTART
	.comm	_NAND_CMD_READ0,4,2             ## @NAND_CMD_READ0
	.comm	_HINFC504_CMD,4,2               ## @HINFC504_CMD
	.comm	_HINFC504_LOG_READ_ADDR,4,2     ## @HINFC504_LOG_READ_ADDR
	.comm	_HINFC504_LOG_READ_LEN,4,2      ## @HINFC504_LOG_READ_LEN
	.no_dead_strip	_hisi_nfc_send_cmd_readstart
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hisi_nfc_send_cmd_readstart
_hisi_nfc_send_cmd_readstart:           ; @hisi_nfc_send_cmd_readstart
	.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
	add	x0, x0, #16
	bl	_nand_to_mtd
	mov	x20, x0
	ldp	x8, x10, [x19]
	ldr	w9, [x8]
	ldr	w11, [x10]
	cmp	w9, w11
	b.ne	LBB0_2
; %bb.1:
	ldr	w11, [x8, #4]
	ldr	w10, [x10, #4]
	cmp	w11, w10
	b.eq	LBB0_3
LBB0_2:
	and	w1, w9, #0xffff0000
	str	w1, [x8]
Lloh0:
	adrp	x8, _HINFC504_ADDRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HINFC504_ADDRL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hinfc_write
	ldr	x8, [x19]
	ldr	w1, [x8, #4]
Lloh3:
	adrp	x8, _HINFC504_ADDRH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HINFC504_ADDRH@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hinfc_write
Lloh6:
	adrp	x8, _NAND_CMD_READSTART@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NAND_CMD_READSTART@GOTPAGEOFF]
Lloh8:
	adrp	x9, _NAND_CMD_READ0@GOTPAGE
Lloh9:
	ldr	x9, [x9, _NAND_CMD_READ0@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	ldr	w9, [x9]
	orr	w1, w9, w8, lsl #8
Lloh12:
	adrp	x8, _HINFC504_CMD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HINFC504_CMD@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hinfc_write
Lloh15:
	adrp	x8, _HINFC504_LOG_READ_ADDR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HINFC504_LOG_READ_ADDR@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_hinfc_write
	ldp	w8, w9, [x20]
	add	w1, w9, w8
Lloh18:
	adrp	x8, _HINFC504_LOG_READ_LEN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HINFC504_LOG_READ_LEN@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hinfc_write
	mov	x0, x19
	mov	w1, #0
	bl	_hisi_nfc_dma_transfer
	ldp	x8, x9, [x19]
	ldr	w10, [x8]
	str	w10, [x9]
	ldr	w8, [x8, #4]
	str	w8, [x9, #4]
LBB0_3:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_HINFC504_ADDRL,4,2             ; @HINFC504_ADDRL
	.comm	_HINFC504_ADDRH,4,2             ; @HINFC504_ADDRH
	.comm	_NAND_CMD_READSTART,4,2         ; @NAND_CMD_READSTART
	.comm	_NAND_CMD_READ0,4,2             ; @NAND_CMD_READ0
	.comm	_HINFC504_CMD,4,2               ; @HINFC504_CMD
	.comm	_HINFC504_LOG_READ_ADDR,4,2     ; @HINFC504_LOG_READ_ADDR
	.comm	_HINFC504_LOG_READ_LEN,4,2      ; @HINFC504_LOG_READ_LEN
	.no_dead_strip	_hisi_nfc_send_cmd_readstart
.subsections_via_symbols
