	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tifm_sd_transfer_data
_tifm_sd_transfer_data:                 ## @tifm_sd_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	cmpq	8(%rdi), %rax
	je	LBB0_16
## %bb.1:
	movq	_TIFM_MMCSD_FIFO_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	testl	%r15d, %r15d
	je	LBB0_16
## %bb.2:
	movq	%rdi, %r14
	movq	40(%rdi), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rcx), %rdx
	addl	%r15d, %r15d
	movl	16(%rdi), %ebx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdx,%rax,8), %r12d
	subl	%ebx, %r12d
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rcx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$0, 16(%r14)
	leaq	1(%rax), %rcx
	movq	%rcx, (%r14)
	cmpq	8(%r14), %rcx
	je	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	8(%rdx,%rax,8), %r12d
	xorl	%ebx, %ebx
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%rdx,%rcx,8), %rdi
	addl	4(%rdx,%rcx,8), %ebx
	callq	_sg_page
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	movl	%ebx, %esi
	shrl	%cl, %esi
	movl	%eax, %edi
	callq	_nth_page
	movq	%rax, %r13
	movl	%ebx, %edi
	callq	_offset_in_page
	movl	%eax, %ebx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	subl	%ebx, %edi
	movl	%r12d, %esi
	callq	_min
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_min
	movl	%eax, %r12d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	movl	%r12d, %ecx
	callq	_tifm_sd_read_fifo
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_MMC_DATA_WRITE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	movl	%r12d, %ecx
	callq	_tifm_sd_write_fifo
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	16(%r14), %ebx
	addl	%r12d, %ebx
	movl	%ebx, 16(%r14)
	subl	%r12d, %r15d
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r14), %rax
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_3
LBB0_6:
	movq	_MMC_DATA_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, (%rcx)
	je	LBB0_16
## %bb.7:
	movq	_DATA_CARRY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 20(%r14)
	je	LBB0_16
## %bb.8:
	movq	24(%r14), %rax
	movq	32(%r14), %rcx
	movl	(%rcx), %edi
	movq	_SOCK_MMCSD_DATA@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	(%rax), %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TIFM_MMCSD_FIFO_SIZE,4,2       ## @TIFM_MMCSD_FIFO_SIZE
	.comm	_MMC_DATA_WRITE,4,2             ## @MMC_DATA_WRITE
	.comm	_DATA_CARRY,4,2                 ## @DATA_CARRY
	.comm	_SOCK_MMCSD_DATA,8,3            ## @SOCK_MMCSD_DATA
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
	.no_dead_strip	_tifm_sd_transfer_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tifm_sd_transfer_data
_tifm_sd_transfer_data:                 ; @tifm_sd_transfer_data
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, _TIFM_MMCSD_FIFO_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TIFM_MMCSD_FIFO_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	ldp	x8, x10, [x0]
	cmp	x8, x10
	ccmp	w9, #0, #4, ne
	b.ne	LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x19, x0
	ldr	x10, [x0, #40]
	ldr	x10, [x10]
	ldr	x24, [x10]
	ldr	x25, [x24, #8]
	lsl	w20, w9, #1
	ldr	w9, [x0, #16]
Lloh3:
	adrp	x26, _PAGE_SHIFT@GOTPAGE
Lloh4:
	ldr	x26, [x26, _PAGE_SHIFT@GOTPAGEOFF]
Lloh5:
	adrp	x28, _PAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x28, [x28, _PAGE_SIZE@GOTPAGEOFF]
Lloh7:
	adrp	x27, _MMC_DATA_READ@GOTPAGE
Lloh8:
	ldr	x27, [x27, _MMC_DATA_READ@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x10, x8, #3
	ldr	w10, [x25, x10]
	subs	w21, w10, w9
	b.ne	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	str	wzr, [x19, #16]
	add	x8, x8, #1
	str	x8, [x19]
	ldr	x9, [x19, #8]
	cmp	x8, x9
	b.eq	LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w9, #0
	lsl	x10, x8, #3
	ldr	w21, [x25, x10]
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x0, x25, x8, lsl #3
	ldr	w8, [x0, #4]
	add	w23, w9, w8
	bl	_sg_page
	ldr	w8, [x26]
	lsr	w1, w23, w8
	bl	_nth_page
	mov	x22, x0
	mov	x0, x23
	bl	_offset_in_page
	mov	x23, x0
	ldr	w8, [x28]
	sub	w0, w8, w0
	mov	x1, x21
	bl	_min
	mov	x1, x20
	bl	_min
	mov	x21, x0
	ldr	w8, [x24]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	mov	x3, x21
	bl	_tifm_sd_read_fifo
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh9:
	adrp	x9, _MMC_DATA_WRITE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MMC_DATA_WRITE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	mov	x3, x21
	bl	_tifm_sd_write_fifo
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x19, #16]
	add	w9, w8, w21
	str	w9, [x19, #16]
	subs	w20, w20, w21
	b.eq	LBB0_1
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19]
	b	LBB0_3
LBB0_12:
	ldr	w8, [x24]
Lloh12:
	adrp	x9, _MMC_DATA_WRITE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MMC_DATA_WRITE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_1
; %bb.13:
	ldr	w8, [x19, #20]
Lloh15:
	adrp	x9, _DATA_CARRY@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DATA_CARRY@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_1
; %bb.14:
	ldp	x9, x8, [x19, #24]
	ldr	w0, [x8]
	ldr	x8, [x9]
Lloh18:
	adrp	x9, _SOCK_MMCSD_DATA@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SOCK_MMCSD_DATA@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	add	x1, x9, x8
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_writel
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_TIFM_MMCSD_FIFO_SIZE,4,2       ; @TIFM_MMCSD_FIFO_SIZE
	.comm	_MMC_DATA_WRITE,4,2             ; @MMC_DATA_WRITE
	.comm	_DATA_CARRY,4,2                 ; @DATA_CARRY
	.comm	_SOCK_MMCSD_DATA,8,3            ; @SOCK_MMCSD_DATA
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
	.no_dead_strip	_tifm_sd_transfer_data
.subsections_via_symbols
