	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_omap_prepare_dma
_mmc_omap_prepare_dma:                  ## @mmc_omap_prepare_dma
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r13
	movl	(%rdi), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	8(%rdi), %r15
	shlq	$2, %r15
	addq	16(%rsi), %r15
	movq	_OMAP_MMC_REG_DATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	16(%rdi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %ebx
	movq	%r15, %rdi
	callq	_sg_dma_len
	cmpl	$1, 4(%r12)
	jne	LBB0_2
## %bb.1:
	cmpl	(%r12), %eax
	cmovgl	%ebx, %eax
LBB0_2:
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%eax, 24(%r13)
	xorl	%eax, %eax
	callq	_cpu_is_omap15xx
	cmpl	$64, %ebx
	movl	$64, %ecx
	cmovll	%ebx, %ecx
	cmpl	$33, %ebx
	movl	$32, %r14d
	cmovll	%ecx, %r14d
	testq	%rax, %rax
	cmovel	%ecx, %r14d
	movl	%r14d, %ebx
	sarl	%ebx
	movq	_MMC_DATA_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r12)
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_3
## %bb.8:
	xorl	%eax, %eax
	callq	_cpu_class_is_omap1
	movl	$0, %edx
	movl	$0, %r12d
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_OMAP_DMA_PORT_EMIFF@GOTPCREL(%rip), %rax
	movq	_OMAP_DMA_PORT_TIPB@GOTPCREL(%rip), %rcx
	movl	(%rax), %edx
	movl	(%rcx), %r12d
LBB0_10:
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	leal	-1(%rbx), %r13d
	xorl	%eax, %eax
	callq	_cpu_is_omap24xx
	movl	$0, %ecx
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	_OMAP24XX_DMA_MMC1_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_12:
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	orl	$3968, %r13d                    ## imm = 0xF80
	movq	_OMAP_DMA_AMODE_CONSTANT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	movl	%r12d, %esi
	movl	%edi, %r12d
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_omap_set_dma_dest_params
	movq	_OMAP_DMA_AMODE_POST_INC@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_sg_dma_address
	movl	%r12d, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%ebx, %edx
	movq	%rax, %rcx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_omap_set_dma_src_params
	movl	%r12d, %edi
	movl	$1, %esi
	callq	_omap_set_dma_src_data_pack
	movq	_OMAP_DMA_DATA_BURST_4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_omap_set_dma_src_burst_mode
	jmp	LBB0_13
LBB0_3:
	movl	%ebx, %r13d
	shll	$8, %r13d
	xorl	%eax, %eax
	callq	_cpu_class_is_omap1
	movl	$0, %edx
	movl	$0, %ecx
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_OMAP_DMA_PORT_TIPB@GOTPCREL(%rip), %rax
	movq	_OMAP_DMA_PORT_EMIFF@GOTPCREL(%rip), %rcx
	movl	(%rax), %edx
	movl	(%rcx), %ecx
LBB0_5:
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	addl	$-256, %r13d
	xorl	%eax, %eax
	callq	_cpu_is_omap24xx
	movl	$0, %ecx
	testq	%rax, %rax
	movl	-56(%rbp), %r12d                ## 4-byte Reload
	je	LBB0_7
## %bb.6:
	movq	_OMAP24XX_DMA_MMC1_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_7:
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	orl	$32783, %r13d                   ## imm = 0x800F
	movq	_OMAP_DMA_AMODE_CONSTANT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %edi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_omap_set_dma_src_params
	movq	_OMAP_DMA_AMODE_POST_INC@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_sg_dma_address
	movl	%r12d, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%ebx, %edx
	movq	%rax, %rcx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_omap_set_dma_dest_params
	movl	%r12d, %edi
	movl	$1, %esi
	callq	_omap_set_dma_dest_data_pack
	movq	_OMAP_DMA_DATA_BURST_4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_omap_set_dma_dest_burst_mode
