	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hisi_nfc_send_cmd_erase
_hisi_nfc_send_cmd_erase:               ## @hisi_nfc_send_cmd_erase
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movl	(%rax), %esi
	movq	_HINFC504_ADDRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_hinfc_write
	movq	_NAND_CMD_ERASE2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$8, %esi
	movq	_NAND_CMD_ERASE1@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_HINFC504_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_hinfc_write
	movq	_HINFC504_OP_WAIT_READY_EN@GOTPCREL(%rip), %rax
	movq	_HINFC504_OP_CMD2_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_HINFC504_OP_CMD1_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_HINFC504_OP_ADDR_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_HINFC504_OP_NF_CS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	8(%rbx), %eax
	movq	_HINFC504_OP_NF_CS_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_HINFC504_OP_ADDR_CYCLE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	andl	12(%rbx), %esi
	movq	_HINFC504_OP_ADDR_CYCLE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	orl	%edx, %eax
	orl	%eax, %esi
	movq	_HINFC504_OP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_hinfc_write
	movq	%rbx, %rdi
	callq	_wait_controller_finished
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HINFC504_ADDRL,4,2             ## @HINFC504_ADDRL
	.comm	_NAND_CMD_ERASE2,4,2            ## @NAND_CMD_ERASE2
	.comm	_NAND_CMD_ERASE1,4,2            ## @NAND_CMD_ERASE1
	.comm	_HINFC504_CMD,4,2               ## @HINFC504_CMD
	.comm	_HINFC504_OP_WAIT_READY_EN,4,2  ## @HINFC504_OP_WAIT_READY_EN
	.comm	_HINFC504_OP_CMD2_EN,4,2        ## @HINFC504_OP_CMD2_EN
	.comm	_HINFC504_OP_CMD1_EN,4,2        ## @HINFC504_OP_CMD1_EN
	.comm	_HINFC504_OP_ADDR_EN,4,2        ## @HINFC504_OP_ADDR_EN
	.comm	_HINFC504_OP_NF_CS_MASK,4,2     ## @HINFC504_OP_NF_CS_MASK
	.comm	_HINFC504_OP_NF_CS_SHIFT,4,2    ## @HINFC504_OP_NF_CS_SHIFT
	.comm	_HINFC504_OP_ADDR_CYCLE_MASK,4,2 ## @HINFC504_OP_ADDR_CYCLE_MASK
	.comm	_HINFC504_OP_ADDR_CYCLE_SHIFT,4,2 ## @HINFC504_OP_ADDR_CYCLE_SHIFT
	.comm	_HINFC504_OP,4,2                ## @HINFC504_OP
	.no_dead_strip	_hisi_nfc_send_cmd_erase
.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_erase
_hisi_nfc_send_cmd_erase:               ; @hisi_nfc_send_cmd_erase
	.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]
	ldr	w1, [x8]
Lloh0:
	adrp	x8, _HINFC504_ADDRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HINFC504_ADDRL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_hinfc_write
Lloh3:
	adrp	x8, _NAND_CMD_ERASE2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NAND_CMD_ERASE2@GOTPAGEOFF]
Lloh5:
	adrp	x9, _NAND_CMD_ERASE1@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NAND_CMD_ERASE1@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
	orr	w1, w9, w8, lsl #8
Lloh9:
	adrp	x8, _HINFC504_CMD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HINFC504_CMD@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hinfc_write
Lloh12:
	adrp	x8, _HINFC504_OP_WAIT_READY_EN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HINFC504_OP_WAIT_READY_EN@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _HINFC504_OP_CMD2_EN@GOTPAGE
Lloh16:
	ldr	x9, [x9, _HINFC504_OP_CMD2_EN@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x10, _HINFC504_OP_CMD1_EN@GOTPAGE
Lloh19:
	ldr	x10, [x10, _HINFC504_OP_CMD1_EN@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh20:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh21:
	adrp	x9, _HINFC504_OP_ADDR_EN@GOTPAGE
Lloh22:
	ldr	x9, [x9, _HINFC504_OP_ADDR_EN@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh24:
	adrp	x9, _HINFC504_OP_NF_CS_MASK@GOTPAGE
Lloh25:
	ldr	x9, [x9, _HINFC504_OP_NF_CS_MASK@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	ldp	w10, w11, [x19, #8]
	and	w9, w9, w10
Lloh27:
	adrp	x10, _HINFC504_OP_NF_CS_SHIFT@GOTPAGE
Lloh28:
	ldr	x10, [x10, _HINFC504_OP_NF_CS_SHIFT@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w8, w9
Lloh30:
	adrp	x9, _HINFC504_OP_ADDR_CYCLE_MASK@GOTPAGE
Lloh31:
	ldr	x9, [x9, _HINFC504_OP_ADDR_CYCLE_MASK@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	and	w9, w9, w11
Lloh33:
	adrp	x10, _HINFC504_OP_ADDR_CYCLE_SHIFT@GOTPAGE
Lloh34:
	ldr	x10, [x10, _HINFC504_OP_ADDR_CYCLE_SHIFT@GOTPAGEOFF]
Lloh35:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w1, w8, w9
Lloh36:
	adrp	x8, _HINFC504_OP@GOTPAGE
Lloh37:
	ldr	x8, [x8, _HINFC504_OP@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hinfc_write
	mov	x0, x19
	bl	_wait_controller_finished
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_HINFC504_ADDRL,4,2             ; @HINFC504_ADDRL
	.comm	_NAND_CMD_ERASE2,4,2            ; @NAND_CMD_ERASE2
	.comm	_NAND_CMD_ERASE1,4,2            ; @NAND_CMD_ERASE1
	.comm	_HINFC504_CMD,4,2               ; @HINFC504_CMD
	.comm	_HINFC504_OP_WAIT_READY_EN,4,2  ; @HINFC504_OP_WAIT_READY_EN
	.comm	_HINFC504_OP_CMD2_EN,4,2        ; @HINFC504_OP_CMD2_EN
	.comm	_HINFC504_OP_CMD1_EN,4,2        ; @HINFC504_OP_CMD1_EN
	.comm	_HINFC504_OP_ADDR_EN,4,2        ; @HINFC504_OP_ADDR_EN
	.comm	_HINFC504_OP_NF_CS_MASK,4,2     ; @HINFC504_OP_NF_CS_MASK
	.comm	_HINFC504_OP_NF_CS_SHIFT,4,2    ; @HINFC504_OP_NF_CS_SHIFT
	.comm	_HINFC504_OP_ADDR_CYCLE_MASK,4,2 ; @HINFC504_OP_ADDR_CYCLE_MASK
	.comm	_HINFC504_OP_ADDR_CYCLE_SHIFT,4,2 ; @HINFC504_OP_ADDR_CYCLE_SHIFT
	.comm	_HINFC504_OP,4,2                ; @HINFC504_OP
	.no_dead_strip	_hisi_nfc_send_cmd_erase
.subsections_via_symbols
