	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ifindex_alloc
_ifindex_alloc:                         ## @ifindex_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
	xorl	%eax, %eax
	callq	_IFNET_WLOCK_ASSERT
	movq	_V_if_index@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movq	_V_ifindex_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	$1, %eax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rsi,%rax,8)
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rax
	cmpq	%rdx, %rax
	jbe	LBB0_3
	jmp	LBB0_5
LBB0_1:
	movl	$1, %eax
LBB0_5:
	movq	_V_if_indexlim@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jae	LBB0_8
## %bb.6:
	movq	%rax, (%rcx)
	jmp	LBB0_9
LBB0_7:
	movq	_V_if_indexlim@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jb	LBB0_9
LBB0_8:
	xorl	%eax, %eax
	callq	_if_grow
	movq	%rax, (%rbx)
	movq	_USHRT_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V_if_index,8,3                 ## @V_if_index
	.comm	_V_ifindex_table,8,3            ## @V_ifindex_table
	.comm	_V_if_indexlim,8,3              ## @V_if_indexlim
	.comm	_USHRT_MAX,8,3                  ## @USHRT_MAX
	.no_dead_strip	_ifindex_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ifindex_alloc
_ifindex_alloc:                         ; @ifindex_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
	bl	_IFNET_WLOCK_ASSERT
Lloh0:
	adrp	x8, _V_if_index@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V_if_index@GOTPAGEOFF]
	ldr	x9, [x8]
	cbz	x9, LBB0_4
; %bb.1:
Lloh2:
	adrp	x10, _V_ifindex_table@GOTPAGE
Lloh3:
	ldr	x10, [x10, _V_ifindex_table@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	mov	w0, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10, x0, lsl #3]
	cbz	x11, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x0, x0, #1
	cmp	x0, x9
	b.ls	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	w0, #1
LBB0_5:
Lloh5:
	adrp	x9, _V_if_indexlim@GOTPAGE
Lloh6:
	ldr	x9, [x9, _V_if_indexlim@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x0, x9
	b.hs	LBB0_8
; %bb.6:
	str	x0, [x8]
	b	LBB0_9
LBB0_7:
Lloh8:
	adrp	x8, _V_if_indexlim@GOTPAGE
Lloh9:
	ldr	x8, [x8, _V_if_indexlim@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.lo	LBB0_9
LBB0_8:
	bl	_if_grow
	str	x0, [x19]
Lloh11:
	adrp	x8, _USHRT_MAX@GOTPAGE
Lloh12:
	ldr	x8, [x8, _USHRT_MAX@GOTPAGEOFF]
Lloh13:
	ldr	x0, [x8]
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_V_if_index,8,3                 ; @V_if_index
	.comm	_V_ifindex_table,8,3            ; @V_ifindex_table
	.comm	_V_if_indexlim,8,3              ; @V_if_indexlim
	.comm	_USHRT_MAX,8,3                  ; @USHRT_MAX
	.no_dead_strip	_ifindex_alloc
.subsections_via_symbols
