	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsm_vacuum_page
_fsm_vacuum_page:                       ## @fsm_vacuum_page
	.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	%r9, %r14
                                        ## kill: def $r8d killed $r8d def $r8
	movq	%r8, -96(%rbp)                  ## 8-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r15
	xorl	%r13d, %r13d
	movl	%edi, -80(%rbp)                 ## 4-byte Spill
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	xorl	%ecx, %ecx
	callq	_fsm_readbuf
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_BufferIsValid
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	$0, (%r14)
	movl	%r12d, %edi
	callq	_BufferGetPage
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_FSM_BOTTOM_LEVEL@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jge	LBB0_14
## %bb.3:
	movl	$0, -52(%rbp)
	leaq	-60(%rbp), %rsi
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_fsm_get_location
	movq	%rax, %rbx
	movq	%rdx, %r14
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	leal	-1(%rax), %edi
	leaq	-56(%rbp), %rsi
	callq	_fsm_get_location
	movq	%rax, %r13
	movq	%r15, %rax
	movq	%rdx, %r15
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	cmpq	%rax, %rbx
	jge	LBB0_7
## %bb.4:
	movl	%r12d, -76(%rbp)                ## 4-byte Spill
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	leaq	-60(%rbp), %rdx
	callq	_fsm_get_parent
	movq	%rax, %rbx
	movq	%rdx, %r14
	movq	%r13, %rdi
	movq	%r15, %rsi
	leaq	-56(%rbp), %rdx
	callq	_fsm_get_parent
	movq	%rax, %r13
	movq	%rdx, %r15
	cmpq	%r12, %rbx
	jl	LBB0_5
## %bb.6:
	movl	-76(%rbp), %r12d                ## 4-byte Reload
LBB0_7:
	xorl	%edi, %edi
	cmpq	-72(%rbp), %rbx                 ## 8-byte Folded Reload
	sete	%dil
	callq	_Assert
	xorl	%r13d, %r13d
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, %r14
	movq	_SlotsPerFSMPage@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$0, %r14d
	cmovgl	%eax, %r14d
	cmovel	-60(%rbp), %r14d
	decl	%eax
	cmpq	%rcx, %r15
	movl	$-1, %r15d
	cmovgl	%eax, %r15d
	cmovel	-56(%rbp), %r15d
	cmpl	%r15d, %r14d
	jle	LBB0_8
