	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cas_pcs_link_check
_cas_pcs_link_check:                    ## @cas_pcs_link_check
	.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
	movq	%rdi, %r14
	movq	_REG_PCS_MII_STATUS@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	32(%r14), %rdi
	callq	_readl
	movl	%eax, %ebx
	movq	_PCS_MII_STATUS_LINK_STATUS@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	jne	LBB0_2
## %bb.1:
	movq	(%r12), %rdi
	addq	32(%r14), %rdi
	callq	_readl
	movl	%eax, %ebx
LBB0_2:
	movq	_PCS_MII_STATUS_AUTONEG_COMP@GOTPCREL(%rip), %rax
	movq	_PCS_MII_STATUS_REMOTE_FAULT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ebx, %eax
	notl	%eax
	testl	%eax, %ecx
	jne	LBB0_4
## %bb.3:
	movq	_link@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	40(%r14), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	callq	_netif_info
LBB0_4:
	movq	_REG_PCS_STATE_MACHINE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	32(%r14), %rdi
	callq	_readl
	movq	_PCS_SM_LINK_STATE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	movq	_SM_LINK_STATE_UP@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_5
## %bb.6:
	movq	_PCS_SM_WORD_SYNC_STATE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	(%r15), %ecx
	cmovnel	%ecx, %eax
	orl	%eax, %ebx
	jmp	LBB0_7
LBB0_5:
	movl	(%r15), %ecx
	movl	%ecx, %eax
	notl	%eax
	andl	%eax, %ebx
LBB0_7:
	movq	(%r14), %rax
	movq	_link_up@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	testl	%ebx, %ecx
	je	LBB0_11
## %bb.8:
	xorl	%ebx, %ebx
	cmpq	%rdx, %rax
	je	LBB0_27
## %bb.9:
	cmpq	$0, 48(%r14)
	je	LBB0_27
## %bb.10:
	movq	%rdx, (%r14)
	movq	_LINK_TRANSITION_LINK_UP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
	movq	%r14, %rdi
	callq	_cas_set_link_modes
	movl	40(%r14), %edi
	callq	_netif_carrier_on
	jmp	LBB0_27
LBB0_11:
	movq	_link_down@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rdx, %rax
	jne	LBB0_21
## %bb.12:
	movq	%rcx, (%r14)
	movq	_link_transition_timeout@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_16
## %bb.13:
	movq	_LINK_TRANSITION_REQUESTED_RESET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, 8(%r14)
	je	LBB0_16
## %bb.14:
	cmpl	$0, 16(%r14)
	je	LBB0_15
LBB0_16:
	movq	_LINK_TRANSITION_ON_FAILURE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
	xorl	%ebx, %ebx
LBB0_17:
	movl	40(%r14), %edi
	callq	_netif_carrier_off
	cmpq	$0, 48(%r14)
	je	LBB0_19
## %bb.18:
	movq	_link@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	40(%r14), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%r14, %rdi
	callq	_netif_info
LBB0_19:
	movq	_CAS_FLAG_REG_PLUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 20(%r14)
	jne	LBB0_27
## %bb.20:
	movq	_REG_PCS_SERDES_STATE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	32(%r14), %rdi
	callq	_readl
	movl	%eax, %ecx
	movl	$1, %eax
	cmpl	$3, %ecx
	jne	LBB0_27
	jmp	LBB0_28
LBB0_21:
	xorl	%ebx, %ebx
	cmpq	%rcx, %rax
	jne	LBB0_27
## %bb.22:
	movq	_link_transition_timeout@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_26
## %bb.23:
	movq	_LINK_TRANSITION_REQUESTED_RESET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, 8(%r14)
	je	LBB0_26
## %bb.24:
	cmpl	$0, 16(%r14)
	je	LBB0_25
LBB0_26:
	movq	_LINK_TRANSITION_STILL_FAILED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
LBB0_27:
	movl	%ebx, %eax
LBB0_28:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	%rax, 8(%r14)
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%r14)
	movl	$1, 16(%r14)
	movl	$1, %ebx
	jmp	LBB0_17
