	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvneta_mac_link_state
_mvneta_mac_link_state:                 ## @mvneta_mac_link_state
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movl	(%rdi), %edi
	callq	_to_net_dev
	movq	%rax, %rdi
	callq	_netdev_priv
	movq	_MVNETA_GMAC_STATUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_mvreg_read
	movq	_MVNETA_GMAC_SPEED_1000@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.1:
	movq	(%rbx), %rcx
	movq	_PHY_INTERFACE_MODE_2500BASEX@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_2
## %bb.3:
	movq	_SPEED_2500@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_4:
	movq	_MVNETA_GMAC_SPEED_100@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.5:
	movq	_SPEED_100@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_2:
	movq	_SPEED_1000@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_6:
	movq	_SPEED_10@GOTPCREL(%rip), %rcx
LBB0_7:
	movl	(%rcx), %ecx
	movl	%ecx, 24(%rbx)
	movq	_MVNETA_GMAC_AN_COMPLETE@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	setne	%dl
	movl	%edx, 8(%rbx)
	movq	_MVNETA_GMAC_LINK_UP@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	setne	%dl
	movl	%edx, 12(%rbx)
	movq	_MVNETA_GMAC_FULL_DUPLEX@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	setne	%dl
	movl	%edx, 16(%rbx)
	movl	$0, 20(%rbx)
	movq	_MVNETA_GMAC_RX_FLOW_CTRL_ENABLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.9:
	movq	_MLO_PAUSE_RX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 20(%rbx)
	jmp	LBB0_10
LBB0_8:
	xorl	%ecx, %ecx
LBB0_10:
	movq	_MVNETA_GMAC_TX_FLOW_CTRL_ENABLE@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_12
## %bb.11:
	movq	_MLO_PAUSE_TX@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 20(%rbx)
LBB0_12:
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MVNETA_GMAC_STATUS,4,2         ## @MVNETA_GMAC_STATUS
	.comm	_MVNETA_GMAC_SPEED_1000,4,2     ## @MVNETA_GMAC_SPEED_1000
	.comm	_PHY_INTERFACE_MODE_2500BASEX,8,3 ## @PHY_INTERFACE_MODE_2500BASEX
	.comm	_SPEED_2500,4,2                 ## @SPEED_2500
	.comm	_SPEED_1000,4,2                 ## @SPEED_1000
	.comm	_MVNETA_GMAC_SPEED_100,4,2      ## @MVNETA_GMAC_SPEED_100
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.comm	_MVNETA_GMAC_AN_COMPLETE,4,2    ## @MVNETA_GMAC_AN_COMPLETE
	.comm	_MVNETA_GMAC_LINK_UP,4,2        ## @MVNETA_GMAC_LINK_UP
	.comm	_MVNETA_GMAC_FULL_DUPLEX,4,2    ## @MVNETA_GMAC_FULL_DUPLEX
	.comm	_MVNETA_GMAC_RX_FLOW_CTRL_ENABLE,4,2 ## @MVNETA_GMAC_RX_FLOW_CTRL_ENABLE
	.comm	_MLO_PAUSE_RX,4,2               ## @MLO_PAUSE_RX
	.comm	_MVNETA_GMAC_TX_FLOW_CTRL_ENABLE,4,2 ## @MVNETA_GMAC_TX_FLOW_CTRL_ENABLE
	.comm	_MLO_PAUSE_TX,4,2               ## @MLO_PAUSE_TX
	.no_dead_strip	_mvneta_mac_link_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvneta_mac_link_state
_mvneta_mac_link_state:                 ; @mvneta_mac_link_state
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	ldr	w0, [x0]
	bl	_to_net_dev
	bl	_netdev_priv
Lloh0:
	adrp	x8, _MVNETA_GMAC_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MVNETA_GMAC_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_mvreg_read
Lloh3:
	adrp	x8, _MVNETA_GMAC_SPEED_1000@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MVNETA_GMAC_SPEED_1000@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _PHY_INTERFACE_MODE_2500BASEX@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PHY_INTERFACE_MODE_2500BASEX@GOTPAGEOFF]
