	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_genphy_c45_an_config_aneg      ## -- Begin function genphy_c45_an_config_aneg
	.p2align	4, 0x90
_genphy_c45_an_config_aneg:             ## @genphy_c45_an_config_aneg
	.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	%rdi, %rbx
	movl	(%rdi), %edi
	movl	4(%rbx), %edx
	movl	%edi, %esi
	callq	_linkmode_and
	movq	%rbx, %rdi
	callq	_genphy_config_eee_advert
	movl	%eax, %r14d
	movl	(%rbx), %edi
	callq	_linkmode_adv_to_mii_adv_t
	movq	_MDIO_MMD_AN@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_ADVERTISE_ALL@GOTPCREL(%rip), %rdx
	movq	_ADVERTISE_100BASE4@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movq	_MDIO_AN_ADVERTISE@GOTPCREL(%rip), %rdx
	movq	_ADVERTISE_PAUSE_CAP@GOTPCREL(%rip), %rdi
	orl	(%rdi), %ecx
	movl	(%rdx), %edx
	movq	_ADVERTISE_PAUSE_ASYM@GOTPCREL(%rip), %rdi
	orl	(%rdi), %ecx
	movq	%rbx, %rdi
	movl	%eax, %r8d
	callq	_phy_modify_mmd_changed
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movl	(%rbx), %edi
	callq	_linkmode_adv_to_mii_10gbt_adv_t
	movl	(%r12), %esi
	movq	_MDIO_AN_10GBT_CTRL@GOTPCREL(%rip), %rdx
	movq	_MDIO_AN_10GBT_CTRL_ADV10G@GOTPCREL(%rip), %rdi
	movq	_MDIO_AN_10GBT_CTRL_ADV5G@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdi), %ecx
	movl	(%rdx), %edx
	movq	_MDIO_AN_10GBT_CTRL_ADV2_5G@GOTPCREL(%rip), %rdi
	orl	(%rdi), %ecx
	movq	%rbx, %rdi
	movl	%eax, %r8d
	callq	_phy_modify_mmd_changed
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	orl	%r15d, %eax
	movl	$1, %r15d
	cmovel	%r14d, %r15d
	jmp	LBB0_4
LBB0_2:
	movl	%eax, %r15d
LBB0_4:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MDIO_MMD_AN,4,2                ## @MDIO_MMD_AN
	.comm	_MDIO_AN_ADVERTISE,4,2          ## @MDIO_AN_ADVERTISE
	.comm	_ADVERTISE_ALL,4,2              ## @ADVERTISE_ALL
	.comm	_ADVERTISE_100BASE4,4,2         ## @ADVERTISE_100BASE4
	.comm	_ADVERTISE_PAUSE_CAP,4,2        ## @ADVERTISE_PAUSE_CAP
	.comm	_ADVERTISE_PAUSE_ASYM,4,2       ## @ADVERTISE_PAUSE_ASYM
	.comm	_MDIO_AN_10GBT_CTRL,4,2         ## @MDIO_AN_10GBT_CTRL
	.comm	_MDIO_AN_10GBT_CTRL_ADV10G,4,2  ## @MDIO_AN_10GBT_CTRL_ADV10G
	.comm	_MDIO_AN_10GBT_CTRL_ADV5G,4,2   ## @MDIO_AN_10GBT_CTRL_ADV5G
	.comm	_MDIO_AN_10GBT_CTRL_ADV2_5G,4,2 ## @MDIO_AN_10GBT_CTRL_ADV2_5G
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_genphy_c45_an_config_aneg      ; -- Begin function genphy_c45_an_config_aneg
	.p2align	2
_genphy_c45_an_config_aneg:             ; @genphy_c45_an_config_aneg
	.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, x0
	ldr	w0, [x0]
	ldr	w2, [x19, #4]
	mov	x1, x0
	bl	_linkmode_and
	mov	x0, x19
	bl	_genphy_config_eee_advert
	mov	x20, x0
	ldr	w0, [x19]
	bl	_linkmode_adv_to_mii_adv_t
	mov	x4, x0
Lloh0:
	adrp	x22, _MDIO_MMD_AN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MDIO_MMD_AN@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh2:
	adrp	x8, _MDIO_AN_ADVERTISE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MDIO_AN_ADVERTISE@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
Lloh5:
	adrp	x8, _ADVERTISE_ALL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ADVERTISE_ALL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _ADVERTISE_100BASE4@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ADVERTISE_100BASE4@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh11:
	adrp	x9, _ADVERTISE_PAUSE_CAP@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ADVERTISE_PAUSE_CAP@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh14:
	adrp	x9, _ADVERTISE_PAUSE_ASYM@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ADVERTISE_PAUSE_ASYM@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w3, w8, w9
	mov	x0, x19
	bl	_phy_modify_mmd_changed
	mov	x21, x0
	tbnz	w0, #31, LBB0_2
; %bb.1:
	ldr	w0, [x19]
	bl	_linkmode_adv_to_mii_10gbt_adv_t
	mov	x4, x0
	ldr	w1, [x22]
Lloh17:
	adrp	x8, _MDIO_AN_10GBT_CTRL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MDIO_AN_10GBT_CTRL@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
Lloh20:
	adrp	x8, _MDIO_AN_10GBT_CTRL_ADV10G@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MDIO_AN_10GBT_CTRL_ADV10G@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _MDIO_AN_10GBT_CTRL_ADV5G@GOTPAGE
Lloh24:
	ldr	x9, [x9, _MDIO_AN_10GBT_CTRL_ADV5G@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh26:
	adrp	x9, _MDIO_AN_10GBT_CTRL_ADV2_5G@GOTPAGE
Lloh27:
	ldr	x9, [x9, _MDIO_AN_10GBT_CTRL_ADV2_5G@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w3, w8, w9
	mov	x0, x19
	bl	_phy_modify_mmd_changed
	orr	w8, w0, w21
	cmp	w8, #0
	csinc	w8, w20, wzr, eq
	tst	w0, #0x80000000
	csel	w21, w0, w8, ne
LBB0_2:
	mov	x0, x21
	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	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MDIO_MMD_AN,4,2                ; @MDIO_MMD_AN
	.comm	_MDIO_AN_ADVERTISE,4,2          ; @MDIO_AN_ADVERTISE
	.comm	_ADVERTISE_ALL,4,2              ; @ADVERTISE_ALL
	.comm	_ADVERTISE_100BASE4,4,2         ; @ADVERTISE_100BASE4
	.comm	_ADVERTISE_PAUSE_CAP,4,2        ; @ADVERTISE_PAUSE_CAP
	.comm	_ADVERTISE_PAUSE_ASYM,4,2       ; @ADVERTISE_PAUSE_ASYM
	.comm	_MDIO_AN_10GBT_CTRL,4,2         ; @MDIO_AN_10GBT_CTRL
	.comm	_MDIO_AN_10GBT_CTRL_ADV10G,4,2  ; @MDIO_AN_10GBT_CTRL_ADV10G
	.comm	_MDIO_AN_10GBT_CTRL_ADV5G,4,2   ; @MDIO_AN_10GBT_CTRL_ADV5G
	.comm	_MDIO_AN_10GBT_CTRL_ADV2_5G,4,2 ; @MDIO_AN_10GBT_CTRL_ADV2_5G
.subsections_via_symbols
