	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msdc_start_command
_msdc_start_command:                    ## @msdc_start_command
	.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
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	24(%rdi), %rdi
	callq	_WARN_ON
	movq	%r14, 24(%rbx)
	movq	_system_wq@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%rbx), %rsi
	movq	_DAT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_mod_delayed_work
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_msdc_cmd_is_ready
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movq	_MSDC_FIFOCS@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	(%rbx), %rdi
	callq	_readl
	movq	_MSDC_FIFOCS_TXCNT@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	ja	LBB0_3
## %bb.2:
	movq	(%r12), %rdi
	addq	(%rbx), %rdi
	callq	_readl
	movq	_MSDC_FIFOCS_RXCNT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
LBB0_3:
	movl	12(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	%rbx, %rdi
	callq	_msdc_reset_hw
LBB0_4:
	movq	$0, 8(%r14)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_msdc_cmd_prepare_raw_cmd
	movl	%eax, %r15d
	leaq	8(%rbx), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	_MSDC_INTEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	movq	_cmd_ints_mask@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_sdr_set_bits
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movl	(%r14), %edi
	movq	_SDC_ARG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_writel
	movq	_SDC_CMD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	movl	%r15d, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_system_wq,4,2                  ## @system_wq
	.comm	_DAT_TIMEOUT,4,2                ## @DAT_TIMEOUT
	.comm	_MSDC_FIFOCS,8,3                ## @MSDC_FIFOCS
	.comm	_MSDC_FIFOCS_TXCNT,4,2          ## @MSDC_FIFOCS_TXCNT
	.comm	_MSDC_FIFOCS_RXCNT,4,2          ## @MSDC_FIFOCS_RXCNT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TX/RX FIFO non-empty before start of IO. Reset\n"

	.comm	_MSDC_INTEN,8,3                 ## @MSDC_INTEN
	.comm	_cmd_ints_mask,4,2              ## @cmd_ints_mask
	.comm	_SDC_ARG,8,3                    ## @SDC_ARG
	.comm	_SDC_CMD,8,3                    ## @SDC_CMD
	.no_dead_strip	_msdc_start_command
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msdc_start_command
_msdc_start_command:                    ; @msdc_start_command
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x0, [x0, #24]
	bl	_WARN_ON
Lloh0:
	adrp	x8, _system_wq@GOTPAGE
Lloh1:
	ldr	x8, [x8, _system_wq@GOTPAGEOFF]
	str	x20, [x19, #24]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #16
Lloh3:
	adrp	x8, _DAT_TIMEOUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DAT_TIMEOUT@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_mod_delayed_work
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_msdc_cmd_is_ready
	cbz	w0, LBB0_5
; %bb.1:
	ldr	x8, [x19]
Lloh6:
	adrp	x22, _MSDC_FIFOCS@GOTPAGE
Lloh7:
	ldr	x22, [x22, _MSDC_FIFOCS@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
Lloh8:
	adrp	x8, _MSDC_FIFOCS_TXCNT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MSDC_FIFOCS_TXCNT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	and	w8, w8, w0
	lsr	w8, w8, #16
	cbnz	w8, LBB0_3
; %bb.2:
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
Lloh11:
	adrp	x8, _MSDC_FIFOCS_RXCNT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MSDC_FIFOCS_RXCNT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
LBB0_3:
	ldr	w0, [x19, #12]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	x0, x19
	bl	_msdc_reset_hw
LBB0_4:
	str	xzr, [x20, #8]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_msdc_cmd_prepare_raw_cmd
	mov	x21, x0
	add	x22, x19, #8
	mov	x0, x22
	bl	_spin_lock_irqsave
Lloh16:
	adrp	x8, _MSDC_INTEN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MSDC_INTEN@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh18:
	ldr	x8, [x8]
	add	x0, x8, x9
Lloh19:
	adrp	x8, _cmd_ints_mask@GOTPAGE
Lloh20:
	ldr	x8, [x8, _cmd_ints_mask@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	bl	_sdr_set_bits
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldr	w0, [x20]
	ldr	x8, [x19]
Lloh22:
	adrp	x9, _SDC_ARG@GOTPAGE
Lloh23:
	ldr	x9, [x9, _SDC_ARG@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19]
Lloh25:
	adrp	x9, _SDC_CMD@GOTPAGE
Lloh26:
	ldr	x9, [x9, _SDC_CMD@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	add	x1, x9, x8
	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
	b	_writel
LBB0_5:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_system_wq,4,2                  ; @system_wq
	.comm	_DAT_TIMEOUT,4,2                ; @DAT_TIMEOUT
	.comm	_MSDC_FIFOCS,8,3                ; @MSDC_FIFOCS
	.comm	_MSDC_FIFOCS_TXCNT,4,2          ; @MSDC_FIFOCS_TXCNT
	.comm	_MSDC_FIFOCS_RXCNT,4,2          ; @MSDC_FIFOCS_RXCNT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TX/RX FIFO non-empty before start of IO. Reset\n"

	.comm	_MSDC_INTEN,8,3                 ; @MSDC_INTEN
	.comm	_cmd_ints_mask,4,2              ; @cmd_ints_mask
	.comm	_SDC_ARG,8,3                    ; @SDC_ARG
	.comm	_SDC_CMD,8,3                    ; @SDC_CMD
	.no_dead_strip	_msdc_start_command
.subsections_via_symbols
