	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8367_set_vlan_4k
_rtl8367_set_vlan_4k:                   ## @rtl8367_set_vlan_4k
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_RTL8367_TA_VLAN_DATA_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movl	(%r15), %eax
	movq	_RTL8367_NUM_VIDS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_4
## %bb.1:
	movl	4(%r15), %ecx
	movq	_RTL8367_TA_VLAN_MEMBER_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	%esi, %ecx
	jg	LBB0_4
## %bb.2:
	movl	8(%r15), %eax
	movq	_RTL8367_UNTAG_MASK@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	jg	LBB0_4
## %bb.3:
	movl	12(%r15), %edx
	movq	_RTL8367_FIDMAX@GOTPCREL(%rip), %rdi
	cmpl	(%rdi), %edx
	jle	LBB0_5
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_11
## %bb.10:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	andl	%ecx, %esi
	movq	_RTL8367_TA_VLAN_MEMBER_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	movl	%esi, (%r12)
	movq	_RTL8367_TA_VLAN_FID_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edx
	movq	_RTL8367_TA_VLAN_FID_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movq	_RTL8367_TA_VLAN_UNTAG1_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	andl	%eax, %esi
	movq	_RTL8367_TA_VLAN_UNTAG1_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	movl	%edx, 4(%r12)
	movl	%esi, 8(%r12)
	sarl	$2, %eax
	movq	_RTL8367_TA_VLAN_UNTAG2_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_RTL8367_TA_VLAN_UNTAG2_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movl	%eax, 12(%r12)
	movq	%r12, %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_RTL8367_TA_DATA_REG
	movl	(%r12,%rbx,4), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_REG_WR
	incq	%rbx
	movq	%r12, %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_8:
	movq	_RTL8367_TA_ADDR_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RTL8367_TA_VLAN_VID_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	(%r15), %edx
	movq	%r14, %rdi
	callq	_REG_WR
	movq	_RTL8367_TA_CTRL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RTL8367_TA_CTRL_CVLAN_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_REG_WR
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RTL8367_TA_VLAN_DATA_SIZE,4,2  ## @RTL8367_TA_VLAN_DATA_SIZE
	.comm	_RTL8367_NUM_VIDS,4,2           ## @RTL8367_NUM_VIDS
	.comm	_RTL8367_TA_VLAN_MEMBER_MASK,4,2 ## @RTL8367_TA_VLAN_MEMBER_MASK
	.comm	_RTL8367_UNTAG_MASK,4,2         ## @RTL8367_UNTAG_MASK
	.comm	_RTL8367_FIDMAX,4,2             ## @RTL8367_FIDMAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RTL8367_TA_VLAN_MEMBER_SHIFT,4,2 ## @RTL8367_TA_VLAN_MEMBER_SHIFT
	.comm	_RTL8367_TA_VLAN_FID_MASK,4,2   ## @RTL8367_TA_VLAN_FID_MASK
	.comm	_RTL8367_TA_VLAN_FID_SHIFT,4,2  ## @RTL8367_TA_VLAN_FID_SHIFT
	.comm	_RTL8367_TA_VLAN_UNTAG1_MASK,4,2 ## @RTL8367_TA_VLAN_UNTAG1_MASK
	.comm	_RTL8367_TA_VLAN_UNTAG1_SHIFT,4,2 ## @RTL8367_TA_VLAN_UNTAG1_SHIFT
	.comm	_RTL8367_TA_VLAN_UNTAG2_MASK,4,2 ## @RTL8367_TA_VLAN_UNTAG2_MASK
	.comm	_RTL8367_TA_VLAN_UNTAG2_SHIFT,4,2 ## @RTL8367_TA_VLAN_UNTAG2_SHIFT
	.comm	_RTL8367_TA_ADDR_REG,4,2        ## @RTL8367_TA_ADDR_REG
	.comm	_RTL8367_TA_VLAN_VID_MASK,4,2   ## @RTL8367_TA_VLAN_VID_MASK
	.comm	_RTL8367_TA_CTRL_REG,4,2        ## @RTL8367_TA_CTRL_REG
	.comm	_RTL8367_TA_CTRL_CVLAN_WRITE,4,2 ## @RTL8367_TA_CTRL_CVLAN_WRITE
	.no_dead_strip	_rtl8367_set_vlan_4k
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8367_set_vlan_4k
_rtl8367_set_vlan_4k:                   ; @rtl8367_set_vlan_4k
	.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
	sub	sp, sp, #16
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _RTL8367_TA_VLAN_DATA_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RTL8367_TA_VLAN_DATA_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	ldr	w8, [x1]
Lloh8:
	adrp	x9, _RTL8367_NUM_VIDS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _RTL8367_NUM_VIDS@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_4
