	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mv88e6xxx_port_set_8021q_mode  ## -- Begin function mv88e6xxx_port_set_8021q_mode
	.p2align	4, 0x90
_mv88e6xxx_port_set_8021q_mode:         ## @mv88e6xxx_port_set_8021q_mode
	.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	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_MV88E6XXX_PORT_CTL2@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	-40(%rbp), %rcx
	callq	_mv88e6xxx_port_read
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movq	_MV88E6XXX_PORT_CTL2_8021Q_MODE_MASK@GOTPCREL(%rip), %rax
	movq	-40(%rbp), %rdx
	movq	%r14, %rcx
	xorq	%rdx, %rcx
	andq	(%rax), %rcx
	xorq	%rdx, %rcx
	movq	%rcx, -40(%rbp)
	movl	(%r12), %edx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_mv88e6xxx_port_write
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movl	(%rbx), %edi
	movq	_mv88e6xxx_port_8021q_mode_names@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r14,4), %ecx
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_dbg
	xorl	%eax, %eax
LBB0_3:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MV88E6XXX_PORT_CTL2,4,2        ## @MV88E6XXX_PORT_CTL2
	.comm	_MV88E6XXX_PORT_CTL2_8021Q_MODE_MASK,8,3 ## @MV88E6XXX_PORT_CTL2_8021Q_MODE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"p%d: 802.1QMode set to %s\n"

	.comm	_mv88e6xxx_port_8021q_mode_names,8,3 ## @mv88e6xxx_port_8021q_mode_names
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mv88e6xxx_port_set_8021q_mode  ; -- Begin function mv88e6xxx_port_set_8021q_mode
	.p2align	2
_mv88e6xxx_port_set_8021q_mode:         ; @mv88e6xxx_port_set_8021q_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _MV88E6XXX_PORT_CTL2@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MV88E6XXX_PORT_CTL2@GOTPAGEOFF]
	ldr	w2, [x22]
	add	x3, sp, #8
	bl	_mv88e6xxx_port_read
	cbnz	w0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _MV88E6XXX_PORT_CTL2_8021Q_MODE_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MV88E6XXX_PORT_CTL2_8021Q_MODE_MASK@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	x9, [sp, #8]
	bic	x9, x9, x8
	and	x8, x8, x20
	orr	x3, x9, x8
	str	x3, [sp, #8]
	ldr	w2, [x22]
	mov	x0, x21
	mov	x1, x19
	bl	_mv88e6xxx_port_write
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	w0, [x21]
Lloh5:
	adrp	x8, _mv88e6xxx_port_8021q_mode_names@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mv88e6xxx_port_8021q_mode_names@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	w3, [x8, x20, lsl #2]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_dbg
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MV88E6XXX_PORT_CTL2,4,2        ; @MV88E6XXX_PORT_CTL2
	.comm	_MV88E6XXX_PORT_CTL2_8021Q_MODE_MASK,8,3 ; @MV88E6XXX_PORT_CTL2_8021Q_MODE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"p%d: 802.1QMode set to %s\n"

	.comm	_mv88e6xxx_port_8021q_mode_names,8,3 ; @mv88e6xxx_port_8021q_mode_names
.subsections_via_symbols
