	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_prioidx
_get_prioidx:                           ## @get_prioidx
	.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, %r14
	movq	_prioidx_map_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movq	_prioidx_map@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_PRIOIDX_SZ@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	shll	$3, %esi
	callq	_find_first_zero_bit
	movl	%eax, %ebx
	cltq
	movslq	(%r12), %rcx
	shlq	$3, %rcx
	cmpq	%rax, %rcx
	jne	LBB0_2
## %bb.1:
	movq	_prioidx_map_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_2:
	movl	(%r15), %esi
	movl	%ebx, %edi
	callq	_set_bit
	movq	_max_prioidx@GOTPCREL(%rip), %rdi
	callq	_atomic_read
	cmpl	%ebx, %eax
	jge	LBB0_4
## %bb.3:
	movq	_max_prioidx@GOTPCREL(%rip), %rdi
	movl	%ebx, %esi
	callq	_atomic_set
LBB0_4:
	movq	_prioidx_map_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	movl	%ebx, (%r14)
	xorl	%eax, %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_prioidx_map_lock,4,2           ## @prioidx_map_lock
	.comm	_prioidx_map,4,2                ## @prioidx_map
	.comm	_PRIOIDX_SZ,4,2                 ## @PRIOIDX_SZ
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_max_prioidx,4,2                ## @max_prioidx
	.no_dead_strip	_get_prioidx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_prioidx
_get_prioidx:                           ; @get_prioidx
	.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	x19, x0
Lloh0:
	adrp	x0, _prioidx_map_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _prioidx_map_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
Lloh2:
	adrp	x21, _prioidx_map@GOTPAGE
Lloh3:
	ldr	x21, [x21, _prioidx_map@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh4:
	adrp	x22, _PRIOIDX_SZ@GOTPAGE
Lloh5:
	ldr	x22, [x22, _PRIOIDX_SZ@GOTPAGEOFF]
	ldr	w8, [x22]
	lsl	w1, w8, #3
	bl	_find_first_zero_bit
	mov	x20, x0
	sxtw	x8, w20
	ldrsw	x9, [x22]
	cmp	x8, x9, lsl #3
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x0, _prioidx_map_lock@GOTPAGE
Lloh7:
	ldr	x0, [x0, _prioidx_map_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
Lloh8:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
	ldr	w1, [x21]
	mov	x0, x20
	bl	_set_bit
Lloh11:
	adrp	x0, _max_prioidx@GOTPAGE
Lloh12:
	ldr	x0, [x0, _max_prioidx@GOTPAGEOFF]
	bl	_atomic_read
	cmp	w0, w20
	b.ge	LBB0_4
; %bb.3:
Lloh13:
	adrp	x0, _max_prioidx@GOTPAGE
Lloh14:
	ldr	x0, [x0, _max_prioidx@GOTPAGEOFF]
	mov	x1, x20
	bl	_atomic_set
LBB0_4:
Lloh15:
	adrp	x0, _prioidx_map_lock@GOTPAGE
Lloh16:
	ldr	x0, [x0, _prioidx_map_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	str	w20, [x19]
LBB0_5:
	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 AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_prioidx_map_lock,4,2           ; @prioidx_map_lock
	.comm	_prioidx_map,4,2                ; @prioidx_map
	.comm	_PRIOIDX_SZ,4,2                 ; @PRIOIDX_SZ
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_max_prioidx,4,2                ; @max_prioidx
	.no_dead_strip	_get_prioidx
.subsections_via_symbols
