	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function port_get_link_speed
_port_get_link_speed:                   ## @port_get_link_speed
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r15
	movq	%r15, %rdi
	callq	_hw_block_intr
	movl	%eax, %esi
	cmpl	$0, 4(%rbx)
	jle	LBB0_21
## %bb.1:
	movl	%esi, -92(%rbp)                 ## 4-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movslq	(%rbx), %r14
	movq	%r14, %r13
	shlq	$5, %r13
	movq	%r14, -112(%rbp)                ## 8-byte Spill
	shlq	$4, %r14
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %ecx
	movq	%r15, %rsi
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	callq	_port_cfg_change
	movq	_media_connected@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, 24(%rbx,%r13)
	movq	-56(%rbp), %r15                 ## 8-byte Reload
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rcx
	movq	%rax, 8(%rcx,%r14)
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r12d
	addq	$32, %r13
	addq	$16, %r14
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpl	4(%rax), %r12d
	jge	LBB0_18
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	16(%r15), %rbx
	movq	_KS884X_PORT_CTRL_4_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-112(%rbp), %rax                ## 8-byte Reload
	leal	(%rax,%r12), %r14d
	movq	%r15, %rdi
	movl	%r14d, %esi
	leaq	-60(%rbp), %rcx
	callq	_port_r16
	movq	_KS884X_PORT_STATUS_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %r15d
	movl	%r14d, %esi
	leaq	-44(%rbp), %rcx
	callq	_port_r16
	movl	-44(%rbp), %eax
	movq	_PORT_STATUS_LINK_GOOD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_PORT_AUTO_NEG_COMPLETE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%ecx, %edx
	andl	%eax, %edx
	movslq	%edx, %rdx
	movslq	-60(%rbp), %rsi
	cmpq	%rsi, (%rbx,%r13)
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rdx, 8(%rbx,%r13)
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rsi, (%rbx,%r13)
	movq	%rdx, 8(%rbx,%r13)
	testl	%eax, %ecx
	je	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rbx,%r13), %rdx
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	cmoveq	%rdx, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	_TX_RATE_UNIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	movl	%eax, 16(%rbx,%r13)
	movq	_PORT_STATUS_SPEED_100MBIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -44(%rbp)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	imull	$100, (%rcx), %eax
	movl	%eax, 16(%rbx,%r13)
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, 20(%rbx,%r13)
	movq	_PORT_STATUS_FULL_DUPLEX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-44(%rbp), %eax
	cmpl	$1, %eax
	movl	$2, %eax
	sbbl	$0, %eax
	movl	%eax, 20(%rbx,%r13)
	movq	_media_connected@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	24(%rbx,%r13), %rax
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movq	_KS884X_PHY_AUTO_NEG_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	leaq	-60(%rbp), %rcx
	callq	_hw_r_phy
	movq	_KS884X_PHY_REMOTE_CAP_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	leaq	-44(%rbp), %rcx
	callq	_hw_r_phy
	movl	-60(%rbp), %edx
	movl	-44(%rbp), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, -96(%rbp)                ## 4-byte Spill
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_determine_flow_ctrl
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	cmpq	$0, 8(%rdi)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edx, %edx
	cmpl	$1, 20(%rbx,%r13)
	sete	%dl
	movq	%rdi, %r15
	movl	-96(%rbp), %esi                 ## 4-byte Reload
	callq	_port_cfg_back_pressure
	movq	%r15, %rdi
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_media_disconnected@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	24(%rbx,%r13), %rax
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rcx
	movl	$1, (%rcx,%r14)
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, 24(%rbx,%r13)
	jmp	LBB0_16
LBB0_18:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	-92(%rbp), %esi                 ## 4-byte Reload
	je	LBB0_21
## %bb.19:
	movq	_media_disconnected@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rdx), %rcx
	cmpq	24(%rcx), %rax
	jne	LBB0_21
## %bb.20:
	movq	%rdi, 8(%rdx)
