	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tmio_mmc_start_data
_tmio_mmc_start_data:                   ## @tmio_mmc_start_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	24(%rdi), %r15
	movl	(%rsi), %esi
	movl	4(%r14), %edx
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	movq	8(%rbx), %rdi
	movq	8(%rdi), %rax
	movq	_MMC_BUS_WIDTH_4@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	_MMC_BUS_WIDTH_8@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
LBB0_6:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_tmio_mmc_init_sg
	movq	%r14, 16(%rbx)
	movl	$0, (%rbx)
	movq	_CTL_SD_XFER_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_sd_ctrl_write16
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	_SZ_64K@GOTPCREL(%rip), %rcx
	movq	_CTL_XFER_BLK_COUNT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	4(%r14), %edx
	cmpq	(%rcx), %rax
	jge	LBB0_7
## %bb.8:
	movq	%rbx, %rdi
	callq	_sd_ctrl_write16
	jmp	LBB0_9
LBB0_2:
	movl	(%r14), %eax
	cmpl	$2, %eax
	jl	LBB0_5
## %bb.3:
	cmpl	$3, %eax
	ja	LBB0_6
## %bb.4:
	movq	_TMIO_MMC_BLKSZ_2BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r15), %eax
	jne	LBB0_6
LBB0_5:
	callq	_mmc_hostname
	movl	(%r14), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_7:
	movq	%rbx, %rdi
	callq	_sd_ctrl_write32
LBB0_9:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_tmio_mmc_start_dma
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setup data transfer: blocksize %08x  nr_blocks %d\n"

	.comm	_MMC_BUS_WIDTH_4,8,3            ## @MMC_BUS_WIDTH_4
	.comm	_MMC_BUS_WIDTH_8,8,3            ## @MMC_BUS_WIDTH_8
	.comm	_TMIO_MMC_BLKSZ_2BYTES,4,2      ## @TMIO_MMC_BLKSZ_2BYTES
L_.str.1:                               ## @.str.1
	.asciz	"%s: %d byte block unsupported in 4/8 bit mode\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CTL_SD_XFER_LEN,4,2            ## @CTL_SD_XFER_LEN
	.comm	_SZ_64K,8,3                     ## @SZ_64K
	.comm	_CTL_XFER_BLK_COUNT,4,2         ## @CTL_XFER_BLK_COUNT
	.no_dead_strip	_tmio_mmc_start_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tmio_mmc_start_data
_tmio_mmc_start_data:                   ; @tmio_mmc_start_data
	.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
	ldr	x21, [x0, #24]
	ldr	w1, [x1]
	ldr	w2, [x19, #4]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	ldr	x0, [x20, #8]
	ldr	x8, [x0, #8]
Lloh2:
	adrp	x9, _MMC_BUS_WIDTH_4@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MMC_BUS_WIDTH_4@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x10, _MMC_BUS_WIDTH_8@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MMC_BUS_WIDTH_8@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_5
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, #2
	b.lt	LBB0_4
; %bb.2:
	cmp	w8, #3
	b.hi	LBB0_5
; %bb.3:
	ldr	w8, [x21]
Lloh8:
	adrp	x9, _TMIO_MMC_BLKSZ_2BYTES@GOTPAGE
Lloh9:
	ldr	x9, [x9, _TMIO_MMC_BLKSZ_2BYTES@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	and	w8, w9, w8
	cbnz	w8, LBB0_5
LBB0_4:
	bl	_mmc_hostname
	mov	x1, x0
	ldr	w2, [x19]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_5:
	mov	x0, x20
	mov	x1, x19
	bl	_tmio_mmc_init_sg
	str	x19, [x20, #16]
	str	wzr, [x20]
Lloh16:
	adrp	x8, _CTL_SD_XFER_LEN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CTL_SD_XFER_LEN@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x20
	bl	_sd_ctrl_write16
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
Lloh19:
	adrp	x9, _SZ_64K@GOTPAGE
Lloh20:
	ldr	x9, [x9, _SZ_64K@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
Lloh22:
	adrp	x10, _CTL_XFER_BLK_COUNT@GOTPAGE
Lloh23:
	ldr	x10, [x10, _CTL_XFER_BLK_COUNT@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x10]
	ldr	w2, [x19, #4]
	mov	x0, x20
	cmp	x8, x9
	b.ge	LBB0_7
; %bb.6:
	bl	_sd_ctrl_write16
	b	LBB0_8
LBB0_7:
	bl	_sd_ctrl_write32
LBB0_8:
	mov	x0, x20
	mov	x1, x19
	bl	_tmio_mmc_start_dma
	mov	w0, #0
LBB0_9:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setup data transfer: blocksize %08x  nr_blocks %d\n"

	.comm	_MMC_BUS_WIDTH_4,8,3            ; @MMC_BUS_WIDTH_4
	.comm	_MMC_BUS_WIDTH_8,8,3            ; @MMC_BUS_WIDTH_8
	.comm	_TMIO_MMC_BLKSZ_2BYTES,4,2      ; @TMIO_MMC_BLKSZ_2BYTES
l_.str.1:                               ; @.str.1
	.asciz	"%s: %d byte block unsupported in 4/8 bit mode\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CTL_SD_XFER_LEN,4,2            ; @CTL_SD_XFER_LEN
	.comm	_SZ_64K,8,3                     ; @SZ_64K
	.comm	_CTL_XFER_BLK_COUNT,4,2         ; @CTL_XFER_BLK_COUNT
	.no_dead_strip	_tmio_mmc_start_data
.subsections_via_symbols
