	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ksz8795_config_cpu_port
_ksz8795_config_cpu_port:               ## @ksz8795_config_cpu_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
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	movl	(%r15), %eax
	incl	%eax
	movl	%eax, (%rdi)
	movq	_REG_SW_CTRL_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SW_LEGAL_PACKET_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$1, %ecx
	callq	_ksz_cfg
	movq	_S_TAIL_TAG_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SW_TAIL_TAG_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$1, %ecx
	callq	_ksz_cfg
	movq	8(%r15), %rsi
	movq	24(%r15), %rax
	movl	32(%r15), %ecx
	leaq	(%rsi,%rsi,4), %rdx
	movl	%ecx, 16(%rax,%rdx,4)
	movl	$1, (%rax,%rdx,4)
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_ksz8795_port_setup
	movl	36(%r15), %eax
	movl	%eax, 40(%r15)
	movq	_SWITCH_PORT_NUM@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_4
## %bb.1:
	movl	$16, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %r12
	movl	%ebx, %edi
	callq	_BIT
	movl	%eax, (%r12,%r13)
	movl	32(%r15), %eax
	movl	%eax, -4(%r12,%r13)
	movq	_BR_STATE_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ksz8795_port_stp_state_set
	movl	(%r15), %eax
	cmpq	%rax, %rbx
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, -16(%r12,%r13)
	incq	%rbx
	movq	_SWITCH_PORT_NUM@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$20, %r13
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_4:
	cmpl	$0, 16(%r15)
	jle	LBB0_14
## %bb.5:
	movl	$8, %r12d
	xorl	%ebx, %ebx
	movq	_PORT_FORCE_FLOW_CTRL@GOTPCREL(%rip), %r13
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	$1, (%r14,%r12)
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_P_STP_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r13), %ecx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$1, %r8d
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	callq	_ksz_port_cfg
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	movslq	16(%r15), %rax
	addq	$20, %r12
	cmpq	%rax, %rbx
	jge	LBB0_14
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %r14
	cmpl	$0, -8(%r14,%r12)
	je	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_P_REMOTE_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	leaq	-44(%rbp), %rcx
	callq	_ksz_pread8
	movq	_PORT_FIBER_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -44(%rbp)
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$0, (%r14,%r12)
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_P_STP_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r13), %ecx
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%r8d, %r8d
	jmp	LBB0_12
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_SW_CTRL_2,4,2              ## @REG_SW_CTRL_2
	.comm	_SW_LEGAL_PACKET_DISABLE,4,2    ## @SW_LEGAL_PACKET_DISABLE
	.comm	_S_TAIL_TAG_CTRL,4,2            ## @S_TAIL_TAG_CTRL
	.comm	_SW_TAIL_TAG_ENABLE,4,2         ## @SW_TAIL_TAG_ENABLE
	.comm	_SWITCH_PORT_NUM,4,2            ## @SWITCH_PORT_NUM
	.comm	_BR_STATE_DISABLED,4,2          ## @BR_STATE_DISABLED
	.comm	_P_REMOTE_STATUS,4,2            ## @P_REMOTE_STATUS
	.comm	_PORT_FIBER_MODE,4,2            ## @PORT_FIBER_MODE
	.comm	_P_STP_CTRL,4,2                 ## @P_STP_CTRL
	.comm	_PORT_FORCE_FLOW_CTRL,4,2       ## @PORT_FORCE_FLOW_CTRL
	.no_dead_strip	_ksz8795_config_cpu_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ksz8795_config_cpu_port
