	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __ar8216_setup_port
___ar8216_setup_port:                   ## @__ar8216_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, %edx
	movq	%rdi, %r15
	cmpq	$0, 24(%rdi)
	je	LBB0_1
## %bb.2:
	movq	(%r15), %rcx
	movq	8(%r15), %rax
	movslq	%edx, %rsi
	movq	(%rax,%rsi,8), %rdi
	movl	16(%r15), %eax
	btl	%esi, %eax
	jb	LBB0_3
## %bb.4:
	movq	_AR8216_OUT_STRIP_VLAN@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_AR8216_IN_PORT_ONLY@GOTPCREL(%rip), %rcx
	movq	_AR8216_OUT_KEEP@GOTPCREL(%rip), %rax
	movl	%edx, %r13d
	jmp	LBB0_6
LBB0_3:
	movq	_AR8216_OUT_ADD_VLAN@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rcx,%rdi,4), %r13d
	movq	_AR8216_IN_SECURE@GOTPCREL(%rip), %rcx
LBB0_6:
	movl	(%rax), %r12d
	movl	(%rcx), %r14d
	movq	_AR8216_PORT_CTRL_HEADER@GOTPCREL(%rip), %rax
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.7:
	movl	(%rax), %ebx
LBB0_8:
	movl	%edx, %edi
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	callq	_AR8216_REG_PORT_CTRL
	movq	_AR8216_PORT_CTRL_LEARN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_AR8216_PORT_CTRL_VLAN_MODE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%ecx, %edx
	movq	_AR8216_PORT_CTRL_SINGLE_VLAN@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	movq	_AR8216_PORT_CTRL_STATE@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	movq	_AR8216_PORT_CTRL_HEADER@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	movq	_AR8216_PORT_CTRL_LEARN_LOCK@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	orl	%ecx, %ebx
	movq	_AR8216_PORT_CTRL_VLAN_MODE_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r12d
	orl	%ebx, %r12d
	movq	_AR8216_PORT_STATE_FORWARD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movq	_AR8216_PORT_CTRL_STATE_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %ebx
	orl	%r12d, %ebx
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%ebx, %ecx
	callq	_ar8xxx_rmw
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_AR8216_REG_PORT_VLAN
	movq	_AR8216_PORT_VLAN_DEST_PORTS@GOTPCREL(%rip), %rcx
	movq	_AR8216_PORT_VLAN_MODE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_AR8216_PORT_VLAN_DEFAULT_ID@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_AR8216_PORT_VLAN_DEST_PORTS_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	shll	%cl, %esi
	movq	_AR8216_PORT_VLAN_MODE_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r14d
	orl	%esi, %r14d
	movq	_AR8216_PORT_VLAN_DEFAULT_ID_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r13d
	orl	%r14d, %r13d
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%r13d, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ar8xxx_rmw                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AR8216_OUT_ADD_VLAN,4,2        ## @AR8216_OUT_ADD_VLAN
	.comm	_AR8216_OUT_STRIP_VLAN,4,2      ## @AR8216_OUT_STRIP_VLAN
	.comm	_AR8216_IN_SECURE,4,2           ## @AR8216_IN_SECURE
	.comm	_AR8216_OUT_KEEP,4,2            ## @AR8216_OUT_KEEP
	.comm	_AR8216_IN_PORT_ONLY,4,2        ## @AR8216_IN_PORT_ONLY
	.comm	_AR8216_PORT_CTRL_HEADER,4,2    ## @AR8216_PORT_CTRL_HEADER
	.comm	_AR8216_PORT_CTRL_LEARN,4,2     ## @AR8216_PORT_CTRL_LEARN
	.comm	_AR8216_PORT_CTRL_VLAN_MODE,4,2 ## @AR8216_PORT_CTRL_VLAN_MODE
	.comm	_AR8216_PORT_CTRL_SINGLE_VLAN,4,2 ## @AR8216_PORT_CTRL_SINGLE_VLAN
	.comm	_AR8216_PORT_CTRL_STATE,4,2     ## @AR8216_PORT_CTRL_STATE
	.comm	_AR8216_PORT_CTRL_LEARN_LOCK,4,2 ## @AR8216_PORT_CTRL_LEARN_LOCK
	.comm	_AR8216_PORT_CTRL_VLAN_MODE_S,4,2 ## @AR8216_PORT_CTRL_VLAN_MODE_S
	.comm	_AR8216_PORT_STATE_FORWARD,4,2  ## @AR8216_PORT_STATE_FORWARD
	.comm	_AR8216_PORT_CTRL_STATE_S,4,2   ## @AR8216_PORT_CTRL_STATE_S
	.comm	_AR8216_PORT_VLAN_DEST_PORTS,4,2 ## @AR8216_PORT_VLAN_DEST_PORTS
	.comm	_AR8216_PORT_VLAN_MODE,4,2      ## @AR8216_PORT_VLAN_MODE
	.comm	_AR8216_PORT_VLAN_DEFAULT_ID,4,2 ## @AR8216_PORT_VLAN_DEFAULT_ID
	.comm	_AR8216_PORT_VLAN_DEST_PORTS_S,4,2 ## @AR8216_PORT_VLAN_DEST_PORTS_S
	.comm	_AR8216_PORT_VLAN_MODE_S,4,2    ## @AR8216_PORT_VLAN_MODE_S
	.comm	_AR8216_PORT_VLAN_DEFAULT_ID_S,4,2 ## @AR8216_PORT_VLAN_DEFAULT_ID_S
	.no_dead_strip	___ar8216_setup_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __ar8216_setup_port
