	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mpool_new                      ## -- Begin function mpool_new
	.p2align	4, 0x90
_mpool_new:                             ## @mpool_new
	.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
	movq	(%rdi), %rax
	movq	_MAX_PAGE_NUMBER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.1:
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_mpool_bkt
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r14
	movq	_MPOOL_PAGE_REQUEST@GOTPCREL(%rip), %rax
	movq	(%rbx), %rdi
	leaq	1(%rdi), %rcx
	cmpq	%r12, (%rax)
	movq	%rcx, (%rbx)
	jne	LBB0_5
## %bb.4:
	movq	(%r15), %rdi
	jmp	LBB0_6
LBB0_2:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_5:
	movq	%rdi, (%r15)
LBB0_6:
	movq	%rdi, 16(%r14)
	movq	_MPOOL_PINNED@GOTPCREL(%rip), %rax
	movq	_MPOOL_INUSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%r14)
	movq	16(%rbx), %r15
	callq	_HASHKEY
	leaq	(%r15,%rax,4), %rdi
	movq	_hq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rsi
	callq	_TAILQ_INSERT_HEAD
	addq	$8, %rbx
	movq	_q@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_TAILQ_INSERT_TAIL
	movq	8(%r14), %rax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	xorl	%eax, %eax
	callq	_abort
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_PAGE_NUMBER,8,3            ## @MAX_PAGE_NUMBER
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mpool_new: page allocation overflow.\n"

	.comm	_MPOOL_PAGE_REQUEST,8,3         ## @MPOOL_PAGE_REQUEST
	.comm	_MPOOL_PINNED,4,2               ## @MPOOL_PINNED
	.comm	_MPOOL_INUSE,4,2                ## @MPOOL_INUSE
	.comm	_hq,4,2                         ## @hq
	.comm	_q,4,2                          ## @q
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mpool_new                      ; -- Begin function mpool_new
	.p2align	2
_mpool_new:                             ; @mpool_new
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _MAX_PAGE_NUMBER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_PAGE_NUMBER@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.1:
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	bl	_mpool_bkt
	cbz	x0, LBB0_6
; %bb.2:
	mov	x20, x0
Lloh3:
	adrp	x8, _MPOOL_PAGE_REQUEST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MPOOL_PAGE_REQUEST@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x0, [x19]
	add	x9, x0, #1
	str	x9, [x19]
	cmp	x8, x22
	b.ne	LBB0_4
; %bb.3:
	ldr	x0, [x21]
	b	LBB0_5
LBB0_4:
	str	x0, [x21]
LBB0_5:
	str	x0, [x20, #16]
Lloh6:
	adrp	x8, _MPOOL_PINNED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MPOOL_PINNED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _MPOOL_INUSE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MPOOL_INUSE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x20]
	ldr	x21, [x19, #16]
	bl	_HASHKEY
	add	x0, x21, x0, lsl #2
Lloh12:
	adrp	x8, _hq@GOTPAGE
Lloh13:
	ldr	x8, [x8, _hq@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_TAILQ_INSERT_HEAD
	add	x0, x19, #8
Lloh15:
	adrp	x8, _q@GOTPAGE
Lloh16:
	ldr	x8, [x8, _q@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_TAILQ_INSERT_TAIL
	ldr	x0, [x20, #8]
LBB0_6:
	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
LBB0_7:
Lloh18:
	adrp	x8, _stderr@GOTPAGE
Lloh19:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	bl	_abort
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_PAGE_NUMBER,8,3            ; @MAX_PAGE_NUMBER
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mpool_new: page allocation overflow.\n"

	.comm	_MPOOL_PAGE_REQUEST,8,3         ; @MPOOL_PAGE_REQUEST
	.comm	_MPOOL_PINNED,4,2               ; @MPOOL_PINNED
	.comm	_MPOOL_INUSE,4,2                ; @MPOOL_INUSE
	.comm	_hq,4,2                         ; @hq
	.comm	_q,4,2                          ; @q
.subsections_via_symbols
