	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prepare_xfer
_prepare_xfer:                          ## @prepare_xfer
	.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	$56, %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	40(%rdi), %r12
	movslq	%esi, %rax
	movq	_XFER_FAILED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	(%rax,%rax,2), %rbx
	movl	%ecx, (%r12,%rbx,8)
	movq	8(%r12,%rbx,8), %rdx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_DEBUG
	movups	16(%r15), %xmm0
	movaps	%xmm0, -96(%rbp)
	movq	32(%r15), %rax
	movq	%rax, -80(%rbp)
	movl	$65535, %edi                    ## imm = 0xFFFF
	callq	_cpu_to_le16
	movl	%eax, -80(%rbp)
	movl	16(%r12,%rbx,8), %edi
	callq	_cpu_to_le32
	movq	%rax, -88(%rbp)
	movq	8(%r15), %rdi
	movq	8(%r12,%rbx,8), %rsi
	leaq	-44(%rbp), %rcx
	leaq	-96(%rbp), %r8
	movl	$24, %edx
	callq	*(%rdi)
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leaq	(%r12,%rbx,8), %r13
	addq	$8, %r13
	leaq	16(%r15), %rbx
	movslq	(%r15), %r14
	movl	16(%r15), %edi
	callq	_le32_to_cpu
	cltq
	movq	_SECTOR_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	leaq	(%rax,%r14,8), %rax
	addq	%rcx, %rax
	decq	%rax
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.3:
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %r14
	jmp	LBB0_4
LBB0_2:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r14d
LBB0_4:
	movq	%rbx, %rax
	movq	(%r13), %rbx
	movl	(%rax), %edi
	callq	_le32_to_cpu
	movl	%eax, %r12d
	movq	_BLOCK_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, -72(%rbp)
	testl	%r14d, %r14d
	jle	LBB0_8
## %bb.5:
	movslq	%r12d, %rax
	addq	%rax, %rbx
	xorl	%r12d, %r12d
	leaq	-72(%rbp), %r13
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rdi
	movq	%rbx, %rsi
	movl	$8, %edx
	leaq	-44(%rbp), %rcx
	movq	%r13, %r8
	callq	*(%rdi)
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incl	%r12d
	addq	$8, %rbx
	cmpl	%r14d, %r12d
	jne	LBB0_6
LBB0_8:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx,8), %rax
	movq	_XFER_PREPARED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	xorl	%eax, %eax
LBB0_9:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XFER_FAILED,4,2                ## @XFER_FAILED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ftl_cs: preparing xfer unit at 0x%x\n"

	.comm	_SECTOR_SIZE,4,2                ## @SECTOR_SIZE
	.comm	_BLOCK_CONTROL,4,2              ## @BLOCK_CONTROL
	.comm	_XFER_PREPARED,4,2              ## @XFER_PREPARED
	.no_dead_strip	_prepare_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prepare_xfer
_prepare_xfer:                          ; @prepare_xfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x0
	ldr	x8, [x0, #40]
Lloh0:
	adrp	x9, _XFER_FAILED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _XFER_FAILED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mov	w10, #24
	smaddl	x21, w1, w10, x8
	str	w9, [x21]
	mov	x20, x21
	ldr	x2, [x20, #8]!
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_DEBUG
	ldr	q0, [x19, #16]
	str	q0, [sp, #16]
	ldr	x8, [x19, #32]
	str	x8, [sp, #32]
	mov	w0, #65535
	bl	_cpu_to_le16
	str	w0, [sp, #32]
	ldr	w0, [x21, #16]
	bl	_cpu_to_le32
	str	x0, [sp, #24]
	ldr	x0, [x19, #8]
	ldr	x8, [x0]
	ldr	x1, [x20]
	add	x3, sp, #4
	add	x4, sp, #16
	mov	w2, #24
	blr	x8
	cbnz	w0, LBB0_6
; %bb.1:
	ldrsw	x8, [x19]
	lsl	x22, x8, #3
	ldr	w0, [x19, #16]
	bl	_le32_to_cpu
Lloh5:
	adrp	x8, _SECTOR_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SECTOR_SIZE@GOTPAGEOFF]
Lloh7:
	ldrsw	x8, [x8]
	add	x9, x22, w0, sxtw
	add	x9, x9, x8
	sub	x9, x9, #1
	ldr	x24, [x20]
	ldr	w0, [x19, #16]
	udiv	x22, x9, x8
	bl	_le32_to_cpu
	mov	x20, x0
Lloh8:
	adrp	x8, _BLOCK_CONTROL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BLOCK_CONTROL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	str	x0, [sp, #8]
	cmp	w22, #1
	b.lt	LBB0_5
; %bb.2:
	mov	w23, #0
	add	x20, x24, w20, sxtw
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, #8]
	ldr	x8, [x0]
	add	x3, sp, #4
	add	x4, sp, #8
	mov	x1, x20
	mov	w2, #8
	blr	x8
	cbnz	w0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w23, w23, #1
	add	x20, x20, #8
	cmp	w23, w22
	b.ne	LBB0_3
LBB0_5:
	mov	w0, #0
Lloh11:
	adrp	x8, _XFER_PREPARED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _XFER_PREPARED@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x21]
LBB0_6:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_XFER_FAILED,4,2                ; @XFER_FAILED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ftl_cs: preparing xfer unit at 0x%x\n"

	.comm	_SECTOR_SIZE,4,2                ; @SECTOR_SIZE
	.comm	_BLOCK_CONTROL,4,2              ; @BLOCK_CONTROL
	.comm	_XFER_PREPARED,4,2              ; @XFER_PREPARED
	.no_dead_strip	_prepare_xfer
.subsections_via_symbols
