	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8366s_set_vlan_mc
_rtl8366s_set_vlan_mc:                  ## @rtl8366s_set_vlan_mc
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_RTL8366S_NUM_VLANS@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jle	LBB0_6
## %bb.1:
	movq	(%rdx), %rax
	movq	_RTL8366S_NUM_VIDS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_6
## %bb.2:
	movq	8(%rdx), %r15
	movq	_RTL8366S_PRIORITYMAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r15
	jg	LBB0_6
## %bb.3:
	movq	16(%rdx), %r12
	movq	_RTL8366S_VLAN_MEMBER_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r13
	cmpq	%r13, %r12
	jg	LBB0_6
## %bb.4:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	24(%rdx), %rdi
	movq	_RTL8366S_VLAN_UNTAG_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	cmpq	%rsi, %rdi
	jg	LBB0_6
## %bb.5:
	movq	32(%rdx), %rdx
	movq	_RTL8366S_FIDMAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	jle	LBB0_7
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movq	_RTL8366S_VLAN_VID_MASK@GOTPCREL(%rip), %rcx
	andq	(%rcx), %rax
	movq	_RTL8366S_VLAN_PRIORITY_MASK@GOTPCREL(%rip), %rcx
	andq	(%rcx), %r15
	movq	_RTL8366S_VLAN_PRIORITY_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %r15
	orq	%rax, %r15
	movq	_RTL8366S_VLAN_UNTAG_SHIFT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_RTL8366S_VLAN_FID_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_RTL8366S_VLAN_FID_SHIFT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_RTL8366S_VLAN_MC_BASE
	movq	%r14, %rdi
	movq	%rax, %rsi
	movq	%r15, %rdx
	callq	_rtl8366_smi_write_reg
	testl	%eax, %eax
	jne	LBB0_8
## %bb.9:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	andq	-72(%rbp), %rax                 ## 8-byte Folded Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $cl killed $cl killed $rcx
	shlq	%cl, %rax
	andq	%r12, %r13
	orq	%rax, %r13
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	andq	-80(%rbp), %r15                 ## 8-byte Folded Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $cl killed $cl killed $rcx
	shlq	%cl, %r15
	orq	%r13, %r15
	movq	%rbx, %rdi
	callq	_RTL8366S_VLAN_MC_BASE
	leaq	1(%rax), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rtl8366_smi_write_reg          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RTL8366S_NUM_VLANS,8,3         ## @RTL8366S_NUM_VLANS
	.comm	_RTL8366S_NUM_VIDS,8,3          ## @RTL8366S_NUM_VIDS
	.comm	_RTL8366S_PRIORITYMAX,8,3       ## @RTL8366S_PRIORITYMAX
	.comm	_RTL8366S_VLAN_MEMBER_MASK,8,3  ## @RTL8366S_VLAN_MEMBER_MASK
	.comm	_RTL8366S_VLAN_UNTAG_MASK,8,3   ## @RTL8366S_VLAN_UNTAG_MASK
	.comm	_RTL8366S_FIDMAX,8,3            ## @RTL8366S_FIDMAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RTL8366S_VLAN_VID_MASK,8,3     ## @RTL8366S_VLAN_VID_MASK
	.comm	_RTL8366S_VLAN_PRIORITY_MASK,8,3 ## @RTL8366S_VLAN_PRIORITY_MASK
	.comm	_RTL8366S_VLAN_PRIORITY_SHIFT,8,3 ## @RTL8366S_VLAN_PRIORITY_SHIFT
	.comm	_RTL8366S_VLAN_UNTAG_SHIFT,8,3  ## @RTL8366S_VLAN_UNTAG_SHIFT
	.comm	_RTL8366S_VLAN_FID_MASK,8,3     ## @RTL8366S_VLAN_FID_MASK
	.comm	_RTL8366S_VLAN_FID_SHIFT,8,3    ## @RTL8366S_VLAN_FID_SHIFT
	.no_dead_strip	_rtl8366s_set_vlan_mc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8366s_set_vlan_mc
_rtl8366s_set_vlan_mc:                  ; @rtl8366s_set_vlan_mc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x8, _RTL8366S_NUM_VLANS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTL8366S_NUM_VLANS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	b.le	LBB0_6
; %bb.1:
	ldr	x8, [x2]
Lloh3:
	adrp	x9, _RTL8366S_NUM_VIDS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RTL8366S_NUM_VIDS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_6