Lloh8:
	adrp	x10, _SPEED_2500@GOTPAGE
Lloh9:
	ldr	x10, [x10, _SPEED_2500@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
Lloh11:
	adrp	x11, _SPEED_1000@GOTPAGE
Lloh12:
	ldr	x11, [x11, _SPEED_1000@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	b	LBB0_5
LBB0_2:
Lloh13:
	adrp	x8, _MVNETA_GMAC_SPEED_100@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MVNETA_GMAC_SPEED_100@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
Lloh16:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh18:
	adrp	x8, _SPEED_10@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SPEED_10@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	str	w8, [x19, #24]
Lloh20:
	adrp	x8, _MVNETA_GMAC_AN_COMPLETE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MVNETA_GMAC_AN_COMPLETE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w8, ne
Lloh23:
	adrp	x9, _MVNETA_GMAC_LINK_UP@GOTPAGE
Lloh24:
	ldr	x9, [x9, _MVNETA_GMAC_LINK_UP@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w0
	cset	w9, ne
	stp	w8, w9, [x19, #8]
Lloh26:
	adrp	x8, _MVNETA_GMAC_FULL_DUPLEX@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MVNETA_GMAC_FULL_DUPLEX@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w8, ne
	stp	w8, wzr, [x19, #16]
Lloh29:
	adrp	x8, _MVNETA_GMAC_RX_FLOW_CTRL_ENABLE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MVNETA_GMAC_RX_FLOW_CTRL_ENABLE@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_7
; %bb.6:
Lloh32:
	adrp	x8, _MLO_PAUSE_RX@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MLO_PAUSE_RX@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	str	w8, [x19, #20]
	b	LBB0_8
LBB0_7:
	mov	w8, #0
LBB0_8:
Lloh35:
	adrp	x9, _MVNETA_GMAC_TX_FLOW_CTRL_ENABLE@GOTPAGE
Lloh36:
	ldr	x9, [x9, _MVNETA_GMAC_TX_FLOW_CTRL_ENABLE@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	tst	w9, w0
	b.eq	LBB0_10
; %bb.9:
Lloh38:
	adrp	x9, _MLO_PAUSE_TX@GOTPAGE
Lloh39:
	ldr	x9, [x9, _MLO_PAUSE_TX@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #20]
LBB0_10:
	mov	w0, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_MVNETA_GMAC_STATUS,4,2         ; @MVNETA_GMAC_STATUS
	.comm	_MVNETA_GMAC_SPEED_1000,4,2     ; @MVNETA_GMAC_SPEED_1000
	.comm	_PHY_INTERFACE_MODE_2500BASEX,8,3 ; @PHY_INTERFACE_MODE_2500BASEX
	.comm	_SPEED_2500,4,2                 ; @SPEED_2500
	.comm	_SPEED_1000,4,2                 ; @SPEED_1000
	.comm	_MVNETA_GMAC_SPEED_100,4,2      ; @MVNETA_GMAC_SPEED_100
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.comm	_MVNETA_GMAC_AN_COMPLETE,4,2    ; @MVNETA_GMAC_AN_COMPLETE
	.comm	_MVNETA_GMAC_LINK_UP,4,2        ; @MVNETA_GMAC_LINK_UP
	.comm	_MVNETA_GMAC_FULL_DUPLEX,4,2    ; @MVNETA_GMAC_FULL_DUPLEX
	.comm	_MVNETA_GMAC_RX_FLOW_CTRL_ENABLE,4,2 ; @MVNETA_GMAC_RX_FLOW_CTRL_ENABLE
	.comm	_MLO_PAUSE_RX,4,2               ; @MLO_PAUSE_RX
	.comm	_MVNETA_GMAC_TX_FLOW_CTRL_ENABLE,4,2 ; @MVNETA_GMAC_TX_FLOW_CTRL_ENABLE
	.comm	_MLO_PAUSE_TX,4,2               ; @MLO_PAUSE_TX
	.no_dead_strip	_mvneta_mac_link_state
.subsections_via_symbols
