	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__FAT_cache_writeSectors        ## -- Begin function _FAT_cache_writeSectors
	.p2align	4, 0x90
__FAT_cache_writeSectors:               ## @_FAT_cache_writeSectors
	.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
	movl	$1, %eax
	testq	%rdx, %rdx
	jle	LBB0_6
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rdx, %r12
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	__FAT_cache_getPage
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r14
	movq	%rbx, %rdi
	subq	(%rax), %rdi
	movq	8(%rax), %r13
	subq	%rdi, %r13
	cmpq	%r12, %r13
	cmovgeq	%r12, %r13
	movq	(%r15), %rdx
	imulq	%rdx, %rdi
	addq	24(%rax), %rdi
	imulq	%r13, %rdx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_memcpy
	movq	(%r15), %rax
	imulq	%r13, %rax
	leaq	(%rbx,%rax,4), %rbx
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	addq	%r13, %rbx
	movl	$1, 16(%r14)
	subq	%r13, %r12
	jg	LBB0_2
## %bb.5:
	movl	$1, %eax
	jmp	LBB0_6
LBB0_3:
	xorl	%eax, %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__FAT_cache_writeSectors        ; -- Begin function _FAT_cache_writeSectors
	.p2align	2
__FAT_cache_writeSectors:               ; @_FAT_cache_writeSectors
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cmp	x2, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x21
	bl	__FAT_cache_getPage
	cbz	x0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x23, x0
	ldp	x8, x9, [x0]
	sub	x8, x21, x8
	sub	x9, x9, x8
	cmp	x9, x20
	csel	x24, x9, x20, lt
	ldr	x9, [x0, #24]
	ldr	x10, [x22]
	madd	x0, x10, x8, x9
	mul	x2, x24, x10
	mov	x1, x19
	bl	_memcpy
	ldr	x8, [x22]
	mul	x8, x8, x24
	add	x19, x19, x8, lsl #2
	add	x21, x24, x21
	sub	x20, x20, x24
	mov	w0, #1
	str	w0, [x23, #16]
	cmp	x20, #0
	b.gt	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	w0, #1
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
