	.file	"extr_adin.c_adin_config_mdix.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	adin_config_mdix, @function
adin_config_mdix:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR [rdi]
	lea	edx, -128[rax]
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	cmp	edx, 2
	jbe	.L14
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	lea	rax, CSWTCH.8[rip]
	mov	esi, DWORD PTR ADIN1300_PHY_CTRL1[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, DWORD PTR [rax+rdx*4]
	lea	rax, CSWTCH.9[rip]
	mov	r12d, DWORD PTR [rax+rdx*4]
	call	phy_read@PLT
	test	eax, eax
	js	.L1
	mov	edx, DWORD PTR ADIN1300_MAN_MDIX_EN[rip]
	mov	ecx, eax
	mov	esi, DWORD PTR ADIN1300_PHY_CTRL1[rip]
	mov	rdi, rbp
	or	ecx, edx
	not	edx
	and	edx, eax
	test	r12d, r12d
	mov	eax, DWORD PTR ADIN1300_AUTO_MDI_EN[rip]
	cmovne	edx, ecx
	mov	ecx, edx
	or	ecx, eax
	not	eax
	and	edx, eax
	test	ebx, ebx
	pop	rbx
	.cfi_remember_state
	.cfi_restore 3
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 16
	cmovne	edx, ecx
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 8
	jmp	phy_write@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	.cfi_restore_state
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	adin_config_mdix, .-adin_config_mdix
	.section	.rodata
	.align 8
	.type	CSWTCH.9, @object
	.size	CSWTCH.9, 12
CSWTCH.9:
	.long	1
	.long	0
	.long	0
	.align 8
	.type	CSWTCH.8, @object
	.size	CSWTCH.8, 12
CSWTCH.8:
	.long	0
	.long	1
	.long	0
	.comm	EINVAL,4,4
	.comm	ADIN1300_PHY_CTRL1,4,4
	.comm	ADIN1300_MAN_MDIX_EN,4,4
	.comm	ADIN1300_AUTO_MDI_EN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_adin.c_adin_config_mdix.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	adin_config_mdix, %function
adin_config_mdix:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0]
	sub	r3, r3, #128
	cmp	r3, #2
	bls	.L16
	ldr	r3, .L17
	ldr	r0, [r3]
	rsb	r0, r0, #0
	bx	lr
.L16:
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r2, .L17+4
	ldr	r5, .L17+8
	add	ip, r2, r3, lsl #2
	ldr	r1, [r5]
	mov	r4, r0
	ldr	r7, [ip, #12]
	ldr	r6, [r2, r3, lsl #2]
	bl	phy_read
	cmp	r0, #0
	poplt	{r4, r5, r6, r7, r8, pc}
	ldr	r3, .L17+12
	cmp	r7, #0
	ldr	r2, [r3]
	ldr	r3, .L17+16
	orrne	r2, r0, r2
	biceq	r2, r0, r2
	ldr	r0, [r3]
	cmp	r6, #0
	ldr	r1, [r5]
	orrne	r2, r2, r0
	biceq	r2, r2, r0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	phy_write
.L18:
	.align	2
.L17:
	.word	EINVAL
	.word	.LANCHOR0
	.word	ADIN1300_PHY_CTRL1
	.word	ADIN1300_MAN_MDIX_EN
	.word	ADIN1300_AUTO_MDI_EN
	.size	adin_config_mdix, .-adin_config_mdix
	.comm	EINVAL,4,4
	.comm	ADIN1300_PHY_CTRL1,4,4
	.comm	ADIN1300_MAN_MDIX_EN,4,4
	.comm	ADIN1300_AUTO_MDI_EN,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
	.type	CSWTCH.8, %object
	.size	CSWTCH.8, 12
CSWTCH.8:
	.word	0
	.word	1
	.word	0
	.type	CSWTCH.9, %object
	.size	CSWTCH.9, 12
CSWTCH.9:
	.word	1
	.word	0
	.word	0
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
