	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar8236_setup_port
_ar8236_setup_port:                     ## @ar8236_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	%edx, %r14d
	movl	%esi, %ebx
	movq	%rdi, %r13
	cmpq	$0, 24(%rdi)
	je	LBB0_1
## %bb.2:
	movq	(%r13), %rcx
	movq	8(%r13), %rax
	movslq	%ebx, %rsi
	movq	(%rax,%rsi,8), %rdx
	movl	16(%r13), %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	%ebx, %r12d
	jmp	LBB0_6
LBB0_3:
	movq	_AR8216_OUT_ADD_VLAN@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rcx,%rdx,4), %r12d
	movq	_AR8216_IN_SECURE@GOTPCREL(%rip), %rcx
LBB0_6:
	movl	(%rax), %r15d
	movl	(%rcx), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	callq	_AR8216_REG_PORT_CTRL
	movq	_AR8216_PORT_CTRL_LEARN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_AR8216_PORT_CTRL_VLAN_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	%esi, %edx
	movq	_AR8216_PORT_CTRL_SINGLE_VLAN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_AR8216_PORT_CTRL_STATE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_AR8216_PORT_CTRL_HEADER@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_AR8216_PORT_CTRL_LEARN_LOCK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_AR8216_PORT_CTRL_VLAN_MODE_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r15d
	orl	%esi, %r15d
	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	%r15d, %ebx
	movq	%r13, %rdi
	movl	%eax, %esi
	movl	%ebx, %ecx
	callq	_ar8xxx_rmw
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_AR8236_REG_PORT_VLAN
	movq	_AR8236_PORT_VLAN_DEFAULT_ID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_AR8236_PORT_VLAN_DEFAULT_ID_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r12d
	movq	%r13, %rdi
	movl	%eax, %esi
	movl	%r12d, %ecx
	callq	_ar8xxx_rmw
	movl	%ebx, %edi
	callq	_AR8236_REG_PORT_VLAN2
	movq	_AR8236_PORT_VLAN2_VLAN_MODE@GOTPCREL(%rip), %rsi
	movq	_AR8236_PORT_VLAN2_VLAN_MODE_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	_AR8236_PORT_VLAN2_MEMBER@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	shll	%cl, %edi
	orl	(%rsi), %edx
	movq	_AR8236_PORT_VLAN2_MEMBER_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r14d
	orl	%edi, %r14d
	movq	%r13, %rdi
	movl	%eax, %esi
	movl	%r14d, %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_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_HEADER,4,2    ## @AR8216_PORT_CTRL_HEADER
	.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	_AR8236_PORT_VLAN_DEFAULT_ID,4,2 ## @AR8236_PORT_VLAN_DEFAULT_ID
	.comm	_AR8236_PORT_VLAN_DEFAULT_ID_S,4,2 ## @AR8236_PORT_VLAN_DEFAULT_ID_S
	.comm	_AR8236_PORT_VLAN2_VLAN_MODE,4,2 ## @AR8236_PORT_VLAN2_VLAN_MODE
	.comm	_AR8236_PORT_VLAN2_MEMBER,4,2   ## @AR8236_PORT_VLAN2_MEMBER
	.comm	_AR8236_PORT_VLAN2_VLAN_MODE_S,4,2 ## @AR8236_PORT_VLAN2_VLAN_MODE_S
	.comm	_AR8236_PORT_VLAN2_MEMBER_S,4,2 ## @AR8236_PORT_VLAN2_MEMBER_S
	.no_dead_strip	_ar8236_setup_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar8236_setup_port
