	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vsc85xx_mdix_set
_vsc85xx_mdix_set:                      ## @vsc85xx_mdix_set
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_MSCC_PHY_BYPASS_CONTROL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_phy_read
	movq	_ETH_TP_MDI@GOTPCREL(%rip), %r12
	movq	_ETH_TP_MDI_X@GOTPCREL(%rip), %r15
	movq	_DISABLE_PAIR_SWAP_CORR_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_DISABLE_POLARITY_CORR_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpq	%rbx, (%r12)
	je	LBB0_2
## %bb.1:
	cmpq	%rbx, (%r15)
	je	LBB0_2
## %bb.3:
	orl	%edx, %ecx
	movq	_DISABLE_HP_AUTO_MDIX_MASK@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, %edx
	jmp	LBB0_4
LBB0_2:
	movq	_DISABLE_HP_AUTO_MDIX_MASK@GOTPCREL(%rip), %rsi
	orl	%eax, %edx
	orl	%ecx, %edx
	orl	(%rsi), %edx
LBB0_4:
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_phy_write
	testl	%eax, %eax
	je	LBB0_5
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	cmpq	%rbx, (%r12)
	jne	LBB0_7
## %bb.6:
	movq	_FORCE_MDI_CROSSOVER_MDI@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	xorl	%r8d, %r8d
	cmpq	%rbx, (%r15)
	jne	LBB0_10
## %bb.8:
	movq	_FORCE_MDI_CROSSOVER_MDIX@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %r8d
LBB0_10:
	movq	_MSCC_PHY_PAGE_EXTENDED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MSCC_PHY_EXT_MODE_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_FORCE_MDI_CROSSOVER_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_phy_modify_paged
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_genphy_restart_aneg            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MSCC_PHY_BYPASS_CONTROL,4,2    ## @MSCC_PHY_BYPASS_CONTROL
	.comm	_ETH_TP_MDI,8,3                 ## @ETH_TP_MDI
	.comm	_ETH_TP_MDI_X,8,3               ## @ETH_TP_MDI_X
	.comm	_DISABLE_PAIR_SWAP_CORR_MASK,4,2 ## @DISABLE_PAIR_SWAP_CORR_MASK
	.comm	_DISABLE_POLARITY_CORR_MASK,4,2 ## @DISABLE_POLARITY_CORR_MASK
	.comm	_DISABLE_HP_AUTO_MDIX_MASK,4,2  ## @DISABLE_HP_AUTO_MDIX_MASK
	.comm	_FORCE_MDI_CROSSOVER_MDI,4,2    ## @FORCE_MDI_CROSSOVER_MDI
	.comm	_FORCE_MDI_CROSSOVER_MDIX,4,2   ## @FORCE_MDI_CROSSOVER_MDIX
	.comm	_MSCC_PHY_PAGE_EXTENDED,4,2     ## @MSCC_PHY_PAGE_EXTENDED
	.comm	_MSCC_PHY_EXT_MODE_CNTL,4,2     ## @MSCC_PHY_EXT_MODE_CNTL
	.comm	_FORCE_MDI_CROSSOVER_MASK,4,2   ## @FORCE_MDI_CROSSOVER_MASK
	.no_dead_strip	_vsc85xx_mdix_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vsc85xx_mdix_set
_vsc85xx_mdix_set:                      ; @vsc85xx_mdix_set
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _MSCC_PHY_BYPASS_CONTROL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MSCC_PHY_BYPASS_CONTROL@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_phy_read
Lloh2:
	adrp	x22, _ETH_TP_MDI@GOTPAGE
Lloh3:
	ldr	x22, [x22, _ETH_TP_MDI@GOTPAGEOFF]
	ldr	x10, [x22]
Lloh4:
	adrp	x21, _ETH_TP_MDI_X@GOTPAGE
Lloh5:
	ldr	x21, [x21, _ETH_TP_MDI_X@GOTPAGEOFF]
	ldr	x11, [x21]
