	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt7530_write_vlan_entry
_mt7530_write_vlan_entry:               ## @mt7530_write_vlan_entry
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r13d
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %r12
	movl	%esi, %edi
	callq	_REG_ESW_VLAN_VTIM
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_mt7530_r32
	movl	%eax, %ebx
	testb	$1, %r15b
	jne	LBB0_2
## %bb.1:
	andl	$16773120, %ebx                 ## imm = 0xFFF000
	jmp	LBB0_3
LBB0_2:
	andl	$4095, %ebx                     ## imm = 0xFFF
	shll	$12, %r14d
LBB0_3:
	orl	%r14d, %ebx
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, %edi
	callq	_REG_ESW_VLAN_VTIM
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_mt7530_w32
	xorl	%r14d, %r14d
	movq	_REG_ESW_VLAN_VAWD1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$0, %edx
	testl	%r13d, %r13d
	je	LBB0_6
## %bb.5:
	movq	_REG_ESW_VLAN_VAWD1_IVL_MAC@GOTPCREL(%rip), %rax
	movq	_REG_ESW_VLAN_VAWD1_VTAG_EN@GOTPCREL(%rip), %rcx
	shll	$16, %r13d
	movq	_REG_ESW_VLAN_VAWD1_VALID@GOTPCREL(%rip), %rdx
	orl	(%rax), %r13d
	orl	(%rcx), %r13d
	orl	(%rdx), %r13d
	movl	%r13d, %edx
LBB0_6:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_mt7530_w32
	movq	_MT7530_NUM_PORTS@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_11
## %bb.7:
	xorl	%r13d, %r13d
	movq	_ETAG_CTRL_TAG@GOTPCREL(%rip), %r12
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=1
	movl	(%rcx), %eax
	movl	%r13d, %ecx
	shll	%cl, %eax
	orl	%eax, %r14d
	incl	%ebx
	addl	$2, %r13d
	cmpl	(%r15), %ebx
	jge	LBB0_11
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_BIT
	movq	%r12, %rcx
	testl	%eax, -48(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_ETAG_CTRL_UNTAG@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_11:
	movq	_REG_ESW_VLAN_VAWD2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_mt7530_w32
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt7530_vtcr                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_ESW_VLAN_VAWD1,4,2         ## @REG_ESW_VLAN_VAWD1
	.comm	_REG_ESW_VLAN_VAWD1_IVL_MAC,4,2 ## @REG_ESW_VLAN_VAWD1_IVL_MAC
	.comm	_REG_ESW_VLAN_VAWD1_VTAG_EN,4,2 ## @REG_ESW_VLAN_VAWD1_VTAG_EN
	.comm	_REG_ESW_VLAN_VAWD1_VALID,4,2   ## @REG_ESW_VLAN_VAWD1_VALID
	.comm	_MT7530_NUM_PORTS,4,2           ## @MT7530_NUM_PORTS
	.comm	_ETAG_CTRL_TAG,4,2              ## @ETAG_CTRL_TAG
	.comm	_ETAG_CTRL_UNTAG,4,2            ## @ETAG_CTRL_UNTAG
	.comm	_REG_ESW_VLAN_VAWD2,4,2         ## @REG_ESW_VLAN_VAWD2
	.no_dead_strip	_mt7530_write_vlan_entry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt7530_write_vlan_entry
_mt7530_write_vlan_entry:               ; @mt7530_write_vlan_entry
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_REG_ESW_VLAN_VTIM
	mov	x1, x0
	mov	x0, x20
	bl	_mt7530_r32
	and	w8, w0, #0xfff000
	bfi	w0, w23, #12, #20
	orr	w8, w8, w23
	tst	w19, #0x1
	csel	w23, w0, w8, ne
	mov	x0, x19
	bl	_REG_ESW_VLAN_VTIM
	mov	x1, x0
	mov	x0, x20
	mov	x2, x23
	bl	_mt7530_w32
Lloh0:
	adrp	x8, _REG_ESW_VLAN_VAWD1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_ESW_VLAN_VAWD1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	cbz	w22, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _REG_ESW_VLAN_VAWD1_IVL_MAC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_ESW_VLAN_VAWD1_IVL_MAC@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _REG_ESW_VLAN_VAWD1_VTAG_EN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _REG_ESW_VLAN_VAWD1_VTAG_EN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _REG_ESW_VLAN_VAWD1_VALID@GOTPAGE
Lloh10:
	ldr	x10, [x10, _REG_ESW_VLAN_VAWD1_VALID@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w8, w8, w22, lsl #16
	orr	w8, w8, w9
	orr	w2, w8, w10
	b	LBB0_3
LBB0_2:
	mov	w2, #0
LBB0_3:
	mov	x0, x20
	bl	_mt7530_w32
Lloh12:
	adrp	x24, _MT7530_NUM_PORTS@GOTPAGE
Lloh13:
	ldr	x24, [x24, _MT7530_NUM_PORTS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	w25, #0
	mov	w22, #0
	mov	w23, #0
Lloh14:
	adrp	x26, _ETAG_CTRL_UNTAG@GOTPAGE
Lloh15:
	ldr	x26, [x26, _ETAG_CTRL_UNTAG@GOTPAGEOFF]
Lloh16:
	adrp	x27, _ETAG_CTRL_TAG@GOTPAGE
Lloh17:
	ldr	x27, [x27, _ETAG_CTRL_TAG@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_BIT
	tst	w0, w21
	csel	x8, x26, x27, eq
	ldr	w8, [x8]
	lsl	w8, w8, w25
	orr	w22, w8, w22
	add	w23, w23, #1
	ldr	w8, [x24]
	add	w25, w25, #2
	cmp	w23, w8
	b.lt	LBB0_5
	b	LBB0_7
LBB0_6:
	mov	w22, #0
LBB0_7:
Lloh18:
	adrp	x8, _REG_ESW_VLAN_VAWD2@GOTPAGE
Lloh19:
	ldr	x8, [x8, _REG_ESW_VLAN_VAWD2@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x22
	bl	_mt7530_w32
	mov	x0, x20
	mov	w1, #1
	mov	x2, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_mt7530_vtcr
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_ESW_VLAN_VAWD1,4,2         ; @REG_ESW_VLAN_VAWD1
	.comm	_REG_ESW_VLAN_VAWD1_IVL_MAC,4,2 ; @REG_ESW_VLAN_VAWD1_IVL_MAC
	.comm	_REG_ESW_VLAN_VAWD1_VTAG_EN,4,2 ; @REG_ESW_VLAN_VAWD1_VTAG_EN
	.comm	_REG_ESW_VLAN_VAWD1_VALID,4,2   ; @REG_ESW_VLAN_VAWD1_VALID
	.comm	_MT7530_NUM_PORTS,4,2           ; @MT7530_NUM_PORTS
	.comm	_ETAG_CTRL_TAG,4,2              ; @ETAG_CTRL_TAG
	.comm	_ETAG_CTRL_UNTAG,4,2            ; @ETAG_CTRL_UNTAG
	.comm	_REG_ESW_VLAN_VAWD2,4,2         ; @REG_ESW_VLAN_VAWD2
	.no_dead_strip	_mt7530_write_vlan_entry
.subsections_via_symbols
