	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tmio_mmc_reset
_tmio_mmc_reset:                        ## @tmio_mmc_reset
	.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
	movq	_CTL_RESET_SD@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	xorl	%edx, %edx
	callq	_sd_ctrl_write16
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$11000, %esi                    ## imm = 0x2AF8
	callq	_usleep_range
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_sd_ctrl_write16
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$11000, %esi                    ## imm = 0x2AF8
	callq	_usleep_range
	movq	8(%rbx), %rax
	movq	_TMIO_MMC_SDIO_IRQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_1
## %bb.2:
	movq	_CTL_SDIO_IRQ_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	%rbx, %rdi
	callq	_sd_ctrl_write16
	movq	_CTL_TRANSACTION_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_sd_ctrl_write16                ## TAILCALL
LBB0_1:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CTL_RESET_SD,4,2               ## @CTL_RESET_SD
	.comm	_TMIO_MMC_SDIO_IRQ,4,2          ## @TMIO_MMC_SDIO_IRQ
	.comm	_CTL_SDIO_IRQ_MASK,4,2          ## @CTL_SDIO_IRQ_MASK
	.comm	_CTL_TRANSACTION_CTL,4,2        ## @CTL_TRANSACTION_CTL
	.no_dead_strip	_tmio_mmc_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tmio_mmc_reset
_tmio_mmc_reset:                        ; @tmio_mmc_reset
	.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	x20, _CTL_RESET_SD@GOTPAGE
Lloh1:
	ldr	x20, [x20, _CTL_RESET_SD@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w2, #0
	bl	_sd_ctrl_write16
	mov	w0, #10000
	mov	w1, #11000
	bl	_usleep_range
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #1
	bl	_sd_ctrl_write16
	mov	w0, #10000
	mov	w1, #11000
	bl	_usleep_range
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh2:
	adrp	x9, _TMIO_MMC_SDIO_IRQ@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TMIO_MMC_SDIO_IRQ@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _CTL_SDIO_IRQ_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CTL_SDIO_IRQ_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_sd_ctrl_write16
Lloh8:
	adrp	x8, _CTL_TRANSACTION_CTL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CTL_TRANSACTION_CTL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_sd_ctrl_write16
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CTL_RESET_SD,4,2               ; @CTL_RESET_SD
	.comm	_TMIO_MMC_SDIO_IRQ,4,2          ; @TMIO_MMC_SDIO_IRQ
	.comm	_CTL_SDIO_IRQ_MASK,4,2          ; @CTL_SDIO_IRQ_MASK
	.comm	_CTL_TRANSACTION_CTL,4,2        ; @CTL_TRANSACTION_CTL
	.no_dead_strip	_tmio_mmc_reset
.subsections_via_symbols