LBB0_13:
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	cltd
	idivl	%r14d
	movl	%eax, %ebx
	xorl	%edi, %edi
	cmpl	$65536, %eax                    ## imm = 0x10000
	setge	%dil
	callq	_BUG_ON
	movq	_BUF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %edx
	callq	_OMAP_MMC_WRITE
	movq	_OMAP_DMA_DATA_TYPE_S16@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_OMAP_DMA_SYNC_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$0, (%rsp)
	movl	%r12d, %edi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%ebx, %ecx
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	callq	_omap_set_dma_transfer_params
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OMAP_MMC_REG_DATA,8,3          ## @OMAP_MMC_REG_DATA
	.comm	_MMC_DATA_WRITE,4,2             ## @MMC_DATA_WRITE
	.comm	_OMAP_DMA_PORT_TIPB,4,2         ## @OMAP_DMA_PORT_TIPB
	.comm	_OMAP_DMA_PORT_EMIFF,4,2        ## @OMAP_DMA_PORT_EMIFF
	.comm	_OMAP24XX_DMA_MMC1_RX,4,2       ## @OMAP24XX_DMA_MMC1_RX
	.comm	_OMAP_DMA_AMODE_CONSTANT,4,2    ## @OMAP_DMA_AMODE_CONSTANT
	.comm	_OMAP_DMA_AMODE_POST_INC,4,2    ## @OMAP_DMA_AMODE_POST_INC
	.comm	_OMAP_DMA_DATA_BURST_4,4,2      ## @OMAP_DMA_DATA_BURST_4
	.comm	_OMAP24XX_DMA_MMC1_TX,4,2       ## @OMAP24XX_DMA_MMC1_TX
	.comm	_BUF,4,2                        ## @BUF
	.comm	_OMAP_DMA_DATA_TYPE_S16,4,2     ## @OMAP_DMA_DATA_TYPE_S16
	.comm	_OMAP_DMA_SYNC_FRAME,4,2        ## @OMAP_DMA_SYNC_FRAME
	.no_dead_strip	_mmc_omap_prepare_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc_omap_prepare_dma
