	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgbe_phy_cur_mode
_xgbe_phy_cur_mode:                     ## @xgbe_phy_cur_mode
	.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	(%rdi), %rbx
	movq	_MDIO_MMD_PCS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MDIO_CTRL2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_XMDIO_READ
	movq	_MDIO_PCS_CTRL2_TYPE@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_MDIO_PCS_CTRL2_10GBR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	movq	_XGBE_MODE_KR@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	movq	(%rbx), %rax
	movq	_XGBE_SPEEDSET_2500_10000@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	movq	_XGBE_MODE_KX_2500@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_XGBE_MODE_KX_1000@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MDIO_MMD_PCS,4,2               ## @MDIO_MMD_PCS
	.comm	_MDIO_CTRL2,4,2                 ## @MDIO_CTRL2
	.comm	_MDIO_PCS_CTRL2_TYPE,4,2        ## @MDIO_PCS_CTRL2_TYPE
	.comm	_MDIO_PCS_CTRL2_10GBR,4,2       ## @MDIO_PCS_CTRL2_10GBR
	.comm	_XGBE_MODE_KR,4,2               ## @XGBE_MODE_KR
	.comm	_XGBE_SPEEDSET_2500_10000,8,3   ## @XGBE_SPEEDSET_2500_10000
	.comm	_XGBE_MODE_KX_2500,4,2          ## @XGBE_MODE_KX_2500
	.comm	_XGBE_MODE_KX_1000,4,2          ## @XGBE_MODE_KX_1000
	.no_dead_strip	_xgbe_phy_cur_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgbe_phy_cur_mode
_xgbe_phy_cur_mode:                     ; @xgbe_phy_cur_mode
	.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	x19, [x0]
Lloh0:
	adrp	x8, _MDIO_MMD_PCS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MDIO_MMD_PCS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _MDIO_CTRL2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MDIO_CTRL2@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_XMDIO_READ
Lloh6:
	adrp	x8, _MDIO_PCS_CTRL2_TYPE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MDIO_PCS_CTRL2_TYPE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh9:
	adrp	x9, _MDIO_PCS_CTRL2_10GBR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MDIO_PCS_CTRL2_10GBR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
Lloh12:
	adrp	x8, _XGBE_MODE_KR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _XGBE_MODE_KR@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19]
Lloh14:
	adrp	x9, _XGBE_SPEEDSET_2500_10000@GOTPAGE
Lloh15:
	ldr	x9, [x9, _XGBE_SPEEDSET_2500_10000@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
Lloh17:
	adrp	x10, _XGBE_MODE_KX_1000@GOTPAGE
Lloh18:
	ldr	x10, [x10, _XGBE_MODE_KX_1000@GOTPAGEOFF]
Lloh19:
	adrp	x11, _XGBE_MODE_KX_2500@GOTPAGE
Lloh20:
	ldr	x11, [x11, _XGBE_MODE_KX_2500@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x11, x10, eq
LBB0_3:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MDIO_MMD_PCS,4,2               ; @MDIO_MMD_PCS
	.comm	_MDIO_CTRL2,4,2                 ; @MDIO_CTRL2
	.comm	_MDIO_PCS_CTRL2_TYPE,4,2        ; @MDIO_PCS_CTRL2_TYPE
	.comm	_MDIO_PCS_CTRL2_10GBR,4,2       ; @MDIO_PCS_CTRL2_10GBR
	.comm	_XGBE_MODE_KR,4,2               ; @XGBE_MODE_KR
	.comm	_XGBE_SPEEDSET_2500_10000,8,3   ; @XGBE_SPEEDSET_2500_10000
	.comm	_XGBE_MODE_KX_2500,4,2          ; @XGBE_MODE_KX_2500
	.comm	_XGBE_MODE_KX_1000,4,2          ; @XGBE_MODE_KX_1000
	.no_dead_strip	_xgbe_phy_cur_mode
.subsections_via_symbols