LBB0_25:
	movq	%rax, 8(%r14)
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%r14)
	movl	$1, 16(%r14)
	movl	$1, %ebx
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_PCS_MII_STATUS,8,3         ## @REG_PCS_MII_STATUS
	.comm	_PCS_MII_STATUS_LINK_STATUS,4,2 ## @PCS_MII_STATUS_LINK_STATUS
	.comm	_PCS_MII_STATUS_AUTONEG_COMP,4,2 ## @PCS_MII_STATUS_AUTONEG_COMP
	.comm	_PCS_MII_STATUS_REMOTE_FAULT,4,2 ## @PCS_MII_STATUS_REMOTE_FAULT
	.comm	_link,4,2                       ## @link
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PCS RemoteFault\n"

	.comm	_REG_PCS_STATE_MACHINE,8,3      ## @REG_PCS_STATE_MACHINE
	.comm	_PCS_SM_LINK_STATE_MASK,4,2     ## @PCS_SM_LINK_STATE_MASK
	.comm	_SM_LINK_STATE_UP,4,2           ## @SM_LINK_STATE_UP
	.comm	_PCS_SM_WORD_SYNC_STATE_MASK,4,2 ## @PCS_SM_WORD_SYNC_STATE_MASK
	.comm	_link_up,8,3                    ## @link_up
	.comm	_LINK_TRANSITION_LINK_UP,8,3    ## @LINK_TRANSITION_LINK_UP
	.comm	_link_down,8,3                  ## @link_down
	.comm	_link_transition_timeout,8,3    ## @link_transition_timeout
	.comm	_LINK_TRANSITION_REQUESTED_RESET,8,3 ## @LINK_TRANSITION_REQUESTED_RESET
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_LINK_TRANSITION_ON_FAILURE,8,3 ## @LINK_TRANSITION_ON_FAILURE
L_.str.1:                               ## @.str.1
	.asciz	"PCS link down\n"

	.comm	_CAS_FLAG_REG_PLUS,4,2          ## @CAS_FLAG_REG_PLUS
	.comm	_REG_PCS_SERDES_STATE,8,3       ## @REG_PCS_SERDES_STATE
	.comm	_LINK_TRANSITION_STILL_FAILED,8,3 ## @LINK_TRANSITION_STILL_FAILED
	.no_dead_strip	_cas_pcs_link_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cas_pcs_link_check
