	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt7530_hw_vlan_add
_mt7530_hw_vlan_add:                    ## @mt7530_hw_vlan_add
	.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
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rsi), %r12d
	movl	4(%rsi), %edi
	callq	_BIT
	orl	%eax, %r12d
	movq	_MT7530_CPU_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %r12d
	movq	_IVL_MAC@GOTPCREL(%rip), %rax
	movq	_VTAG_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movl	%r12d, %edi
	callq	_PORT_MEM
	orl	%eax, %ebx
	movq	_VLAN_VALID@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_MT7530_VAWD1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_mt7530_write
	cmpq	$0, 8(%r15)
	jne	LBB0_1
## %bb.2:
	movq	_MT7530_VLAN_EGRESS_TAG@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_MT7530_VLAN_EGRESS_UNTAG@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r13d
	movq	_MT7530_VAWD2@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	4(%r15), %edi
	callq	_ETAG_CTRL_P_MASK
	movl	%eax, %ebx
	movl	4(%r15), %edi
	movl	%r13d, %esi
	callq	_ETAG_CTRL_P
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_mt7530_rmw
	movq	_MT7530_VAWD2@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_MT7530_CPU_PORT@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_ETAG_CTRL_P_MASK
	movl	%eax, %ebx
	movl	(%r12), %edi
	movq	_MT7530_VLAN_EGRESS_STACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ETAG_CTRL_P
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt7530_rmw                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MT7530_CPU_PORT,4,2            ## @MT7530_CPU_PORT
	.comm	_IVL_MAC,4,2                    ## @IVL_MAC
	.comm	_VTAG_EN,4,2                    ## @VTAG_EN
	.comm	_VLAN_VALID,4,2                 ## @VLAN_VALID
	.comm	_MT7530_VAWD1,4,2               ## @MT7530_VAWD1
	.comm	_MT7530_VLAN_EGRESS_UNTAG,4,2   ## @MT7530_VLAN_EGRESS_UNTAG
	.comm	_MT7530_VLAN_EGRESS_TAG,4,2     ## @MT7530_VLAN_EGRESS_TAG
	.comm	_MT7530_VAWD2,4,2               ## @MT7530_VAWD2
	.comm	_MT7530_VLAN_EGRESS_STACK,4,2   ## @MT7530_VLAN_EGRESS_STACK
	.no_dead_strip	_mt7530_hw_vlan_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt7530_hw_vlan_add
_mt7530_hw_vlan_add:                    ; @mt7530_hw_vlan_add
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	ldp	w21, w0, [x1]
	bl	_BIT
	orr	w21, w0, w21
Lloh0:
	adrp	x24, _MT7530_CPU_PORT@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MT7530_CPU_PORT@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_BIT
Lloh2:
	adrp	x8, _IVL_MAC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IVL_MAC@GOTPAGEOFF]
	orr	w0, w21, w0
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _VTAG_EN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _VTAG_EN@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w21, w9, w8
	bl	_PORT_MEM
Lloh8:
	adrp	x8, _VLAN_VALID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VLAN_VALID@GOTPAGEOFF]
	orr	w9, w21, w0
Lloh10:
	ldr	w8, [x8]
	orr	w2, w9, w8
Lloh11:
	adrp	x8, _MT7530_VAWD1@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MT7530_VAWD1@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mt7530_write
	ldr	x8, [x20, #8]
Lloh14:
	adrp	x9, _MT7530_VLAN_EGRESS_UNTAG@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MT7530_VLAN_EGRESS_UNTAG@GOTPAGEOFF]
Lloh16:
	adrp	x10, _MT7530_VLAN_EGRESS_TAG@GOTPAGE
Lloh17:
	ldr	x10, [x10, _MT7530_VLAN_EGRESS_TAG@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w21, [x8]
Lloh18:
	adrp	x25, _MT7530_VAWD2@GOTPAGE
Lloh19:
	ldr	x25, [x25, _MT7530_VAWD2@GOTPAGEOFF]
	ldr	w22, [x25]
	ldr	w0, [x20, #4]
	bl	_ETAG_CTRL_P_MASK
	mov	x23, x0
	ldr	w0, [x20, #4]
	mov	x1, x21
	bl	_ETAG_CTRL_P
	mov	x3, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_mt7530_rmw
	ldr	w20, [x25]
	ldr	w0, [x24]
	bl	_ETAG_CTRL_P_MASK
	mov	x21, x0
	ldr	w0, [x24]
Lloh20:
	adrp	x8, _MT7530_VLAN_EGRESS_STACK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MT7530_VLAN_EGRESS_STACK@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	bl	_ETAG_CTRL_P
	mov	x3, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_mt7530_rmw
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MT7530_CPU_PORT,4,2            ; @MT7530_CPU_PORT
	.comm	_IVL_MAC,4,2                    ; @IVL_MAC
	.comm	_VTAG_EN,4,2                    ; @VTAG_EN
	.comm	_VLAN_VALID,4,2                 ; @VLAN_VALID
	.comm	_MT7530_VAWD1,4,2               ; @MT7530_VAWD1
	.comm	_MT7530_VLAN_EGRESS_UNTAG,4,2   ; @MT7530_VLAN_EGRESS_UNTAG
	.comm	_MT7530_VLAN_EGRESS_TAG,4,2     ; @MT7530_VLAN_EGRESS_TAG
	.comm	_MT7530_VAWD2,4,2               ; @MT7530_VAWD2
	.comm	_MT7530_VLAN_EGRESS_STACK,4,2   ; @MT7530_VLAN_EGRESS_STACK
	.no_dead_strip	_mt7530_hw_vlan_add
.subsections_via_symbols
