	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mv88e6185_port_link_state      ## -- Begin function mv88e6185_port_link_state
	.p2align	4, 0x90
_mv88e6185_port_link_state:             ## @mv88e6185_port_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	%rdx, %rbx
	movq	(%rdx), %rax
	movq	_PHY_INTERFACE_MODE_1000BASEX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.1:
	movq	(%rdi), %rax
	movslq	%esi, %rcx
	movq	(%rax,%rcx,8), %rax
	movq	_MV88E6185_PORT_STS_CMODE_SERDES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.2:
	movq	_MV88E6XXX_PORT_MAC_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-12(%rbp), %rcx
	callq	_mv88e6xxx_port_read
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	-12(%rbp), %ecx
	movq	_MV88E6185_PORT_MAC_CTL_SYNC_OK@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	movl	(%rdx), %edx
	andl	%ecx, %edx
	setne	%sil
	movl	%esi, 8(%rbx)
	movl	$1, 12(%rbx)
	movq	_MV88E6185_PORT_MAC_CTL_AN_DONE@GOTPCREL(%rip), %r8
	movq	_DUPLEX_UNKNOWN@GOTPCREL(%rip), %rsi
	cmovneq	_DUPLEX_FULL@GOTPCREL(%rip), %rsi
	movq	_SPEED_UNKNOWN@GOTPCREL(%rip), %rdi
	cmovneq	_SPEED_1000@GOTPCREL(%rip), %rdi
	xorl	%edx, %edx
	andl	(%r8), %ecx
	setne	%dl
	movl	%edx, 16(%rbx)
	movl	(%rsi), %ecx
	movl	%ecx, 24(%rbx)
	movl	(%rdi), %ecx
	movl	%ecx, 20(%rbx)
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_mv88e6352_port_link_state      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_INTERFACE_MODE_1000BASEX,8,3 ## @PHY_INTERFACE_MODE_1000BASEX
	.comm	_MV88E6185_PORT_STS_CMODE_SERDES,8,3 ## @MV88E6185_PORT_STS_CMODE_SERDES
	.comm	_MV88E6XXX_PORT_MAC_CTL,4,2     ## @MV88E6XXX_PORT_MAC_CTL
	.comm	_MV88E6185_PORT_MAC_CTL_SYNC_OK,4,2 ## @MV88E6185_PORT_MAC_CTL_SYNC_OK
	.comm	_MV88E6185_PORT_MAC_CTL_AN_DONE,4,2 ## @MV88E6185_PORT_MAC_CTL_AN_DONE
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.comm	_DUPLEX_UNKNOWN,4,2             ## @DUPLEX_UNKNOWN
	.comm	_SPEED_1000,4,2                 ## @SPEED_1000
	.comm	_SPEED_UNKNOWN,4,2              ## @SPEED_UNKNOWN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mv88e6185_port_link_state      ; -- Begin function mv88e6185_port_link_state
	.p2align	2
_mv88e6185_port_link_state:             ; @mv88e6185_port_link_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x2
	ldr	x8, [x2]
Lloh0:
	adrp	x9, _PHY_INTERFACE_MODE_1000BASEX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PHY_INTERFACE_MODE_1000BASEX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
	ldr	x8, [x0]
	ldr	x8, [x8, w1, sxtw #3]
Lloh3:
	adrp	x9, _MV88E6185_PORT_STS_CMODE_SERDES@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MV88E6185_PORT_STS_CMODE_SERDES@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
Lloh6:
	adrp	x8, _MV88E6XXX_PORT_MAC_CTL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MV88E6XXX_PORT_MAC_CTL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	add	x3, sp, #12
	bl	_mv88e6xxx_port_read
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	w8, [sp, #12]
Lloh9:
	adrp	x9, _MV88E6185_PORT_MAC_CTL_SYNC_OK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MV88E6185_PORT_MAC_CTL_SYNC_OK@GOTPAGEOFF]
Lloh11:
	adrp	x10, _MV88E6185_PORT_MAC_CTL_AN_DONE@GOTPAGE
Lloh12:
	ldr	x10, [x10, _MV88E6185_PORT_MAC_CTL_AN_DONE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	ldr	w10, [x10]
	tst	w10, w8
	cset	w10, ne
	tst	w9, w8
	cset	w8, ne
	mov	w9, #1
	stp	w8, w9, [x19, #8]
	str	w10, [x19, #16]
Lloh15:
	adrp	x8, _DUPLEX_FULL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DUPLEX_FULL@GOTPAGEOFF]
Lloh17:
	adrp	x9, _DUPLEX_UNKNOWN@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DUPLEX_UNKNOWN@GOTPAGEOFF]
	csel	x8, x8, x9, ne
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _SPEED_1000@GOTPAGE
Lloh20:
	ldr	x9, [x9, _SPEED_1000@GOTPAGEOFF]
	str	w8, [x19, #24]
Lloh21:
	adrp	x8, _SPEED_UNKNOWN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SPEED_UNKNOWN@GOTPAGEOFF]
	csel	x8, x9, x8, ne
	ldr	w8, [x8]
	str	w8, [x19, #20]
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_5:
	mov	x2, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_mv88e6352_port_link_state
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_INTERFACE_MODE_1000BASEX,8,3 ; @PHY_INTERFACE_MODE_1000BASEX
	.comm	_MV88E6185_PORT_STS_CMODE_SERDES,8,3 ; @MV88E6185_PORT_STS_CMODE_SERDES
	.comm	_MV88E6XXX_PORT_MAC_CTL,4,2     ; @MV88E6XXX_PORT_MAC_CTL
	.comm	_MV88E6185_PORT_MAC_CTL_SYNC_OK,4,2 ; @MV88E6185_PORT_MAC_CTL_SYNC_OK
	.comm	_MV88E6185_PORT_MAC_CTL_AN_DONE,4,2 ; @MV88E6185_PORT_MAC_CTL_AN_DONE
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.comm	_DUPLEX_UNKNOWN,4,2             ; @DUPLEX_UNKNOWN
	.comm	_SPEED_1000,4,2                 ; @SPEED_1000
	.comm	_SPEED_UNKNOWN,4,2              ; @SPEED_UNKNOWN
.subsections_via_symbols