_cas_pcs_link_check:                    ; @cas_pcs_link_check
	.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	x19, x0
	ldr	x8, [x0, #32]
Lloh0:
	adrp	x22, _REG_PCS_MII_STATUS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _REG_PCS_MII_STATUS@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	mov	x20, x0
Lloh2:
	adrp	x21, _PCS_MII_STATUS_LINK_STATUS@GOTPAGE
Lloh3:
	ldr	x21, [x21, _PCS_MII_STATUS_LINK_STATUS@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x19, #32]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	mov	x20, x0
LBB0_2:
Lloh4:
	adrp	x8, _PCS_MII_STATUS_AUTONEG_COMP@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PCS_MII_STATUS_AUTONEG_COMP@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _PCS_MII_STATUS_REMOTE_FAULT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PCS_MII_STATUS_REMOTE_FAULT@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bics	wzr, w8, w20
	b.ne	LBB0_4
; %bb.3:
Lloh10:
	adrp	x8, _link@GOTPAGE
Lloh11:
	ldr	x8, [x8, _link@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	w2, [x19, #40]
Lloh13:
	adrp	x3, l_.str@PAGE
Lloh14:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_info
LBB0_4:
	ldr	x8, [x19, #32]
Lloh15:
	adrp	x9, _REG_PCS_STATE_MACHINE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _REG_PCS_STATE_MACHINE@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
Lloh18:
	adrp	x8, _PCS_SM_LINK_STATE_MASK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PCS_SM_LINK_STATE_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh21:
	adrp	x9, _SM_LINK_STATE_UP@GOTPAGE
Lloh22:
	ldr	x9, [x9, _SM_LINK_STATE_UP@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.5:
Lloh24:
	adrp	x8, _PCS_SM_WORD_SYNC_STATE_MASK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PCS_SM_WORD_SYNC_STATE_MASK@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x8]
	ldr	w8, [x21]
	tst	w9, w0
	csel	w9, wzr, w8, eq
	orr	w9, w20, w9
	b	LBB0_7
LBB0_6:
	ldr	w8, [x21]
	bic	w9, w20, w8
LBB0_7:
	ldr	x11, [x19]
Lloh27:
	adrp	x10, _link_up@GOTPAGE
Lloh28:
	ldr	x10, [x10, _link_up@GOTPAGEOFF]
Lloh29:
	ldr	x10, [x10]
	tst	w8, w9
	b.eq	LBB0_11
; %bb.8:
	cmp	x11, x10
	b.eq	LBB0_26
; %bb.9:
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_26
; %bb.10:
	str	x10, [x19]
Lloh30:
	adrp	x8, _LINK_TRANSITION_LINK_UP@GOTPAGE
Lloh31:
	ldr	x8, [x8, _LINK_TRANSITION_LINK_UP@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	mov	x0, x19
	bl	_cas_set_link_modes
	ldr	w0, [x19, #40]
	bl	_netif_carrier_on
	b	LBB0_26
LBB0_11:
Lloh33:
	adrp	x8, _link_down@GOTPAGE
Lloh34:
	ldr	x8, [x8, _link_down@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	cmp	x11, x10
	b.ne	LBB0_21
; %bb.12:
	str	x8, [x19]
Lloh36:
	adrp	x8, _link_transition_timeout@GOTPAGE
Lloh37:
	ldr	x8, [x8, _link_transition_timeout@GOTPAGEOFF]
Lloh38:
	ldr	x8, [x8]
	cbz	x8, LBB0_15
; %bb.13:
	ldr	x9, [x19, #8]
Lloh39:
	adrp	x8, _LINK_TRANSITION_REQUESTED_RESET@GOTPAGE
Lloh40:
	ldr	x8, [x8, _LINK_TRANSITION_REQUESTED_RESET@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
	cmp	x9, x8
	b.eq	LBB0_15
; %bb.14:
	ldr	w9, [x19, #16]
	cbz	w9, LBB0_28
LBB0_15:
	mov	w20, #0
Lloh42:
	adrp	x8, _LINK_TRANSITION_ON_FAILURE@GOTPAGE
Lloh43:
	ldr	x8, [x8, _LINK_TRANSITION_ON_FAILURE@GOTPAGEOFF]
Lloh44:
	ldr	x8, [x8]
	str	x8, [x19, #8]
LBB0_16:
	ldr	w0, [x19, #40]
	bl	_netif_carrier_off
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_18
; %bb.17:
Lloh45:
	adrp	x8, _link@GOTPAGE
Lloh46:
	ldr	x8, [x8, _link@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
	ldr	w2, [x19, #40]
Lloh48:
	adrp	x3, l_.str.1@PAGE
Lloh49:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netif_info
LBB0_18:
	ldr	w8, [x19, #20]
Lloh50:
	adrp	x9, _CAS_FLAG_REG_PLUS@GOTPAGE
Lloh51:
	ldr	x9, [x9, _CAS_FLAG_REG_PLUS@GOTPAGEOFF]
Lloh52:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_27
; %bb.19:
	ldr	x8, [x19, #32]
Lloh53:
	adrp	x9, _REG_PCS_SERDES_STATE@GOTPAGE
Lloh54:
	ldr	x9, [x9, _REG_PCS_SERDES_STATE@GOTPAGEOFF]
Lloh55:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	cmp	w0, #3
	b.ne	LBB0_27
; %bb.20:
	mov	w20, #1
	b	LBB0_27
LBB0_21:
	cmp	x11, x8
	b.ne	LBB0_26
; %bb.22:
Lloh56:
	adrp	x8, _link_transition_timeout@GOTPAGE
Lloh57:
	ldr	x8, [x8, _link_transition_timeout@GOTPAGEOFF]
Lloh58:
	ldr	x8, [x8]
	cbz	x8, LBB0_25
; %bb.23:
	ldr	x9, [x19, #8]
Lloh59:
	adrp	x8, _LINK_TRANSITION_REQUESTED_RESET@GOTPAGE
Lloh60:
	ldr	x8, [x8, _LINK_TRANSITION_REQUESTED_RESET@GOTPAGEOFF]
Lloh61:
	ldr	x8, [x8]
	cmp	x9, x8
	b.eq	LBB0_25
; %bb.24:
	ldr	w9, [x19, #16]
	cbz	w9, LBB0_29
LBB0_25:
	mov	w20, #0
Lloh62:
	adrp	x8, _LINK_TRANSITION_STILL_FAILED@GOTPAGE
Lloh63:
	ldr	x8, [x8, _LINK_TRANSITION_STILL_FAILED@GOTPAGEOFF]
Lloh64:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	b	LBB0_27
LBB0_26:
	mov	w20, #0
LBB0_27:
	mov	x0, x20
	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
	ret
LBB0_28:
	str	x8, [x19, #8]
Lloh65:
	adrp	x8, _jiffies@GOTPAGE
Lloh66:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh67:
	ldr	x8, [x8]
	str	x8, [x19, #24]
	mov	w20, #1
	str	w20, [x19, #16]
	b	LBB0_16
LBB0_29:
	str	x8, [x19, #8]
Lloh68:
	adrp	x8, _jiffies@GOTPAGE
Lloh69:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh70:
	ldr	x8, [x8]
	str	x8, [x19, #24]
	mov	w20, #1
	str	w20, [x19, #16]
	b	LBB0_27
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_PCS_MII_STATUS,8,3         ; @REG_PCS_MII_STATUS
	.comm	_PCS_MII_STATUS_LINK_STATUS,4,2 ; @PCS_MII_STATUS_LINK_STATUS
	.comm	_PCS_MII_STATUS_AUTONEG_COMP,4,2 ; @PCS_MII_STATUS_AUTONEG_COMP
	.comm	_PCS_MII_STATUS_REMOTE_FAULT,4,2 ; @PCS_MII_STATUS_REMOTE_FAULT
	.comm	_link,4,2                       ; @link
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PCS RemoteFault\n"

	.comm	_REG_PCS_STATE_MACHINE,8,3      ; @REG_PCS_STATE_MACHINE
	.comm	_PCS_SM_LINK_STATE_MASK,4,2     ; @PCS_SM_LINK_STATE_MASK
	.comm	_SM_LINK_STATE_UP,4,2           ; @SM_LINK_STATE_UP
	.comm	_PCS_SM_WORD_SYNC_STATE_MASK,4,2 ; @PCS_SM_WORD_SYNC_STATE_MASK
	.comm	_link_up,8,3                    ; @link_up
	.comm	_LINK_TRANSITION_LINK_UP,8,3    ; @LINK_TRANSITION_LINK_UP
	.comm	_link_down,8,3                  ; @link_down
	.comm	_link_transition_timeout,8,3    ; @link_transition_timeout
	.comm	_LINK_TRANSITION_REQUESTED_RESET,8,3 ; @LINK_TRANSITION_REQUESTED_RESET
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_LINK_TRANSITION_ON_FAILURE,8,3 ; @LINK_TRANSITION_ON_FAILURE
l_.str.1:                               ; @.str.1
	.asciz	"PCS link down\n"

	.comm	_CAS_FLAG_REG_PLUS,4,2          ; @CAS_FLAG_REG_PLUS
	.comm	_REG_PCS_SERDES_STATE,8,3       ; @REG_PCS_SERDES_STATE
	.comm	_LINK_TRANSITION_STILL_FAILED,8,3 ; @LINK_TRANSITION_STILL_FAILED
	.no_dead_strip	_cas_pcs_link_check
.subsections_via_symbols
