	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_mci_hw_reset
_dw_mci_hw_reset:                       ## @dw_mci_hw_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_mmc_priv
	movq	%rax, %r14
	movq	8(%rax), %r15
	movq	(%r15), %rax
	movq	_TRANS_MODE_IDMAC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_dw_mci_idmac_reset
LBB0_2:
	movq	_SDMMC_CTRL_DMA_RESET@GOTPCREL(%rip), %rax
	movq	_SDMMC_CTRL_FIFO_RESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r15, %rdi
	callq	_dw_mci_ctrl_reset
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	_RST_N@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_mci_readl
	movq	_SDMMC_RST_HWACTIVE@GOTPCREL(%rip), %r13
	movl	(%r13), %ebx
	movb	(%r14), %cl
	shll	%cl, %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_mci_writel
	movl	$1, %edi
	movl	$2, %esi
	callq	_usleep_range
	movl	(%r13), %edx
	movb	(%r14), %cl
	shll	%cl, %edx
	orl	%ebx, %edx
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_mci_writel
	movl	$200, %edi
	movl	$300, %esi                      ## imm = 0x12C
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_usleep_range                   ## TAILCALL
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRANS_MODE_IDMAC,8,3           ## @TRANS_MODE_IDMAC
	.comm	_SDMMC_CTRL_DMA_RESET,4,2       ## @SDMMC_CTRL_DMA_RESET
	.comm	_SDMMC_CTRL_FIFO_RESET,4,2      ## @SDMMC_CTRL_FIFO_RESET
	.comm	_RST_N,4,2                      ## @RST_N
	.comm	_SDMMC_RST_HWACTIVE,4,2         ## @SDMMC_RST_HWACTIVE
	.no_dead_strip	_dw_mci_hw_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_mci_hw_reset
_dw_mci_hw_reset:                       ; @dw_mci_hw_reset
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	bl	_mmc_priv
	mov	x20, x0
	ldr	x19, [x0, #8]
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _TRANS_MODE_IDMAC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TRANS_MODE_IDMAC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_dw_mci_idmac_reset
LBB0_2:
Lloh3:
	adrp	x8, _SDMMC_CTRL_DMA_RESET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SDMMC_CTRL_DMA_RESET@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _SDMMC_CTRL_FIFO_RESET@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SDMMC_CTRL_FIFO_RESET@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x19
	bl	_dw_mci_ctrl_reset
	cbz	w0, LBB0_4
; %bb.3:
Lloh9:
	adrp	x22, _RST_N@GOTPAGE
Lloh10:
	ldr	x22, [x22, _RST_N@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_mci_readl
Lloh11:
	adrp	x23, _SDMMC_RST_HWACTIVE@GOTPAGE
Lloh12:
	ldr	x23, [x23, _SDMMC_RST_HWACTIVE@GOTPAGEOFF]
	ldr	w8, [x23]
	ldr	w9, [x20]
	lsl	w8, w8, w9
	bic	w21, w0, w8
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x21
	bl	_mci_writel
	mov	w0, #1
	mov	w1, #2
	bl	_usleep_range
	ldr	w8, [x23]
	ldr	w9, [x20]
	lsl	w8, w8, w9
	orr	w2, w8, w21
	ldr	w1, [x22]
	mov	x0, x19
	bl	_mci_writel
	mov	w0, #200
	mov	w1, #300
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_usleep_range
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_TRANS_MODE_IDMAC,8,3           ; @TRANS_MODE_IDMAC
	.comm	_SDMMC_CTRL_DMA_RESET,4,2       ; @SDMMC_CTRL_DMA_RESET
	.comm	_SDMMC_CTRL_FIFO_RESET,4,2      ; @SDMMC_CTRL_FIFO_RESET
	.comm	_RST_N,4,2                      ; @RST_N
	.comm	_SDMMC_RST_HWACTIVE,4,2         ; @SDMMC_RST_HWACTIVE
	.no_dead_strip	_dw_mci_hw_reset
.subsections_via_symbols