___ar8216_setup_port:                   ; @__ar8216_setup_port
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_2
; %bb.1:
	ldp	x8, x9, [x19]
	ldr	x9, [x9, w21, sxtw #3]
	ldr	w22, [x8, x9, lsl #2]
	ldr	w8, [x19, #16]
	lsr	w8, w8, w21
Lloh0:
	adrp	x9, _AR8216_OUT_ADD_VLAN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AR8216_OUT_ADD_VLAN@GOTPAGEOFF]
Lloh2:
	adrp	x10, _AR8216_OUT_STRIP_VLAN@GOTPAGE
Lloh3:
	ldr	x10, [x10, _AR8216_OUT_STRIP_VLAN@GOTPAGEOFF]
	tst	w8, #0x1
	csel	x9, x10, x9, eq
Lloh4:
	adrp	x8, _AR8216_IN_SECURE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AR8216_IN_SECURE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _AR8216_IN_PORT_ONLY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AR8216_IN_PORT_ONLY@GOTPAGEOFF]
Lloh8:
	adrp	x9, _AR8216_OUT_KEEP@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AR8216_OUT_KEEP@GOTPAGEOFF]
	mov	x22, x21
LBB0_3:
	ldr	w24, [x9]
	ldr	w23, [x8]
Lloh10:
	adrp	x25, _AR8216_PORT_CTRL_HEADER@GOTPAGE
