	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _FAT_file_extend_r
__FAT_file_extend_r:                    ## @_FAT_file_extend_r
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	%rsp, -80(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	32(%rsi), %r13
	movq	16(%r13), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	(%r13), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rdi
	movl	(%r13), %edx
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	xorl	%esi, %esi
	callq	_memset
	movl	(%rbx), %ecx
	movl	(%r13), %esi
	movl	%ecx, %eax
	cltd
	idivl	%esi
	movl	%edx, %r12d
	movl	%edx, -64(%rbp)
	movl	%ecx, %eax
	cltd
	idivl	4(%r13)
	movl	%edx, %eax
	cltd
	idivl	%esi
	movl	%eax, %r15d
	movl	%eax, -60(%rbp)
	movl	24(%rbx), %esi
	movq	%r13, %rdi
	callq	__FAT_fat_lastCluster
	movq	%rax, %r14
	movq	%rax, -56(%rbp)
	movl	(%rbx), %eax
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	movl	4(%rbx), %ecx
	subl	%eax, %ecx
	movslq	%ecx, %rbx
	je	LBB0_6
## %bb.1:
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:
	testl	%r15d, %r15d
	jne	LBB0_6
## %bb.3:
	testl	%r12d, %r12d
	jne	LBB0_6
## %bb.4:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	__FAT_fat_linkFreeCluster
	movq	%rax, %r14
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	__FAT_fat_isValidCluster
	testl	%eax, %eax
	je	LBB0_5
## %bb.8:
	movq	%r14, -56(%rbp)
	movl	$0, -60(%rbp)
	movl	%r12d, %ecx
	addq	%rbx, %rcx
	movslq	(%r13), %rax
	xorl	%r15d, %r15d
	cmpq	%rax, %rcx
	jae	LBB0_13
## %bb.9:
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_10
LBB0_6:
	movslq	%r12d, %rcx
	leaq	(%rbx,%rcx), %rdx
	movslq	(%r13), %rax
	cmpq	%rax, %rdx
	jae	LBB0_11
## %bb.7:
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
LBB0_10:
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	__FAT_fat_clusterToSector
	addl	%eax, %r15d
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%rbx, %r8
	callq	__FAT_cache_writePartialSector
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movl	%eax, -64(%rbp)
	jmp	LBB0_23
LBB0_11:
	testl	%r12d, %r12d
	jle	LBB0_13
## %bb.12:
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%rcx, %r12
	callq	__FAT_fat_clusterToSector
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%r15), %edx
	movslq	(%r13), %r8
	subq	%r12, %r8
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rcx
	callq	__FAT_cache_writePartialSector
	movslq	(%r13), %rax
	subq	%rax, %r12
	addq	%r12, %rbx
	movl	$0, -64(%rbp)
	incl	%r15d
	movl	%r15d, -60(%rbp)
LBB0_13:
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	%r14, -56(%rbp)
	xorl	%r15d, %r15d
LBB0_19:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	__FAT_fat_clusterToSector
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%r15), %esi
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %edx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	callq	__FAT_cache_writeSectors
	movslq	(%r13), %rax
	subq	%rax, %rbx
	incl	%r15d
	movl	%r15d, -60(%rbp)
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rax, %rbx
	jb	LBB0_20
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	cmpl	8(%r13), %r15d
	jb	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	$0, -60(%rbp)
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	__FAT_fat_linkFreeCluster
	movq	%rax, %r14
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	__FAT_fat_isValidCluster
	testl	%eax, %eax
	jne	LBB0_18
## %bb.17:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	xorl	%r14d, %r14d
	jmp	LBB0_24
LBB0_20:
	xorl	%r14d, %r14d
	leaq	-64(%rbp), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rdx
	movq	%rbx, %rcx
	xorl	%r8d, %r8d
	callq	__FAT_check_position_for_next_cluster
	testl	%eax, %eax
	je	LBB0_24
## %bb.21:
	testq	%rbx, %rbx
	je	LBB0_23
## %bb.22:
	movq	-56(%rbp), %rsi
	movq	%r13, %rdi
	callq	__FAT_fat_clusterToSector
	addl	-60(%rbp), %eax
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %edx
	xorl	%ecx, %ecx
	movq	%rbx, %r8
	callq	__FAT_cache_writePartialSector
	movl	%ebx, -64(%rbp)
LBB0_23:
	movl	-64(%rbp), %eax
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movl	%eax, 8(%rcx)
	movq	-60(%rbp), %rax
	movq	%rax, 12(%rcx)
	movl	-52(%rbp), %eax
	movl	%eax, 20(%rcx)
	movl	4(%rcx), %eax
	movl	%eax, (%rcx)
	movl	$1, %r14d
LBB0_24:
	movq	%r12, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_26