Lloh6:
	adrp	x8, _DISABLE_PAIR_SWAP_CORR_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DISABLE_PAIR_SWAP_CORR_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _DISABLE_POLARITY_CORR_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DISABLE_POLARITY_CORR_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	x10, x20
	ccmp	x11, x20, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh12:
	adrp	x10, _DISABLE_HP_AUTO_MDIX_MASK@GOTPAGE
Lloh13:
	ldr	x10, [x10, _DISABLE_HP_AUTO_MDIX_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w8, w8, w0
	orr	w8, w8, w9
	orr	w2, w8, w10
	b	LBB0_3
LBB0_2:
	orr	w8, w9, w8
Lloh15:
	adrp	x9, _DISABLE_HP_AUTO_MDIX_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DISABLE_HP_AUTO_MDIX_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w8, w9
	bic	w2, w0, w8
LBB0_3:
	ldr	w1, [x23]
	mov	x0, x19
	bl	_phy_write
	cbz	w0, LBB0_5
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	x8, [x22]
	cmp	x8, x20
	b.ne	LBB0_7
; %bb.6:
Lloh18:
	adrp	x8, _FORCE_MDI_CROSSOVER_MDI@GOTPAGE
Lloh19:
	ldr	x8, [x8, _FORCE_MDI_CROSSOVER_MDI@GOTPAGEOFF]
Lloh20:
	ldr	w4, [x8]
	b	LBB0_8
LBB0_7:
	ldr	x8, [x21]
Lloh21:
	adrp	x9, _FORCE_MDI_CROSSOVER_MDIX@GOTPAGE
Lloh22:
	ldr	x9, [x9, _FORCE_MDI_CROSSOVER_MDIX@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	cmp	x8, x20
	csel	w4, w9, wzr, eq
LBB0_8:
Lloh24:
	adrp	x8, _MSCC_PHY_PAGE_EXTENDED@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MSCC_PHY_PAGE_EXTENDED@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x8, _MSCC_PHY_EXT_MODE_CNTL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MSCC_PHY_EXT_MODE_CNTL@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
Lloh30:
	adrp	x8, _FORCE_MDI_CROSSOVER_MASK@GOTPAGE
Lloh31:
	ldr	x8, [x8, _FORCE_MDI_CROSSOVER_MASK@GOTPAGEOFF]
Lloh32:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_phy_modify_paged
	tbnz	w0, #31, LBB0_4
; %bb.9:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_genphy_restart_aneg
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MSCC_PHY_BYPASS_CONTROL,4,2    ; @MSCC_PHY_BYPASS_CONTROL
	.comm	_ETH_TP_MDI,8,3                 ; @ETH_TP_MDI
	.comm	_ETH_TP_MDI_X,8,3               ; @ETH_TP_MDI_X
	.comm	_DISABLE_PAIR_SWAP_CORR_MASK,4,2 ; @DISABLE_PAIR_SWAP_CORR_MASK
	.comm	_DISABLE_POLARITY_CORR_MASK,4,2 ; @DISABLE_POLARITY_CORR_MASK
	.comm	_DISABLE_HP_AUTO_MDIX_MASK,4,2  ; @DISABLE_HP_AUTO_MDIX_MASK
	.comm	_FORCE_MDI_CROSSOVER_MDI,4,2    ; @FORCE_MDI_CROSSOVER_MDI
	.comm	_FORCE_MDI_CROSSOVER_MDIX,4,2   ; @FORCE_MDI_CROSSOVER_MDIX
	.comm	_MSCC_PHY_PAGE_EXTENDED,4,2     ; @MSCC_PHY_PAGE_EXTENDED
	.comm	_MSCC_PHY_EXT_MODE_CNTL,4,2     ; @MSCC_PHY_EXT_MODE_CNTL
	.comm	_FORCE_MDI_CROSSOVER_MASK,4,2   ; @FORCE_MDI_CROSSOVER_MASK
	.no_dead_strip	_vsc85xx_mdix_set
.subsections_via_symbols
