	.file	"extr_lan9303-core.c_lan9303_adjust_link.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"unsupported speed: %d\n"
	.text
	.p2align 4
	.type	lan9303_adjust_link, @function
lan9303_adjust_link:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdx
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	r13, QWORD PTR 8[rdi]
	mov	rdi, rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	phy_is_pseudo_fixed_link@PLT
	test	eax, eax
	jne	.L12
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	edx, DWORD PTR MII_BMCR[rip]
	mov	esi, r12d
	mov	rdi, rbp
	call	lan9303_phy_read@PLT
	mov	rdx, QWORD PTR [rbx]
	mov	r8d, eax
	mov	eax, DWORD PTR BMCR_ANENABLE[rip]
	not	eax
	and	eax, r8d
	cmp	rdx, QWORD PTR SPEED_100[rip]
	mov	DWORD PTR 4[rsp], eax
	je	.L14
	cmp	rdx, QWORD PTR SPEED_10[rip]
	jne	.L5
	mov	edx, DWORD PTR BMCR_SPEED100[rip]
	not	edx
	and	eax, edx
.L4:
	mov	edx, DWORD PTR BMCR_FULLDPLX[rip]
	mov	rsi, QWORD PTR DUPLEX_FULL[rip]
	mov	ecx, edx
	not	ecx
	and	ecx, eax
	cmp	QWORD PTR 8[rbx], rsi
	jne	.L7
	or	eax, edx
	mov	ecx, eax
.L7:
	mov	edx, DWORD PTR MII_BMCR[rip]
	mov	esi, r12d
	mov	rdi, rbp
	mov	DWORD PTR 4[rsp], ecx
	call	lan9303_phy_write@PLT
	cmp	DWORD PTR 0[r13], r12d
	jne	.L1
	mov	edi, DWORD PTR 4[r13]
	mov	esi, DWORD PTR LAN9303_VIRT_SPECIAL_CTRL[rip]
	lea	rdx, 4[rsp]
	call	lan9303_read@PLT
	mov	edx, DWORD PTR LAN9303_VIRT_SPECIAL_TURBO[rip]
	mov	edi, DWORD PTR 4[r13]
	mov	esi, DWORD PTR LAN9303_VIRT_SPECIAL_CTRL[rip]
	not	edx
	and	edx, DWORD PTR 4[rsp]
	mov	DWORD PTR 4[rsp], edx
	call	regmap_write@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, DWORD PTR 0[rbp]
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	eax, DWORD PTR 4[rsp]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L14:
	or	eax, DWORD PTR BMCR_SPEED100[rip]
	jmp	.L4
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	lan9303_adjust_link, .-lan9303_adjust_link
	.comm	SPEED_100,8,8
	.comm	SPEED_10,8,8
	.comm	MII_BMCR,4,4
	.comm	LAN9303_VIRT_SPECIAL_TURBO,4,4
	.comm	LAN9303_VIRT_SPECIAL_CTRL,4,4
	.comm	DUPLEX_FULL,8,8
	.comm	BMCR_SPEED100,4,4
	.comm	BMCR_FULLDPLX,4,4
	.comm	BMCR_ANENABLE,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_lan9303-core.c_lan9303_adjust_link.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"unsupported speed: %d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lan9303_adjust_link, %function
lan9303_adjust_link:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r3, .L15
	sub	sp, sp, #8
	mov	r0, r2
	mov	r5, r2
	mov	r6, r1
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	ldr	r7, [r4, #4]
	bl	phy_is_pseudo_fixed_link
	cmp	r0, #0
	bne	.L12
.L1:
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	ldr	r8, .L15+4
	mov	r1, r6
	ldr	r2, [r8]
	mov	r0, r4
	bl	lan9303_phy_read
	ldr	r2, .L15+8
	ldr	r3, .L15+12
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, [r5]
	bic	r0, r0, r3
	cmp	r2, r1
	str	r0, [sp]
	beq	.L14
	ldr	r3, .L15+16
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L5
	ldr	r3, .L15+20
	ldr	r3, [r3]
	bic	r3, r0, r3
.L4:
	ldr	r2, .L15+24
	ldr	r0, [r5, #4]
	ldr	r1, [r2]
	ldr	r2, .L15+28
	cmp	r0, r1
	ldr	r0, [r2]
	mov	r1, r6
	orreq	r3, r3, r0
	bicne	r3, r3, r0
	ldr	r2, [r8]
	mov	r0, r4
	str	r3, [sp]
	bl	lan9303_phy_write
	ldr	r3, [r7]
	cmp	r3, r6
	bne	.L1
	ldr	r4, .L15+32
	mov	r2, sp
	ldr	r1, [r4]
	ldr	r0, [r7, #4]
	bl	lan9303_read
	ldr	r3, .L15+36
	ldr	r2, [sp]
	ldr	r3, [r3]
	ldr	r1, [r4]
	bic	r2, r2, r3
	ldr	r0, [r7, #4]
	str	r2, [sp]
	bl	regmap_write
	b	.L1
.L5:
	ldr	r1, .L15+40
	ldr	r0, [r4]
	bl	dev_err
	ldr	r3, [sp]
	b	.L4
.L14:
	ldr	r3, .L15+20
	ldr	r3, [r3]
	orr	r3, r0, r3
	b	.L4
.L13:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	.LC1
	.word	MII_BMCR
	.word	SPEED_100
	.word	BMCR_ANENABLE
	.word	SPEED_10
	.word	BMCR_SPEED100
	.word	DUPLEX_FULL
	.word	BMCR_FULLDPLX
	.word	LAN9303_VIRT_SPECIAL_CTRL
	.word	LAN9303_VIRT_SPECIAL_TURBO
	.word	.LC0
	.size	lan9303_adjust_link, .-lan9303_adjust_link
	.comm	SPEED_100,4,4
	.comm	SPEED_10,4,4
	.comm	MII_BMCR,4,4
	.comm	LAN9303_VIRT_SPECIAL_TURBO,4,4
	.comm	LAN9303_VIRT_SPECIAL_CTRL,4,4
	.comm	DUPLEX_FULL,4,4
	.comm	BMCR_SPEED100,4,4
	.comm	BMCR_FULLDPLX,4,4
	.comm	BMCR_ANENABLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