LBB0_21:
	movq	%r15, %rdi
	callq	_hw_restore_intr
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KS884X_PORT_CTRL_4_OFFSET,4,2  ## @KS884X_PORT_CTRL_4_OFFSET
	.comm	_KS884X_PORT_STATUS_OFFSET,4,2  ## @KS884X_PORT_STATUS_OFFSET
	.comm	_PORT_AUTO_NEG_COMPLETE,4,2     ## @PORT_AUTO_NEG_COMPLETE
	.comm	_PORT_STATUS_LINK_GOOD,4,2      ## @PORT_STATUS_LINK_GOOD
	.comm	_TX_RATE_UNIT,4,2               ## @TX_RATE_UNIT
	.comm	_PORT_STATUS_SPEED_100MBIT,4,2  ## @PORT_STATUS_SPEED_100MBIT
	.comm	_PORT_STATUS_FULL_DUPLEX,4,2    ## @PORT_STATUS_FULL_DUPLEX
	.comm	_media_connected,8,3            ## @media_connected
	.comm	_KS884X_PHY_AUTO_NEG_OFFSET,4,2 ## @KS884X_PHY_AUTO_NEG_OFFSET
	.comm	_KS884X_PHY_REMOTE_CAP_OFFSET,4,2 ## @KS884X_PHY_REMOTE_CAP_OFFSET
	.comm	_media_disconnected,8,3         ## @media_disconnected
	.no_dead_strip	_port_get_link_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function port_get_link_speed
