	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function filesys_ftruncate
_filesys_ftruncate:                     ## @filesys_ftruncate
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	cmpl	%esi, (%rdi)
	jbe	LBB0_4
## %bb.1:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	movl	%r14d, %esi
	callq	_realloc
	movq	%rax, 16(%rbx)
	movl	%r14d, %eax
	subl	(%rbx), %eax
	movq	_tot_loaded_index_data@GOTPCREL(%rip), %rcx
	addl	%eax, (%rcx)
LBB0_3:
	movl	%r14d, (%rbx)
LBB0_4:
	movl	8(%rbx), %edi
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %esi
	callq	_tree_lowerbound
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	8(%rbx), %edi
	movl	(%rax), %esi
	callq	_tree_delete
	movl	%eax, 8(%rbx)
	movl	%eax, %edi
	jmp	LBB0_6
LBB0_7:
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.8:
	movl	8(%rbx), %edi
	leal	-1(%r14), %esi
	callq	_tree_upperbound
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movq	%rax, %r15
	movl	4(%rax), %esi
	movl	(%rax), %r12d
	addl	%esi, %r12d
	subl	%r14d, %r12d
	jbe	LBB0_11
## %bb.10:
	subl	%r12d, %esi
	movl	%esi, 4(%r15)
	movq	8(%r15), %rdi
	callq	_realloc
	movq	%rax, 8(%r15)
	movq	_tot_allocated_data@GOTPCREL(%rip), %rax
	subl	%r12d, (%rax)
LBB0_11:
	movl	%r14d, 4(%rbx)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tot_loaded_index_data,4,2      ## @tot_loaded_index_data
	.comm	_tot_allocated_data,4,2         ## @tot_allocated_data
	.no_dead_strip	_filesys_ftruncate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function filesys_ftruncate
_filesys_ftruncate:                     ; @filesys_ftruncate
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, w1
	b.ls	LBB0_4
; %bb.1:
	ldr	x0, [x20, #16]
	cbz	x0, LBB0_3
; %bb.2:
	mov	x1, x19
	bl	_realloc
	str	x0, [x20, #16]
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _tot_loaded_index_data@GOTPAGE
Lloh1:
	ldr	x9, [x9, _tot_loaded_index_data@GOTPAGEOFF]
	ldr	w10, [x9]
	sub	w8, w19, w8
	add	w8, w8, w10
	str	w8, [x9]
LBB0_3:
	str	w19, [x20]
LBB0_4:
	ldr	w0, [x20, #8]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x1, x19
	bl	_tree_lowerbound
	cbz	x0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x20, #8]
	ldr	w1, [x0]
	mov	x0, x8
	bl	_tree_delete
	str	w0, [x20, #8]
	b	LBB0_5
LBB0_7:
	cbz	w19, LBB0_11
; %bb.8:
	ldr	w0, [x20, #8]
	sub	w1, w19, #1
	bl	_tree_upperbound
	cbz	x0, LBB0_11
; %bb.9:
	mov	x21, x0
	ldp	w9, w8, [x0]
	add	w9, w8, w9
	subs	w22, w9, w19
	b.ls	LBB0_11
; %bb.10:
	sub	w1, w8, w22
	str	w1, [x21, #4]
	ldr	x0, [x21, #8]
	bl	_realloc
	str	x0, [x21, #8]
Lloh2:
	adrp	x8, _tot_allocated_data@GOTPAGE
Lloh3:
	ldr	x8, [x8, _tot_allocated_data@GOTPAGEOFF]
	ldr	w9, [x8]
	sub	w9, w9, w22
	str	w9, [x8]
LBB0_11:
	str	w19, [x20, #4]
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_tot_loaded_index_data,4,2      ; @tot_loaded_index_data
	.comm	_tot_allocated_data,4,2         ; @tot_allocated_data
	.no_dead_strip	_filesys_ftruncate
.subsections_via_symbols
