	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function toshsd_start_data
_toshsd_start_data:                     ## @toshsd_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, %rbx
	movq	%rdi, %r14
	movq	_SG_MITER_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	24(%rdi), %rdi
	movl	4(%rsi), %edx
	movl	8(%rsi), %ecx
	movq	16(%rsi), %rax
	movl	(%rax), %r8d
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	%rbx, 16(%r14)
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rbx), %eax
	jne	LBB0_1
## %bb.2:
	movq	_SG_MITER_FROM_SG@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_SG_MITER_TO_SG@GOTPCREL(%rip), %rax
LBB0_3:
	orl	(%rax), %r15d
	leaq	8(%r14), %rdi
	movq	16(%rbx), %rsi
	movl	12(%rbx), %edx
	movl	%r15d, %ecx
	callq	_sg_miter_start
	movl	8(%rbx), %edi
	movq	_SD_BLOCKCOUNT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	callq	_iowrite16
	movl	4(%rbx), %edi
	movq	_SD_CARDXFERDATALEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_iowrite16                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SG_MITER_ATOMIC,4,2            ## @SG_MITER_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setup data transfer: blocksize %08x  nr_blocks %d, offset: %08x\n"

	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
	.comm	_SG_MITER_TO_SG,4,2             ## @SG_MITER_TO_SG
	.comm	_SG_MITER_FROM_SG,4,2           ## @SG_MITER_FROM_SG
	.comm	_SD_BLOCKCOUNT,8,3              ## @SD_BLOCKCOUNT
	.comm	_SD_CARDXFERDATALEN,8,3         ## @SD_CARDXFERDATALEN
	.no_dead_strip	_toshsd_start_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function toshsd_start_data
_toshsd_start_data:                     ; @toshsd_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
Lloh0:
	adrp	x8, _SG_MITER_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SG_MITER_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	ldr	x0, [x0, #24]
	ldp	w2, w3, [x1, #4]
	ldr	x8, [x1, #16]
	ldr	w4, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	str	x19, [x20, #16]
	ldr	w8, [x19]
Lloh5:
	adrp	x9, _MMC_DATA_READ@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MMC_DATA_READ@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _SG_MITER_FROM_SG@GOTPAGE
Lloh9:
	ldr	x10, [x10, _SG_MITER_FROM_SG@GOTPAGEOFF]
Lloh10:
	adrp	x11, _SG_MITER_TO_SG@GOTPAGE
Lloh11:
	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, x20, #8
	ldr	x1, [x19, #16]
	ldr	w2, [x19, #12]
	bl	_sg_miter_start
	ldr	w0, [x19, #8]
	ldr	x8, [x20]
Lloh12:
	adrp	x9, _SD_BLOCKCOUNT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SD_BLOCKCOUNT@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite16
	ldr	w0, [x19, #4]
	ldr	x8, [x20]
Lloh15:
	adrp	x9, _SD_CARDXFERDATALEN@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SD_CARDXFERDATALEN@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x1, x9, x8
	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
	b	_iowrite16
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SG_MITER_ATOMIC,4,2            ; @SG_MITER_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setup data transfer: blocksize %08x  nr_blocks %d, offset: %08x\n"

	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
	.comm	_SG_MITER_TO_SG,4,2             ; @SG_MITER_TO_SG
	.comm	_SG_MITER_FROM_SG,4,2           ; @SG_MITER_FROM_SG
	.comm	_SD_BLOCKCOUNT,8,3              ; @SD_BLOCKCOUNT
	.comm	_SD_CARDXFERDATALEN,8,3         ; @SD_CARDXFERDATALEN
	.no_dead_strip	_toshsd_start_data
.subsections_via_symbols
