	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_b53_serdes_link_state          ## -- Begin function b53_serdes_link_state
	.p2align	4, 0x90
_b53_serdes_link_state:                 ## @b53_serdes_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rdi, %r12
	callq	_b53_serdes_map_lane
	movq	%rax, %rbx
	movq	_B53_INVALID_LANE@GOTPCREL(%rip), %rcx
	movl	$1, %eax
	cmpq	(%rcx), %rbx
	je	LBB0_11
## %bb.1:
	movq	_B53_SERDES_DIGITAL_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SERDES_DIGITAL_BLK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_b53_serdes_read
	movl	%eax, %r15d
	movq	_MII_BMSR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_B53_SERDES_MII_REG
	movq	_SERDES_MII_BLK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_b53_serdes_read
	movq	_SPEED_STATUS_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%r15d, %edx
	sarl	%cl, %edx
	movq	_SPEED_STATUS_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edx
	addl	$-129, %edx
	cmpl	$2, %edx
	ja	LBB0_2
## %bb.3:
	movslq	%edx, %rcx
	leaq	l_switch.table.b53_serdes_link_state(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	jmp	LBB0_4
LBB0_2:
	movq	_SPEED_2500@GOTPCREL(%rip), %rcx
LBB0_4:
	movl	(%rcx), %ecx
	movl	%ecx, 16(%r14)
	movq	_DUPLEX_STATUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%r15d, %ecx
	jne	LBB0_5
## %bb.6:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_5:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rcx
LBB0_7:
	movl	(%rcx), %ecx
	movl	%ecx, 12(%r14)
	movq	_BMSR_ANEGCOMPLETE@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	andl	(%rcx), %eax
	setne	%dl
	movl	%edx, (%r14)
	movq	_LINK_STATUS@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	movl	(%rax), %eax
	andl	%r15d, %eax
	setne	%cl
	movl	%ecx, 4(%r14)
	movq	_PAUSE_RESOLUTION_RX_SIDE@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_9
## %bb.8:
	movq	_MLO_PAUSE_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r14)
LBB0_9:
	movq	_PAUSE_RESOLUTION_TX_SIDE@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	testl	%r15d, (%rcx)
	je	LBB0_11
## %bb.10:
	movq	_MLO_PAUSE_TX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 8(%r14)
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_B53_INVALID_LANE,8,3           ## @B53_INVALID_LANE
	.comm	_B53_SERDES_DIGITAL_STATUS,4,2  ## @B53_SERDES_DIGITAL_STATUS
	.comm	_SERDES_DIGITAL_BLK,4,2         ## @SERDES_DIGITAL_BLK
	.comm	_MII_BMSR,4,2                   ## @MII_BMSR
	.comm	_SERDES_MII_BLK,4,2             ## @SERDES_MII_BLK
	.comm	_SPEED_STATUS_SHIFT,4,2         ## @SPEED_STATUS_SHIFT
	.comm	_SPEED_STATUS_MASK,4,2          ## @SPEED_STATUS_MASK
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_SPEED_1000,4,2                 ## @SPEED_1000
	.comm	_SPEED_2500,4,2                 ## @SPEED_2500
	.comm	_DUPLEX_STATUS,4,2              ## @DUPLEX_STATUS
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ## @DUPLEX_HALF
	.comm	_BMSR_ANEGCOMPLETE,4,2          ## @BMSR_ANEGCOMPLETE
	.comm	_LINK_STATUS,4,2                ## @LINK_STATUS
	.comm	_PAUSE_RESOLUTION_RX_SIDE,4,2   ## @PAUSE_RESOLUTION_RX_SIDE
	.comm	_MLO_PAUSE_RX,4,2               ## @MLO_PAUSE_RX
	.comm	_PAUSE_RESOLUTION_TX_SIDE,4,2   ## @PAUSE_RESOLUTION_TX_SIDE
	.comm	_MLO_PAUSE_TX,4,2               ## @MLO_PAUSE_TX
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.b53_serdes_link_state
l_switch.table.b53_serdes_link_state:
	.quad	_SPEED_1000
	.quad	_SPEED_100
	.quad	_SPEED_10

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_b53_serdes_link_state          ; -- Begin function b53_serdes_link_state
	.p2align	2
_b53_serdes_link_state:                 ; @b53_serdes_link_state
	.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, x2
	mov	x21, x0
	bl	_b53_serdes_map_lane
Lloh0:
	adrp	x8, _B53_INVALID_LANE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _B53_INVALID_LANE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_10
LBB0_2:
	mov	x22, x0
Lloh3:
	adrp	x8, _B53_SERDES_DIGITAL_STATUS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _B53_SERDES_DIGITAL_STATUS@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _SERDES_DIGITAL_BLK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SERDES_DIGITAL_BLK@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x22
	bl	_b53_serdes_read
	mov	x20, x0
