	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsm_search
_fsm_search:                            ## @fsm_search
	.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	%esi, -44(%rbp)                 ## 4-byte Spill
	movl	%edi, %r12d
	movq	_FSM_ROOT_ADDRESS@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	xorl	%eax, %eax
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorl	%r15d, %r15d
	movl	%r12d, %edi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_fsm_readbuf
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_BufferIsValid
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	_BUFFER_LOCK_SHARE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_LockBuffer
	xorl	%edx, %edx
	movq	_FSM_BOTTOM_LEVEL@GOTPCREL(%rip), %r15
	cmpq	(%r15), %r13
	sete	%dl
	movl	%r14d, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	xorl	%ecx, %ecx
	callq	_fsm_search_avail
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	%eax, %ebx
	movl	%r14d, %edi
	callq	_UnlockReleaseBuffer
	cmpq	(%r15), %r13
	je	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=2
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_fsm_get_child
	movq	%rax, %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%r14d, %edi
	callq	_BufferGetPage
	movl	%eax, %edi
	callq	_fsm_get_max_avail
	movl	%eax, %r15d
	movl	%r14d, %edi
	callq	_UnlockReleaseBuffer
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_FSM_ROOT_LEVEL@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r13, %rdi
	leaq	-48(%rbp), %rsi
	callq	_fsm_get_parent
	movl	-48(%rbp), %edx
	movl	%r12d, %edi
	movq	%rax, %rsi
	movl	%r15d, %ecx
	xorl	%r8d, %r8d
	callq	_fsm_set_and_search
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	leal	1(%rdx), %eax
	movq	_FSM_ROOT_ADDRESS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r13
	cmpl	$10001, %edx                    ## imm = 0x2711
                                        ## kill: def $eax killed $eax def $rax
	jb	LBB0_1
LBB0_7:
	movq	_InvalidBlockNumber@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_10
LBB0_9:
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_fsm_get_heap_blk
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FSM_ROOT_ADDRESS,8,3           ## @FSM_ROOT_ADDRESS
	.comm	_BUFFER_LOCK_SHARE,4,2          ## @BUFFER_LOCK_SHARE
	.comm	_FSM_BOTTOM_LEVEL,8,3           ## @FSM_BOTTOM_LEVEL
	.comm	_FSM_ROOT_LEVEL,8,3             ## @FSM_ROOT_LEVEL
	.comm	_InvalidBlockNumber,4,2         ## @InvalidBlockNumber
	.no_dead_strip	_fsm_search
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsm_search
_fsm_search:                            ; @fsm_search
	.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	x19, x1
	mov	x20, x0
	mov	w25, #0
Lloh0:
	adrp	x24, _FSM_ROOT_ADDRESS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _FSM_ROOT_ADDRESS@GOTPAGEOFF]
	ldr	x21, [x24]
	mov	w28, #10001
Lloh2:
	adrp	x26, _BUFFER_LOCK_SHARE@GOTPAGE
Lloh3:
	ldr	x26, [x26, _BUFFER_LOCK_SHARE@GOTPAGEOFF]
Lloh4:
	adrp	x27, _FSM_BOTTOM_LEVEL@GOTPAGE
Lloh5:
	ldr	x27, [x27, _FSM_BOTTOM_LEVEL@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_fsm_readbuf
	mov	x22, x0
	bl	_BufferIsValid
	cbz	x0, LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w1, [x26]
	mov	x0, x22
	bl	_LockBuffer
	ldr	x8, [x27]
	cmp	x21, x8
	cset	w2, eq
	mov	x0, x22
	mov	x1, x19
	mov	w3, #0
	bl	_fsm_search_avail
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x23, x0
	mov	x0, x22
	bl	_UnlockReleaseBuffer
	ldr	x8, [x27]
	mov	x0, x21
	mov	x1, x23
	cmp	x21, x8
	b.eq	LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_fsm_get_child
	mov	x21, x0
	b	LBB0_1
LBB0_5:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	w23, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x22
	bl	_BufferGetPage
	bl	_fsm_get_max_avail
	mov	x23, x0
	mov	x0, x22
	bl	_UnlockReleaseBuffer
LBB0_7:                                 ;   in Loop: Header=BB0_1 Depth=1
Lloh6:
	adrp	x8, _FSM_ROOT_LEVEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FSM_ROOT_LEVEL@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x21, x8
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x1, sp, #12
	mov	x0, x21
	bl	_fsm_get_parent
	mov	x1, x0
	ldr	w2, [sp, #12]
	mov	x0, x20
	mov	x3, x23
	mov	w4, #0
	bl	_fsm_set_and_search
	add	w8, w25, #1
	ldr	x21, [x24]
	cmp	w25, w28
	mov	x25, x8
	b.lo	LBB0_1
LBB0_9:
Lloh9:
	adrp	x8, _InvalidBlockNumber@GOTPAGE
Lloh10:
	ldr	x8, [x8, _InvalidBlockNumber@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	b	LBB0_11
LBB0_10:
	bl	_fsm_get_heap_blk
LBB0_11:
	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
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_FSM_ROOT_ADDRESS,8,3           ; @FSM_ROOT_ADDRESS
	.comm	_BUFFER_LOCK_SHARE,4,2          ; @BUFFER_LOCK_SHARE
	.comm	_FSM_BOTTOM_LEVEL,8,3           ; @FSM_BOTTOM_LEVEL
	.comm	_FSM_ROOT_LEVEL,8,3             ; @FSM_ROOT_LEVEL
	.comm	_InvalidBlockNumber,4,2         ; @InvalidBlockNumber
	.no_dead_strip	_fsm_search
.subsections_via_symbols
