	.file	"extr_tg3.c_tg3_phy_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Could not attach to PHY\n"
	.text
	.p2align 4
	.type	tg3_phy_init, @function
tg3_phy_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	eax, DWORD PTR [rdi]
	and	eax, DWORD PTR TG3_PHYFLG_IS_CONNECTED[rip]
	je	.L13
	xor	r12d, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	rbx, rdi
	mov	r12d, eax
	call	tg3_bmcr_reset@PLT
	mov	esi, DWORD PTR 4[rbx]
	mov	edi, DWORD PTR 8[rbx]
	call	mdiobus_get_phy@PLT
	mov	r13d, DWORD PTR tg3_adjust_link[rip]
	mov	r14d, DWORD PTR [rax]
	mov	rdi, rax
	call	phydev_name@PLT
	mov	edi, DWORD PTR 24[rbx]
	mov	edx, r13d
	mov	esi, eax
	mov	ecx, r14d
	call	phy_connect@PLT
	mov	rdi, rax
	mov	rbp, rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L14
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, 129
	je	.L4
	and	eax, -3
	cmp	eax, 128
	je	.L15
	mov	esi, DWORD PTR 4[rbx]
	mov	edi, DWORD PTR 8[rbx]
	call	mdiobus_get_phy@PLT
	mov	rdi, rax
	call	phy_disconnect@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR TG3_PHYFLG_10_100_ONLY[rip], eax
	je	.L16
.L4:
	mov	esi, DWORD PTR SPEED_100[rip]
	mov	rdi, rbp
	call	phy_set_max_speed@PLT
	mov	rdi, rbp
	call	phy_support_asym_pause@PLT
.L6:
	mov	eax, DWORD PTR TG3_PHYFLG_IS_CONNECTED[rip]
	or	DWORD PTR [rbx], eax
	mov	rdi, rbp
	call	phy_attached_info@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	rdi, QWORD PTR 16[rbx]
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	PTR_ERR@PLT
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	esi, DWORD PTR SPEED_1000[rip]
	mov	rdi, rbp
	call	phy_set_max_speed@PLT
	mov	rdi, rbp
	call	phy_support_asym_pause@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	tg3_phy_init, .-tg3_phy_init
	.comm	tg3_adjust_link,4,4
	.comm	TG3_PHYFLG_IS_CONNECTED,4,4
	.comm	TG3_PHYFLG_10_100_ONLY,4,4
	.comm	SPEED_1000,4,4
	.comm	SPEED_100,4,4
	.comm	EINVAL,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_tg3.c_tg3_phy_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Could not attach to PHY\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tg3_phy_init, %function
tg3_phy_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r6, .L17
	ldr	r2, [r0]
	ldr	r3, [r6]
	tst	r2, r3
	movne	r5, #0
	beq	.L14
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	mov	r4, r0
	bl	tg3_bmcr_reset
	ldr	r1, [r4, #4]
	ldr	r0, [r4, #8]
	bl	mdiobus_get_phy
	ldr	r7, [r4, #16]
	mov	r5, r0
	bl	phydev_name
	ldr	r2, .L17+4
	mov	r1, r0
	ldr	r3, [r5]
	mov	r0, r7
	ldr	r2, [r2]
	bl	phy_connect
	mov	r7, r0
	bl	IS_ERR
	subs	r5, r0, #0
	bne	.L15
	ldr	r3, [r7]
	cmp	r3, #129
	beq	.L4
	bic	r3, r3, #2
	cmp	r3, #128
	beq	.L16
	ldr	r1, [r4, #4]
	ldr	r0, [r4, #8]
	bl	mdiobus_get_phy
	bl	phy_disconnect
	ldr	r3, .L17+8
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	ldr	r3, .L17+12
	ldr	r2, [r4]
	ldr	r3, [r3]
	tst	r2, r3
	ldreq	r3, .L17+16
	beq	.L12
.L4:
	ldr	r3, .L17+20
.L12:
	ldr	r1, [r3]
	mov	r0, r7
	bl	phy_set_max_speed
	mov	r0, r7
	bl	phy_support_asym_pause
	ldr	r2, [r6]
	ldr	r3, [r4]
	mov	r0, r7
	orr	r3, r3, r2
	str	r3, [r4]
	bl	phy_attached_info
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	ldr	r0, [r4, #12]
	ldr	r1, .L17+24
	bl	dev_err
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, lr}
	b	PTR_ERR
.L18:
	.align	2
.L17:
	.word	TG3_PHYFLG_IS_CONNECTED
	.word	tg3_adjust_link
	.word	EINVAL
	.word	TG3_PHYFLG_10_100_ONLY
	.word	SPEED_1000
	.word	SPEED_100
	.word	.LC0
	.size	tg3_phy_init, .-tg3_phy_init
	.comm	tg3_adjust_link,4,4
	.comm	TG3_PHYFLG_IS_CONNECTED,4,4
	.comm	TG3_PHYFLG_10_100_ONLY,4,4
	.comm	SPEED_1000,4,4
	.comm	SPEED_100,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
