	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8366s_get_vlan_mc
_rtl8366s_get_vlan_mc:                  ## @rtl8366s_get_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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	xorl	%ebx, %ebx
	movq	%rdx, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	_RTL8366S_NUM_VLANS@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	jle	LBB0_6
## %bb.1:
	movq	%r12, %rdi
	callq	_RTL8366S_VLAN_MC_BASE
	leaq	-64(%rbp), %rdx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_rtl8366_smi_read_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movq	%r12, %rdi
	callq	_RTL8366S_VLAN_MC_BASE
	leaq	1(%rax), %rsi
	leaq	-56(%rbp), %rdx
	movq	%r15, %rdi
	callq	_rtl8366_smi_read_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	-64(%rbp), %rax
	movq	_RTL8366S_VLAN_VID_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andq	%rax, %rcx
	movq	%rcx, 32(%r14)
	movq	_RTL8366S_VLAN_PRIORITY_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarq	%cl, %rax
	movq	_RTL8366S_VLAN_PRIORITY_MASK@GOTPCREL(%rip), %rcx
	andq	(%rcx), %rax
	movq	%rax, 24(%r14)
	movq	-56(%rbp), %rax
	movq	_RTL8366S_VLAN_UNTAG_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	%rax, %rdx
	sarq	%cl, %rdx
	movq	_RTL8366S_VLAN_UNTAG_MASK@GOTPCREL(%rip), %rcx
	andq	(%rcx), %rdx
	movq	%rdx, 16(%r14)
	movq	_RTL8366S_VLAN_MEMBER_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andq	%rax, %rcx
	movq	%rcx, 8(%r14)
	movq	_RTL8366S_VLAN_FID_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarq	%cl, %rax
	movq	_RTL8366S_VLAN_FID_MASK@GOTPCREL(%rip), %rcx
	andq	(%rcx), %rax
	movq	%rax, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_4
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_7
## %bb.5:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RTL8366S_NUM_VLANS,8,3         ## @RTL8366S_NUM_VLANS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RTL8366S_VLAN_VID_MASK,8,3     ## @RTL8366S_VLAN_VID_MASK
	.comm	_RTL8366S_VLAN_PRIORITY_SHIFT,8,3 ## @RTL8366S_VLAN_PRIORITY_SHIFT
	.comm	_RTL8366S_VLAN_PRIORITY_MASK,8,3 ## @RTL8366S_VLAN_PRIORITY_MASK
	.comm	_RTL8366S_VLAN_UNTAG_SHIFT,8,3  ## @RTL8366S_VLAN_UNTAG_SHIFT
	.comm	_RTL8366S_VLAN_UNTAG_MASK,8,3   ## @RTL8366S_VLAN_UNTAG_MASK
	.comm	_RTL8366S_VLAN_MEMBER_MASK,8,3  ## @RTL8366S_VLAN_MEMBER_MASK
	.comm	_RTL8366S_VLAN_FID_SHIFT,8,3    ## @RTL8366S_VLAN_FID_SHIFT
	.comm	_RTL8366S_VLAN_FID_MASK,8,3     ## @RTL8366S_VLAN_FID_MASK
	.no_dead_strip	_rtl8366s_get_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_get_vlan_mc
_rtl8366s_get_vlan_mc:                  ; @rtl8366s_get_vlan_mc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	mov	x0, x2
	mov	w1, #0
	mov	w2, #40
	bl	_memset
Lloh3:
	adrp	x8, _RTL8366S_NUM_VLANS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RTL8366S_NUM_VLANS@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x21
	b.le	LBB0_4
; %bb.1:
	mov	x0, x21
	bl	_RTL8366S_VLAN_MC_BASE
	mov	x1, x0
	add	x22, sp, #8
	add	x2, sp, #8
	mov	x0, x20
	bl	_rtl8366_smi_read_reg
	cbnz	w0, LBB0_5
; %bb.2:
	mov	x0, x21
	bl	_RTL8366S_VLAN_MC_BASE
	add	x1, x0, #1
	add	x2, x22, #8
	mov	x0, x20
	bl	_rtl8366_smi_read_reg
	cbnz	w0, LBB0_5
; %bb.3:
Lloh6:
	adrp	x8, _RTL8366S_VLAN_VID_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RTL8366S_VLAN_VID_MASK@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldp	x9, x10, [sp, #8]
	and	x8, x8, x9
	str	x8, [x19, #32]
Lloh9:
	adrp	x8, _RTL8366S_VLAN_PRIORITY_SHIFT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RTL8366S_VLAN_PRIORITY_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	asr	x8, x9, x8
Lloh12:
	adrp	x9, _RTL8366S_VLAN_PRIORITY_MASK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _RTL8366S_VLAN_PRIORITY_MASK@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	and	x8, x8, x9
Lloh15:
	adrp	x9, _RTL8366S_VLAN_UNTAG_SHIFT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _RTL8366S_VLAN_UNTAG_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	asr	x9, x10, x9
Lloh18:
	adrp	x11, _RTL8366S_VLAN_UNTAG_MASK@GOTPAGE
Lloh19:
	ldr	x11, [x11, _RTL8366S_VLAN_UNTAG_MASK@GOTPAGEOFF]
Lloh20:
	ldr	x11, [x11]
	and	x9, x9, x11
	stp	x9, x8, [x19, #16]
Lloh21:
	adrp	x8, _RTL8366S_VLAN_MEMBER_MASK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _RTL8366S_VLAN_MEMBER_MASK@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	and	x8, x8, x10
Lloh24:
	adrp	x9, _RTL8366S_VLAN_FID_SHIFT@GOTPAGE
Lloh25:
	ldr	x9, [x9, _RTL8366S_VLAN_FID_SHIFT@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	asr	x9, x10, x9
Lloh27:
	adrp	x10, _RTL8366S_VLAN_FID_MASK@GOTPAGE
Lloh28:
	ldr	x10, [x10, _RTL8366S_VLAN_FID_MASK@GOTPAGEOFF]
Lloh29:
	ldr	x10, [x10]
	and	x9, x9, x10
	stp	x9, x8, [x19]
	b	LBB0_5
LBB0_4:
Lloh30:
	adrp	x8, _EINVAL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldr	x8, [sp, #24]
Lloh33:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh34:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	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
	add	sp, sp, #80
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_RTL8366S_NUM_VLANS,8,3         ; @RTL8366S_NUM_VLANS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RTL8366S_VLAN_VID_MASK,8,3     ; @RTL8366S_VLAN_VID_MASK
	.comm	_RTL8366S_VLAN_PRIORITY_SHIFT,8,3 ; @RTL8366S_VLAN_PRIORITY_SHIFT
	.comm	_RTL8366S_VLAN_PRIORITY_MASK,8,3 ; @RTL8366S_VLAN_PRIORITY_MASK
	.comm	_RTL8366S_VLAN_UNTAG_SHIFT,8,3  ; @RTL8366S_VLAN_UNTAG_SHIFT
	.comm	_RTL8366S_VLAN_UNTAG_MASK,8,3   ; @RTL8366S_VLAN_UNTAG_MASK
	.comm	_RTL8366S_VLAN_MEMBER_MASK,8,3  ; @RTL8366S_VLAN_MEMBER_MASK
	.comm	_RTL8366S_VLAN_FID_SHIFT,8,3    ; @RTL8366S_VLAN_FID_SHIFT
	.comm	_RTL8366S_VLAN_FID_MASK,8,3     ; @RTL8366S_VLAN_FID_MASK
	.no_dead_strip	_rtl8366s_get_vlan_mc
.subsections_via_symbols