; %bb.2:
	ldr	x9, [x2, #8]
Lloh6:
	adrp	x10, _RTL8366S_PRIORITYMAX@GOTPAGE
Lloh7:
	ldr	x10, [x10, _RTL8366S_PRIORITYMAX@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x9, x10
	b.gt	LBB0_6
; %bb.3:
	ldr	x22, [x2, #16]
Lloh9:
	adrp	x10, _RTL8366S_VLAN_MEMBER_MASK@GOTPAGE
Lloh10:
	ldr	x10, [x10, _RTL8366S_VLAN_MEMBER_MASK@GOTPAGEOFF]
Lloh11:
	ldr	x23, [x10]
	cmp	x22, x23
	b.gt	LBB0_6
; %bb.4:
	ldr	x24, [x2, #24]
Lloh12:
	adrp	x10, _RTL8366S_VLAN_UNTAG_MASK@GOTPAGE
Lloh13:
	ldr	x10, [x10, _RTL8366S_VLAN_UNTAG_MASK@GOTPAGEOFF]
Lloh14:
	ldr	x25, [x10]
	cmp	x24, x25
	b.gt	LBB0_6
; %bb.5:
	ldr	x26, [x2, #32]
Lloh15:
	adrp	x10, _RTL8366S_FIDMAX@GOTPAGE
Lloh16:
	ldr	x10, [x10, _RTL8366S_FIDMAX@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	cmp	x26, x10
	b.le	LBB0_8
LBB0_6:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_8:
	mov	x20, x1
	mov	x19, x0
Lloh21:
	adrp	x10, _RTL8366S_VLAN_VID_MASK@GOTPAGE
Lloh22:
	ldr	x10, [x10, _RTL8366S_VLAN_VID_MASK@GOTPAGEOFF]
Lloh23:
	ldr	x10, [x10]
	and	x8, x10, x8
Lloh24:
	adrp	x10, _RTL8366S_VLAN_PRIORITY_MASK@GOTPAGE
Lloh25:
	ldr	x10, [x10, _RTL8366S_VLAN_PRIORITY_MASK@GOTPAGEOFF]
Lloh26:
	ldr	x10, [x10]
	and	x9, x10, x9
Lloh27:
	adrp	x10, _RTL8366S_VLAN_PRIORITY_SHIFT@GOTPAGE
Lloh28:
	ldr	x10, [x10, _RTL8366S_VLAN_PRIORITY_SHIFT@GOTPAGEOFF]
Lloh29:
	ldr	x10, [x10]
	lsl	x9, x9, x10
	orr	x21, x9, x8
Lloh30:
	adrp	x8, _RTL8366S_VLAN_UNTAG_SHIFT@GOTPAGE
Lloh31:
	ldr	x8, [x8, _RTL8366S_VLAN_UNTAG_SHIFT@GOTPAGEOFF]
Lloh32:
	ldr	x28, [x8]
Lloh33:
	adrp	x8, _RTL8366S_VLAN_FID_MASK@GOTPAGE
Lloh34:
	ldr	x8, [x8, _RTL8366S_VLAN_FID_MASK@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
Lloh36:
	adrp	x8, _RTL8366S_VLAN_FID_SHIFT@GOTPAGE
Lloh37:
	ldr	x8, [x8, _RTL8366S_VLAN_FID_SHIFT@GOTPAGEOFF]
Lloh38:
	ldr	x27, [x8]
	mov	x0, x1
	bl	_RTL8366S_VLAN_MC_BASE
	mov	x1, x0
	mov	x0, x19
	mov	x2, x21
	bl	_rtl8366_smi_write_reg
	cbnz	w0, LBB0_7
; %bb.9:
	and	x8, x25, x24
	lsl	x8, x8, x28
	and	x9, x23, x22
	orr	x8, x8, x9
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	and	x9, x9, x26
	lsl	x9, x9, x27
	orr	x21, x8, x9
	mov	x0, x20
	bl	_RTL8366S_VLAN_MC_BASE
	add	x1, x0, #1
	mov	x0, x19
	mov	x2, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_rtl8366_smi_write_reg
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_RTL8366S_NUM_VLANS,8,3         ; @RTL8366S_NUM_VLANS
	.comm	_RTL8366S_NUM_VIDS,8,3          ; @RTL8366S_NUM_VIDS
	.comm	_RTL8366S_PRIORITYMAX,8,3       ; @RTL8366S_PRIORITYMAX
	.comm	_RTL8366S_VLAN_MEMBER_MASK,8,3  ; @RTL8366S_VLAN_MEMBER_MASK
	.comm	_RTL8366S_VLAN_UNTAG_MASK,8,3   ; @RTL8366S_VLAN_UNTAG_MASK
	.comm	_RTL8366S_FIDMAX,8,3            ; @RTL8366S_FIDMAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RTL8366S_VLAN_VID_MASK,8,3     ; @RTL8366S_VLAN_VID_MASK
	.comm	_RTL8366S_VLAN_PRIORITY_MASK,8,3 ; @RTL8366S_VLAN_PRIORITY_MASK
	.comm	_RTL8366S_VLAN_PRIORITY_SHIFT,8,3 ; @RTL8366S_VLAN_PRIORITY_SHIFT
	.comm	_RTL8366S_VLAN_UNTAG_SHIFT,8,3  ; @RTL8366S_VLAN_UNTAG_SHIFT
	.comm	_RTL8366S_VLAN_FID_MASK,8,3     ; @RTL8366S_VLAN_FID_MASK
	.comm	_RTL8366S_VLAN_FID_SHIFT,8,3    ; @RTL8366S_VLAN_FID_SHIFT
	.no_dead_strip	_rtl8366s_set_vlan_mc
.subsections_via_symbols
