	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mem_pool_alloc                 ## -- Begin function mem_pool_alloc
	.p2align	4, 0x90
_mem_pool_alloc:                        ## @mem_pool_alloc
	.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
	movl	%esi, %eax
	andl	$3, %eax
	movl	$4, %ebx
	subq	%rax, %rbx
	testq	%rax, %rax
	cmoveq	%rax, %rbx
	addq	%rsi, %rbx
	movq	8(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%rax), %rdx
	movq	8(%rax), %rcx
	subq	%rcx, %rdx
	cmpq	%rbx, %rdx
	jae	LBB0_4
LBB0_2:
	movslq	(%rdi), %rsi
	movl	%esi, %ecx
	shrl	$31, %ecx
	addl	%esi, %ecx
	sarl	%ecx
	movslq	%ecx, %rcx
	cmpq	%rcx, %rbx
	jae	LBB0_5
## %bb.3:
	xorl	%edx, %edx
	callq	_mem_pool_alloc_block
	movq	8(%rax), %rcx
LBB0_4:
	addq	%rcx, %rbx
	movq	%rbx, 8(%rax)
	movq	%rcx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, %rsi
	movq	%rax, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_mem_pool_alloc_block           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mem_pool_alloc                 ; -- Begin function mem_pool_alloc
	.p2align	2
_mem_pool_alloc:                        ; @mem_pool_alloc
	.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
	ands	x8, x1, #0x3
	mov	w9, #4
	sub	x8, x9, x8
	tst	x1, #0x3
	csel	x8, xzr, x8, eq
	add	x19, x8, x1
	ldr	x2, [x0, #8]
	cbz	x2, LBB0_2
; %bb.1:
	ldp	x9, x8, [x2]
	sub	x9, x9, x8
	cmp	x9, x19
	b.hs	LBB0_4
LBB0_2:
	ldrsw	x1, [x0]
	cmp	w1, #0
	cinc	w8, w1, lt
	asr	w8, w8, #1
	cmp	x19, w8, sxtw
	b.hs	LBB0_5
; %bb.3:
	mov	x2, #0
	bl	_mem_pool_alloc_block
	mov	x2, x0
	ldr	x8, [x0, #8]
LBB0_4:
	add	x9, x8, x19
	str	x9, [x2, #8]
	mov	x0, x8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x1, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mem_pool_alloc_block
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
