	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sec_id_alloc
_sec_id_alloc:                          ## @sec_id_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
	movq	%rdi, %rbx
	movq	_sec_id_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_SEC_MAX_DEVICES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.4:
	movq	_sec_devices@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rdx,%rcx,8)
	je	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_5
	jmp	LBB0_7
LBB0_1:
	xorl	%ecx, %ecx
LBB0_2:
	cmpl	%eax, %ecx
	jne	LBB0_3
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_3:
	movl	%ecx, (%rbx)
	movq	_sec_devices@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ecx, %ecx
	movq	%rbx, (%rax,%rcx,8)
	xorl	%ebx, %ebx
LBB0_8:
	movq	_sec_id_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sec_id_lock,4,2                ## @sec_id_lock
	.comm	_SEC_MAX_DEVICES,4,2            ## @SEC_MAX_DEVICES
	.comm	_sec_devices,8,3                ## @sec_devices
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_sec_id_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sec_id_alloc
_sec_id_alloc:                          ; @sec_id_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
	mov	x19, x0
Lloh0:
	adrp	x0, _sec_id_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _sec_id_lock@GOTPAGEOFF]
	bl	_mutex_lock
Lloh2:
	adrp	x8, _SEC_MAX_DEVICES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SEC_MAX_DEVICES@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x9, #0
Lloh5:
	adrp	x10, _sec_devices@GOTPAGE
Lloh6:
	ldr	x10, [x10, _sec_devices@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10, x9, lsl #3]
	cbz	x11, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_2
	b	LBB0_6
LBB0_4:
	mov	w9, #0
LBB0_5:
	cmp	w9, w8
	b.ne	LBB0_7
LBB0_6:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_8
LBB0_7:
	mov	w20, #0
	str	w9, [x19]
Lloh11:
	adrp	x8, _sec_devices@GOTPAGE
Lloh12:
	ldr	x8, [x8, _sec_devices@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	str	x19, [x8, w9, uxtw #3]
LBB0_8:
Lloh14:
	adrp	x0, _sec_id_lock@GOTPAGE
Lloh15:
	ldr	x0, [x0, _sec_id_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_sec_id_lock,4,2                ; @sec_id_lock
	.comm	_SEC_MAX_DEVICES,4,2            ; @SEC_MAX_DEVICES
	.comm	_sec_devices,8,3                ; @sec_devices
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_sec_id_alloc
.subsections_via_symbols