LBB0_14:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_fsm_get_max_avail
	movl	%eax, %r13d
	movl	%ebx, %edi
	callq	_PageGetContents
	movq	$0, (%rax)
	movl	%r12d, %edi
	callq	_ReleaseBuffer
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	testl	%r13d, %r13d
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_fsm_get_child
	movl	-80(%rbp), %edi                 ## 4-byte Reload
	movq	%rax, %rsi
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movq	-96(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	leaq	-52(%rbp), %r9
	callq	_fsm_vacuum_page
	movl	%eax, %ebx
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r14d, %esi
	callq	_fsm_get_avail
	cmpl	%ebx, %eax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_BUFFER_LOCK_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_LockBuffer
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_fsm_set_avail
	movl	%r12d, %edi
	xorl	%esi, %esi
	callq	_MarkBufferDirtyHint
	movq	_BUFFER_LOCK_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_LockBuffer
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	cmpl	%r14d, %r15d
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=1
	incl	%r14d
	movl	-52(%rbp), %r13d
	jmp	LBB0_8
LBB0_1:
	movl	$1, (%r14)
LBB0_15:
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FSM_BOTTOM_LEVEL,8,3           ## @FSM_BOTTOM_LEVEL
	.comm	_SlotsPerFSMPage,4,2            ## @SlotsPerFSMPage
	.comm	_BUFFER_LOCK_EXCLUSIVE,4,2      ## @BUFFER_LOCK_EXCLUSIVE
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ## @BUFFER_LOCK_UNLOCK
	.no_dead_strip	_fsm_vacuum_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsm_vacuum_page
_fsm_vacuum_page:                       ; @fsm_vacuum_page
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x5
	str	w4, [sp]                        ; 4-byte Folded Spill
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
	mov	w3, #0
	bl	_fsm_readbuf
	mov	x19, x0
	bl	_BufferIsValid
	cbz	w0, LBB0_7
; %bb.1:
	str	wzr, [x20]
	mov	x0, x19
	bl	_BufferGetPage
	mov	x25, x0
Lloh0:
	adrp	x8, _FSM_BOTTOM_LEVEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FSM_BOTTOM_LEVEL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x23, x8
	b.le	LBB0_6
; %bb.2:
	str	wzr, [sp, #4]
	add	x1, sp, #12
	mov	x0, x21
	bl	_fsm_get_location
	mov	x28, x0
	mov	x26, x1
	ldr	w8, [sp]                        ; 4-byte Folded Reload
	sub	w0, w8, #1
	add	x1, sp, #8
	bl	_fsm_get_location
	mov	x27, x1
	cmp	x28, x23
	b.ge	LBB0_5
; %bb.3:
	mov	x20, x0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #12
	mov	x0, x28
	mov	x1, x26
	bl	_fsm_get_parent
	mov	x28, x0
	mov	x26, x1
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x27
	bl	_fsm_get_parent
	mov	x20, x0
	mov	x27, x1
	cmp	x28, x23
	b.lt	LBB0_4
LBB0_5:
	cmp	x28, x23
	cset	w0, eq
	bl	_Assert
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _SlotsPerFSMPage@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SlotsPerFSMPage@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	x26, x22
	csel	w10, w9, wzr, gt
	csel	w26, w8, w10, eq
	ldr	w8, [sp, #8]
	sub	w9, w9, #1
	cmp	x27, x22
	csinv	w9, w9, wzr, gt
	csel	w27, w8, w9, eq
	cmp	w26, w27
	b.le	LBB0_9
LBB0_6:
	mov	x0, x25
	bl	_fsm_get_max_avail
	mov	x21, x0
	mov	x0, x25
	bl	_PageGetContents
	str	xzr, [x0]
	mov	x0, x19
	bl	_ReleaseBuffer
	b	LBB0_8
LBB0_7:
	mov	w21, #0
	mov	w8, #1
	str	w8, [x20]
LBB0_8:
	mov	x0, x21
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_9:
	mov	w20, #0
Lloh6:
	adrp	x28, _BUFFER_LOCK_UNLOCK@GOTPAGE
Lloh7:
	ldr	x28, [x28, _BUFFER_LOCK_UNLOCK@GOTPAGEOFF]
	bl	_CHECK_FOR_INTERRUPTS
	cbz	w20, LBB0_11
LBB0_10:
	mov	w20, #0
	b	LBB0_12
LBB0_11:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x26
	bl	_fsm_get_child
	mov	x2, x0
	mov	x3, x1
	add	x5, sp, #4
	mov	x0, x24
	mov	x1, x2
	mov	x2, x3
	mov	x3, x21
	ldr	w4, [sp]                        ; 4-byte Folded Reload
	bl	_fsm_vacuum_page
	mov	x20, x0
LBB0_12:
	mov	x0, x25
	mov	x1, x26
	bl	_fsm_get_avail
	cmp	w0, w20
	b.eq	LBB0_14
; %bb.13:
Lloh8:
	adrp	x8, _BUFFER_LOCK_EXCLUSIVE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BUFFER_LOCK_EXCLUSIVE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_LockBuffer
	mov	x0, x25
	mov	x1, x26
	mov	x2, x20
	bl	_fsm_set_avail
	mov	x0, x19
	mov	w1, #0
	bl	_MarkBufferDirtyHint
	ldr	w1, [x28]
	mov	x0, x19
	bl	_LockBuffer
LBB0_14:
	cmp	w27, w26
	b.eq	LBB0_6
; %bb.15:
	add	w26, w26, #1
	ldr	w20, [sp, #4]
	bl	_CHECK_FOR_INTERRUPTS
	cbnz	w20, LBB0_10
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_FSM_BOTTOM_LEVEL,8,3           ; @FSM_BOTTOM_LEVEL
	.comm	_SlotsPerFSMPage,4,2            ; @SlotsPerFSMPage
	.comm	_BUFFER_LOCK_EXCLUSIVE,4,2      ; @BUFFER_LOCK_EXCLUSIVE
	.comm	_BUFFER_LOCK_UNLOCK,4,2         ; @BUFFER_LOCK_UNLOCK
	.no_dead_strip	_fsm_vacuum_page
.subsections_via_symbols