Lloh11:
	ldr	x25, [x25, _AR8216_PORT_CTRL_HEADER@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w3, #0
	csel	w26, wzr, w8, eq
	mov	x0, x21
	bl	_AR8216_REG_PORT_CTRL
	mov	x1, x0
Lloh12:
	adrp	x8, _AR8216_PORT_CTRL_LEARN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AR8216_PORT_CTRL_LEARN@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _AR8216_PORT_CTRL_VLAN_MODE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _AR8216_PORT_CTRL_VLAN_MODE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w9, w9, w8
Lloh18:
	adrp	x10, _AR8216_PORT_CTRL_SINGLE_VLAN@GOTPAGE
Lloh19:
	ldr	x10, [x10, _AR8216_PORT_CTRL_SINGLE_VLAN@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	orr	w9, w9, w10
Lloh21:
	adrp	x10, _AR8216_PORT_CTRL_STATE@GOTPAGE
Lloh22:
	ldr	x10, [x10, _AR8216_PORT_CTRL_STATE@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	orr	w9, w9, w10
	ldr	w10, [x25]
	orr	w9, w9, w10
Lloh24:
	adrp	x10, _AR8216_PORT_CTRL_LEARN_LOCK@GOTPAGE
Lloh25:
	ldr	x10, [x10, _AR8216_PORT_CTRL_LEARN_LOCK@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	orr	w2, w9, w10
Lloh27:
	adrp	x9, _AR8216_PORT_CTRL_VLAN_MODE_S@GOTPAGE
Lloh28:
	ldr	x9, [x9, _AR8216_PORT_CTRL_VLAN_MODE_S@GOTPAGEOFF]
	orr	w8, w8, w26
Lloh29:
	ldr	w9, [x9]
	lsl	w9, w24, w9
	orr	w8, w8, w9
Lloh30:
	adrp	x9, _AR8216_PORT_STATE_FORWARD@GOTPAGE
Lloh31:
	ldr	x9, [x9, _AR8216_PORT_STATE_FORWARD@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
Lloh33:
	adrp	x10, _AR8216_PORT_CTRL_STATE_S@GOTPAGE
Lloh34:
	ldr	x10, [x10, _AR8216_PORT_CTRL_STATE_S@GOTPAGEOFF]
Lloh35:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w3, w8, w9
	mov	x0, x19
	bl	_ar8xxx_rmw
	mov	x0, x21
	bl	_AR8216_REG_PORT_VLAN
	mov	x1, x0
Lloh36:
	adrp	x8, _AR8216_PORT_VLAN_DEST_PORTS@GOTPAGE
Lloh37:
	ldr	x8, [x8, _AR8216_PORT_VLAN_DEST_PORTS@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
Lloh39:
	adrp	x9, _AR8216_PORT_VLAN_MODE@GOTPAGE
Lloh40:
	ldr	x9, [x9, _AR8216_PORT_VLAN_MODE@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh42:
	adrp	x9, _AR8216_PORT_VLAN_DEFAULT_ID@GOTPAGE
Lloh43:
	ldr	x9, [x9, _AR8216_PORT_VLAN_DEFAULT_ID@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	orr	w2, w8, w9
Lloh45:
	adrp	x8, _AR8216_PORT_VLAN_DEST_PORTS_S@GOTPAGE
Lloh46:
	ldr	x8, [x8, _AR8216_PORT_VLAN_DEST_PORTS_S@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	lsl	w8, w20, w8
Lloh48:
	adrp	x9, _AR8216_PORT_VLAN_MODE_S@GOTPAGE
Lloh49:
	ldr	x9, [x9, _AR8216_PORT_VLAN_MODE_S@GOTPAGEOFF]
Lloh50:
	ldr	w9, [x9]
	lsl	w9, w23, w9
	orr	w8, w9, w8
Lloh51:
	adrp	x9, _AR8216_PORT_VLAN_DEFAULT_ID_S@GOTPAGE
Lloh52:
	ldr	x9, [x9, _AR8216_PORT_VLAN_DEFAULT_ID_S@GOTPAGEOFF]
Lloh53:
	ldr	w9, [x9]
	lsl	w9, w22, w9
	orr	w3, w8, w9
	mov	x0, x19
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_ar8xxx_rmw
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.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 AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AR8216_OUT_ADD_VLAN,4,2        ; @AR8216_OUT_ADD_VLAN
	.comm	_AR8216_OUT_STRIP_VLAN,4,2      ; @AR8216_OUT_STRIP_VLAN
	.comm	_AR8216_IN_SECURE,4,2           ; @AR8216_IN_SECURE
	.comm	_AR8216_OUT_KEEP,4,2            ; @AR8216_OUT_KEEP
	.comm	_AR8216_IN_PORT_ONLY,4,2        ; @AR8216_IN_PORT_ONLY
	.comm	_AR8216_PORT_CTRL_HEADER,4,2    ; @AR8216_PORT_CTRL_HEADER
	.comm	_AR8216_PORT_CTRL_LEARN,4,2     ; @AR8216_PORT_CTRL_LEARN
	.comm	_AR8216_PORT_CTRL_VLAN_MODE,4,2 ; @AR8216_PORT_CTRL_VLAN_MODE
	.comm	_AR8216_PORT_CTRL_SINGLE_VLAN,4,2 ; @AR8216_PORT_CTRL_SINGLE_VLAN
	.comm	_AR8216_PORT_CTRL_STATE,4,2     ; @AR8216_PORT_CTRL_STATE
	.comm	_AR8216_PORT_CTRL_LEARN_LOCK,4,2 ; @AR8216_PORT_CTRL_LEARN_LOCK
	.comm	_AR8216_PORT_CTRL_VLAN_MODE_S,4,2 ; @AR8216_PORT_CTRL_VLAN_MODE_S
	.comm	_AR8216_PORT_STATE_FORWARD,4,2  ; @AR8216_PORT_STATE_FORWARD
	.comm	_AR8216_PORT_CTRL_STATE_S,4,2   ; @AR8216_PORT_CTRL_STATE_S
	.comm	_AR8216_PORT_VLAN_DEST_PORTS,4,2 ; @AR8216_PORT_VLAN_DEST_PORTS
	.comm	_AR8216_PORT_VLAN_MODE,4,2      ; @AR8216_PORT_VLAN_MODE
	.comm	_AR8216_PORT_VLAN_DEFAULT_ID,4,2 ; @AR8216_PORT_VLAN_DEFAULT_ID
	.comm	_AR8216_PORT_VLAN_DEST_PORTS_S,4,2 ; @AR8216_PORT_VLAN_DEST_PORTS_S
	.comm	_AR8216_PORT_VLAN_MODE_S,4,2    ; @AR8216_PORT_VLAN_MODE_S
	.comm	_AR8216_PORT_VLAN_DEFAULT_ID_S,4,2 ; @AR8216_PORT_VLAN_DEFAULT_ID_S
	.no_dead_strip	___ar8216_setup_port
.subsections_via_symbols
