	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ofdpa_port_internal_vlan_id_get
_ofdpa_port_internal_vlan_id_get:       ## @ofdpa_port_internal_vlan_id_get
	.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, %ebx
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movl	%ebx, (%rax)
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ofdpa_internal_vlan_tbl_find
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_kfree
	movq	%rbx, %r12
	jmp	LBB0_10
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_4:
	movl	8(%r14), %edi
	movq	%r12, %rsi
	addq	$12, %rsi
	movl	(%r12), %edx
	callq	_hash_add
	movq	_OFDPA_N_INTERNAL_VLANS@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_9
## %bb.5:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r14), %esi
	movl	%ebx, %edi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	cmpl	(%r13), %ebx
	jl	LBB0_6
LBB0_9:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	jmp	LBB0_10
LBB0_7:
	movq	_OFDPA_INTERNAL_VLAN_ID_BASE@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_htons
	movl	%eax, 4(%r12)
LBB0_10:
	incl	8(%r12)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	4(%r12), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_OFDPA_N_INTERNAL_VLANS,4,2     ## @OFDPA_N_INTERNAL_VLANS
	.comm	_OFDPA_INTERNAL_VLAN_ID_BASE,8,3 ## @OFDPA_INTERNAL_VLAN_ID_BASE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Out of internal VLAN IDs\n"

	.no_dead_strip	_ofdpa_port_internal_vlan_id_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ofdpa_port_internal_vlan_id_get
_ofdpa_port_internal_vlan_id_get:       ; @ofdpa_port_internal_vlan_id_get
	.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	x22, x1
	mov	x21, x0
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_10
; %bb.1:
	mov	x20, x0
	str	w22, [x0]
	mov	x0, x19
	bl	_spin_lock_irqsave
	mov	x0, x19
	mov	x1, x22
	bl	_ofdpa_internal_vlan_tbl_find
	cbz	x0, LBB0_3
; %bb.2:
	mov	x22, x0
	mov	x0, x20
	bl	_kfree
	mov	x20, x22
	b	LBB0_9
LBB0_3:
	ldr	w0, [x19, #8]
	mov	x1, x20
	ldr	w2, [x1], #12
	bl	_hash_add
Lloh3:
	adrp	x23, _OFDPA_N_INTERNAL_VLANS@GOTPAGE
Lloh4:
	ldr	x23, [x23, _OFDPA_N_INTERNAL_VLANS@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.4:
	mov	x22, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x19, #4]
	mov	x0, x22
	bl	_test_and_set_bit
	cbz	x0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x23]
	add	x22, x22, #1
	cmp	w22, w8
	b.lt	LBB0_5
LBB0_7:
	ldr	w0, [x21]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	b	LBB0_9
LBB0_8:
Lloh7:
	adrp	x8, _OFDPA_INTERNAL_VLAN_ID_BASE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _OFDPA_INTERNAL_VLAN_ID_BASE@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	add	x0, x8, x22
	bl	_htons
	str	w0, [x20, #4]
LBB0_9:
	ldr	w8, [x20, #8]
	add	w8, w8, #1
	str	w8, [x20, #8]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	ldr	w0, [x20, #4]
LBB0_10:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_OFDPA_N_INTERNAL_VLANS,4,2     ; @OFDPA_N_INTERNAL_VLANS
	.comm	_OFDPA_INTERNAL_VLAN_ID_BASE,8,3 ; @OFDPA_INTERNAL_VLAN_ID_BASE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Out of internal VLAN IDs\n"

	.no_dead_strip	_ofdpa_port_internal_vlan_id_get
.subsections_via_symbols
