	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hisi_nfc_host_init
_hisi_nfc_host_init:                    ## @hisi_nfc_host_init
	.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	_HINFC_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_hinfc_read
	movl	%eax, 40(%rbx)
	movq	$0, 32(%rbx)
	movq	24(%rbx), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movq	16(%rbx), %rax
	movq	$-1, (%rax)
	movq	$0, 8(%rbx)
	movq	_HINFC504_CON_OP_MODE_NORMAL@GOTPCREL(%rip), %rax
	movq	_HINFC504_CON_READY_BUSY_SEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_HINFC504_CON_PAGESIZE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	$1, %esi
	movq	_HINFC504_CON_PAGEISZE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %esi
	orl	%edx, %esi
	movq	_NAND_BUSWIDTH_16@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	44(%rbx), %eax
	je	LBB0_2
## %bb.1:
	movq	_HINFC504_CON_BUS_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_2:
	orl	%eax, %esi
	movq	_HINFC504_CON@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_hinfc_write
	movl	(%rbx), %edi
	movq	_HINFC504_BUFFER_BASE_ADDRESS_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$255, %esi
	callq	_memset
	movq	_HINFC504_W_LATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HINFC504_R_LATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HINFC504_RW_LATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_SET_HINFC504_PWIDTH
	movq	_HINFC504_PWIDTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_hinfc_write
	movq	_HINFC504_INTEN_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HINFC504_INTEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_hinfc_write                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HINFC_VERSION,4,2              ## @HINFC_VERSION
	.comm	_HINFC504_CON_OP_MODE_NORMAL,4,2 ## @HINFC504_CON_OP_MODE_NORMAL
	.comm	_HINFC504_CON_READY_BUSY_SEL,4,2 ## @HINFC504_CON_READY_BUSY_SEL
	.comm	_HINFC504_CON_PAGESIZE_MASK,4,2 ## @HINFC504_CON_PAGESIZE_MASK
	.comm	_HINFC504_CON_PAGEISZE_SHIFT,4,2 ## @HINFC504_CON_PAGEISZE_SHIFT
	.comm	_HINFC504_CON_ECCTYPE_MASK,4,2  ## @HINFC504_CON_ECCTYPE_MASK
	.comm	_HINFC504_CON_ECCTYPE_SHIFT,4,2 ## @HINFC504_CON_ECCTYPE_SHIFT
	.comm	_NAND_BUSWIDTH_16,4,2           ## @NAND_BUSWIDTH_16
	.comm	_HINFC504_CON_BUS_WIDTH,4,2     ## @HINFC504_CON_BUS_WIDTH
	.comm	_HINFC504_CON,4,2               ## @HINFC504_CON
	.comm	_HINFC504_BUFFER_BASE_ADDRESS_LEN,4,2 ## @HINFC504_BUFFER_BASE_ADDRESS_LEN
	.comm	_HINFC504_W_LATCH,4,2           ## @HINFC504_W_LATCH
	.comm	_HINFC504_R_LATCH,4,2           ## @HINFC504_R_LATCH
	.comm	_HINFC504_RW_LATCH,4,2          ## @HINFC504_RW_LATCH
	.comm	_HINFC504_PWIDTH,4,2            ## @HINFC504_PWIDTH
	.comm	_HINFC504_INTEN_DMA,4,2         ## @HINFC504_INTEN_DMA
	.comm	_HINFC504_INTEN,4,2             ## @HINFC504_INTEN
	.no_dead_strip	_hisi_nfc_host_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hisi_nfc_host_init
_hisi_nfc_host_init:                    ; @hisi_nfc_host_init
	.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
