	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt753x_write_vlan_entry
_mt753x_write_vlan_entry:               ## @mt753x_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, %r12d
	movl	%ecx, %eax
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	xorl	%r13d, %r13d
	movq	_VAWD1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	$0, %edx
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_IVL_MAC@GOTPCREL(%rip), %rcx
	movq	_VTAG_EN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_VENTRY_VALID@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_PORT_MEM_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_PORT_MEM_M@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	orl	%edx, %eax
	movl	%eax, %edx
LBB0_2:
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_mt753x_reg_write
	movq	_MT753X_NUM_PORTS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_7
## %bb.3:
	xorl	%r13d, %r13d
	movq	_ETAG_CTRL_TAG@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	(%rcx), %r14d
	movl	%ebx, %edi
	callq	_PORT_ETAG_S
	movl	%eax, %ecx
	shll	%cl, %r14d
	orl	%r14d, %r13d
	incl	%ebx
	movq	_MT753X_NUM_PORTS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jge	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_BIT
	movq	%r15, %rcx
	testl	%r12d, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_ETAG_CTRL_UNTAG@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_7:
	movq	_VAWD2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_mt753x_reg_write
	movq	_VTCR_WRITE_VLAN_ENTRY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt753x_vlan_ctrl               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VAWD1,4,2                      ## @VAWD1
	.comm	_IVL_MAC,4,2                    ## @IVL_MAC
	.comm	_VTAG_EN,4,2                    ## @VTAG_EN
	.comm	_VENTRY_VALID,4,2               ## @VENTRY_VALID
	.comm	_PORT_MEM_S,4,2                 ## @PORT_MEM_S
	.comm	_PORT_MEM_M,4,2                 ## @PORT_MEM_M
	.comm	_MT753X_NUM_PORTS,4,2           ## @MT753X_NUM_PORTS
	.comm	_ETAG_CTRL_TAG,4,2              ## @ETAG_CTRL_TAG
	.comm	_ETAG_CTRL_UNTAG,4,2            ## @ETAG_CTRL_UNTAG
	.comm	_VAWD2,4,2                      ## @VAWD2
	.comm	_VTCR_WRITE_VLAN_ENTRY,4,2      ## @VTCR_WRITE_VLAN_ENTRY
	.no_dead_strip	_mt753x_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 mt753x_write_vlan_entry
_mt753x_write_vlan_entry:               ; @mt753x_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	x19, x2
	mov	x20, x0
Lloh0:
	adrp	x8, _VAWD1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VAWD1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	cbz	w3, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _IVL_MAC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IVL_MAC@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _VTAG_EN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _VTAG_EN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _VENTRY_VALID@GOTPAGE
Lloh10:
	ldr	x10, [x10, _VENTRY_VALID@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh11:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _PORT_MEM_S@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PORT_MEM_S@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	lsl	w9, w3, w9
Lloh15:
	adrp	x10, _PORT_MEM_M@GOTPAGE
Lloh16:
	ldr	x10, [x10, _PORT_MEM_M@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	and	w9, w9, w10
	orr	w2, w8, w9
	b	LBB0_3
LBB0_2:
	mov	w2, #0
LBB0_3:
	mov	x0, x20
	bl	_mt753x_reg_write
Lloh18:
	adrp	x24, _MT753X_NUM_PORTS@GOTPAGE
Lloh19:
	ldr	x24, [x24, _MT753X_NUM_PORTS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	w22, #0
	mov	w23, #0
Lloh20:
	adrp	x25, _ETAG_CTRL_UNTAG@GOTPAGE
Lloh21:
	ldr	x25, [x25, _ETAG_CTRL_UNTAG@GOTPAGEOFF]
Lloh22:
	adrp	x26, _ETAG_CTRL_TAG@GOTPAGE
Lloh23:
	ldr	x26, [x26, _ETAG_CTRL_TAG@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_BIT
	tst	w0, w21
	csel	x8, x25, x26, eq
	ldr	w27, [x8]
	mov	x0, x23
	bl	_PORT_ETAG_S
	lsl	w8, w27, w0
	orr	w22, w8, w22
	add	w23, w23, #1
	ldr	w8, [x24]
	cmp	w23, w8
	b.lt	LBB0_5
	b	LBB0_7
LBB0_6:
	mov	w22, #0
LBB0_7:
Lloh24:
	adrp	x8, _VAWD2@GOTPAGE
Lloh25:
	ldr	x8, [x8, _VAWD2@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x22
	bl	_mt753x_reg_write
Lloh27:
	adrp	x8, _VTCR_WRITE_VLAN_ENTRY@GOTPAGE
Lloh28:
	ldr	x8, [x8, _VTCR_WRITE_VLAN_ENTRY@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x20
	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	_mt753x_vlan_ctrl
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_VAWD1,4,2                      ; @VAWD1
	.comm	_IVL_MAC,4,2                    ; @IVL_MAC
	.comm	_VTAG_EN,4,2                    ; @VTAG_EN
	.comm	_VENTRY_VALID,4,2               ; @VENTRY_VALID
	.comm	_PORT_MEM_S,4,2                 ; @PORT_MEM_S
	.comm	_PORT_MEM_M,4,2                 ; @PORT_MEM_M
	.comm	_MT753X_NUM_PORTS,4,2           ; @MT753X_NUM_PORTS
	.comm	_ETAG_CTRL_TAG,4,2              ; @ETAG_CTRL_TAG
	.comm	_ETAG_CTRL_UNTAG,4,2            ; @ETAG_CTRL_UNTAG
	.comm	_VAWD2,4,2                      ; @VAWD2
	.comm	_VTCR_WRITE_VLAN_ENTRY,4,2      ; @VTCR_WRITE_VLAN_ENTRY
	.no_dead_strip	_mt753x_write_vlan_entry
.subsections_via_symbols
