	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar8327_setup_port
_ar8327_setup_port:                     ## @ar8327_setup_port
	.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
	movl	%esi, %r9d
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movslq	%esi, %rsi
	movq	(%rcx,%rsi,8), %rcx
	movl	(%rax,%rcx,4), %ebx
	movq	_AR8327_PORT_VLAN0_DEF_SVID_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%ebx, %eax
	shll	%cl, %eax
	movq	_AR8327_PORT_VLAN0_DEF_CVID_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %ebx
	movq	24(%rdi), %rcx
	orl	%eax, %ebx
	testq	%rcx, %rcx
	jne	LBB0_1
## %bb.2:
	movq	_AR8327_PORT_VLAN1_OUT_MODE_UNTOUCH@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_AR8327_PORT_VLAN1_OUT_MODE_UNMOD@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r13d
	movq	_AR8216_IN_PORT_ONLY@GOTPCREL(%rip), %rax
	movq	_AR8216_IN_SECURE@GOTPCREL(%rip), %r8
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_6
## %bb.4:
	movq	16(%r12), %rcx
	movl	(%rcx,%rsi,4), %esi
	testl	%esi, %esi
	je	LBB0_6
## %bb.5:
	movq	_AR8327_PORT_VLAN0_DEF_SPRI_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%esi, %edi
	shll	%cl, %edi
	orl	%ebx, %edi
	movq	_AR8327_PORT_VLAN0_DEF_CPRI_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	orl	%edi, %esi
	movl	%esi, %ebx
LBB0_6:
	movl	(%rax), %r14d
	movl	(%r8), %r15d
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movl	%r9d, %edi
	callq	_AR8327_REG_PORT_VLAN0
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_ar8xxx_write
	movq	_AR8327_PORT_VLAN1_PORT_VLAN_PROP@GOTPCREL(%rip), %rax
	movq	_AR8327_PORT_VLAN1_OUT_MODE_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r13d
	orl	(%rax), %r13d
	cmpq	$0, 24(%r12)
	je	LBB0_9
## %bb.7:
	movq	16(%r12), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	cmpl	$0, (%rax,%rcx,4)
	je	LBB0_9
## %bb.8:
	movq	_AR8327_PORT_VLAN1_VLAN_PRI_PROP@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
LBB0_9:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	testq	%rax, %rax
	cmovel	%r14d, %r15d
	movl	%edi, %r14d
	callq	_AR8327_REG_PORT_VLAN1
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	%r13d, %edx
	callq	_ar8xxx_write
	movq	_AR8327_PORT_LOOKUP_IN_MODE_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r15d
	movq	_AR8327_PORT_LOOKUP_LEARN@GOTPCREL(%rip), %rax
	movq	_AR8327_PORT_LOOKUP_STATE_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	_AR8216_PORT_STATE_FORWARD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	shll	%cl, %ebx
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	orl	(%rax), %ecx
	orl	%ecx, %ebx
	orl	%r15d, %ebx
	movl	%r14d, %edi
	callq	_AR8327_REG_PORT_LOOKUP
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ar8xxx_write                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AR8327_PORT_VLAN1_OUT_MODE_UNMOD,4,2 ## @AR8327_PORT_VLAN1_OUT_MODE_UNMOD
	.comm	_AR8216_IN_SECURE,4,2           ## @AR8216_IN_SECURE
	.comm	_AR8327_PORT_VLAN1_OUT_MODE_UNTOUCH,4,2 ## @AR8327_PORT_VLAN1_OUT_MODE_UNTOUCH
	.comm	_AR8216_IN_PORT_ONLY,4,2        ## @AR8216_IN_PORT_ONLY
	.comm	_AR8327_PORT_VLAN0_DEF_SVID_S,4,2 ## @AR8327_PORT_VLAN0_DEF_SVID_S
	.comm	_AR8327_PORT_VLAN0_DEF_CVID_S,4,2 ## @AR8327_PORT_VLAN0_DEF_CVID_S
	.comm	_AR8327_PORT_VLAN0_DEF_SPRI_S,4,2 ## @AR8327_PORT_VLAN0_DEF_SPRI_S
	.comm	_AR8327_PORT_VLAN0_DEF_CPRI_S,4,2 ## @AR8327_PORT_VLAN0_DEF_CPRI_S
	.comm	_AR8327_PORT_VLAN1_PORT_VLAN_PROP,4,2 ## @AR8327_PORT_VLAN1_PORT_VLAN_PROP
	.comm	_AR8327_PORT_VLAN1_OUT_MODE_S,4,2 ## @AR8327_PORT_VLAN1_OUT_MODE_S
	.comm	_AR8327_PORT_VLAN1_VLAN_PRI_PROP,4,2 ## @AR8327_PORT_VLAN1_VLAN_PRI_PROP
	.comm	_AR8327_PORT_LOOKUP_LEARN,4,2   ## @AR8327_PORT_LOOKUP_LEARN
	.comm	_AR8327_PORT_LOOKUP_IN_MODE_S,4,2 ## @AR8327_PORT_LOOKUP_IN_MODE_S
	.comm	_AR8216_PORT_STATE_FORWARD,4,2  ## @AR8216_PORT_STATE_FORWARD
	.comm	_AR8327_PORT_LOOKUP_STATE_S,4,2 ## @AR8327_PORT_LOOKUP_STATE_S
	.no_dead_strip	_ar8327_setup_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar8327_setup_port