Lloh0:
	adrp	x8, _HINFC_VERSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HINFC_VERSION@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_hinfc_read
	str	w0, [x19, #40]
	str	xzr, [x19, #32]
	ldr	x8, [x19, #24]
	stp	xzr, xzr, [x8]
	ldr	x8, [x19, #16]
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x8]
	str	xzr, [x19, #8]
Lloh3:
	adrp	x8, _HINFC504_CON_OP_MODE_NORMAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HINFC504_CON_OP_MODE_NORMAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _HINFC504_CON_READY_BUSY_SEL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HINFC504_CON_READY_BUSY_SEL@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _HINFC504_CON_PAGESIZE_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _HINFC504_CON_PAGESIZE_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	and	w9, w9, #0x1
Lloh12:
	adrp	x10, _HINFC504_CON_PAGEISZE_SHIFT@GOTPAGE
Lloh13:
	ldr	x10, [x10, _HINFC504_CON_PAGEISZE_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w8, w9
	ldr	w9, [x19, #44]
Lloh15:
	adrp	x10, _NAND_BUSWIDTH_16@GOTPAGE
Lloh16:
	ldr	x10, [x10, _NAND_BUSWIDTH_16@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
Lloh18:
	adrp	x11, _HINFC504_CON_BUS_WIDTH@GOTPAGE
Lloh19:
	ldr	x11, [x11, _HINFC504_CON_BUS_WIDTH@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
	tst	w10, w9
	csel	w9, wzr, w11, eq
	orr	w1, w8, w9
Lloh21:
	adrp	x8, _HINFC504_CON@GOTPAGE
Lloh22:
	ldr	x8, [x8, _HINFC504_CON@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hinfc_write
	ldr	w0, [x19]
Lloh24:
	adrp	x8, _HINFC504_BUFFER_BASE_ADDRESS_LEN@GOTPAGE
Lloh25:
	ldr	x8, [x8, _HINFC504_BUFFER_BASE_ADDRESS_LEN@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	w1, #255
	bl	_memset
Lloh27:
	adrp	x8, _HINFC504_W_LATCH@GOTPAGE
Lloh28:
	ldr	x8, [x8, _HINFC504_W_LATCH@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
Lloh30:
	adrp	x8, _HINFC504_R_LATCH@GOTPAGE
Lloh31:
	ldr	x8, [x8, _HINFC504_R_LATCH@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
Lloh33:
	adrp	x8, _HINFC504_RW_LATCH@GOTPAGE
Lloh34:
	ldr	x8, [x8, _HINFC504_RW_LATCH@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	bl	_SET_HINFC504_PWIDTH
	mov	x1, x0
Lloh36:
	adrp	x8, _HINFC504_PWIDTH@GOTPAGE
Lloh37:
	ldr	x8, [x8, _HINFC504_PWIDTH@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hinfc_write
Lloh39:
	adrp	x8, _HINFC504_INTEN_DMA@GOTPAGE
Lloh40:
	ldr	x8, [x8, _HINFC504_INTEN_DMA@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
Lloh42:
	adrp	x8, _HINFC504_INTEN@GOTPAGE
Lloh43:
	ldr	x8, [x8, _HINFC504_INTEN@GOTPAGEOFF]
Lloh44:
	ldr	w2, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_hinfc_write
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_HINFC_VERSION,4,2              ; @HINFC_VERSION
	.comm	_HINFC504_CON_OP_MODE_NORMAL,4,2 ; @HINFC504_CON_OP_MODE_NORMAL
	.comm	_HINFC504_CON_READY_BUSY_SEL,4,2 ; @HINFC504_CON_READY_BUSY_SEL
	.comm	_HINFC504_CON_PAGESIZE_MASK,4,2 ; @HINFC504_CON_PAGESIZE_MASK
	.comm	_HINFC504_CON_PAGEISZE_SHIFT,4,2 ; @HINFC504_CON_PAGEISZE_SHIFT
	.comm	_HINFC504_CON_ECCTYPE_MASK,4,2  ; @HINFC504_CON_ECCTYPE_MASK
	.comm	_HINFC504_CON_ECCTYPE_SHIFT,4,2 ; @HINFC504_CON_ECCTYPE_SHIFT
	.comm	_NAND_BUSWIDTH_16,4,2           ; @NAND_BUSWIDTH_16
	.comm	_HINFC504_CON_BUS_WIDTH,4,2     ; @HINFC504_CON_BUS_WIDTH
	.comm	_HINFC504_CON,4,2               ; @HINFC504_CON
	.comm	_HINFC504_BUFFER_BASE_ADDRESS_LEN,4,2 ; @HINFC504_BUFFER_BASE_ADDRESS_LEN
	.comm	_HINFC504_W_LATCH,4,2           ; @HINFC504_W_LATCH
	.comm	_HINFC504_R_LATCH,4,2           ; @HINFC504_R_LATCH
	.comm	_HINFC504_RW_LATCH,4,2          ; @HINFC504_RW_LATCH
	.comm	_HINFC504_PWIDTH,4,2            ; @HINFC504_PWIDTH
	.comm	_HINFC504_INTEN_DMA,4,2         ; @HINFC504_INTEN_DMA
	.comm	_HINFC504_INTEN,4,2             ; @HINFC504_INTEN
	.no_dead_strip	_hisi_nfc_host_init
.subsections_via_symbols
