	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adin_mdix_update
_adin_mdix_update:                      ## @adin_mdix_update
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_ADIN1300_PHY_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_phy_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_10
## %bb.1:
	movq	_ADIN1300_AUTO_MDI_EN@GOTPCREL(%rip), %rax
	movq	_ADIN1300_MAN_MDIX_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	testl	%ebx, (%rax)
	je	LBB0_5
## %bb.2:
	movq	_ADIN1300_PHY_STATUS1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_phy_read
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:
	testl	%ebx, %r15d
	setne	%cl
	movq	_ADIN1300_PAIR_01_SWAP@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	sete	%al
	xorb	%cl, %al
	je	LBB0_6
LBB0_7:
	movq	_ETH_TP_MDI@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_5:
	testl	%ebx, %r15d
	je	LBB0_7
LBB0_6:
	movq	_ETH_TP_MDI_X@GOTPCREL(%rip), %rax
LBB0_8:
	movq	(%rax), %rax
	movq	%rax, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_9:
	movl	%eax, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADIN1300_PHY_CTRL1,4,2         ## @ADIN1300_PHY_CTRL1
	.comm	_ADIN1300_AUTO_MDI_EN,4,2       ## @ADIN1300_AUTO_MDI_EN
	.comm	_ADIN1300_MAN_MDIX_EN,4,2       ## @ADIN1300_MAN_MDIX_EN
	.comm	_ETH_TP_MDI_X,8,3               ## @ETH_TP_MDI_X
	.comm	_ETH_TP_MDI,8,3                 ## @ETH_TP_MDI
	.comm	_ADIN1300_PHY_STATUS1,4,2       ## @ADIN1300_PHY_STATUS1
	.comm	_ADIN1300_PAIR_01_SWAP,4,2      ## @ADIN1300_PAIR_01_SWAP
	.no_dead_strip	_adin_mdix_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adin_mdix_update
_adin_mdix_update:                      ; @adin_mdix_update
	.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
Lloh0:
	adrp	x8, _ADIN1300_PHY_CTRL1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADIN1300_PHY_CTRL1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_phy_read
	tbnz	w0, #31, LBB0_6
; %bb.1:
Lloh3:
	adrp	x8, _ADIN1300_AUTO_MDI_EN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ADIN1300_AUTO_MDI_EN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _ADIN1300_MAN_MDIX_EN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ADIN1300_MAN_MDIX_EN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w20, w9, w0
	tst	w8, w0
	b.eq	LBB0_4
; %bb.2:
Lloh9:
	adrp	x8, _ADIN1300_PHY_STATUS1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ADIN1300_PHY_STATUS1@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_phy_read
	tbnz	w0, #31, LBB0_6
; %bb.3:
	cmp	w20, #0
	cset	w8, ne
Lloh12:
	adrp	x9, _ADIN1300_PAIR_01_SWAP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ADIN1300_PAIR_01_SWAP@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w0
	cset	w9, eq
	eor	w8, w8, w9
Lloh15:
	adrp	x9, _ETH_TP_MDI_X@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ETH_TP_MDI_X@GOTPAGEOFF]
Lloh17:
	adrp	x10, _ETH_TP_MDI@GOTPAGE
Lloh18:
	ldr	x10, [x10, _ETH_TP_MDI@GOTPAGEOFF]
	cmp	w8, #0
	csel	x8, x10, x9, ne
	b	LBB0_5
LBB0_4:
Lloh19:
	adrp	x8, _ETH_TP_MDI@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ETH_TP_MDI@GOTPAGEOFF]
Lloh21:
	adrp	x9, _ETH_TP_MDI_X@GOTPAGE
Lloh22:
	ldr	x9, [x9, _ETH_TP_MDI_X@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, ne
LBB0_5:
	mov	w0, #0
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ADIN1300_PHY_CTRL1,4,2         ; @ADIN1300_PHY_CTRL1
	.comm	_ADIN1300_AUTO_MDI_EN,4,2       ; @ADIN1300_AUTO_MDI_EN
	.comm	_ADIN1300_MAN_MDIX_EN,4,2       ; @ADIN1300_MAN_MDIX_EN
	.comm	_ETH_TP_MDI_X,8,3               ; @ETH_TP_MDI_X
	.comm	_ETH_TP_MDI,8,3                 ; @ETH_TP_MDI
	.comm	_ADIN1300_PHY_STATUS1,4,2       ; @ADIN1300_PHY_STATUS1
	.comm	_ADIN1300_PAIR_01_SWAP,4,2      ; @ADIN1300_PAIR_01_SWAP
	.no_dead_strip	_adin_mdix_update
.subsections_via_symbols
