	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sunxi_mmc_init_host
_sunxi_mmc_init_host:                   ## @sunxi_mmc_init_host
	.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
	callq	_sunxi_mmc_reset_host
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_3
LBB0_2:
	movq	_REG_FTRGL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$537329672, %edx                ## imm = 0x20070008
	callq	_mmc_writel
	movq	_REG_TMOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$-1, %edx
	callq	_mmc_writel
	movq	_REG_IMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	%rbx, %rdi
	callq	_mmc_writel
	movq	_REG_RINTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$-1, %edx
	callq	_mmc_writel
	movq	_REG_DBGC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$3563, %edx                     ## imm = 0xDEB
	callq	_mmc_writel
	movq	_REG_FUNS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SDXC_CEATA_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_mmc_writel
	movq	_REG_DLBA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%rbx), %edx
	movq	%rbx, %rdi
	callq	_mmc_writel
	movq	_REG_GCTRL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_mmc_readl
	movq	_SDXC_INTERRUPT_ENABLE_BIT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_SDXC_ACCESS_DONE_DIRECT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_mmc_writel
	xorl	%eax, %eax
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_REG_FTRGL,4,2                  ## @REG_FTRGL
	.comm	_REG_TMOUT,4,2                  ## @REG_TMOUT
	.comm	_REG_IMASK,4,2                  ## @REG_IMASK
	.comm	_REG_RINTR,4,2                  ## @REG_RINTR
	.comm	_REG_DBGC,4,2                   ## @REG_DBGC
	.comm	_REG_FUNS,4,2                   ## @REG_FUNS
	.comm	_SDXC_CEATA_ON,4,2              ## @SDXC_CEATA_ON
	.comm	_REG_DLBA,4,2                   ## @REG_DLBA
	.comm	_REG_GCTRL,4,2                  ## @REG_GCTRL
	.comm	_SDXC_INTERRUPT_ENABLE_BIT,4,2  ## @SDXC_INTERRUPT_ENABLE_BIT
	.comm	_SDXC_ACCESS_DONE_DIRECT,4,2    ## @SDXC_ACCESS_DONE_DIRECT
	.no_dead_strip	_sunxi_mmc_init_host
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sunxi_mmc_init_host
_sunxi_mmc_init_host:                   ; @sunxi_mmc_init_host
	.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
	bl	_sunxi_mmc_reset_host
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _REG_FTRGL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_FTRGL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #8
	movk	w2, #8199, lsl #16
	bl	_mmc_writel
Lloh6:
	adrp	x8, _REG_TMOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_TMOUT@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #-1
	bl	_mmc_writel
Lloh9:
	adrp	x8, _REG_IMASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_IMASK@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_mmc_writel
Lloh12:
	adrp	x8, _REG_RINTR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REG_RINTR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #-1
	bl	_mmc_writel
Lloh15:
	adrp	x8, _REG_DBGC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _REG_DBGC@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #3563
	bl	_mmc_writel
Lloh18:
	adrp	x8, _REG_FUNS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _REG_FUNS@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _SDXC_CEATA_ON@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SDXC_CEATA_ON@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mmc_writel
Lloh24:
	adrp	x8, _REG_DLBA@GOTPAGE
Lloh25:
	ldr	x8, [x8, _REG_DLBA@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	ldr	w2, [x19, #4]
	mov	x0, x19
	bl	_mmc_writel
Lloh27:
	adrp	x20, _REG_GCTRL@GOTPAGE
Lloh28:
	ldr	x20, [x20, _REG_GCTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_mmc_readl
Lloh29:
	adrp	x8, _SDXC_INTERRUPT_ENABLE_BIT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _SDXC_INTERRUPT_ENABLE_BIT@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh32:
	adrp	x9, _SDXC_ACCESS_DONE_DIRECT@GOTPAGE
Lloh33:
	ldr	x9, [x9, _SDXC_ACCESS_DONE_DIRECT@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	bic	w2, w8, w9
	ldr	w1, [x20]
	mov	x0, x19
	bl	_mmc_writel
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh27, Lloh28
	.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
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_REG_FTRGL,4,2                  ; @REG_FTRGL
	.comm	_REG_TMOUT,4,2                  ; @REG_TMOUT
	.comm	_REG_IMASK,4,2                  ; @REG_IMASK
	.comm	_REG_RINTR,4,2                  ; @REG_RINTR
	.comm	_REG_DBGC,4,2                   ; @REG_DBGC
	.comm	_REG_FUNS,4,2                   ; @REG_FUNS
	.comm	_SDXC_CEATA_ON,4,2              ; @SDXC_CEATA_ON
	.comm	_REG_DLBA,4,2                   ; @REG_DLBA
	.comm	_REG_GCTRL,4,2                  ; @REG_GCTRL
	.comm	_SDXC_INTERRUPT_ENABLE_BIT,4,2  ; @SDXC_INTERRUPT_ENABLE_BIT
	.comm	_SDXC_ACCESS_DONE_DIRECT,4,2    ; @SDXC_ACCESS_DONE_DIRECT
	.no_dead_strip	_sunxi_mmc_init_host
.subsections_via_symbols
