	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tmio_mmc_transfer_data
_tmio_mmc_transfer_data:                ## @tmio_mmc_transfer_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
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	(%rdi), %rcx
	movq	8(%rdi), %rdx
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rdx), %eax
	movq	_TMIO_MMC_32BIT_DATA_PORT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rcx)
	je	LBB0_6
## %bb.1:
	movl	$0, -44(%rbp)
	movl	%r15d, %ebx
	shrl	$2, %ebx
	movq	_CTL_SD_DATA_PORT@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r12, %rdi
	movq	%r14, %rdx
	movl	%ebx, %ecx
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	callq	_sd_ctrl_read32_rep
	andl	$3, %r15d
	je	LBB0_11
## %bb.5:
	movl	%ebx, %eax
	leaq	(%r14,%rax,4), %rbx
	movl	(%r13), %esi
	leaq	-44(%rbp), %r14
	movq	%r12, %rdi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	_sd_ctrl_read32_rep
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_memcpy
	jmp	LBB0_11
LBB0_6:
	movl	%r15d, %ebx
	shrl	%ebx
	movq	_CTL_SD_DATA_PORT@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r12, %rdi
	movq	%r14, %rdx
	movl	%ebx, %ecx
	testl	%eax, %eax
	je	LBB0_7
## %bb.9:
	callq	_sd_ctrl_read16_rep
	testb	$1, %r15b
	je	LBB0_11
## %bb.10:
	movl	%ebx, %ebx
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_sd_ctrl_read16
	movzbl	%al, %eax
	movl	%eax, (%r14,%rbx,2)
	jmp	LBB0_11
LBB0_2:
	callq	_sd_ctrl_write32_rep
	andl	$3, %r15d
	je	LBB0_11
## %bb.3:
	movl	%ebx, %eax
	leaq	(%r14,%rax,4), %rsi
	leaq	-44(%rbp), %rbx
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_memcpy
	movl	(%r13), %esi
	movq	%r12, %rdi
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	_sd_ctrl_write32_rep
	jmp	LBB0_11
LBB0_7:
	callq	_sd_ctrl_write16_rep
	testb	$1, %r15b
	jne	LBB0_8
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	%ebx, %eax
	movl	(%r13), %esi
	movl	(%r14,%rax,2), %edx
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sd_ctrl_write16                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
	.comm	_TMIO_MMC_32BIT_DATA_PORT,4,2   ## @TMIO_MMC_32BIT_DATA_PORT
	.comm	_CTL_SD_DATA_PORT,4,2           ## @CTL_SD_DATA_PORT
	.no_dead_strip	_tmio_mmc_transfer_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_transfer_data
_tmio_mmc_transfer_data:                ; @tmio_mmc_transfer_data
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldp	x9, x8, [x0]
	ldr	w8, [x8]
Lloh0:
	adrp	x10, _MMC_DATA_READ@GOTPAGE
Lloh1:
	ldr	x10, [x10, _MMC_DATA_READ@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	and	w8, w10, w8
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _TMIO_MMC_32BIT_DATA_PORT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _TMIO_MMC_32BIT_DATA_PORT@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_4
; %bb.1:
	str	wzr, [sp, #12]
Lloh6:
	adrp	x23, _CTL_SD_DATA_PORT@GOTPAGE
Lloh7:
	ldr	x23, [x23, _CTL_SD_DATA_PORT@GOTPAGEOFF]
	ldr	w1, [x23]
	lsr	w22, w21, #2
	mov	x0, x19
	mov	x2, x20
	mov	x3, x22
	cbz	w8, LBB0_7
; %bb.2:
	bl	_sd_ctrl_read32_rep
	ands	w21, w21, #0x3
	b.eq	LBB0_10
; %bb.3:
	add	x20, x20, w22, uxtw #2
	ldr	w1, [x23]
	add	x2, sp, #12
	mov	x0, x19
	mov	w3, #1
	bl	_sd_ctrl_read32_rep
	add	x1, sp, #12
	mov	x0, x20
	mov	x2, x21
	bl	_memcpy
	b	LBB0_10
LBB0_4:
Lloh8:
	adrp	x23, _CTL_SD_DATA_PORT@GOTPAGE
Lloh9:
	ldr	x23, [x23, _CTL_SD_DATA_PORT@GOTPAGEOFF]
	ldr	w1, [x23]
	lsr	w22, w21, #1
	mov	x0, x19
	mov	x2, x20
	mov	x3, x22
	cbz	w8, LBB0_9
; %bb.5:
	bl	_sd_ctrl_read16_rep
	tbz	w21, #0, LBB0_10
; %bb.6:
	lsl	x21, x22, #1
	ldr	w1, [x23]
	mov	x0, x19
	bl	_sd_ctrl_read16
	and	w8, w0, #0xff
	str	w8, [x20, x21]
	b	LBB0_10
LBB0_7:
	bl	_sd_ctrl_write32_rep
	ands	w2, w21, #0x3
	b.eq	LBB0_10
; %bb.8:
	add	x1, x20, w22, uxtw #2
	add	x0, sp, #12
	bl	_memcpy
	ldr	w1, [x23]
	add	x2, sp, #12
	mov	x0, x19
	mov	w3, #1
	bl	_sd_ctrl_write32_rep
	b	LBB0_10
LBB0_9:
	bl	_sd_ctrl_write16_rep
	tbnz	w21, #0, LBB0_11
LBB0_10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_11:
	lsl	x8, x22, #1
	ldr	w1, [x23]
	ldr	w2, [x20, x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_sd_ctrl_write16
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
	.comm	_TMIO_MMC_32BIT_DATA_PORT,4,2   ; @TMIO_MMC_32BIT_DATA_PORT
	.comm	_CTL_SD_DATA_PORT,4,2           ; @CTL_SD_DATA_PORT
	.no_dead_strip	_tmio_mmc_transfer_data
.subsections_via_symbols