_ar8327_setup_port:                     ; @ar8327_setup_port
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldp	x8, x9, [x0]
	ldr	x9, [x9, w1, sxtw #3]
	sxtw	x24, w20
	ldr	w10, [x8, x9, lsl #2]
	ldr	x23, [x0, #24]
Lloh0:
	adrp	x8, _AR8327_PORT_VLAN1_OUT_MODE_UNTOUCH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR8327_PORT_VLAN1_OUT_MODE_UNTOUCH@GOTPAGEOFF]
Lloh2:
	adrp	x9, _AR8327_PORT_VLAN1_OUT_MODE_UNMOD@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AR8327_PORT_VLAN1_OUT_MODE_UNMOD@GOTPAGEOFF]
	cmp	x23, #0
	csel	x9, x8, x9, eq
Lloh4:
	adrp	x8, _AR8216_IN_PORT_ONLY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AR8216_IN_PORT_ONLY@GOTPAGEOFF]
	ldr	w25, [x9]
Lloh6:
	adrp	x9, _AR8216_IN_SECURE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AR8216_IN_SECURE@GOTPAGEOFF]
Lloh8:
	adrp	x11, _AR8327_PORT_VLAN0_DEF_SVID_S@GOTPAGE
Lloh9:
	ldr	x11, [x11, _AR8327_PORT_VLAN0_DEF_SVID_S@GOTPAGEOFF]
Lloh10:
	ldr	w11, [x11]
	lsl	w11, w10, w11
Lloh11:
	adrp	x12, _AR8327_PORT_VLAN0_DEF_CVID_S@GOTPAGE
Lloh12:
	ldr	x12, [x12, _AR8327_PORT_VLAN0_DEF_CVID_S@GOTPAGEOFF]
Lloh13:
	ldr	w12, [x12]
	lsl	w10, w10, w12
	orr	w22, w10, w11
	cbz	x23, LBB0_3
