	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv88e6xxx_port_vlan_add
_mv88e6xxx_port_vlan_add:               ## @mv88e6xxx_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	cmpl	$0, (%rax)
	je	LBB0_15
## %bb.1:
	movq	%rdx, %r15
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movl	(%rdx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_BRIDGE_VLAN_INFO_UNTAGGED@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_BRIDGE_VLAN_INFO_PVID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	callq	_dsa_is_dsa_port
	movq	_MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNMODIFIED@GOTPCREL(%rip), %r12
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_dsa_is_cpu_port
	testq	%rax, %rax
	jne	LBB0_6
## %bb.3:
	testl	%r14d, -44(%rbp)                ## 4-byte Folded Reload
	jne	LBB0_4
## %bb.5:
	movq	_MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_TAGGED@GOTPCREL(%rip), %r12
	jmp	LBB0_6
LBB0_15:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNTAGGED@GOTPCREL(%rip), %r12
LBB0_6:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	(%r12), %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mv88e6xxx_reg_lock
	movq	8(%r15), %r12
	movq	16(%r15), %rdx
	cmpq	%rdx, %r12
	jle	LBB0_7
LBB0_11:
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, -44(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_14
## %bb.12:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	callq	_mv88e6xxx_port_set_pvid
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	16(%r15), %rcx
	leaq	L_.str.1(%rip), %rsi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_14:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mv88e6xxx_reg_unlock           ## TAILCALL
LBB0_7:
	andl	-44(%rbp), %r14d                ## 4-byte Folded Reload
	cmpl	$1, %r14d
	movl	$117, %r14d
	sbbl	$0, %r14d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	leaq	1(%r12), %rax
	movq	16(%r15), %rdx
	cmpq	%rdx, %r12
	movq	%rax, %r12
	jge	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	callq	_mv88e6xxx_port_vlan_join
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	movq	%r12, %rcx
	movl	%r14d, %r8d
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_BRIDGE_VLAN_INFO_UNTAGGED,4,2  ## @BRIDGE_VLAN_INFO_UNTAGGED
	.comm	_BRIDGE_VLAN_INFO_PVID,4,2      ## @BRIDGE_VLAN_INFO_PVID
	.comm	_MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNMODIFIED,4,2 ## @MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNMODIFIED
	.comm	_MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNTAGGED,4,2 ## @MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNTAGGED
	.comm	_MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_TAGGED,4,2 ## @MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_TAGGED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"p%d: failed to add VLAN %d%c\n"

L_.str.1:                               ## @.str.1
	.asciz	"p%d: failed to set PVID %d\n"

	.no_dead_strip	_mv88e6xxx_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 mv88e6xxx_port_vlan_add
_mv88e6xxx_port_vlan_add:               ; @mv88e6xxx_port_vlan_add
	.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
	ldr	x19, [x0, #8]
	ldr	x8, [x19]
	ldr	w8, [x8]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _BRIDGE_VLAN_INFO_UNTAGGED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BRIDGE_VLAN_INFO_UNTAGGED@GOTPAGEOFF]
	ldr	w23, [x2]
Lloh2:
	ldr	w8, [x8]
	and	w25, w8, w23
Lloh3:
	adrp	x8, _BRIDGE_VLAN_INFO_PVID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BRIDGE_VLAN_INFO_PVID@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
	bl	_dsa_is_dsa_port
	cbz	x0, LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNMODIFIED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNMODIFIED@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
	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_4:
	mov	x0, x22
	mov	x1, x20
	bl	_dsa_is_cpu_port
Lloh8:
	adrp	x8, _MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNMODIFIED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNMODIFIED@GOTPAGEOFF]
Lloh10:
	adrp	x9, _MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNTAGGED@GOTPAGE
Lloh11:
	ldr	x9, [x9, _MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNTAGGED@GOTPAGEOFF]
Lloh12:
	adrp	x10, _MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_TAGGED@GOTPAGE
Lloh13:
	ldr	x10, [x10, _MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_TAGGED@GOTPAGEOFF]
	cmp	w25, #0
	csel	x9, x10, x9, eq
	cmp	x0, #0
	csel	x8, x8, x9, ne
LBB0_5:
	and	w26, w24, w23
	ldr	w23, [x8]
	mov	x0, x19
	bl	_mv88e6xxx_reg_lock
	ldp	x24, x2, [x21, #8]
	cmp	x24, x2
	b.le	LBB0_10
LBB0_6:
	cbz	w26, LBB0_9
; %bb.7:
	mov	x0, x19
	mov	x1, x20
	bl	_mv88e6xxx_port_set_pvid
	cbz	x0, LBB0_9
; %bb.8:
	ldr	w0, [x22]
	ldr	x3, [x21, #16]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_dev_err
LBB0_9:
	mov	x0, x19
	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	_mv88e6xxx_reg_unlock
LBB0_10:
	cmp	w25, #0
	mov	w8, #116
	cinc	w27, w8, ne
Lloh16:
	adrp	x25, l_.str@PAGE
Lloh17:
	add	x25, x25, l_.str@PAGEOFF
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x8, x24, #1
	ldr	x2, [x21, #16]
	cmp	x24, x2
	mov	x24, x8
	b.ge	LBB0_6
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	x2, x24
	mov	x3, x23
	bl	_mv88e6xxx_port_vlan_join
	cbz	x0, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x22]
	str	x27, [sp]
	mov	x1, x25
	mov	x2, x20
	mov	x3, x24
	bl	_dev_err
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_BRIDGE_VLAN_INFO_UNTAGGED,4,2  ; @BRIDGE_VLAN_INFO_UNTAGGED
	.comm	_BRIDGE_VLAN_INFO_PVID,4,2      ; @BRIDGE_VLAN_INFO_PVID
	.comm	_MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNMODIFIED,4,2 ; @MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNMODIFIED
	.comm	_MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNTAGGED,4,2 ; @MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNTAGGED
	.comm	_MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_TAGGED,4,2 ; @MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_TAGGED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"p%d: failed to add VLAN %d%c\n"

l_.str.1:                               ; @.str.1
	.asciz	"p%d: failed to set PVID %d\n"

	.no_dead_strip	_mv88e6xxx_port_vlan_add
.subsections_via_symbols
