	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __ar8216_init_port
___ar8216_init_port:                    ## @__ar8216_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	%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, %r12d
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	%esi, %edi
	callq	_AR8216_REG_PORT_CTRL
	movq	_AR8216_PORT_CTRL_STATE_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$4, %edx
	shll	%cl, %edx
	movq	_AR8216_PORT_CTRL_LEARN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_ar8xxx_write
	movl	%ebx, %edi
	callq	_AR8216_REG_PORT_VLAN
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_ar8xxx_write
	movq	_AR8216_PORT_CPU@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%ebx, %edi
	callq	_AR8216_REG_PORT_STATUS
	cmpl	%ebx, %r13d
	jne	LBB0_5
## %bb.1:
	movq	_AR8216_PORT_STATUS_LINK_UP@GOTPCREL(%rip), %rcx
	testl	%r15d, %r15d
	jne	LBB0_2
## %bb.3:
	movq	_AR8216_PORT_SPEED_100M@GOTPCREL(%rip), %rdx
	jmp	LBB0_4
LBB0_5:
	movq	_AR8216_PORT_STATUS_LINK_AUTO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	jmp	LBB0_6
LBB0_2:
	movq	_AR8216_PORT_SPEED_1000M@GOTPCREL(%rip), %rdx
LBB0_4:
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_AR8216_PORT_STATUS_TXMAC@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_AR8216_PORT_STATUS_RXMAC@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	testl	%r12d, %r12d
	movq	_AR8216_PORT_STATUS_RXFLOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmovel	%r12d, %ecx
	movq	_AR8216_PORT_STATUS_TXFLOW@GOTPCREL(%rip), %rsi
	cmovnel	(%rsi), %r12d
	orl	%ecx, %r12d
	orl	%edx, %r12d
	movq	_AR8216_PORT_STATUS_DUPLEX@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r12d
LBB0_6:
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%r12d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ar8xxx_write                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AR8216_PORT_CTRL_LEARN,4,2     ## @AR8216_PORT_CTRL_LEARN
	.comm	_AR8216_PORT_CTRL_STATE_S,4,2   ## @AR8216_PORT_CTRL_STATE_S
	.comm	_AR8216_PORT_CPU,4,2            ## @AR8216_PORT_CPU
	.comm	_AR8216_PORT_STATUS_LINK_UP,4,2 ## @AR8216_PORT_STATUS_LINK_UP
	.comm	_AR8216_PORT_SPEED_1000M,4,2    ## @AR8216_PORT_SPEED_1000M
	.comm	_AR8216_PORT_SPEED_100M,4,2     ## @AR8216_PORT_SPEED_100M
	.comm	_AR8216_PORT_STATUS_TXMAC,4,2   ## @AR8216_PORT_STATUS_TXMAC
	.comm	_AR8216_PORT_STATUS_RXMAC,4,2   ## @AR8216_PORT_STATUS_RXMAC
	.comm	_AR8216_PORT_STATUS_RXFLOW,4,2  ## @AR8216_PORT_STATUS_RXFLOW
	.comm	_AR8216_PORT_STATUS_TXFLOW,4,2  ## @AR8216_PORT_STATUS_TXFLOW
	.comm	_AR8216_PORT_STATUS_DUPLEX,4,2  ## @AR8216_PORT_STATUS_DUPLEX
	.comm	_AR8216_PORT_STATUS_LINK_AUTO,4,2 ## @AR8216_PORT_STATUS_LINK_AUTO
	.no_dead_strip	___ar8216_init_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __ar8216_init_port
___ar8216_init_port:                    ; @__ar8216_init_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, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	mov	x0, x1
	bl	_AR8216_REG_PORT_CTRL
	mov	x1, x0
Lloh0:
	adrp	x8, _AR8216_PORT_CTRL_LEARN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR8216_PORT_CTRL_LEARN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _AR8216_PORT_CTRL_STATE_S@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AR8216_PORT_CTRL_STATE_S@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	mov	w10, #4
	lsl	w9, w10, w9
	orr	w2, w9, w8
	mov	x0, x19
	bl	_ar8xxx_write
	mov	x0, x22
	bl	_AR8216_REG_PORT_VLAN
	mov	x1, x0
	mov	x0, x19
	mov	w2, #0
	bl	_ar8xxx_write
