	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ksz8795_port_vlan_add
_ksz8795_port_vlan_add:                 ## @ksz8795_port_vlan_add
	.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
	movq	%rdx, %r12
	movq	_BRIDGE_VLAN_INFO_UNTAGGED@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	andl	(%rdx), %r8d
	movq	(%rdi), %r15
	movq	_P_TAG_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PORT_REMOVE_TAG@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	callq	_ksz_port_cfg
	movl	4(%r12), %ebx
	cmpl	8(%r12), %ebx
	jg	LBB0_7
## %bb.1:
	xorl	%r14d, %r14d
	leaq	-64(%rbp), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_BIT
	orl	-56(%rbp), %eax
	movl	%eax, -56(%rbp)
	movl	-60(%rbp), %edi
	movl	-44(%rbp), %edx
	movl	%eax, %esi
	movq	%r13, %rcx
	callq	_ksz8795_to_vlan
	movl	-64(%rbp), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_ksz8795_w_vlan_table
	movq	_BRIDGE_VLAN_INFO_PVID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r12), %eax
	cmovnel	%ebx, %r14d
	leal	1(%rbx), %eax
	movl	%eax, -48(%rbp)
	cmpl	8(%r12), %ebx
	movl	%eax, %ebx
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r13, %rdx
	callq	_ksz8795_r_vlan_table
	movl	-64(%rbp), %edi
	leaq	-60(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	callq	_ksz8795_from_vlan
	cmpl	$0, -44(%rbp)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, -60(%rbp)
	movl	$1, -44(%rbp)
	jmp	LBB0_4
LBB0_5:
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.6:
	movq	_REG_PORT_CTRL_VID@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	-48(%rbp), %rcx
	movq	%r15, %rdi
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_ksz_pread16
	movl	$4095, %ecx                     ## imm = 0xFFF
	andl	-48(%rbp), %ecx
	orl	%r14d, %ecx
	movl	%ecx, -48(%rbp)
	movl	(%r12), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_ksz_pwrite16
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BRIDGE_VLAN_INFO_UNTAGGED,4,2  ## @BRIDGE_VLAN_INFO_UNTAGGED
	.comm	_P_TAG_CTRL,4,2                 ## @P_TAG_CTRL
	.comm	_PORT_REMOVE_TAG,4,2            ## @PORT_REMOVE_TAG
	.comm	_BRIDGE_VLAN_INFO_PVID,4,2      ## @BRIDGE_VLAN_INFO_PVID
	.comm	_REG_PORT_CTRL_VID,4,2          ## @REG_PORT_CTRL_VID
	.no_dead_strip	_ksz8795_port_vlan_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ksz8795_port_vlan_add
_ksz8795_port_vlan_add:                 ; @ksz8795_port_vlan_add
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x21, x2
	mov	x19, x1
	ldr	w8, [x2]
Lloh0:
	adrp	x9, _BRIDGE_VLAN_INFO_UNTAGGED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BRIDGE_VLAN_INFO_UNTAGGED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w4, w9, w8
	ldr	x20, [x0]
Lloh3:
	adrp	x8, _P_TAG_CTRL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _P_TAG_CTRL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _PORT_REMOVE_TAG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PORT_REMOVE_TAG@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_ksz_port_cfg
	ldp	w22, w8, [x21, #4]
	cmp	w22, w8
	b.gt	LBB0_7
; %bb.1:
	mov	w23, #0
	mov	w24, #1
Lloh9:
	adrp	x25, _BRIDGE_VLAN_INFO_PVID@GOTPAGE
Lloh10:
	ldr	x25, [x25, _BRIDGE_VLAN_INFO_PVID@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_BIT
	ldp	w2, w8, [sp, #12]
	orr	w1, w8, w0
	str	w1, [sp, #16]
	ldr	w0, [sp, #20]
	add	x3, sp, #28
	bl	_ksz8795_to_vlan
	ldr	w2, [sp, #28]
	mov	x0, x20
	mov	x1, x22
	bl	_ksz8795_w_vlan_table
	ldr	w8, [x21]
	ldr	w9, [x25]
	tst	w9, w8
	csel	w23, w23, w22, eq
	add	w8, w22, #1
	str	w8, [sp, #24]
	ldr	w9, [x21, #8]
	cmp	w22, w9
	mov	x22, x8
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #28
	mov	x0, x20
	mov	x1, x22
	bl	_ksz8795_r_vlan_table
	ldr	w0, [sp, #28]
	add	x1, sp, #20
	add	x2, sp, #16
	add	x3, sp, #12
	bl	_ksz8795_from_vlan
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	str	w24, [sp, #20]
	str	w24, [sp, #12]
	b	LBB0_2
LBB0_5:
	cbz	w23, LBB0_7
; %bb.6:
Lloh11:
	adrp	x21, _REG_PORT_CTRL_VID@GOTPAGE
Lloh12:
	ldr	x21, [x21, _REG_PORT_CTRL_VID@GOTPAGEOFF]
	ldr	w2, [x21]
	add	x3, sp, #24
	mov	x0, x20
	mov	x1, x19
	bl	_ksz_pread16
	ldr	w8, [sp, #24]
	and	w8, w8, #0xfff
	orr	w3, w8, w23
	str	w3, [sp, #24]
	ldr	w2, [x21]
	mov	x0, x20
	mov	x1, x19
	bl	_ksz_pwrite16
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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_BRIDGE_VLAN_INFO_UNTAGGED,4,2  ; @BRIDGE_VLAN_INFO_UNTAGGED
	.comm	_P_TAG_CTRL,4,2                 ; @P_TAG_CTRL
	.comm	_PORT_REMOVE_TAG,4,2            ; @PORT_REMOVE_TAG
	.comm	_BRIDGE_VLAN_INFO_PVID,4,2      ; @BRIDGE_VLAN_INFO_PVID
	.comm	_REG_PORT_CTRL_VID,4,2          ; @REG_PORT_CTRL_VID
	.no_dead_strip	_ksz8795_port_vlan_add
.subsections_via_symbols