## %bb.25:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	xorl	%r14d, %r14d
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_24
LBB0_26:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSPC,8,3                     ## @ENOSPC
	.no_dead_strip	__FAT_file_extend_r
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _FAT_file_extend_r
__FAT_file_extend_r:                    ; @_FAT_file_extend_r
	.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
	sub	sp, sp, #48
	mov	x19, x1
	mov	x24, x0
	mov	x26, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x22, [x1, #32]
	ldr	x20, [x22, #16]
	ldr	w8, [x22]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh3:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh4:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	ldr	w2, [x22]
	mov	x0, x21
	mov	w1, #0
	bl	_memset
	ldr	w8, [x19]
	ldp	w9, w10, [x22]
	sdiv	w11, w8, w9
	msub	w27, w11, w9, w8
	sdiv	w11, w8, w10
	msub	w8, w11, w10, w8
	sdiv	w28, w8, w9
	stp	w27, w28, [x29, #-104]
	ldr	w1, [x19, #24]
	mov	x0, x22
	bl	__FAT_fat_lastCluster
	mov	x25, x0
	stur	x0, [x29, #-96]
	ldp	w8, w9, [x19]
	subs	w9, w9, w8
	sxtw	x23, w9
	b.eq	LBB0_6
; %bb.1:
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
	cmp	w28, #0
	ccmp	w27, #0, #0, eq
	b.ne	LBB0_6
; %bb.3:
	mov	x0, x22
	mov	x1, x25
	bl	__FAT_fat_linkFreeCluster
	mov	x25, x0
	mov	x0, x22
	mov	x1, x25
	bl	__FAT_fat_isValidCluster
	cbz	w0, LBB0_17
; %bb.4:
	mov	x9, x24
	mov	w28, #0
	stur	x25, [x29, #-96]
	stur	wzr, [x29, #-100]
	add	x24, x23, w27, uxtw
	ldrsw	x8, [x22]
	cmp	x24, x8
	b.hs	LBB0_11
; %bb.5:
	stur	x26, [x29, #-112]               ; 8-byte Folded Spill
	mov	x26, #0
	b	LBB0_7
LBB0_6:
	stp	x24, x26, [x29, #-120]          ; 16-byte Folded Spill
	sxtw	x26, w27
	ldrsw	x8, [x22]
	add	x24, x23, x26
	cmp	x24, x8
	b.hs	LBB0_8
LBB0_7:
	mov	x0, x22
	mov	x1, x25
	bl	__FAT_fat_clusterToSector
	add	w2, w28, w0
	mov	x0, x20
	mov	x1, x21
	mov	x3, x26
	mov	x4, x23
	bl	__FAT_cache_writePartialSector
	stur	w24, [x29, #-104]
	ldur	x26, [x29, #-112]               ; 8-byte Folded Reload
	b	LBB0_21
LBB0_8:
	cmp	w27, #1
	b.lt	LBB0_10
; %bb.9:
	mov	x0, x22
	mov	x1, x25
	bl	__FAT_fat_clusterToSector
	add	w2, w28, w0
	ldrsw	x8, [x22]
                                        ; kill: def $w27 killed $w27 killed $x27 def $x27
	sxtw	x24, w27
	sub	x4, x8, x24
	mov	x0, x20
	mov	x1, x21
	mov	x3, x26
	bl	__FAT_cache_writePartialSector
	ldrsw	x8, [x22]
	sub	x9, x24, x8
	add	x23, x23, x9
	add	w28, w28, #1
	stp	wzr, w28, [x29, #-104]
LBB0_10:
	ldp	x24, x26, [x29, #-120]          ; 16-byte Folded Reload
	b	LBB0_14
LBB0_11:
	mov	x24, x9
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	w28, #0
	stur	x25, [x29, #-96]
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x22
	mov	x1, x25
	bl	__FAT_fat_clusterToSector
	add	w1, w28, w0
	mov	x0, x20
	mov	w2, #1
	mov	x3, x21
	bl	__FAT_cache_writeSectors
	ldrsw	x8, [x22]
	add	w28, w28, #1
	stur	w28, [x29, #-100]
	sub	x23, x23, x8
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	cmp	x23, x8
	b.lo	LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w8, [x22, #8]
	cmp	w28, w8
	b.lo	LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	stur	wzr, [x29, #-100]
	mov	x0, x22
	mov	x1, x25
	bl	__FAT_fat_linkFreeCluster
	mov	x25, x0
	mov	x0, x22
	mov	x1, x25
	bl	__FAT_fat_isValidCluster
	cbnz	w0, LBB0_12
LBB0_17:
Lloh5:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	x8, [x24]
	b	LBB0_22
LBB0_18:
	sub	x1, x29, #104
	mov	x0, x24
	mov	x2, x22
	mov	x3, x23
	mov	x4, #0
	bl	__FAT_check_position_for_next_cluster
	cbz	w0, LBB0_22
; %bb.19:
	cbz	x23, LBB0_21
; %bb.20:
	ldur	x1, [x29, #-96]
	mov	x0, x22
	bl	__FAT_fat_clusterToSector
	ldur	w8, [x29, #-100]
	add	w2, w8, w0
	mov	x0, x20
	mov	x1, x21
	mov	x3, #0
	mov	x4, x23
	bl	__FAT_cache_writePartialSector
	stur	w23, [x29, #-104]
LBB0_21:
	ldur	q0, [x29, #-104]
	stur	q0, [x19, #8]
	ldr	w8, [x19, #4]
	str	w8, [x19]
	mov	w0, #1
LBB0_22:
	mov	sp, x26
	ldur	x8, [x29, #-88]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.23:
	sub	sp, x29, #80
	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_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSPC,8,3                     ; @ENOSPC
	.no_dead_strip	__FAT_file_extend_r
.subsections_via_symbols