Lloh6:
	adrp	x8, _AR8216_PORT_CPU@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AR8216_PORT_CPU@GOTPAGEOFF]
Lloh8:
	ldr	w23, [x8]
	mov	x0, x22
	bl	_AR8216_REG_PORT_STATUS
	mov	x1, x0
	cmp	w23, w22
	b.ne	LBB0_2
; %bb.1:
Lloh9:
	adrp	x8, _AR8216_PORT_STATUS_LINK_UP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AR8216_PORT_STATUS_LINK_UP@GOTPAGEOFF]
Lloh11:
	adrp	x9, _AR8216_PORT_SPEED_1000M@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AR8216_PORT_SPEED_1000M@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x10, _AR8216_PORT_SPEED_100M@GOTPAGE
Lloh15:
	ldr	x10, [x10, _AR8216_PORT_SPEED_100M@GOTPAGEOFF]
	cmp	w21, #0
	csel	x9, x10, x9, eq
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh16:
	adrp	x9, _AR8216_PORT_STATUS_TXMAC@GOTPAGE
Lloh17:
	ldr	x9, [x9, _AR8216_PORT_STATUS_TXMAC@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	adrp	x10, _AR8216_PORT_STATUS_RXMAC@GOTPAGE
Lloh20:
	ldr	x10, [x10, _AR8216_PORT_STATUS_RXMAC@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh21:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh22:
	adrp	x9, _AR8216_PORT_STATUS_RXFLOW@GOTPAGE
Lloh23:
	ldr	x9, [x9, _AR8216_PORT_STATUS_RXFLOW@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	cmp	w20, #0
	csel	w9, wzr, w9, eq
	orr	w8, w8, w9
Lloh25:
	adrp	x9, _AR8216_PORT_STATUS_TXFLOW@GOTPAGE
Lloh26:
	ldr	x9, [x9, _AR8216_PORT_STATUS_TXFLOW@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	csel	w9, wzr, w9, eq
	orr	w8, w8, w9
Lloh28:
	adrp	x9, _AR8216_PORT_STATUS_DUPLEX@GOTPAGE
Lloh29:
	ldr	x9, [x9, _AR8216_PORT_STATUS_DUPLEX@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	orr	w2, w8, w9
	b	LBB0_3
LBB0_2:
Lloh31:
	adrp	x8, _AR8216_PORT_STATUS_LINK_AUTO@GOTPAGE
Lloh32:
	ldr	x8, [x8, _AR8216_PORT_STATUS_LINK_AUTO@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
LBB0_3:
	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_write
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.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 AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_AR8216_PORT_CTRL_LEARN,4,2     ; @AR8216_PORT_CTRL_LEARN
	.comm	_AR8216_PORT_CTRL_STATE_S,4,2   ; @AR8216_PORT_CTRL_STATE_S
	.comm	_AR8216_PORT_CPU,4,2            ; @AR8216_PORT_CPU
	.comm	_AR8216_PORT_STATUS_LINK_UP,4,2 ; @AR8216_PORT_STATUS_LINK_UP
	.comm	_AR8216_PORT_SPEED_1000M,4,2    ; @AR8216_PORT_SPEED_1000M
	.comm	_AR8216_PORT_SPEED_100M,4,2     ; @AR8216_PORT_SPEED_100M
	.comm	_AR8216_PORT_STATUS_TXMAC,4,2   ; @AR8216_PORT_STATUS_TXMAC
	.comm	_AR8216_PORT_STATUS_RXMAC,4,2   ; @AR8216_PORT_STATUS_RXMAC
	.comm	_AR8216_PORT_STATUS_RXFLOW,4,2  ; @AR8216_PORT_STATUS_RXFLOW
	.comm	_AR8216_PORT_STATUS_TXFLOW,4,2  ; @AR8216_PORT_STATUS_TXFLOW
	.comm	_AR8216_PORT_STATUS_DUPLEX,4,2  ; @AR8216_PORT_STATUS_DUPLEX
	.comm	_AR8216_PORT_STATUS_LINK_AUTO,4,2 ; @AR8216_PORT_STATUS_LINK_AUTO
	.no_dead_strip	___ar8216_init_port
.subsections_via_symbols
