	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xm_check_link
_xm_check_link:                         ## @xm_check_link
	.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, %r12
	callq	_netdev_priv
	movq	%rax, %r13
	movq	40(%rax), %r15
	movl	(%rax), %r14d
	movq	_PHY_XMAC_STAT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_xm_phy_read
	movl	(%rbx), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_xm_phy_read
	movq	_PHY_ST_LSYNC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_1
## %bb.2:
	movq	8(%r13), %rcx
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_23
## %bb.3:
	movq	%r12, %rbx
	movq	_PHY_ST_AN_OVER@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	testl	%eax, (%rcx)
	je	LBB0_25
## %bb.4:
	movq	_PHY_XMAC_AUNE_LP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_xm_phy_read
	movq	_PHY_B_AN_RF@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.5:
	leaq	L_.str(%rip), %rsi
LBB0_6:
	movq	%rbx, %rdi
	callq	_netdev_notice
	jmp	LBB0_25
LBB0_1:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_xm_link_down
	xorl	%r12d, %r12d
	jmp	LBB0_25
LBB0_7:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_PHY_XMAC_RES_ABI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_xm_phy_read
	andb	$-127, %al
	cmpb	$-127, %al
	je	LBB0_8
## %bb.9:
	cmpb	$-128, %al
	jne	LBB0_26
## %bb.10:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_8:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	movl	%eax, 32(%r13)
	movq	16(%r13), %rax
	movq	_FLOW_MODE_SYMMETRIC@GOTPCREL(%rip), %rdx
	movq	_FLOW_MODE_SYM_OR_REM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	(%rdx), %rax
	movq	%rbx, %r12
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	je	LBB0_13
## %bb.12:
	cmpq	%rcx, %rax
	jne	LBB0_15
LBB0_13:
	movq	_PHY_X_P_SYM_MD@GOTPCREL(%rip), %rdx
	testl	%esi, (%rdx)
	je	LBB0_15
## %bb.14:
	movq	_FLOW_STAT_SYMMETRIC@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_15:
	cmpq	%rcx, %rax
	jne	LBB0_18
## %bb.16:
	movq	_PHY_X_RS_PAUSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%esi, %ecx
	movq	_PHY_X_P_ASYM_MD@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_18
## %bb.17:
	movq	_FLOW_STAT_REM_SEND@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_26:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_18:
	movq	_FLOW_MODE_LOC_SEND@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.19:
	movq	_PHY_X_RS_PAUSE@GOTPCREL(%rip), %rax
	andl	(%rax), %esi
	movq	_PHY_X_P_BOTH_MD@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jne	LBB0_21
## %bb.20:
	movq	_FLOW_STAT_LOC_SEND@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_21:
	movq	_FLOW_STAT_NONE@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %eax
	movl	%eax, 28(%r13)
	movq	_SPEED_1000@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r13)
LBB0_23:
	movq	%r12, %rdi
	callq	_netif_carrier_ok
	movl	$1, %r12d
	testl	%eax, %eax
	jne	LBB0_25
## %bb.24:
	movq	%r13, %rdi
	callq	_genesis_link_up
LBB0_25:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_XMAC_STAT,4,2              ## @PHY_XMAC_STAT
	.comm	_PHY_ST_LSYNC,4,2               ## @PHY_ST_LSYNC
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_PHY_ST_AN_OVER,4,2             ## @PHY_ST_AN_OVER
	.comm	_PHY_XMAC_AUNE_LP,4,2           ## @PHY_XMAC_AUNE_LP
	.comm	_PHY_B_AN_RF,4,2                ## @PHY_B_AN_RF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"remote fault\n"

	.comm	_PHY_XMAC_RES_ABI,4,2           ## @PHY_XMAC_RES_ABI
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ## @DUPLEX_HALF
L_.str.1:                               ## @.str.1
	.asciz	"duplex mismatch\n"

	.comm	_FLOW_MODE_SYMMETRIC,8,3        ## @FLOW_MODE_SYMMETRIC
	.comm	_FLOW_MODE_SYM_OR_REM,8,3       ## @FLOW_MODE_SYM_OR_REM
	.comm	_PHY_X_P_SYM_MD,4,2             ## @PHY_X_P_SYM_MD
	.comm	_FLOW_STAT_SYMMETRIC,4,2        ## @FLOW_STAT_SYMMETRIC
	.comm	_PHY_X_RS_PAUSE,4,2             ## @PHY_X_RS_PAUSE
	.comm	_PHY_X_P_ASYM_MD,4,2            ## @PHY_X_P_ASYM_MD
	.comm	_FLOW_STAT_REM_SEND,4,2         ## @FLOW_STAT_REM_SEND
	.comm	_FLOW_MODE_LOC_SEND,8,3         ## @FLOW_MODE_LOC_SEND
	.comm	_PHY_X_P_BOTH_MD,4,2            ## @PHY_X_P_BOTH_MD
	.comm	_FLOW_STAT_LOC_SEND,4,2         ## @FLOW_STAT_LOC_SEND
	.comm	_FLOW_STAT_NONE,4,2             ## @FLOW_STAT_NONE
	.comm	_SPEED_1000,4,2                 ## @SPEED_1000
	.no_dead_strip	_xm_check_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xm_check_link
