	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_c2_pd_alloc                    ## -- Begin function c2_pd_alloc
	.p2align	4, 0x90
_c2_pd_alloc:                           ## @c2_pd_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rdi, %r12
	leaq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movl	20(%r12), %edi
	movq	(%r12), %rsi
	movq	8(%r12), %rdx
	callq	_find_next_zero_bit
	movq	(%r12), %rsi
	cmpq	%rsi, %rax
	jge	LBB0_2
## %bb.1:
	movq	%rax, %rbx
	cmpq	%rsi, %rbx
	jl	LBB0_4
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_6
LBB0_2:
	movl	20(%r12), %edi
	callq	_find_first_zero_bit
	movq	%rax, %rbx
	movq	(%r12), %rsi
	cmpq	%rsi, %rbx
	jge	LBB0_5
LBB0_4:
	movq	%rbx, (%r15)
	movl	20(%r12), %esi
	movq	%rbx, %rdi
	callq	___set_bit
	incq	%rbx
	xorl	%r15d, %r15d
	cmpq	(%r12), %rbx
	cmovgeq	%r15, %rbx
	movq	%rbx, 8(%r12)
LBB0_6:
	movq	%r14, %rdi
	callq	_spin_unlock
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_c2_pd_alloc                    ; -- Begin function c2_pd_alloc
	.p2align	2
_c2_pd_alloc:                           ; @c2_pd_alloc
	.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
	mov	x21, x2
	mov	x20, x0
	add	x19, x0, #16
	mov	x0, x19
	bl	_spin_lock
	ldr	w0, [x20, #20]
	ldp	x1, x2, [x20]
	bl	_find_next_zero_bit
	ldr	x1, [x20]
	cmp	x0, x1
	b.ge	LBB0_3
; %bb.1:
	mov	x22, x0
	cmp	x22, x1
	b.lt	LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_5
LBB0_3:
	ldr	w0, [x20, #20]
	bl	_find_first_zero_bit
	mov	x22, x0
	ldr	x1, [x20]
	cmp	x22, x1
	b.ge	LBB0_2
LBB0_4:
	str	x22, [x21]
	ldr	w1, [x20, #20]
	mov	x0, x22
	bl	___set_bit
	mov	w21, #0
	add	x8, x22, #1
	ldr	x9, [x20]
	cmp	x8, x9
	csinc	x8, xzr, x22, ge
	str	x8, [x20, #8]
LBB0_5:
	mov	x0, x19
	bl	_spin_unlock
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
