	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_eth_vlan_rx_add_vid
_sh_eth_vlan_rx_add_vid:                ## @sh_eth_vlan_rx_add_vid
	.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
	movl	%edx, %r14d
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_sh_eth_get_vtag_index
	movl	%eax, %r12d
	movq	8(%rbx), %rax
	xorl	%edi, %edi
	cmpl	$0, (%rax)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EPERM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_7
LBB0_2:
	xorl	%r15d, %r15d
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.3:
	movl	(%rbx), %eax
	leal	1(%rax), %ecx
	movl	%ecx, (%rbx)
	testl	%eax, %eax
	jle	LBB0_5
## %bb.4:
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	jmp	LBB0_6
LBB0_5:
	movq	_TSU_VTAG_ENABLE@GOTPCREL(%rip), %rax
	movq	_TSU_VTAG_VID_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r14d
	orl	(%rax), %r14d
	movq	%rbx, %rdi
	movl	%r14d, %esi
LBB0_6:
	movl	%r12d, %edx
	callq	_sh_eth_tsu_write
LBB0_7:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_TSU_VTAG_ENABLE,4,2            ## @TSU_VTAG_ENABLE
	.comm	_TSU_VTAG_VID_MASK,4,2          ## @TSU_VTAG_VID_MASK
	.no_dead_strip	_sh_eth_vlan_rx_add_vid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_eth_vlan_rx_add_vid
_sh_eth_vlan_rx_add_vid:                ; @sh_eth_vlan_rx_add_vid
	.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	x20, x2
	bl	_netdev_priv
	mov	x19, x0
	bl	_sh_eth_get_vtag_index
	mov	x21, x0
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EPERM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_2:
	cbz	w20, LBB0_7
; %bb.3:
	ldr	w8, [x19]
	add	w9, w8, #1
	str	w9, [x19]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.4:
	mov	x0, x19
	mov	w1, #0
	b	LBB0_6
LBB0_5:
Lloh3:
	adrp	x8, _TSU_VTAG_ENABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TSU_VTAG_ENABLE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _TSU_VTAG_VID_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TSU_VTAG_VID_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w9, w9, w20
	orr	w1, w9, w8
	mov	x0, x19
LBB0_6:
	mov	x2, x21
	bl	_sh_eth_tsu_write
LBB0_7:
	mov	w0, #0
LBB0_8:
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_TSU_VTAG_ENABLE,4,2            ; @TSU_VTAG_ENABLE
	.comm	_TSU_VTAG_VID_MASK,4,2          ; @TSU_VTAG_VID_MASK
	.no_dead_strip	_sh_eth_vlan_rx_add_vid
.subsections_via_symbols
