	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_mci_ctrl_reset
_dw_mci_ctrl_reset:                     ## @dw_mci_ctrl_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	_CTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_mci_readl
	movl	%eax, %ebx
	orl	%r14d, %ebx
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_mci_writel
	movq	_SDMMC_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r12), %rdi
	xorl	%edx, %edx
	testl	%r14d, %r14d
	sete	%dl
	movq	_USEC_PER_MSEC@GOTPCREL(%rip), %rax
	imull	$500, (%rax), %r8d              ## imm = 0x1F4
	movl	$1, %r15d
	movl	%ebx, %esi
	movl	$1, %ecx
	callq	_readl_poll_timeout_atomic
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_err
	xorl	%r15d, %r15d
LBB0_2:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CTRL,4,2                       ## @CTRL
	.comm	_SDMMC_CTRL,8,3                 ## @SDMMC_CTRL
	.comm	_USEC_PER_MSEC,4,2              ## @USEC_PER_MSEC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout resetting block (ctrl reset %#x)\n"

	.no_dead_strip	_dw_mci_ctrl_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_ctrl_reset
_dw_mci_ctrl_reset:                     ; @dw_mci_ctrl_reset
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _CTRL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CTRL@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_mci_readl
	orr	w22, w0, w19
	ldr	w1, [x21]
	mov	x0, x20
	mov	x2, x22
	bl	_mci_writel
	ldr	x8, [x20, #8]
Lloh2:
	adrp	x9, _SDMMC_CTRL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SDMMC_CTRL@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x0, x9, x8
	cmp	w19, #0
	cset	w2, eq
Lloh5:
	adrp	x8, _USEC_PER_MSEC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _USEC_PER_MSEC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	mov	w9, #500
	mul	w4, w8, w9
	mov	w21, #1
	mov	x1, x22
	mov	w3, #1
	bl	_readl_poll_timeout_atomic
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x20]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_err
	mov	w21, #0
LBB0_2:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_CTRL,4,2                       ; @CTRL
	.comm	_SDMMC_CTRL,8,3                 ; @SDMMC_CTRL
	.comm	_USEC_PER_MSEC,4,2              ; @USEC_PER_MSEC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout resetting block (ctrl reset %#x)\n"

	.no_dead_strip	_dw_mci_ctrl_reset
.subsections_via_symbols