_mmc_omap_prepare_dma:                  ; @mmc_omap_prepare_dma
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x1
	mov	x20, x0
	ldr	w19, [x0]
	ldr	x8, [x1, #16]
	ldp	x9, x10, [x0, #8]
	add	x24, x8, x9, lsl #2
Lloh0:
	adrp	x8, _OMAP_MMC_REG_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OMAP_MMC_REG_DATA@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x26, x8, x10
	ldr	w22, [x1]
	mov	x0, x24
	bl	_sg_dma_len
	mov	x21, x0
	ldr	w8, [x23, #4]
	cmp	w8, #1
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x23]
	cmp	w21, w8
	csel	w21, w22, w21, gt
LBB0_2:
	str	w21, [x20, #24]
	bl	_cpu_is_omap15xx
	mov	w8, #64
	cmp	w22, #64
	csel	w8, w22, w8, lt
	cmp	w22, #32
	ccmp	x0, #0, #4, gt
	mov	w9, #32
	csel	w25, w9, w8, ne
	asr	w22, w25, #1
	ldr	w8, [x23, #8]
Lloh3:
	adrp	x9, _MMC_DATA_WRITE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MMC_DATA_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	sub	w8, w22, #1
	orr	w8, w8, #0xf80
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	bl	_cpu_class_is_omap1
Lloh6:
	adrp	x8, _OMAP_DMA_PORT_EMIFF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OMAP_DMA_PORT_EMIFF@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _OMAP_DMA_PORT_TIPB@GOTPAGE
Lloh10:
	ldr	x9, [x9, _OMAP_DMA_PORT_TIPB@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	x0, #0
	csel	w27, wzr, w8, eq
	csel	w28, wzr, w9, eq
	bl	_cpu_is_omap24xx
Lloh12:
	adrp	x8, _OMAP24XX_DMA_MMC1_TX@GOTPAGE
Lloh13:
	ldr	x8, [x8, _OMAP24XX_DMA_MMC1_TX@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w23, wzr, w8, eq
Lloh15:
	adrp	x8, _OMAP_DMA_AMODE_CONSTANT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _OMAP_DMA_AMODE_CONSTANT@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x28
	mov	x3, x26
	mov	w4, #0
	mov	w5, #0
	bl	_omap_set_dma_dest_params
Lloh18:
	adrp	x8, _OMAP_DMA_AMODE_POST_INC@GOTPAGE
Lloh19:
	ldr	x8, [x8, _OMAP_DMA_AMODE_POST_INC@GOTPAGEOFF]
Lloh20:
	ldr	w26, [x8]
	mov	x0, x24
	bl	_sg_dma_address
	mov	x3, x0
	mov	x0, x19
	mov	x1, x27
	mov	x2, x26
	mov	w4, #0
	mov	w5, #0
	bl	_omap_set_dma_src_params
	mov	x0, x19
	mov	w1, #1
	bl	_omap_set_dma_src_data_pack
Lloh21:
	adrp	x8, _OMAP_DMA_DATA_BURST_4@GOTPAGE
Lloh22:
	ldr	x8, [x8, _OMAP_DMA_DATA_BURST_4@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_omap_set_dma_src_burst_mode
	b	LBB0_5
LBB0_4:
	lsl	w8, w22, #8
	sub	w8, w8, #256
	mov	w9, #32783
	orr	w8, w8, w9
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	bl	_cpu_class_is_omap1
Lloh24:
	adrp	x8, _OMAP_DMA_PORT_TIPB@GOTPAGE
Lloh25:
	ldr	x8, [x8, _OMAP_DMA_PORT_TIPB@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
Lloh27:
	adrp	x9, _OMAP_DMA_PORT_EMIFF@GOTPAGE
Lloh28:
	ldr	x9, [x9, _OMAP_DMA_PORT_EMIFF@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	cmp	x0, #0
	csel	w27, wzr, w8, eq
	csel	w28, wzr, w9, eq
	bl	_cpu_is_omap24xx
Lloh30:
	adrp	x8, _OMAP24XX_DMA_MMC1_RX@GOTPAGE
Lloh31:
	ldr	x8, [x8, _OMAP24XX_DMA_MMC1_RX@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w23, wzr, w8, eq
Lloh33:
	adrp	x8, _OMAP_DMA_AMODE_CONSTANT@GOTPAGE
Lloh34:
	ldr	x8, [x8, _OMAP_DMA_AMODE_CONSTANT@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x27
	mov	x3, x26
	mov	w4, #0
	mov	w5, #0
	bl	_omap_set_dma_src_params
Lloh36:
	adrp	x8, _OMAP_DMA_AMODE_POST_INC@GOTPAGE
Lloh37:
	ldr	x8, [x8, _OMAP_DMA_AMODE_POST_INC@GOTPAGEOFF]
Lloh38:
	ldr	w26, [x8]
	mov	x0, x24
	bl	_sg_dma_address
	mov	x3, x0
	mov	x0, x19
	mov	x1, x28
	mov	x2, x26
	mov	w4, #0
	mov	w5, #0
	bl	_omap_set_dma_dest_params
	mov	x0, x19
	mov	w1, #1
	bl	_omap_set_dma_dest_data_pack
Lloh39:
	adrp	x8, _OMAP_DMA_DATA_BURST_4@GOTPAGE
Lloh40:
	ldr	x8, [x8, _OMAP_DMA_DATA_BURST_4@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_omap_set_dma_dest_burst_mode
LBB0_5:
	sdiv	w21, w21, w25
	cmp	w21, #16, lsl #12               ; =65536
	cset	w0, ge
	bl	_BUG_ON
Lloh42:
	adrp	x8, _BUF@GOTPAGE
Lloh43:
	ldr	x8, [x8, _BUF@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
	mov	x0, x20
	ldr	w2, [sp, #12]                   ; 4-byte Folded Reload
	bl	_OMAP_MMC_WRITE
Lloh45:
	adrp	x8, _OMAP_DMA_DATA_TYPE_S16@GOTPAGE
Lloh46:
	ldr	x8, [x8, _OMAP_DMA_DATA_TYPE_S16@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
Lloh48:
	adrp	x8, _OMAP_DMA_SYNC_FRAME@GOTPAGE
Lloh49:
	ldr	x8, [x8, _OMAP_DMA_SYNC_FRAME@GOTPAGEOFF]
Lloh50:
	ldr	w4, [x8]
	mov	x0, x19
	mov	x2, x22
	mov	x3, x21
	mov	x5, x23
	mov	w6, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_omap_set_dma_transfer_params
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_OMAP_MMC_REG_DATA,8,3          ; @OMAP_MMC_REG_DATA
	.comm	_MMC_DATA_WRITE,4,2             ; @MMC_DATA_WRITE
	.comm	_OMAP_DMA_PORT_TIPB,4,2         ; @OMAP_DMA_PORT_TIPB
	.comm	_OMAP_DMA_PORT_EMIFF,4,2        ; @OMAP_DMA_PORT_EMIFF
	.comm	_OMAP24XX_DMA_MMC1_RX,4,2       ; @OMAP24XX_DMA_MMC1_RX
	.comm	_OMAP_DMA_AMODE_CONSTANT,4,2    ; @OMAP_DMA_AMODE_CONSTANT
	.comm	_OMAP_DMA_AMODE_POST_INC,4,2    ; @OMAP_DMA_AMODE_POST_INC
	.comm	_OMAP_DMA_DATA_BURST_4,4,2      ; @OMAP_DMA_DATA_BURST_4
	.comm	_OMAP24XX_DMA_MMC1_TX,4,2       ; @OMAP24XX_DMA_MMC1_TX
	.comm	_BUF,4,2                        ; @BUF
	.comm	_OMAP_DMA_DATA_TYPE_S16,4,2     ; @OMAP_DMA_DATA_TYPE_S16
	.comm	_OMAP_DMA_SYNC_FRAME,4,2        ; @OMAP_DMA_SYNC_FRAME
	.no_dead_strip	_mmc_omap_prepare_dma
.subsections_via_symbols
