	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar8327_init_port
_ar8327_init_port:                      ## @ar8327_init_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	_AR8216_PORT_CPU@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	cmpl	$6, %esi
	je	LBB0_1
## %bb.2:
	movq	_AR8216_PORT_STATUS_LINK_AUTO@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_1:
	leaq	4(%rax), %rcx
LBB0_3:
	cmpl	%r12d, %ebx
	cmoveq	%rax, %rcx
	movl	(%rcx), %r15d
	movl	%r12d, %edi
	callq	_AR8327_REG_PORT_STATUS
	cmpl	$6, %r12d
	je	LBB0_6
## %bb.4:
	cmpl	%r12d, %ebx
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_ar8xxx_write
	movl	$100, %edi
	callq	_msleep
	movq	_AR8216_PORT_STATUS_FLOW_CONTROL@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movl	%r12d, %edi
	callq	_AR8327_REG_PORT_STATUS
LBB0_6:
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%r15d, %edx
	callq	_ar8xxx_write
	movl	%r12d, %edi
	callq	_AR8327_REG_PORT_HEADER
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_ar8xxx_write
	movl	%r12d, %edi
	callq	_AR8327_REG_PORT_VLAN0
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_ar8xxx_write
	movq	_AR8327_PORT_VLAN1_OUT_MODE_UNTOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_AR8327_PORT_VLAN1_OUT_MODE_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movl	%r12d, %edi
	callq	_AR8327_REG_PORT_VLAN1
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_ar8xxx_write
	movq	_AR8216_PORT_STATE_FORWARD@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_AR8327_PORT_LOOKUP_STATE_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movq	_AR8327_PORT_LOOKUP_LEARN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%r12d, %edi
	callq	_AR8327_REG_PORT_LOOKUP
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ar8xxx_write                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AR8216_PORT_CPU,4,2            ## @AR8216_PORT_CPU
	.comm	_AR8216_PORT_STATUS_LINK_AUTO,4,2 ## @AR8216_PORT_STATUS_LINK_AUTO
	.comm	_AR8216_PORT_STATUS_FLOW_CONTROL,4,2 ## @AR8216_PORT_STATUS_FLOW_CONTROL
	.comm	_AR8327_PORT_VLAN1_OUT_MODE_UNTOUCH,4,2 ## @AR8327_PORT_VLAN1_OUT_MODE_UNTOUCH
	.comm	_AR8327_PORT_VLAN1_OUT_MODE_S,4,2 ## @AR8327_PORT_VLAN1_OUT_MODE_S
	.comm	_AR8327_PORT_LOOKUP_LEARN,4,2   ## @AR8327_PORT_LOOKUP_LEARN
	.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_init_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar8327_init_port
_ar8327_init_port:                      ; @ar8327_init_port
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _AR8216_PORT_CPU@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AR8216_PORT_CPU@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x9]
Lloh3:
	adrp	x9, _AR8216_PORT_STATUS_LINK_AUTO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AR8216_PORT_STATUS_LINK_AUTO@GOTPAGEOFF]
	add	x10, x8, #4
	cmp	w1, #6
	csel	x9, x10, x9, eq
	cmp	w22, w1
	csel	x8, x8, x9, eq
	ldr	w21, [x8]
	mov	x0, x1
	bl	_AR8327_REG_PORT_STATUS
	mov	x1, x0
	cmp	w20, #6
	b.eq	LBB0_3
; %bb.1:
	cmp	w22, w20
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x19
	mov	w2, #0
	bl	_ar8xxx_write
	mov	w0, #100
	bl	_msleep
Lloh5:
	adrp	x8, _AR8216_PORT_STATUS_FLOW_CONTROL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AR8216_PORT_STATUS_FLOW_CONTROL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w21, w8, w21
	mov	x0, x20
	bl	_AR8327_REG_PORT_STATUS
	mov	x1, x0
LBB0_3:
	mov	x0, x19
	mov	x2, x21
	bl	_ar8xxx_write
	mov	x0, x20
	bl	_AR8327_REG_PORT_HEADER
	mov	x1, x0
	mov	x0, x19
	mov	w2, #0
	bl	_ar8xxx_write
	mov	x0, x20
	bl	_AR8327_REG_PORT_VLAN0
	mov	x1, x0
	mov	x0, x19
	mov	w2, #0
	bl	_ar8xxx_write
Lloh8:
	adrp	x8, _AR8327_PORT_VLAN1_OUT_MODE_UNTOUCH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AR8327_PORT_VLAN1_OUT_MODE_UNTOUCH@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _AR8327_PORT_VLAN1_OUT_MODE_S@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AR8327_PORT_VLAN1_OUT_MODE_S@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	lsl	w21, w8, w9
	mov	x0, x20
	bl	_AR8327_REG_PORT_VLAN1
	mov	x1, x0
	mov	x0, x19
	mov	x2, x21
	bl	_ar8xxx_write
Lloh14:
	adrp	x8, _AR8327_PORT_LOOKUP_LEARN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AR8327_PORT_LOOKUP_LEARN@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _AR8216_PORT_STATE_FORWARD@GOTPAGE
Lloh18:
	ldr	x9, [x9, _AR8216_PORT_STATE_FORWARD@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x10, _AR8327_PORT_LOOKUP_STATE_S@GOTPAGE
Lloh21:
	ldr	x10, [x10, _AR8327_PORT_LOOKUP_STATE_S@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w21, w9, w8
	mov	x0, x20
	bl	_AR8327_REG_PORT_LOOKUP
	mov	x1, x0
	mov	x0, x19
	mov	x2, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ar8xxx_write
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_AR8216_PORT_CPU,4,2            ; @AR8216_PORT_CPU
	.comm	_AR8216_PORT_STATUS_LINK_AUTO,4,2 ; @AR8216_PORT_STATUS_LINK_AUTO
	.comm	_AR8216_PORT_STATUS_FLOW_CONTROL,4,2 ; @AR8216_PORT_STATUS_FLOW_CONTROL
	.comm	_AR8327_PORT_VLAN1_OUT_MODE_UNTOUCH,4,2 ; @AR8327_PORT_VLAN1_OUT_MODE_UNTOUCH
	.comm	_AR8327_PORT_VLAN1_OUT_MODE_S,4,2 ; @AR8327_PORT_VLAN1_OUT_MODE_S
	.comm	_AR8327_PORT_LOOKUP_LEARN,4,2   ; @AR8327_PORT_LOOKUP_LEARN
	.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_init_port
.subsections_via_symbols