Lloh9:
	adrp	x8, _MII_BMSR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MII_BMSR@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_B53_SERDES_MII_REG
	mov	x2, x0
Lloh12:
	adrp	x8, _SERDES_MII_BLK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SERDES_MII_BLK@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x22
	bl	_b53_serdes_read
Lloh15:
	adrp	x8, _SPEED_STATUS_SHIFT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SPEED_STATUS_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	asr	w8, w20, w8
Lloh18:
	adrp	x9, _SPEED_STATUS_MASK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SPEED_STATUS_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	and	w8, w8, w9
	sub	w8, w8, #129
	cmp	w8, #2
	b.hi	LBB0_4
; %bb.3:
Lloh21:
	adrp	x9, l_switch.table.b53_serdes_link_state@PAGE
Lloh22:
	add	x9, x9, l_switch.table.b53_serdes_link_state@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	b	LBB0_5
LBB0_4:
Lloh23:
	adrp	x8, _SPEED_2500@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SPEED_2500@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	str	w8, [x19, #16]
Lloh25:
	adrp	x8, _DUPLEX_STATUS@GOTPAGE
Lloh26:
	ldr	x8, [x8, _DUPLEX_STATUS@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
Lloh28:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh29:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh30:
	adrp	x10, _DUPLEX_HALF@GOTPAGE
Lloh31:
	ldr	x10, [x10, _DUPLEX_HALF@GOTPAGEOFF]
	tst	w8, w20
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
	str	w8, [x19, #12]
Lloh32:
	adrp	x8, _BMSR_ANEGCOMPLETE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _BMSR_ANEGCOMPLETE@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w8, ne
	str	w8, [x19]
Lloh35:
	adrp	x8, _LINK_STATUS@GOTPAGE
Lloh36:
	ldr	x8, [x8, _LINK_STATUS@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	tst	w8, w20
	cset	w8, ne
	str	w8, [x19, #4]
Lloh38:
	adrp	x8, _PAUSE_RESOLUTION_RX_SIDE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _PAUSE_RESOLUTION_RX_SIDE@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_7
; %bb.6:
Lloh41:
	adrp	x8, _MLO_PAUSE_RX@GOTPAGE
Lloh42:
	ldr	x8, [x8, _MLO_PAUSE_RX@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
LBB0_7:
Lloh44:
	adrp	x8, _PAUSE_RESOLUTION_TX_SIDE@GOTPAGE
Lloh45:
	ldr	x8, [x8, _PAUSE_RESOLUTION_TX_SIDE@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_9
; %bb.8:
	mov	w0, #0
Lloh47:
	adrp	x8, _MLO_PAUSE_TX@GOTPAGE
Lloh48:
	ldr	x8, [x8, _MLO_PAUSE_TX@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_B53_INVALID_LANE,8,3           ; @B53_INVALID_LANE
	.comm	_B53_SERDES_DIGITAL_STATUS,4,2  ; @B53_SERDES_DIGITAL_STATUS
	.comm	_SERDES_DIGITAL_BLK,4,2         ; @SERDES_DIGITAL_BLK
	.comm	_MII_BMSR,4,2                   ; @MII_BMSR
	.comm	_SERDES_MII_BLK,4,2             ; @SERDES_MII_BLK
	.comm	_SPEED_STATUS_SHIFT,4,2         ; @SPEED_STATUS_SHIFT
	.comm	_SPEED_STATUS_MASK,4,2          ; @SPEED_STATUS_MASK
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_SPEED_1000,4,2                 ; @SPEED_1000
	.comm	_SPEED_2500,4,2                 ; @SPEED_2500
	.comm	_DUPLEX_STATUS,4,2              ; @DUPLEX_STATUS
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ; @DUPLEX_HALF
	.comm	_BMSR_ANEGCOMPLETE,4,2          ; @BMSR_ANEGCOMPLETE
	.comm	_LINK_STATUS,4,2                ; @LINK_STATUS
	.comm	_PAUSE_RESOLUTION_RX_SIDE,4,2   ; @PAUSE_RESOLUTION_RX_SIDE
	.comm	_MLO_PAUSE_RX,4,2               ; @MLO_PAUSE_RX
	.comm	_PAUSE_RESOLUTION_TX_SIDE,4,2   ; @PAUSE_RESOLUTION_TX_SIDE
	.comm	_MLO_PAUSE_TX,4,2               ; @MLO_PAUSE_TX
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.b53_serdes_link_state
l_switch.table.b53_serdes_link_state:
	.quad	_SPEED_1000
	.quad	_SPEED_100
	.quad	_SPEED_10

.subsections_via_symbols
