	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function genmii_read_link
_genmii_read_link:                      ## @genmii_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_8
## %bb.1:
	movq	%rdi, %rbx
	movq	_MII_LPA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_sungem_phy_read
	movq	_LPA_10FULL@GOTPCREL(%rip), %rdx
	movq	_LPA_100FULL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	(%rdx), %edx
	orl	%ecx, %edx
	testl	%eax, %edx
	jne	LBB0_2
## %bb.3:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rdx
	jmp	LBB0_4
LBB0_2:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rdx
LBB0_4:
	movl	(%rdx), %edx
	movl	%edx, 12(%rbx)
	movq	_LPA_100HALF@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	testl	%eax, %ecx
	jne	LBB0_5
## %bb.6:
	movq	_SPEED_10@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_SPEED_100@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	$0, (%rbx)
LBB0_8:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_LPA,4,2                    ## @MII_LPA
	.comm	_LPA_10FULL,4,2                 ## @LPA_10FULL
	.comm	_LPA_100FULL,4,2                ## @LPA_100FULL
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ## @DUPLEX_HALF
	.comm	_LPA_100HALF,4,2                ## @LPA_100HALF
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.no_dead_strip	_genmii_read_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function genmii_read_link
_genmii_read_link:                      ; @genmii_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_2
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _MII_LPA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MII_LPA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_sungem_phy_read
Lloh3:
	adrp	x8, _LPA_10FULL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LPA_10FULL@GOTPAGEOFF]
Lloh5:
	adrp	x9, _LPA_100FULL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _LPA_100FULL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _DUPLEX_HALF@GOTPAGE
Lloh10:
	ldr	x10, [x10, _DUPLEX_HALF@GOTPAGEOFF]
Lloh11:
	adrp	x11, _DUPLEX_FULL@GOTPAGE
Lloh12:
	ldr	x11, [x11, _DUPLEX_FULL@GOTPAGEOFF]
	orr	w8, w9, w8
	tst	w8, w0
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
Lloh13:
	adrp	x10, _LPA_100HALF@GOTPAGE
Lloh14:
	ldr	x10, [x10, _LPA_100HALF@GOTPAGEOFF]
	str	w8, [x19, #12]
Lloh15:
	ldr	w8, [x10]
Lloh16:
	adrp	x10, _SPEED_10@GOTPAGE
Lloh17:
	ldr	x10, [x10, _SPEED_10@GOTPAGEOFF]
Lloh18:
	adrp	x11, _SPEED_100@GOTPAGE
Lloh19:
	ldr	x11, [x11, _SPEED_100@GOTPAGEOFF]
	orr	w8, w8, w9
	tst	w8, w0
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
	str	w8, [x19, #8]
	str	xzr, [x19]
LBB0_2:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_LPA,4,2                    ; @MII_LPA
	.comm	_LPA_10FULL,4,2                 ; @LPA_10FULL
	.comm	_LPA_100FULL,4,2                ; @LPA_100FULL
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ; @DUPLEX_HALF
	.comm	_LPA_100HALF,4,2                ; @LPA_100HALF
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.no_dead_strip	_genmii_read_link
.subsections_via_symbols
