	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_object
_alloc_object:                          ## @alloc_object
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	movslq	%esi, %r13
	leaq	(%rbx,%r13,8), %r15
	movl	%r13d, %esi
	callq	_DSA_SCLASS_LOCK
	movl	%eax, %edi
	callq	_LWLockHeldByMe
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_Assert
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_DSA_SCLASS_LOCK
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_LWLockAcquire
	movq	(%rbx,%r13,8), %rax
	movq	8(%rax), %rdi
	callq	_DsaPointerIsValid
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_ensure_active_superblock
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	movq	(%r15), %rax
	movq	8(%rax), %rdi
	callq	_DsaPointerIsValid
	movl	%eax, %edi
	callq	_Assert
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rax
	movq	8(%rax), %rsi
	movq	%r12, %rdi
	callq	_dsa_get_address
	movq	%rax, %rbx
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	setg	%dil
	callq	_Assert
	movq	24(%rbx), %r15
	movq	_DSA_NUM_SIZE_CLASSES@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	%r14d, (%rax)
	setg	%dil
	callq	_Assert
	movq	_dsa_size_classes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r13,8), %rax
	movq	8(%rbx), %r13
	movq	_DSA_SPAN_NOTHING_FREE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r13
	jne	LBB0_4
## %bb.5:
	movq	16(%rbx), %rcx
	imulq	%rcx, %rax
	addq	%r15, %rax
	incq	%rcx
	movq	%rcx, 16(%rbx)
	movq	%rax, %r13
	jmp	LBB0_6
LBB0_4:
	imulq	%rax, %r13
	addq	%r15, %r13
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_dsa_get_address
	movq	%rax, %rdi
	callq	_NextFreeObjectIndex
	movq	%rax, 8(%rbx)
LBB0_6:
	decq	(%rbx)
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	jne	LBB0_8
## %bb.7:
	movq	_DSA_FULLNESS_CLASSES@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	decq	%rcx
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_transfer_first_span
	jmp	LBB0_8
LBB0_2:
	movq	_InvalidDsaPointer@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
LBB0_8:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_DSA_SCLASS_LOCK
	movl	%eax, %edi
	callq	_LWLockHeldByMe
	movl	%eax, %edi
	callq	_Assert
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_DSA_SCLASS_LOCK
	movl	%eax, %edi
	callq	_LWLockRelease
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LW_EXCLUSIVE,4,2               ## @LW_EXCLUSIVE
	.comm	_InvalidDsaPointer,8,3          ## @InvalidDsaPointer
	.comm	_DSA_NUM_SIZE_CLASSES,4,2       ## @DSA_NUM_SIZE_CLASSES
	.comm	_dsa_size_classes,8,3           ## @dsa_size_classes
	.comm	_DSA_SPAN_NOTHING_FREE,8,3      ## @DSA_SPAN_NOTHING_FREE
	.comm	_DSA_FULLNESS_CLASSES,8,3       ## @DSA_FULLNESS_CLASSES
	.no_dead_strip	_alloc_object
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_object
_alloc_object:                          ; @alloc_object
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x8, [x8]
	add	x21, x8, w1, sxtw #3
	bl	_DSA_SCLASS_LOCK
	bl	_LWLockHeldByMe
	cmp	w0, #0
	cset	w0, eq
	bl	_Assert
	mov	x0, x20
	mov	x1, x19
	bl	_DSA_SCLASS_LOCK
Lloh0:
	adrp	x8, _LW_EXCLUSIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LW_EXCLUSIVE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_LWLockAcquire
	ldr	x8, [x21]
	ldr	x0, [x8, #8]
	bl	_DsaPointerIsValid
	cbnz	w0, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_ensure_active_superblock
	cbz	w0, LBB0_7
LBB0_2:
	sxtw	x24, w19
	ldr	x8, [x21]
	ldr	x0, [x8, #8]
	bl	_DsaPointerIsValid
	bl	_Assert
	ldr	x8, [x21]
	ldr	x1, [x8, #8]
	mov	x0, x20
	bl	_dsa_get_address
	mov	x23, x0
	ldr	x8, [x0]
	cmp	x8, #0
	cset	w0, gt
	bl	_Assert
	ldr	x22, [x23, #24]
Lloh3:
	adrp	x8, _DSA_NUM_SIZE_CLASSES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DSA_NUM_SIZE_CLASSES@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w19
	cset	w0, gt
	bl	_Assert
Lloh6:
	adrp	x8, _dsa_size_classes@GOTPAGE
Lloh7:
	ldr	x8, [x8, _dsa_size_classes@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	x8, [x8, x24, lsl #3]
	ldr	x9, [x23, #8]
Lloh9:
	adrp	x10, _DSA_SPAN_NOTHING_FREE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _DSA_SPAN_NOTHING_FREE@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.3:
	ldr	x9, [x23, #16]
	madd	x22, x9, x8, x22
	add	x8, x9, #1
	str	x8, [x23, #16]
	b	LBB0_5
LBB0_4:
	madd	x22, x9, x8, x22
	mov	x0, x20
	mov	x1, x22
	bl	_dsa_get_address
	bl	_NextFreeObjectIndex
	str	x0, [x23, #8]
LBB0_5:
	ldr	x8, [x23]
	subs	x8, x8, #1
	str	x8, [x23]
	b.ne	LBB0_8
; %bb.6:
Lloh12:
	adrp	x8, _DSA_FULLNESS_CLASSES@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DSA_FULLNESS_CLASSES@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	sub	x3, x8, #1
	mov	x0, x20
	mov	x1, x21
	mov	w2, #1
	bl	_transfer_first_span
	b	LBB0_8
LBB0_7:
Lloh15:
	adrp	x8, _InvalidDsaPointer@GOTPAGE
Lloh16:
	ldr	x8, [x8, _InvalidDsaPointer@GOTPAGEOFF]
Lloh17:
	ldr	x22, [x8]
LBB0_8:
	mov	x0, x20
	mov	x1, x19
	bl	_DSA_SCLASS_LOCK
	bl	_LWLockHeldByMe
	bl	_Assert
	mov	x0, x20
	mov	x1, x19
	bl	_DSA_SCLASS_LOCK
	bl	_LWLockRelease
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_LW_EXCLUSIVE,4,2               ; @LW_EXCLUSIVE
	.comm	_InvalidDsaPointer,8,3          ; @InvalidDsaPointer
	.comm	_DSA_NUM_SIZE_CLASSES,4,2       ; @DSA_NUM_SIZE_CLASSES
	.comm	_dsa_size_classes,8,3           ; @dsa_size_classes
	.comm	_DSA_SPAN_NOTHING_FREE,8,3      ; @DSA_SPAN_NOTHING_FREE
	.comm	_DSA_FULLNESS_CLASSES,8,3       ; @DSA_FULLNESS_CLASSES
	.no_dead_strip	_alloc_object
.subsections_via_symbols