_port_get_link_speed:                   ; @port_get_link_speed
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	mov	x20, x0
	ldr	x19, [x0, #16]
	mov	x0, x19
	bl	_hw_block_intr
	mov	x1, x0
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.1:
	str	w1, [sp, #12]                   ; 4-byte Folded Spill
	mov	w25, #0
	mov	x24, #0
	ldrsw	x8, [x20]
	lsl	x28, x8, #5
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	lsl	x21, x8, #4
Lloh0:
	adrp	x10, _TX_RATE_UNIT@GOTPAGE
Lloh1:
	ldr	x10, [x10, _TX_RATE_UNIT@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w3, [sp, #24]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_port_cfg_change
Lloh2:
	adrp	x8, _media_connected@GOTPAGE
Lloh3:
	ldr	x8, [x8, _media_connected@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	mov	x10, x26
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	str	x8, [x27, #24]
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x19]
	add	x9, x9, x21
	str	x8, [x9, #8]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w25, w25, #1
	ldr	w8, [x20, #4]
	add	x28, x28, #32
	add	x21, x21, #16
	cmp	w25, w8
	b.ge	LBB0_18
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x26, x10
	ldr	x27, [x19, #16]
	add	x22, x27, x28
Lloh5:
	adrp	x8, _KS884X_PORT_CTRL_4_OFFSET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _KS884X_PORT_CTRL_4_OFFSET@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	add	w23, w8, w25
	add	x3, sp, #28
	mov	x0, x19
	mov	x1, x23
	bl	_port_r16
Lloh8:
	adrp	x8, _KS884X_PORT_STATUS_OFFSET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _KS884X_PORT_STATUS_OFFSET@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	add	x3, sp, #24
	mov	x0, x19
	mov	x1, x23
	bl	_port_r16
	ldp	w8, w11, [sp, #24]
                                        ; kill: def $w11 killed $w11 def $x11
	sxtw	x11, w11
Lloh11:
	adrp	x9, _PORT_AUTO_NEG_COMPLETE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PORT_AUTO_NEG_COMPLETE@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x9]
Lloh14:
	adrp	x9, _PORT_STATUS_LINK_GOOD@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PORT_STATUS_LINK_GOOD@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w10, w9, w10
	and	w10, w10, w8
	sxtw	x10, w10
	ldr	x12, [x22]
	cmp	x12, x11
	b.ne	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x12, [x22, #8]
	cmp	x12, x10
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x10, x26
	b	LBB0_5
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	stp	x11, x10, [x22]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	cmp	x24, #0
	csel	x24, x22, x24, eq
	mov	x10, x26
	ldr	w8, [x26]
	add	w8, w8, w8, lsl #2
	lsl	w8, w8, #1
	add	x27, x27, x28
	str	w8, [x27, #16]
	ldr	w8, [sp, #24]
Lloh17:
	adrp	x9, _PORT_STATUS_SPEED_100MBIT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _PORT_STATUS_SPEED_100MBIT@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x10]
	mov	w9, #100
	mul	w8, w8, w9
	str	w8, [x27, #16]
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w11, #1
	str	w11, [x27, #20]
	ldr	w8, [sp, #24]
Lloh20:
	adrp	x9, _PORT_STATUS_FULL_DUPLEX@GOTPAGE
Lloh21:
	ldr	x9, [x9, _PORT_STATUS_FULL_DUPLEX@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	cinc	w8, w11, ne
	str	w8, [x27, #20]
Lloh23:
	adrp	x8, _media_connected@GOTPAGE
Lloh24:
	ldr	x8, [x8, _media_connected@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	ldr	x9, [x27, #24]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
Lloh26:
	adrp	x8, _KS884X_PHY_AUTO_NEG_OFFSET@GOTPAGE
Lloh27:
	ldr	x8, [x8, _KS884X_PHY_AUTO_NEG_OFFSET@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	add	x3, sp, #28
	mov	x0, x19
	mov	x1, x23
	bl	_hw_r_phy
Lloh29:
	adrp	x8, _KS884X_PHY_REMOTE_CAP_OFFSET@GOTPAGE
Lloh30:
	ldr	x8, [x8, _KS884X_PHY_REMOTE_CAP_OFFSET@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	add	x3, sp, #24
	mov	x0, x19
	mov	x1, x23
	bl	_hw_r_phy
	ldp	w3, w2, [sp, #24]
	mov	x0, x19
	mov	x1, x20
	bl	_determine_flow_ctrl
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x27, #20]
	cmp	w8, #1
	cset	w2, eq
	mov	x0, x19
	mov	x1, x23
	bl	_port_cfg_back_pressure
	b	LBB0_2
LBB0_15:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh32:
	adrp	x8, _media_disconnected@GOTPAGE
Lloh33:
	ldr	x8, [x8, _media_disconnected@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	add	x9, x27, x28
	ldr	x10, [x9, #24]
	cmp	x8, x10
	b.eq	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x10, [x19]
	mov	w11, #1
	str	w11, [x10, x21]
LBB0_17:                                ;   in Loop: Header=BB0_6 Depth=1
	str	x8, [x9, #24]
	mov	x10, x26
	b	LBB0_4
LBB0_18:
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	cbz	x24, LBB0_21
; %bb.19:
Lloh35:
	adrp	x8, _media_disconnected@GOTPAGE
Lloh36:
	ldr	x8, [x8, _media_disconnected@GOTPAGEOFF]
Lloh37:
	ldr	x8, [x8]
	ldr	x9, [x20, #8]
	ldr	x9, [x9, #24]
	cmp	x8, x9
	b.ne	LBB0_21
; %bb.20:
	str	x24, [x20, #8]
LBB0_21:
	mov	x0, x19
	bl	_hw_restore_intr
	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
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_KS884X_PORT_CTRL_4_OFFSET,4,2  ; @KS884X_PORT_CTRL_4_OFFSET
	.comm	_KS884X_PORT_STATUS_OFFSET,4,2  ; @KS884X_PORT_STATUS_OFFSET
	.comm	_PORT_AUTO_NEG_COMPLETE,4,2     ; @PORT_AUTO_NEG_COMPLETE
	.comm	_PORT_STATUS_LINK_GOOD,4,2      ; @PORT_STATUS_LINK_GOOD
	.comm	_TX_RATE_UNIT,4,2               ; @TX_RATE_UNIT
	.comm	_PORT_STATUS_SPEED_100MBIT,4,2  ; @PORT_STATUS_SPEED_100MBIT
	.comm	_PORT_STATUS_FULL_DUPLEX,4,2    ; @PORT_STATUS_FULL_DUPLEX
	.comm	_media_connected,8,3            ; @media_connected
	.comm	_KS884X_PHY_AUTO_NEG_OFFSET,4,2 ; @KS884X_PHY_AUTO_NEG_OFFSET
	.comm	_KS884X_PHY_REMOTE_CAP_OFFSET,4,2 ; @KS884X_PHY_REMOTE_CAP_OFFSET
	.comm	_media_disconnected,8,3         ; @media_disconnected
	.no_dead_strip	_port_get_link_speed
.subsections_via_symbols
