	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function genphy_config_advert
_genphy_config_advert:                  ## @genphy_config_advert
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	movl	4(%rbx), %edx
	movl	%edi, %esi
	callq	_linkmode_and
	movl	(%rbx), %edi
	callq	_linkmode_adv_to_mii_adv_t
	movq	_ADVERTISE_ALL@GOTPCREL(%rip), %rcx
	movq	_ADVERTISE_100BASE4@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_MII_ADVERTISE@GOTPCREL(%rip), %rcx
	movq	_ADVERTISE_PAUSE_CAP@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	movl	(%rcx), %esi
	movq	_ADVERTISE_PAUSE_ASYM@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	%rbx, %rdi
	movl	%eax, %ecx
	callq	_phy_modify_changed
	testl	%eax, %eax
	js	LBB0_6
## %bb.1:
	setne	%r14b
	movq	_MII_BMSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_phy_read
	testl	%eax, %eax
	js	LBB0_6
## %bb.2:
	movzbl	%r14b, %r14d
	movq	_BMSR_ESTATEN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.4:
	movl	(%rbx), %edi
	callq	_linkmode_adv_to_mii_ctrl1000_t
	movq	_MII_CTRL1000@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_ADVERTISE_1000FULL@GOTPCREL(%rip), %rcx
	movq	_ADVERTISE_1000HALF@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	%rbx, %rdi
	movl	%eax, %ecx
	callq	_phy_modify_changed
	testl	%eax, %eax
	js	LBB0_6
## %bb.5:
	movl	$1, %eax
	cmovel	%r14d, %eax
	jmp	LBB0_6
LBB0_3:
	movl	%r14d, %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_ADVERTISE,4,2              ## @MII_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	_MII_BMSR,4,2                   ## @MII_BMSR
	.comm	_BMSR_ESTATEN,4,2               ## @BMSR_ESTATEN
	.comm	_MII_CTRL1000,4,2               ## @MII_CTRL1000
	.comm	_ADVERTISE_1000FULL,4,2         ## @ADVERTISE_1000FULL
	.comm	_ADVERTISE_1000HALF,4,2         ## @ADVERTISE_1000HALF
	.no_dead_strip	_genphy_config_advert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function genphy_config_advert
_genphy_config_advert:                  ; @genphy_config_advert
	.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
	mov	x19, x0
	ldr	w0, [x0]
	ldr	w2, [x19, #4]
	mov	x1, x0
	bl	_linkmode_and
	ldr	w0, [x19]
	bl	_linkmode_adv_to_mii_adv_t
	mov	x3, x0
Lloh0:
	adrp	x8, _MII_ADVERTISE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MII_ADVERTISE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _ADVERTISE_ALL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ADVERTISE_ALL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _ADVERTISE_100BASE4@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ADVERTISE_100BASE4@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _ADVERTISE_PAUSE_CAP@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ADVERTISE_PAUSE_CAP@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _ADVERTISE_PAUSE_ASYM@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ADVERTISE_PAUSE_ASYM@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_phy_modify_changed
	tbnz	w0, #31, LBB0_5
; %bb.1:
	cmp	w0, #0
	cset	w20, ne
Lloh15:
	adrp	x8, _MII_BMSR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MII_BMSR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_phy_read
	tbnz	w0, #31, LBB0_5
; %bb.2:
Lloh18:
	adrp	x8, _BMSR_ESTATEN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BMSR_ESTATEN@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x19]
	bl	_linkmode_adv_to_mii_ctrl1000_t
	mov	x3, x0
Lloh21:
	adrp	x8, _MII_CTRL1000@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MII_CTRL1000@GOTPAGEOFF]
Lloh23:
	adrp	x9, _ADVERTISE_1000FULL@GOTPAGE
Lloh24:
	ldr	x9, [x9, _ADVERTISE_1000FULL@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	ldr	w8, [x9]
Lloh27:
	adrp	x9, _ADVERTISE_1000HALF@GOTPAGE
Lloh28:
	ldr	x9, [x9, _ADVERTISE_1000HALF@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_phy_modify_changed
	cmp	w0, #0
	csinc	w8, w20, wzr, eq
	tst	w0, #0x80000000
	csel	w0, w0, w8, ne
	b	LBB0_5
LBB0_4:
	mov	x0, x20
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_ADVERTISE,4,2              ; @MII_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	_MII_BMSR,4,2                   ; @MII_BMSR
	.comm	_BMSR_ESTATEN,4,2               ; @BMSR_ESTATEN
	.comm	_MII_CTRL1000,4,2               ; @MII_CTRL1000
	.comm	_ADVERTISE_1000FULL,4,2         ; @ADVERTISE_1000FULL
	.comm	_ADVERTISE_1000HALF,4,2         ; @ADVERTISE_1000HALF
	.no_dead_strip	_genphy_config_advert
.subsections_via_symbols