_ar8236_setup_port:                     ; @ar8236_setup_port
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	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	w23, [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	x23, x21
LBB0_3:
	ldr	w24, [x9]
	ldr	w22, [x8]
	mov	x0, x21
	bl	_AR8216_REG_PORT_CTRL
	mov	x1, x0
Lloh10:
	adrp	x8, _AR8216_PORT_CTRL_LEARN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AR8216_PORT_CTRL_LEARN@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _AR8216_PORT_CTRL_VLAN_MODE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AR8216_PORT_CTRL_VLAN_MODE@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w9, w9, w8
Lloh16:
	adrp	x10, _AR8216_PORT_CTRL_SINGLE_VLAN@GOTPAGE
Lloh17:
	ldr	x10, [x10, _AR8216_PORT_CTRL_SINGLE_VLAN@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
Lloh19:
	adrp	x11, _AR8216_PORT_CTRL_STATE@GOTPAGE
Lloh20:
	ldr	x11, [x11, _AR8216_PORT_CTRL_STATE@GOTPAGEOFF]
	orr	w9, w9, w10
Lloh21:
	ldr	w10, [x11]
	orr	w9, w9, w10
Lloh22:
	adrp	x10, _AR8216_PORT_CTRL_HEADER@GOTPAGE
Lloh23:
	ldr	x10, [x10, _AR8216_PORT_CTRL_HEADER@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
	orr	w9, w9, w10
Lloh25:
	adrp	x10, _AR8216_PORT_CTRL_LEARN_LOCK@GOTPAGE
Lloh26:
	ldr	x10, [x10, _AR8216_PORT_CTRL_LEARN_LOCK@GOTPAGEOFF]
Lloh27:
	ldr	w10, [x10]
Lloh28:
	adrp	x11, _AR8216_PORT_CTRL_VLAN_MODE_S@GOTPAGE
Lloh29:
	ldr	x11, [x11, _AR8216_PORT_CTRL_VLAN_MODE_S@GOTPAGEOFF]
	orr	w2, w9, w10
Lloh30:
	ldr	w9, [x11]
	lsl	w9, w24, w9
	orr	w8, w9, w8
Lloh31:
	adrp	x9, _AR8216_PORT_STATE_FORWARD@GOTPAGE
Lloh32:
	ldr	x9, [x9, _AR8216_PORT_STATE_FORWARD@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
Lloh34:
	adrp	x10, _AR8216_PORT_CTRL_STATE_S@GOTPAGE
Lloh35:
	ldr	x10, [x10, _AR8216_PORT_CTRL_STATE_S@GOTPAGEOFF]
Lloh36:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w3, w8, w9
	mov	x0, x19
	bl	_ar8xxx_rmw
	mov	x0, x21
	bl	_AR8236_REG_PORT_VLAN
	mov	x1, x0
Lloh37:
	adrp	x8, _AR8236_PORT_VLAN_DEFAULT_ID@GOTPAGE
Lloh38:
	ldr	x8, [x8, _AR8236_PORT_VLAN_DEFAULT_ID@GOTPAGEOFF]
Lloh39:
	ldr	w2, [x8]
Lloh40:
	adrp	x8, _AR8236_PORT_VLAN_DEFAULT_ID_S@GOTPAGE
Lloh41:
	ldr	x8, [x8, _AR8236_PORT_VLAN_DEFAULT_ID_S@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	lsl	w3, w23, w8
	mov	x0, x19
	bl	_ar8xxx_rmw
	mov	x0, x21
	bl	_AR8236_REG_PORT_VLAN2
	mov	x1, x0
Lloh43:
	adrp	x8, _AR8236_PORT_VLAN2_VLAN_MODE@GOTPAGE
Lloh44:
	ldr	x8, [x8, _AR8236_PORT_VLAN2_VLAN_MODE@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
Lloh46:
	adrp	x9, _AR8236_PORT_VLAN2_MEMBER@GOTPAGE
Lloh47:
	ldr	x9, [x9, _AR8236_PORT_VLAN2_MEMBER@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
Lloh49:
	adrp	x10, _AR8236_PORT_VLAN2_VLAN_MODE_S@GOTPAGE
Lloh50:
	ldr	x10, [x10, _AR8236_PORT_VLAN2_VLAN_MODE_S@GOTPAGEOFF]
	orr	w2, w9, w8
Lloh51:
	ldr	w8, [x10]
	lsl	w8, w22, w8
Lloh52:
	adrp	x9, _AR8236_PORT_VLAN2_MEMBER_S@GOTPAGE
Lloh53:
	ldr	x9, [x9, _AR8236_PORT_VLAN2_MEMBER_S@GOTPAGEOFF]
Lloh54:
	ldr	w9, [x9]
	lsl	w9, w20, w9
	orr	w3, w9, w8
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 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	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.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_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_HEADER,4,2    ; @AR8216_PORT_CTRL_HEADER
	.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	_AR8236_PORT_VLAN_DEFAULT_ID,4,2 ; @AR8236_PORT_VLAN_DEFAULT_ID
	.comm	_AR8236_PORT_VLAN_DEFAULT_ID_S,4,2 ; @AR8236_PORT_VLAN_DEFAULT_ID_S
	.comm	_AR8236_PORT_VLAN2_VLAN_MODE,4,2 ; @AR8236_PORT_VLAN2_VLAN_MODE
	.comm	_AR8236_PORT_VLAN2_MEMBER,4,2   ; @AR8236_PORT_VLAN2_MEMBER
	.comm	_AR8236_PORT_VLAN2_VLAN_MODE_S,4,2 ; @AR8236_PORT_VLAN2_VLAN_MODE_S
	.comm	_AR8236_PORT_VLAN2_MEMBER_S,4,2 ; @AR8236_PORT_VLAN2_MEMBER_S
	.no_dead_strip	_ar8236_setup_port
.subsections_via_symbols
