	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_mci_submit_data
_dw_mci_submit_data:                    ## @dw_mci_submit_data
	.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
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_SG_MITER_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_EINPROGRESS@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, 28(%rsi)
	movq	64(%rdi), %rdi
	callq	_WARN_ON
	movq	$0, 48(%rbx)
	movq	%r14, 64(%rbx)
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	andl	(%r14), %eax
	jne	LBB0_2
## %bb.1:
	movq	_DW_MCI_SEND_STATUS@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_DW_MCI_RECV_STATUS@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movl	%eax, 72(%rbx)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_dw_mci_ctrl_thld
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_dw_mci_submit_data_dma
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	64(%rbx), %rax
	movl	(%r12), %ecx
	andl	(%rax), %ecx
	jne	LBB0_7
## %bb.5:
	movq	_SG_MITER_FROM_SG@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	8(%r14), %rax
	jmp	LBB0_12
LBB0_7:
	movq	_SG_MITER_TO_SG@GOTPCREL(%rip), %rax
LBB0_8:
	orl	(%rax), %r15d
	leaq	56(%rbx), %rdi
	movq	16(%r14), %rsi
	movl	24(%r14), %edx
	movl	%r15d, %ecx
	callq	_sg_miter_start
	movq	16(%r14), %rax
	movq	%rax, 48(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rbx)
	movq	_RINTSTS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SDMMC_INT_TXDR@GOTPCREL(%rip), %r12
	movq	_SDMMC_INT_RXDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_mci_writel
	leaq	24(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_INTMASK@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_mci_readl
	orl	(%r12), %eax
	movq	_SDMMC_INT_RXDR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r13), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_mci_writel
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	_CTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_mci_readl
	movq	_SDMMC_CTRL_DMA_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_mci_writel
	cmpq	$0, 16(%rbx)
	je	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_dw_mci_adjust_fifoth
	jmp	LBB0_11