; %bb.1:
	ldr	w9, [x20, #4]
Lloh11:
	adrp	x8, _RTL8367_TA_VLAN_MEMBER_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RTL8367_TA_VLAN_MEMBER_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x8]
	cmp	w9, w10
	b.gt	LBB0_4
; %bb.2:
	ldr	w8, [x20, #8]
Lloh14:
	adrp	x11, _RTL8367_UNTAG_MASK@GOTPAGE
Lloh15:
	ldr	x11, [x11, _RTL8367_UNTAG_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w11, [x11]
	cmp	w8, w11
	b.gt	LBB0_4
; %bb.3:
	ldr	w11, [x20, #12]
Lloh17:
	adrp	x12, _RTL8367_FIDMAX@GOTPAGE
Lloh18:
	ldr	x12, [x12, _RTL8367_FIDMAX@GOTPAGEOFF]
Lloh19:
	ldr	w12, [x12]
	cmp	w11, w12
	b.le	LBB0_7
LBB0_4:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldur	x8, [x29, #-40]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.6:
	sub	sp, x29, #32
	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
LBB0_7:
	and	w9, w10, w9
Lloh26:
	adrp	x10, _RTL8367_TA_VLAN_MEMBER_SHIFT@GOTPAGE
Lloh27:
	ldr	x10, [x10, _RTL8367_TA_VLAN_MEMBER_SHIFT@GOTPAGEOFF]
Lloh28:
	ldr	w10, [x10]
	lsl	w9, w9, w10
Lloh29:
	adrp	x10, _RTL8367_TA_VLAN_FID_MASK@GOTPAGE
Lloh30:
	ldr	x10, [x10, _RTL8367_TA_VLAN_FID_MASK@GOTPAGEOFF]
Lloh31:
	ldr	w10, [x10]
	and	w10, w10, w11
Lloh32:
	adrp	x11, _RTL8367_TA_VLAN_FID_SHIFT@GOTPAGE
Lloh33:
	ldr	x11, [x11, _RTL8367_TA_VLAN_FID_SHIFT@GOTPAGEOFF]
Lloh34:
	ldr	w11, [x11]
	lsl	w10, w10, w11
	stp	w9, w10, [x21]
Lloh35:
	adrp	x9, _RTL8367_TA_VLAN_UNTAG1_MASK@GOTPAGE
Lloh36:
	ldr	x9, [x9, _RTL8367_TA_VLAN_UNTAG1_MASK@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	and	w9, w9, w8
Lloh38:
	adrp	x10, _RTL8367_TA_VLAN_UNTAG1_SHIFT@GOTPAGE
Lloh39:
	ldr	x10, [x10, _RTL8367_TA_VLAN_UNTAG1_SHIFT@GOTPAGEOFF]
Lloh40:
	ldr	w10, [x10]
	lsl	w9, w9, w10
Lloh41:
	adrp	x10, _RTL8367_TA_VLAN_UNTAG2_MASK@GOTPAGE
Lloh42:
	ldr	x10, [x10, _RTL8367_TA_VLAN_UNTAG2_MASK@GOTPAGEOFF]
Lloh43:
	ldr	w10, [x10]
	and	w8, w10, w8, asr #2
Lloh44:
	adrp	x10, _RTL8367_TA_VLAN_UNTAG2_SHIFT@GOTPAGE
Lloh45:
	ldr	x10, [x10, _RTL8367_TA_VLAN_UNTAG2_SHIFT@GOTPAGEOFF]
Lloh46:
	ldr	w10, [x10]
	lsl	w8, w8, w10
	stp	w9, w8, [x21, #8]
	mov	x0, x21
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x22, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_RTL8367_TA_DATA_REG
	mov	x1, x0
	ldr	w2, [x21, x22, lsl #2]
	mov	x0, x19
	bl	_REG_WR
	add	x22, x22, #1
	mov	x0, x21
	bl	_ARRAY_SIZE
	cmp	x22, w0, sxtw
	b.lt	LBB0_9
LBB0_10:
Lloh47:
	adrp	x8, _RTL8367_TA_ADDR_REG@GOTPAGE
Lloh48:
	ldr	x8, [x8, _RTL8367_TA_ADDR_REG@GOTPAGEOFF]
Lloh49:
	ldr	w1, [x8]
	ldr	w8, [x20]
Lloh50:
	adrp	x9, _RTL8367_TA_VLAN_VID_MASK@GOTPAGE
Lloh51:
	ldr	x9, [x9, _RTL8367_TA_VLAN_VID_MASK@GOTPAGEOFF]
Lloh52:
	ldr	w9, [x9]
	and	w2, w9, w8
	mov	x0, x19
	bl	_REG_WR
Lloh53:
	adrp	x8, _RTL8367_TA_CTRL_REG@GOTPAGE
Lloh54:
	ldr	x8, [x8, _RTL8367_TA_CTRL_REG@GOTPAGEOFF]
Lloh55:
	ldr	w1, [x8]
Lloh56:
	adrp	x8, _RTL8367_TA_CTRL_CVLAN_WRITE@GOTPAGE
Lloh57:
	ldr	x8, [x8, _RTL8367_TA_CTRL_CVLAN_WRITE@GOTPAGEOFF]
Lloh58:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_WR
	mov	w0, #0
	b	LBB0_5
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_RTL8367_TA_VLAN_DATA_SIZE,4,2  ; @RTL8367_TA_VLAN_DATA_SIZE
	.comm	_RTL8367_NUM_VIDS,4,2           ; @RTL8367_NUM_VIDS
	.comm	_RTL8367_TA_VLAN_MEMBER_MASK,4,2 ; @RTL8367_TA_VLAN_MEMBER_MASK
	.comm	_RTL8367_UNTAG_MASK,4,2         ; @RTL8367_UNTAG_MASK
	.comm	_RTL8367_FIDMAX,4,2             ; @RTL8367_FIDMAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RTL8367_TA_VLAN_MEMBER_SHIFT,4,2 ; @RTL8367_TA_VLAN_MEMBER_SHIFT
	.comm	_RTL8367_TA_VLAN_FID_MASK,4,2   ; @RTL8367_TA_VLAN_FID_MASK
	.comm	_RTL8367_TA_VLAN_FID_SHIFT,4,2  ; @RTL8367_TA_VLAN_FID_SHIFT
	.comm	_RTL8367_TA_VLAN_UNTAG1_MASK,4,2 ; @RTL8367_TA_VLAN_UNTAG1_MASK
	.comm	_RTL8367_TA_VLAN_UNTAG1_SHIFT,4,2 ; @RTL8367_TA_VLAN_UNTAG1_SHIFT
	.comm	_RTL8367_TA_VLAN_UNTAG2_MASK,4,2 ; @RTL8367_TA_VLAN_UNTAG2_MASK
	.comm	_RTL8367_TA_VLAN_UNTAG2_SHIFT,4,2 ; @RTL8367_TA_VLAN_UNTAG2_SHIFT
	.comm	_RTL8367_TA_ADDR_REG,4,2        ; @RTL8367_TA_ADDR_REG
	.comm	_RTL8367_TA_VLAN_VID_MASK,4,2   ; @RTL8367_TA_VLAN_VID_MASK
	.comm	_RTL8367_TA_CTRL_REG,4,2        ; @RTL8367_TA_CTRL_REG
	.comm	_RTL8367_TA_CTRL_CVLAN_WRITE,4,2 ; @RTL8367_TA_CTRL_CVLAN_WRITE
	.no_dead_strip	_rtl8367_set_vlan_4k
.subsections_via_symbols
