	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsm_space_needed_to_cat
_fsm_space_needed_to_cat:               ## @fsm_space_needed_to_cat
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_MaxFSMRequestSize@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jge	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	callq	_elog
LBB0_2:
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.3:
	movq	_FSM_CAT_STEP@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	(%rbx,%rcx), %rax
	decq	%rax
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_4
## %bb.5:
	cqto
	idivq	%rcx
	jmp	LBB0_6
LBB0_7:
	movl	$1, %eax
	jmp	LBB0_8
LBB0_4:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_6:
	cmpl	$255, %eax
	movl	$255, %ecx
	cmovll	%eax, %ecx
	movl	%ecx, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MaxFSMRequestSize,8,3          ## @MaxFSMRequestSize
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid FSM request size %zu"

	.comm	_FSM_CAT_STEP,8,3               ## @FSM_CAT_STEP
	.no_dead_strip	_fsm_space_needed_to_cat
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsm_space_needed_to_cat
_fsm_space_needed_to_cat:               ; @fsm_space_needed_to_cat
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _MaxFSMRequestSize@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MaxFSMRequestSize@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
	b.ge	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_elog
LBB0_2:
	cbz	x19, LBB0_4
; %bb.3:
Lloh8:
	adrp	x8, _FSM_CAT_STEP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FSM_CAT_STEP@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	add	x9, x19, x8
	sub	x9, x9, #1
	sdiv	x8, x9, x8
	mov	w9, #255
	cmp	w8, #255
	csel	w0, w8, w9, lt
	b	LBB0_5
LBB0_4:
	mov	w0, #1
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MaxFSMRequestSize,8,3          ; @MaxFSMRequestSize
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid FSM request size %zu"

	.comm	_FSM_CAT_STEP,8,3               ; @FSM_CAT_STEP
	.no_dead_strip	_fsm_space_needed_to_cat
.subsections_via_symbols