LBB0_10:
	movq	_FIFOTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	%rbx, %rdi
	callq	_mci_writel
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	movq	%rax, 8(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SG_MITER_ATOMIC,4,2            ## @SG_MITER_ATOMIC
	.comm	_EINPROGRESS,4,2                ## @EINPROGRESS
	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
	.comm	_DW_MCI_RECV_STATUS,4,2         ## @DW_MCI_RECV_STATUS
	.comm	_DW_MCI_SEND_STATUS,4,2         ## @DW_MCI_SEND_STATUS
	.comm	_SG_MITER_TO_SG,4,2             ## @SG_MITER_TO_SG
	.comm	_SG_MITER_FROM_SG,4,2           ## @SG_MITER_FROM_SG
	.comm	_RINTSTS,4,2                    ## @RINTSTS
	.comm	_SDMMC_INT_TXDR,4,2             ## @SDMMC_INT_TXDR
	.comm	_SDMMC_INT_RXDR,4,2             ## @SDMMC_INT_RXDR
	.comm	_INTMASK,4,2                    ## @INTMASK
	.comm	_CTRL,4,2                       ## @CTRL
	.comm	_SDMMC_CTRL_DMA_ENABLE,4,2      ## @SDMMC_CTRL_DMA_ENABLE
	.comm	_FIFOTH,4,2                     ## @FIFOTH
	.no_dead_strip	_dw_mci_submit_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_mci_submit_data
_dw_mci_submit_data:                    ; @dw_mci_submit_data
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _SG_MITER_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SG_MITER_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x8, _EINPROGRESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINPROGRESS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [x1, #28]
	ldr	x0, [x0, #64]
	bl	_WARN_ON
	str	xzr, [x19, #48]
	str	x20, [x19, #64]
	ldr	w8, [x20]
Lloh6:
	adrp	x22, _MMC_DATA_READ@GOTPAGE
Lloh7:
	ldr	x22, [x22, _MMC_DATA_READ@GOTPAGEOFF]
	ldr	w9, [x22]
Lloh8:
	adrp	x10, _DW_MCI_SEND_STATUS@GOTPAGE
Lloh9:
	ldr	x10, [x10, _DW_MCI_SEND_STATUS@GOTPAGEOFF]
Lloh10:
	adrp	x11, _DW_MCI_RECV_STATUS@GOTPAGE
Lloh11:
	ldr	x11, [x11, _DW_MCI_RECV_STATUS@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
	str	w8, [x19, #72]
	mov	x0, x19
	mov	x1, x20
	bl	_dw_mci_ctrl_thld
	mov	x0, x19
	mov	x1, x20
	bl	_dw_mci_submit_data_dma
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x19, #64]
	ldr	w8, [x8]
	ldr	w9, [x22]
Lloh12:
	adrp	x10, _SG_MITER_FROM_SG@GOTPAGE
Lloh13:
	ldr	x10, [x10, _SG_MITER_FROM_SG@GOTPAGEOFF]
Lloh14:
	adrp	x11, _SG_MITER_TO_SG@GOTPAGE
Lloh15:
	ldr	x11, [x11, _SG_MITER_TO_SG@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
	orr	w3, w8, w21
	add	x0, x19, #56
	ldr	x1, [x20, #16]
	ldr	w2, [x20, #24]
	bl	_sg_miter_start
	ldr	x8, [x20, #16]
	stp	xzr, x8, [x19, #40]
	str	xzr, [x19, #32]
Lloh16:
	adrp	x8, _RINTSTS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _RINTSTS@GOTPAGEOFF]
Lloh18:
	adrp	x22, _SDMMC_INT_TXDR@GOTPAGE
Lloh19:
	ldr	x22, [x22, _SDMMC_INT_TXDR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldr	w8, [x22]
Lloh21:
	adrp	x23, _SDMMC_INT_RXDR@GOTPAGE
Lloh22:
	ldr	x23, [x23, _SDMMC_INT_RXDR@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_mci_writel
	add	x21, x19, #24
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh23:
	adrp	x24, _INTMASK@GOTPAGE
Lloh24:
	ldr	x24, [x24, _INTMASK@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_mci_readl
	ldr	w8, [x22]
	ldr	w9, [x23]
	orr	w8, w8, w0
	orr	w2, w8, w9
	ldr	w1, [x24]
	mov	x0, x19
	bl	_mci_writel
	mov	x0, x21
	bl	_spin_unlock_irqrestore
Lloh25:
	adrp	x21, _CTRL@GOTPAGE
Lloh26:
	ldr	x21, [x21, _CTRL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_mci_readl
Lloh27:
	adrp	x8, _SDMMC_CTRL_DMA_ENABLE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SDMMC_CTRL_DMA_ENABLE@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	bic	w2, w0, w8
	ldr	w1, [x21]
	mov	x0, x19
	bl	_mci_writel
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_4
; %bb.2:
	mov	x0, x19
	mov	x1, x20
	bl	_dw_mci_adjust_fifoth
	b	LBB0_5
LBB0_3:
	ldr	x8, [x20, #8]
	b	LBB0_6
LBB0_4:
Lloh30:
	adrp	x8, _FIFOTH@GOTPAGE
Lloh31:
	ldr	x8, [x8, _FIFOTH@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_mci_writel
LBB0_5:
	mov	x8, #0
LBB0_6:
	str	x8, [x19, #8]
	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 AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_SG_MITER_ATOMIC,4,2            ; @SG_MITER_ATOMIC
	.comm	_EINPROGRESS,4,2                ; @EINPROGRESS
	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
	.comm	_DW_MCI_RECV_STATUS,4,2         ; @DW_MCI_RECV_STATUS
	.comm	_DW_MCI_SEND_STATUS,4,2         ; @DW_MCI_SEND_STATUS
	.comm	_SG_MITER_TO_SG,4,2             ; @SG_MITER_TO_SG
	.comm	_SG_MITER_FROM_SG,4,2           ; @SG_MITER_FROM_SG
	.comm	_RINTSTS,4,2                    ; @RINTSTS
	.comm	_SDMMC_INT_TXDR,4,2             ; @SDMMC_INT_TXDR
	.comm	_SDMMC_INT_RXDR,4,2             ; @SDMMC_INT_RXDR
	.comm	_INTMASK,4,2                    ; @INTMASK
	.comm	_CTRL,4,2                       ; @CTRL
	.comm	_SDMMC_CTRL_DMA_ENABLE,4,2      ; @SDMMC_CTRL_DMA_ENABLE
	.comm	_FIFOTH,4,2                     ; @FIFOTH
	.no_dead_strip	_dw_mci_submit_data
.subsections_via_symbols
