	.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, %r14
	movq	32(%rdi), %rbx
	movslq	%esi, %rax
	movq	_XFER_FAILED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	(%rax,%rax,2), %r12
	movl	%ecx, (%rbx,%r12,8)
	movq	8(%rbx,%r12,8), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	movups	8(%r14), %xmm0
	movaps	%xmm0, -96(%rbp)
	movq	24(%r14), %rax
	movq	%rax, -80(%rbp)
	movl	$65535, %edi                    ## imm = 0xFFFF
	callq	_cpu_to_le16
	movl	%eax, -80(%rbp)
	movl	16(%rbx,%r12,8), %edi
	callq	_cpu_to_le32
	movq	%rax, -88(%rbp)
	movl	4(%r14), %edi
	movq	8(%rbx,%r12,8), %rsi
	leaq	-44(%rbp), %rcx
	leaq	-96(%rbp), %r8
	movl	$24, %edx
	callq	_mtd_write
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leaq	(%rbx,%r12,8), %r13
	addq	$8, %r13
	movslq	(%r14), %rbx
	movl	8(%r14), %edi
	callq	_le32_to_cpu
	leaq	(%rax,%rbx,8), %rdi
	movq	_SECTOR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %r15d
	movq	(%r13), %r13
	movl	8(%r14), %edi
	callq	_le32_to_cpu
	movq	%rax, %rbx
	movq	_BLOCK_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, -64(%rbp)
	testl	%r15d, %r15d
	jle	LBB0_5
## %bb.2:
	addq	%r13, %rbx
	leaq	-64(%rbp), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r14), %edi
	movq	%rbx, %rsi
	movl	$8, %edx
	leaq	-44(%rbp), %rcx
	movq	%r13, %r8
	callq	_mtd_write
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	$8, %rbx
	decl	%r15d
	jne	LBB0_3
LBB0_5:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r12,8), %rax
	movq	_XFER_PREPARED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	xorl	%eax, %eax
LBB0_6:
	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, #32]
Lloh0:
	adrp	x9, _XFER_FAILED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _XFER_FAILED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mov	w10, #24
	smaddl	x22, w1, w10, x8
	str	w9, [x22]
	mov	x21, x22
	ldr	x1, [x21, #8]!
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	ldur	q0, [x19, #8]
	str	q0, [sp, #16]
	ldr	x8, [x19, #24]
	str	x8, [sp, #32]
	mov	w0, #65535
	bl	_cpu_to_le16
	str	w0, [sp, #32]
	ldr	w0, [x22, #16]
	bl	_cpu_to_le32
	str	x0, [sp, #24]
	ldr	w0, [x19, #4]
	ldr	x1, [x21]
	add	x3, sp, #4
	add	x4, sp, #16
	mov	w2, #24
	bl	_mtd_write
	cbnz	w0, LBB0_6
; %bb.1:
	ldrsw	x20, [x19]
	ldr	w0, [x19, #8]
	bl	_le32_to_cpu
	add	x0, x0, x20, lsl #3
Lloh5:
	adrp	x8, _SECTOR_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SECTOR_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_DIV_ROUND_UP
	mov	x20, x0
	ldr	x23, [x21]
	ldr	w0, [x19, #8]
	bl	_le32_to_cpu
	mov	x21, 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	w20, #1
	b.lt	LBB0_5
; %bb.2:
	add	x21, x21, x23
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #4]
	add	x3, sp, #4
	add	x4, sp, #8
	mov	x1, x21
	mov	w2, #8
	bl	_mtd_write
	cbnz	w0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #8
	subs	w20, w20, #1
	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, [x22]
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
