	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm54xx_read_link
_bcm54xx_read_link:                     ## @bcm54xx_read_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	cmpq	$0, 16(%rdi)
	je	LBB0_10
## %bb.1:
	movq	%rdi, %rbx
	movq	_MII_BCM5400_AUXSTATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_sungem_phy_read
	movq	_MII_BCM5400_AUXSTATUS_LINKMODE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_MII_BCM5400_AUXSTATUS_LINKMODE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movq	_phy_BCM5400_link_table@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cltq
	movq	(%rcx,%rax,8), %rax
	cmpq	$0, (%rax)
	jne	LBB0_2
## %bb.3:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_2:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rcx
LBB0_4:
	movq	(%rcx), %rcx
	movq	%rcx, (%rbx)
	cmpq	$0, 16(%rax)
	je	LBB0_6
## %bb.5:
	movq	_SPEED_1000@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	cmpq	$0, 8(%rax)
	jne	LBB0_7
## %bb.8:
	movq	_SPEED_10@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_SPEED_100@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	_MII_LPA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sungem_phy_read
	movq	(%rbx), %rcx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	sete	%cl
	movq	_LPA_PAUSE@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	setne	%al
	andb	%cl, %al
	movzbl	%al, %eax
	movl	%eax, 8(%rbx)
LBB0_10:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_BCM5400_AUXSTATUS,4,2      ## @MII_BCM5400_AUXSTATUS
	.comm	_MII_BCM5400_AUXSTATUS_LINKMODE_MASK,4,2 ## @MII_BCM5400_AUXSTATUS_LINKMODE_MASK
	.comm	_MII_BCM5400_AUXSTATUS_LINKMODE_SHIFT,4,2 ## @MII_BCM5400_AUXSTATUS_LINKMODE_SHIFT
	.comm	_phy_BCM5400_link_table,8,3     ## @phy_BCM5400_link_table
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_DUPLEX_HALF,8,3                ## @DUPLEX_HALF
	.comm	_SPEED_1000,4,2                 ## @SPEED_1000
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.comm	_MII_LPA,4,2                    ## @MII_LPA
	.comm	_LPA_PAUSE,4,2                  ## @LPA_PAUSE
	.no_dead_strip	_bcm54xx_read_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm54xx_read_link
_bcm54xx_read_link:                     ; @bcm54xx_read_link
	.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
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _MII_BCM5400_AUXSTATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MII_BCM5400_AUXSTATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_sungem_phy_read
Lloh3:
	adrp	x8, _MII_BCM5400_AUXSTATUS_LINKMODE_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MII_BCM5400_AUXSTATUS_LINKMODE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _MII_BCM5400_AUXSTATUS_LINKMODE_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MII_BCM5400_AUXSTATUS_LINKMODE_SHIFT@GOTPAGEOFF]
	and	w8, w8, w0
Lloh8:
	ldr	w9, [x9]
	asr	w8, w8, w9
Lloh9:
	adrp	x9, _phy_BCM5400_link_table@GOTPAGE
Lloh10:
	ldr	x9, [x9, _phy_BCM5400_link_table@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	ldr	x8, [x9, w8, sxtw #3]
Lloh12:
	adrp	x20, _DUPLEX_FULL@GOTPAGE
Lloh13:
	ldr	x20, [x20, _DUPLEX_FULL@GOTPAGEOFF]
Lloh14:
	adrp	x9, _DUPLEX_HALF@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DUPLEX_HALF@GOTPAGEOFF]
	ldr	x10, [x8]
	cmp	x10, #0
	csel	x9, x9, x20, eq
	ldr	x9, [x9]
	str	x9, [x19]
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_3
; %bb.2:
Lloh16:
	adrp	x8, _SPEED_1000@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SPEED_1000@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh18:
	adrp	x9, _SPEED_100@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SPEED_100@GOTPAGEOFF]
	ldr	x8, [x8, #8]
Lloh20:
	adrp	x10, _SPEED_10@GOTPAGE
Lloh21:
	ldr	x10, [x10, _SPEED_10@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
LBB0_4:
	ldr	w8, [x8]
	str	w8, [x19, #12]
Lloh22:
	adrp	x8, _MII_LPA@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MII_LPA@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sungem_phy_read
	ldr	x8, [x19]
Lloh25:
	adrp	x9, _LPA_PAUSE@GOTPAGE
Lloh26:
	ldr	x9, [x9, _LPA_PAUSE@GOTPAGEOFF]
	ldr	x10, [x20]
Lloh27:
	ldr	w9, [x9]
	tst	w9, w0
	ccmp	x8, x10, #0, ne
	cset	w8, eq
	str	w8, [x19, #8]
LBB0_5:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_BCM5400_AUXSTATUS,4,2      ; @MII_BCM5400_AUXSTATUS
	.comm	_MII_BCM5400_AUXSTATUS_LINKMODE_MASK,4,2 ; @MII_BCM5400_AUXSTATUS_LINKMODE_MASK
	.comm	_MII_BCM5400_AUXSTATUS_LINKMODE_SHIFT,4,2 ; @MII_BCM5400_AUXSTATUS_LINKMODE_SHIFT
	.comm	_phy_BCM5400_link_table,8,3     ; @phy_BCM5400_link_table
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_DUPLEX_HALF,8,3                ; @DUPLEX_HALF
	.comm	_SPEED_1000,4,2                 ; @SPEED_1000
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.comm	_MII_LPA,4,2                    ; @MII_LPA
	.comm	_LPA_PAUSE,4,2                  ; @LPA_PAUSE
	.no_dead_strip	_bcm54xx_read_link
.subsections_via_symbols