; %bb.1:
	ldr	x10, [x19, #16]
	ldr	w10, [x10, x24, lsl #2]
	cbz	w10, LBB0_3
; %bb.2:
Lloh14:
	adrp	x11, _AR8327_PORT_VLAN0_DEF_SPRI_S@GOTPAGE
Lloh15:
	ldr	x11, [x11, _AR8327_PORT_VLAN0_DEF_SPRI_S@GOTPAGEOFF]
Lloh16:
	ldr	w11, [x11]
	lsl	w11, w10, w11
	orr	w11, w11, w22
Lloh17:
	adrp	x12, _AR8327_PORT_VLAN0_DEF_CPRI_S@GOTPAGE
Lloh18:
	ldr	x12, [x12, _AR8327_PORT_VLAN0_DEF_CPRI_S@GOTPAGEOFF]
Lloh19:
	ldr	w12, [x12]
	lsl	w10, w10, w12
	orr	w22, w11, w10
LBB0_3:
	ldr	w26, [x8]
	ldr	w27, [x9]
	mov	x0, x20
	bl	_AR8327_REG_PORT_VLAN0
	mov	x1, x0
	mov	x0, x19
	mov	x2, x22
	bl	_ar8xxx_write
Lloh20:
	adrp	x8, _AR8327_PORT_VLAN1_PORT_VLAN_PROP@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AR8327_PORT_VLAN1_PORT_VLAN_PROP@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _AR8327_PORT_VLAN1_OUT_MODE_S@GOTPAGE
Lloh24:
	ldr	x9, [x9, _AR8327_PORT_VLAN1_OUT_MODE_S@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	lsl	w9, w25, w9
	orr	w22, w9, w8
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_6
; %bb.4:
	ldr	x8, [x19, #16]
	ldr	w8, [x8, x24, lsl #2]
	cbz	w8, LBB0_6
; %bb.5:
Lloh26:
	adrp	x8, _AR8327_PORT_VLAN1_VLAN_PRI_PROP@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AR8327_PORT_VLAN1_VLAN_PRI_PROP@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	orr	w22, w8, w22
LBB0_6:
	cmp	x23, #0
	csel	w23, w26, w27, eq
	mov	x0, x20
	bl	_AR8327_REG_PORT_VLAN1
	mov	x1, x0
	mov	x0, x19
	mov	x2, x22
	bl	_ar8xxx_write
Lloh29:
	adrp	x8, _AR8327_PORT_LOOKUP_LEARN@GOTPAGE
Lloh30:
	ldr	x8, [x8, _AR8327_PORT_LOOKUP_LEARN@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
Lloh32:
	adrp	x9, _AR8327_PORT_LOOKUP_IN_MODE_S@GOTPAGE
Lloh33:
	ldr	x9, [x9, _AR8327_PORT_LOOKUP_IN_MODE_S@GOTPAGEOFF]
	orr	w8, w8, w21
Lloh34:
	ldr	w9, [x9]
	lsl	w9, w23, w9
	orr	w8, w8, w9
Lloh35:
	adrp	x9, _AR8216_PORT_STATE_FORWARD@GOTPAGE
Lloh36:
	ldr	x9, [x9, _AR8216_PORT_STATE_FORWARD@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
Lloh38:
	adrp	x10, _AR8327_PORT_LOOKUP_STATE_S@GOTPAGE
Lloh39:
	ldr	x10, [x10, _AR8327_PORT_LOOKUP_STATE_S@GOTPAGEOFF]
Lloh40:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w21, w8, w9
	mov	x0, x20
	bl	_AR8327_REG_PORT_LOOKUP
	mov	x1, x0
	mov	x0, x19
	mov	x2, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_ar8xxx_write
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_AR8327_PORT_VLAN1_OUT_MODE_UNMOD,4,2 ; @AR8327_PORT_VLAN1_OUT_MODE_UNMOD
	.comm	_AR8216_IN_SECURE,4,2           ; @AR8216_IN_SECURE
	.comm	_AR8327_PORT_VLAN1_OUT_MODE_UNTOUCH,4,2 ; @AR8327_PORT_VLAN1_OUT_MODE_UNTOUCH
	.comm	_AR8216_IN_PORT_ONLY,4,2        ; @AR8216_IN_PORT_ONLY
	.comm	_AR8327_PORT_VLAN0_DEF_SVID_S,4,2 ; @AR8327_PORT_VLAN0_DEF_SVID_S
	.comm	_AR8327_PORT_VLAN0_DEF_CVID_S,4,2 ; @AR8327_PORT_VLAN0_DEF_CVID_S
	.comm	_AR8327_PORT_VLAN0_DEF_SPRI_S,4,2 ; @AR8327_PORT_VLAN0_DEF_SPRI_S
	.comm	_AR8327_PORT_VLAN0_DEF_CPRI_S,4,2 ; @AR8327_PORT_VLAN0_DEF_CPRI_S
	.comm	_AR8327_PORT_VLAN1_PORT_VLAN_PROP,4,2 ; @AR8327_PORT_VLAN1_PORT_VLAN_PROP
	.comm	_AR8327_PORT_VLAN1_OUT_MODE_S,4,2 ; @AR8327_PORT_VLAN1_OUT_MODE_S
	.comm	_AR8327_PORT_VLAN1_VLAN_PRI_PROP,4,2 ; @AR8327_PORT_VLAN1_VLAN_PRI_PROP
	.comm	_AR8327_PORT_LOOKUP_LEARN,4,2   ; @AR8327_PORT_LOOKUP_LEARN
	.comm	_AR8327_PORT_LOOKUP_IN_MODE_S,4,2 ; @AR8327_PORT_LOOKUP_IN_MODE_S
	.comm	_AR8216_PORT_STATE_FORWARD,4,2  ; @AR8216_PORT_STATE_FORWARD
	.comm	_AR8327_PORT_LOOKUP_STATE_S,4,2 ; @AR8327_PORT_LOOKUP_STATE_S
	.no_dead_strip	_ar8327_setup_port
.subsections_via_symbols