_xm_check_link:                         ; @xm_check_link
	.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	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	x22, [x0, #40]
	ldr	w23, [x0]
Lloh0:
	adrp	x21, _PHY_XMAC_STAT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PHY_XMAC_STAT@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x22
	mov	x1, x23
	bl	_xm_phy_read
	ldr	w2, [x21]
	mov	x0, x22
	mov	x1, x23
	bl	_xm_phy_read
Lloh2:
	adrp	x8, _PHY_ST_LSYNC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PHY_ST_LSYNC@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.1:
	ldr	x8, [x20, #8]
Lloh5:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_25
; %bb.2:
Lloh8:
	adrp	x8, _PHY_ST_AN_OVER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PHY_ST_AN_OVER@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_7
; %bb.3:
Lloh11:
	adrp	x8, _PHY_XMAC_AUNE_LP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PHY_XMAC_AUNE_LP@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x23
	bl	_xm_phy_read
Lloh14:
	adrp	x8, _PHY_B_AN_RF@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PHY_B_AN_RF@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_8
; %bb.4:
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
LBB0_5:
	mov	x0, x19
	bl	_netdev_notice
	mov	w0, #0
	b	LBB0_28
LBB0_6:
	mov	x0, x22
	mov	x1, x23
	bl	_xm_link_down
LBB0_7:
	mov	w0, #0
	b	LBB0_28
LBB0_8:
	mov	x21, x0
Lloh19:
	adrp	x8, _PHY_XMAC_RES_ABI@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PHY_XMAC_RES_ABI@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x23
	bl	_xm_phy_read
	mov	w8, #129
	and	w8, w0, w8
	cmp	w8, #129
	b.eq	LBB0_11
; %bb.9:
	cmp	w8, #128
	b.ne	LBB0_19
; %bb.10:
Lloh22:
	adrp	x8, _DUPLEX_HALF@GOTPAGE
Lloh23:
	ldr	x8, [x8, _DUPLEX_HALF@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh24:
	adrp	x8, _DUPLEX_FULL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _DUPLEX_FULL@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	str	w8, [x20, #32]
Lloh26:
	adrp	x9, _FLOW_MODE_SYMMETRIC@GOTPAGE
Lloh27:
	ldr	x9, [x9, _FLOW_MODE_SYMMETRIC@GOTPAGEOFF]
	ldr	x8, [x20, #16]
Lloh28:
	ldr	x10, [x9]
Lloh29:
	adrp	x9, _FLOW_MODE_SYM_OR_REM@GOTPAGE
Lloh30:
	ldr	x9, [x9, _FLOW_MODE_SYM_OR_REM@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x8, x10
	b.eq	LBB0_14
; %bb.13:
	cmp	x8, x9
	b.ne	LBB0_16
LBB0_14:
Lloh32:
	adrp	x10, _PHY_X_P_SYM_MD@GOTPAGE
Lloh33:
	ldr	x10, [x10, _PHY_X_P_SYM_MD@GOTPAGEOFF]
Lloh34:
	ldr	w10, [x10]
	tst	w10, w21
	b.eq	LBB0_16
; %bb.15:
Lloh35:
	adrp	x8, _FLOW_STAT_SYMMETRIC@GOTPAGE
Lloh36:
	ldr	x8, [x8, _FLOW_STAT_SYMMETRIC@GOTPAGEOFF]
	b	LBB0_24
LBB0_16:
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.17:
Lloh37:
	adrp	x9, _PHY_X_RS_PAUSE@GOTPAGE
Lloh38:
	ldr	x9, [x9, _PHY_X_RS_PAUSE@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	and	w9, w9, w21
Lloh40:
	adrp	x10, _PHY_X_P_ASYM_MD@GOTPAGE
Lloh41:
	ldr	x10, [x10, _PHY_X_P_ASYM_MD@GOTPAGEOFF]
Lloh42:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_20
; %bb.18:
Lloh43:
	adrp	x8, _FLOW_STAT_REM_SEND@GOTPAGE
Lloh44:
	ldr	x8, [x8, _FLOW_STAT_REM_SEND@GOTPAGEOFF]
	b	LBB0_24
LBB0_19:
Lloh45:
	adrp	x1, l_.str.1@PAGE
Lloh46:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_20:
Lloh47:
	adrp	x9, _FLOW_MODE_LOC_SEND@GOTPAGE
Lloh48:
	ldr	x9, [x9, _FLOW_MODE_LOC_SEND@GOTPAGEOFF]
Lloh49:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_23
; %bb.21:
Lloh50:
	adrp	x8, _PHY_X_RS_PAUSE@GOTPAGE
Lloh51:
	ldr	x8, [x8, _PHY_X_RS_PAUSE@GOTPAGEOFF]
Lloh52:
	ldr	w8, [x8]
	and	w8, w8, w21
Lloh53:
	adrp	x9, _PHY_X_P_BOTH_MD@GOTPAGE
Lloh54:
	ldr	x9, [x9, _PHY_X_P_BOTH_MD@GOTPAGEOFF]
Lloh55:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_23
; %bb.22:
Lloh56:
	adrp	x8, _FLOW_STAT_LOC_SEND@GOTPAGE
Lloh57:
	ldr	x8, [x8, _FLOW_STAT_LOC_SEND@GOTPAGEOFF]
	b	LBB0_24
LBB0_23:
Lloh58:
	adrp	x8, _FLOW_STAT_NONE@GOTPAGE
Lloh59:
	ldr	x8, [x8, _FLOW_STAT_NONE@GOTPAGEOFF]
LBB0_24:
	ldr	w8, [x8]
Lloh60:
	adrp	x9, _SPEED_1000@GOTPAGE
Lloh61:
	ldr	x9, [x9, _SPEED_1000@GOTPAGEOFF]
Lloh62:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #24]
LBB0_25:
	mov	x0, x19
	bl	_netif_carrier_ok
	cbnz	w0, LBB0_27
; %bb.26:
	mov	x0, x20
	bl	_genesis_link_up
LBB0_27:
	mov	w0, #1
LBB0_28:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh56, Lloh57
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_XMAC_STAT,4,2              ; @PHY_XMAC_STAT
	.comm	_PHY_ST_LSYNC,4,2               ; @PHY_ST_LSYNC
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_PHY_ST_AN_OVER,4,2             ; @PHY_ST_AN_OVER
	.comm	_PHY_XMAC_AUNE_LP,4,2           ; @PHY_XMAC_AUNE_LP
	.comm	_PHY_B_AN_RF,4,2                ; @PHY_B_AN_RF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"remote fault\n"

	.comm	_PHY_XMAC_RES_ABI,4,2           ; @PHY_XMAC_RES_ABI
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ; @DUPLEX_HALF
l_.str.1:                               ; @.str.1
	.asciz	"duplex mismatch\n"

	.comm	_FLOW_MODE_SYMMETRIC,8,3        ; @FLOW_MODE_SYMMETRIC
	.comm	_FLOW_MODE_SYM_OR_REM,8,3       ; @FLOW_MODE_SYM_OR_REM
	.comm	_PHY_X_P_SYM_MD,4,2             ; @PHY_X_P_SYM_MD
	.comm	_FLOW_STAT_SYMMETRIC,4,2        ; @FLOW_STAT_SYMMETRIC
	.comm	_PHY_X_RS_PAUSE,4,2             ; @PHY_X_RS_PAUSE
	.comm	_PHY_X_P_ASYM_MD,4,2            ; @PHY_X_P_ASYM_MD
	.comm	_FLOW_STAT_REM_SEND,4,2         ; @FLOW_STAT_REM_SEND
	.comm	_FLOW_MODE_LOC_SEND,8,3         ; @FLOW_MODE_LOC_SEND
	.comm	_PHY_X_P_BOTH_MD,4,2            ; @PHY_X_P_BOTH_MD
	.comm	_FLOW_STAT_LOC_SEND,4,2         ; @FLOW_STAT_LOC_SEND
	.comm	_FLOW_STAT_NONE,4,2             ; @FLOW_STAT_NONE
	.comm	_SPEED_1000,4,2                 ; @SPEED_1000
	.no_dead_strip	_xm_check_link
.subsections_via_symbols