_ksz8795_config_cpu_port:               ; @ksz8795_config_cpu_port
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x20, x0
	ldr	x19, [x0, #8]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x0]
Lloh0:
	adrp	x8, _REG_SW_CTRL_2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_SW_CTRL_2@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _SW_LEGAL_PACKET_DISABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SW_LEGAL_PACKET_DISABLE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w21, #1
	mov	x0, x19
	mov	w3, #1
	bl	_ksz_cfg
Lloh6:
	adrp	x8, _S_TAIL_TAG_CTRL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _S_TAIL_TAG_CTRL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _SW_TAIL_TAG_ENABLE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SW_TAIL_TAG_ENABLE@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_ksz_cfg
	ldr	x8, [x19, #24]
	ldr	x1, [x19, #8]
	ldr	w9, [x19, #32]
	mov	w10, #20
	madd	x8, x1, x10, x8
	str	w9, [x8, #16]
	str	w21, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_ksz8795_port_setup
	ldr	w8, [x19, #36]
	str	w8, [x19, #40]
Lloh12:
	adrp	x22, _SWITCH_PORT_NUM@GOTPAGE
Lloh13:
	ldr	x22, [x22, _SWITCH_PORT_NUM@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x23, #0
	mov	x21, #0
Lloh14:
	adrp	x24, _BR_STATE_DISABLED@GOTPAGE
Lloh15:
	ldr	x24, [x24, _BR_STATE_DISABLED@GOTPAGEOFF]
	movi.2s	v8, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x25, [x19, #24]
	mov	x0, x21
	bl	_BIT
	add	x8, x25, x23
	ldr	w9, [x19, #32]
	stp	w9, w0, [x8, #12]
	ldr	w2, [x24]
	mov	x0, x20
	mov	x1, x21
	bl	_ksz8795_port_stp_state_set
	ldr	w8, [x19]
	cmp	x21, x8
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	str	d8, [x25, x23]
	add	x21, x21, #1
	ldrsw	x8, [x22]
	add	x23, x23, #20
	cmp	x21, x8
	b.lt	LBB0_2
LBB0_4:
	ldr	w8, [x19, #16]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.5:
	mov	x21, #0
	mov	x20, #0
Lloh16:
	adrp	x22, _P_REMOTE_STATUS@GOTPAGE
Lloh17:
	ldr	x22, [x22, _P_REMOTE_STATUS@GOTPAGEOFF]
Lloh18:
	adrp	x23, _PORT_FIBER_MODE@GOTPAGE
Lloh19:
	ldr	x23, [x23, _PORT_FIBER_MODE@GOTPAGEOFF]
Lloh20:
	adrp	x24, _P_STP_CTRL@GOTPAGE
Lloh21:
	ldr	x24, [x24, _P_STP_CTRL@GOTPAGEOFF]
	mov	w25, #1
Lloh22:
	adrp	x26, _PORT_FORCE_FLOW_CTRL@GOTPAGE
Lloh23:
	ldr	x26, [x26, _PORT_FORCE_FLOW_CTRL@GOTPAGEOFF]
	b	LBB0_10
LBB0_6:                                 ;   in Loop: Header=BB0_10 Depth=1
	str	w25, [x8, #8]
LBB0_7:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	w2, [x24]
	ldr	w3, [x26]
	mov	x0, x19
	mov	x1, x20
	mov	w4, #1
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	bl	_ksz_port_cfg
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x19, #16]
	add	x21, x21, #20
	cmp	x20, x8
	b.ge	LBB0_14
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x27, [x19, #24]
	ldr	w8, [x27, x21]
	cbz	w8, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w2, [x22]
	add	x3, sp, #12
	mov	x0, x19
	mov	x1, x20
	bl	_ksz_pread8
	ldr	w9, [sp, #12]
	ldr	w10, [x23]
	add	x8, x27, x21
	tst	w10, w9
	b.ne	LBB0_6
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x8, #8]
	cbnz	w8, LBB0_7
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w2, [x24]
	ldr	w3, [x26]
	mov	x0, x19
	mov	x1, x20
	mov	w4, #0
	b	LBB0_8
LBB0_14:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_SW_CTRL_2,4,2              ; @REG_SW_CTRL_2
	.comm	_SW_LEGAL_PACKET_DISABLE,4,2    ; @SW_LEGAL_PACKET_DISABLE
	.comm	_S_TAIL_TAG_CTRL,4,2            ; @S_TAIL_TAG_CTRL
	.comm	_SW_TAIL_TAG_ENABLE,4,2         ; @SW_TAIL_TAG_ENABLE
	.comm	_SWITCH_PORT_NUM,4,2            ; @SWITCH_PORT_NUM
	.comm	_BR_STATE_DISABLED,4,2          ; @BR_STATE_DISABLED
	.comm	_P_REMOTE_STATUS,4,2            ; @P_REMOTE_STATUS
	.comm	_PORT_FIBER_MODE,4,2            ; @PORT_FIBER_MODE
	.comm	_P_STP_CTRL,4,2                 ; @P_STP_CTRL
	.comm	_PORT_FORCE_FLOW_CTRL,4,2       ; @PORT_FORCE_FLOW_CTRL
	.no_dead_strip	_ksz8795_config_cpu_port
.subsections_via_symbols
