	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_omap_get_dma_channel
_mmc_omap_get_dma_channel:              ## @mmc_omap_get_dma_channel
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_MMC_DATA_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	xorl	%r15d, %r15d
	andl	(%rsi), %r12d
	sete	%r15b
	addq	$20, %rdi
	callq	_del_timer_sync
	movl	(%r14), %edi
	testl	%edi, %edi
	js	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	cmpl	%r15d, 4(%r14)
	je	LBB0_6
## %bb.2:
	callq	_omap_free_dma
	movl	$-1, (%r14)
LBB0_3:
	cmpq	$0, 8(%r14)
	leaq	L_.str(%rip), %rax
	leaq	L_.str.1(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.3(%rip), %rsi
	cmoveq	%rax, %rsi
	movq	_OMAP_DMA_MMC2_RX@GOTPCREL(%rip), %rax
	cmoveq	_OMAP_DMA_MMC_RX@GOTPCREL(%rip), %rax
	movq	_OMAP_DMA_MMC2_TX@GOTPCREL(%rip), %rdx
	cmoveq	_OMAP_DMA_MMC_TX@GOTPCREL(%rip), %rdx
	testl	%r12d, %r12d
	cmoveq	%rcx, %rsi
	cmoveq	%rax, %rdx
	movl	(%rdx), %edi
	movq	_mmc_omap_dma_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-36(%rbp), %r8
	movq	%r14, %rcx
	callq	_omap_request_dma
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	movl	16(%r14), %edi
	callq	_mmc_dev
	leaq	L_.str.4(%rip), %rsi
	movl	%eax, %edi
	movl	%ebx, %edx
	callq	_dev_dbg
	jmp	LBB0_6
LBB0_5:
	movl	-36(%rbp), %eax
	movl	%eax, (%r14)
	movl	%r15d, 4(%r14)
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_DATA_WRITE,4,2             ## @MMC_DATA_WRITE
	.comm	_OMAP_DMA_MMC_RX,4,2            ## @OMAP_DMA_MMC_RX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MMC1 read"

	.comm	_OMAP_DMA_MMC2_RX,4,2           ## @OMAP_DMA_MMC2_RX
L_.str.1:                               ## @.str.1
	.asciz	"MMC2 read"

	.comm	_OMAP_DMA_MMC_TX,4,2            ## @OMAP_DMA_MMC_TX
L_.str.2:                               ## @.str.2
	.asciz	"MMC1 write"

	.comm	_OMAP_DMA_MMC2_TX,4,2           ## @OMAP_DMA_MMC2_TX
L_.str.3:                               ## @.str.3
	.asciz	"MMC2 write"

	.comm	_mmc_omap_dma_cb,4,2            ## @mmc_omap_dma_cb
L_.str.4:                               ## @.str.4
	.asciz	"omap_request_dma() failed with %d\n"

	.no_dead_strip	_mmc_omap_get_dma_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc_omap_get_dma_channel
_mmc_omap_get_dma_channel:              ; @mmc_omap_get_dma_channel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _MMC_DATA_WRITE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMC_DATA_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ands	w20, w9, w8
	cset	w21, eq
	add	x0, x0, #20
	bl	_del_timer_sync
	ldr	w0, [x19]
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	w8, [x19, #4]
	cmp	w8, w21
	b.ne	LBB0_3
; %bb.2:
	mov	w20, #0
	b	LBB0_7
LBB0_3:
	bl	_omap_free_dma
	mov	w8, #-1
	str	w8, [x19]
LBB0_4:
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, l_.str.1@PAGE
Lloh4:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh5:
	adrp	x10, l_.str@PAGE
Lloh6:
	add	x10, x10, l_.str@PAGEOFF
	cmp	x8, #0
	csel	x8, x10, x9, eq
Lloh7:
	adrp	x9, l_.str.3@PAGE
Lloh8:
	add	x9, x9, l_.str.3@PAGEOFF
Lloh9:
	adrp	x10, l_.str.2@PAGE
Lloh10:
	add	x10, x10, l_.str.2@PAGEOFF
	csel	x9, x10, x9, eq
Lloh11:
	adrp	x10, _OMAP_DMA_MMC_RX@GOTPAGE
Lloh12:
	ldr	x10, [x10, _OMAP_DMA_MMC_RX@GOTPAGEOFF]
Lloh13:
	adrp	x11, _OMAP_DMA_MMC2_RX@GOTPAGE
Lloh14:
	ldr	x11, [x11, _OMAP_DMA_MMC2_RX@GOTPAGEOFF]
	csel	x10, x10, x11, eq
Lloh15:
	adrp	x11, _OMAP_DMA_MMC_TX@GOTPAGE
Lloh16:
	ldr	x11, [x11, _OMAP_DMA_MMC_TX@GOTPAGEOFF]
Lloh17:
	adrp	x12, _OMAP_DMA_MMC2_TX@GOTPAGE
Lloh18:
	ldr	x12, [x12, _OMAP_DMA_MMC2_TX@GOTPAGEOFF]
	csel	x11, x11, x12, eq
	cmp	w20, #0
	csel	x1, x8, x9, eq
	csel	x8, x10, x11, eq
	ldr	w0, [x8]
Lloh19:
	adrp	x8, _mmc_omap_dma_cb@GOTPAGE
Lloh20:
	ldr	x8, [x8, _mmc_omap_dma_cb@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	add	x4, sp, #12
	mov	x3, x19
	bl	_omap_request_dma
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.5:
	ldr	w0, [x19, #16]
	bl	_mmc_dev
Lloh22:
	adrp	x1, l_.str.4@PAGE
Lloh23:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
	b	LBB0_7
LBB0_6:
	ldr	w8, [sp, #12]
	stp	w8, w21, [x19]
LBB0_7:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_DATA_WRITE,4,2             ; @MMC_DATA_WRITE
	.comm	_OMAP_DMA_MMC_RX,4,2            ; @OMAP_DMA_MMC_RX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MMC1 read"

	.comm	_OMAP_DMA_MMC2_RX,4,2           ; @OMAP_DMA_MMC2_RX
l_.str.1:                               ; @.str.1
	.asciz	"MMC2 read"

	.comm	_OMAP_DMA_MMC_TX,4,2            ; @OMAP_DMA_MMC_TX
l_.str.2:                               ; @.str.2
	.asciz	"MMC1 write"

	.comm	_OMAP_DMA_MMC2_TX,4,2           ; @OMAP_DMA_MMC2_TX
l_.str.3:                               ; @.str.3
	.asciz	"MMC2 write"

	.comm	_mmc_omap_dma_cb,4,2            ; @mmc_omap_dma_cb
l_.str.4:                               ; @.str.4
	.asciz	"omap_request_dma() failed with %d\n"

	.no_dead_strip	_mmc_omap_get_dma_channel
.subsections_via_symbols
