	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tifm_sd_bounce_block
_tifm_sd_bounce_block:                  ## @tifm_sd_bounce_block
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rsi), %r12
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %r13d
	movq	32(%rdi), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	testl	%r13d, %r13d
	je	LBB0_12
## %bb.1:
	leaq	24(%r15), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	8(%r15), %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rbx
	movq	%r12, %r15
	movq	%rcx, %r12
	callq	_sg_page
	movl	(%r12), %esi
	movq	%r15, %r12
	movq	%rbx, %r15
	subl	%r13d, %esi
	movq	%rax, %rdi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %r8d
	callq	_tifm_sd_copy_page
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%r15), %ebx
	addl	%r14d, %ebx
	movl	%ebx, 8(%r15)
	subl	%r14d, %r13d
	je	LBB0_12
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rcx
	movl	(%r12,%rcx,8), %r14d
	subl	%ebx, %r14d
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rcx, %rax
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, 8(%r15)
	leaq	1(%rcx), %rax
	movq	%rax, (%r15)
	cmpq	16(%r15), %rax
	je	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%r12,%rcx,8), %r14d
	xorl	%ebx, %ebx
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r12,%rax,8), %rdi
	addl	4(%r12,%rax,8), %ebx
	callq	_sg_page
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	movl	%ebx, %esi
	shrl	%cl, %esi
	movq	%rax, %rdi
	callq	_nth_page
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	%ebx, %edi
	callq	_offset_in_page
	movl	%eax, %ebx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	subl	%ebx, %edi
	movl	%r14d, %esi
	callq	_min
	movl	%eax, %edi
	movl	%r13d, %esi
	callq	_min
	movl	%eax, %r14d
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	4(%rcx), %eax
	movq	_MMC_DATA_WRITE@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_sg_page
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %ecx
	subl	%r13d, %ecx
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	%rax, %rdx
	jmp	LBB0_10
LBB0_12:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bouncing block\n"

	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_MMC_DATA_WRITE,4,2             ## @MMC_DATA_WRITE
	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
	.no_dead_strip	_tifm_sd_bounce_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tifm_sd_bounce_block
_tifm_sd_bounce_block:                  ; @tifm_sd_bounce_block
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x26, [x1, #8]
	ldr	w21, [x1]
	ldr	x0, [x0, #32]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	cbz	w21, LBB0_11
; %bb.1:
	add	x22, x20, #24
	ldr	w8, [x20, #8]
Lloh2:
	adrp	x28, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x28, [x28, _PAGE_SIZE@GOTPAGEOFF]
Lloh4:
	adrp	x27, _MMC_DATA_WRITE@GOTPAGE
Lloh5:
	ldr	x27, [x27, _MMC_DATA_WRITE@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_sg_page
	ldr	w8, [x19]
	sub	w1, w8, w21
	mov	x2, x23
	mov	x3, x25
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x4, x24
	bl	_tifm_sd_copy_page
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x20, #8]
	add	w8, w8, w24
	str	w8, [x20, #8]
	subs	w21, w21, w24
	b.eq	LBB0_11
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20]
	lsl	x10, x9, #3
	ldr	w10, [x26, x10]
	subs	w24, w10, w8
	b.ne	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	str	wzr, [x20, #8]
	add	x9, x9, #1
	str	x9, [x20]
	ldr	x8, [x20, #16]
	cmp	x9, x8
	b.eq	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w8, #0
	lsl	x10, x9, #3
	ldr	w24, [x26, x10]
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x0, x26, x9, lsl #3
	ldr	w9, [x0, #4]
	add	w25, w8, w9
	bl	_sg_page
Lloh6:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	lsr	w1, w25, w8
	bl	_nth_page
	mov	x23, x0
	mov	x0, x25
	bl	_offset_in_page
	mov	x25, x0
	ldr	w8, [x28]
	sub	w0, w8, w0
	mov	x1, x24
	bl	_min
	mov	x1, x21
	bl	_min
	mov	x24, x0
	ldr	w8, [x19, #4]
	ldr	w9, [x27]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh9:
	adrp	x9, _MMC_DATA_READ@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MMC_DATA_READ@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_sg_page
	mov	x2, x0
	ldr	w8, [x19]
	sub	w3, w8, w21
	mov	x0, x23
	mov	x1, x25
	b	LBB0_3
LBB0_11:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bouncing block\n"

	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_MMC_DATA_WRITE,4,2             ; @MMC_DATA_WRITE
	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
	.no_dead_strip	_tifm_sd_bounce_block
.subsections_via_symbols
