	.file	"extr_t3_hw.c_t3_link_changed.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	t3_link_changed
	.type	t3_link_changed, @function
t3_link_changed:
.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
	sub	rsp, 56
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	adap2pinfo@PLT
	lea	rdx, 16[rsp]
	lea	rcx, 20[rsp]
	mov	rbx, rax
	lea	rdi, 56[rax]
	lea	r13, 40[rax]
	mov	rax, QWORD PTR 56[rax]
	lea	rsi, 12[rsp]
	lea	r8, 24[rsp]
	call	[QWORD PTR [rax]]
	mov	edx, DWORD PTR 8[rbx]
	test	edx, edx
	jne	.L37
	mov	edx, DWORD PTR 12[rsp]
	xor	eax, eax
	test	edx, edx
	jne	.L40
	mov	r9d, DWORD PTR 12[rbx]
	test	DWORD PTR PAUSE_AUTONEG[rip], r9d
	je	.L5
.L45:
	and	r9d, DWORD PTR 24[rsp]
	mov	DWORD PTR 24[rsp], r9d
	cmp	eax, edx
	je	.L41
.L7:
	cmp	QWORD PTR 0[rbp], 0
	jg	.L10
	mov	r10d, DWORD PTR 16[rsp]
	mov	r8d, DWORD PTR 20[rsp]
.L8:
	mov	DWORD PTR 8[rbx], eax
	test	r10d, r10d
	js	.L42
.L15:
	mov	DWORD PTR 16[rbx], r10d
	test	r8d, r8d
	js	.L18
	mov	edx, r8d
.L17:
	mov	DWORD PTR 20[rbx], edx
	test	r10d, r10d
	js	.L19
	test	eax, eax
	je	.L21
	mov	rax, QWORD PTR AUTONEG_ENABLE[rip]
	cmp	QWORD PTR 32[rbx], rax
	je	.L43
.L20:
	mov	eax, DWORD PTR [rbx]
	mov	edx, 1
	test	eax, eax
	jne	.L21
.L22:
	mov	ecx, r10d
	mov	esi, r12d
	mov	rdi, rbp
	call	t3_os_link_changed@PLT
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L44
	add	rsp, 56
	.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
.L40:
	.cfi_restore_state
	mov	esi, r12d
	mov	rdi, rbp
	call	t3_xgm_intr_enable@PLT
	lea	rcx, 36[rsp]
	lea	rdx, 32[rsp]
	mov	rdi, r13
	lea	rsi, 28[rsp]
	call	t3_gate_rx_traffic@PLT
	xor	edx, edx
	mov	rsi, QWORD PTR A_XGM_RX_CTRL[rip]
	mov	rdi, rbp
	add	rsi, QWORD PTR 40[rbx]
	call	t3_write_reg@PLT
	mov	esi, DWORD PTR MAC_DIRECTION_RX[rip]
	mov	rdi, r13
	call	t3_mac_enable@PLT
	mov	rsi, QWORD PTR A_XGM_INT_STATUS[rip]
	mov	rdi, rbp
	add	rsi, QWORD PTR 40[rbx]
	call	t3_read_reg@PLT
	test	DWORD PTR F_LINKFAULTCHANGE[rip], eax
	je	.L4
	add	DWORD PTR 48[rbx], 1
	mov	DWORD PTR [rbx], 1
.L4:
	mov	edx, DWORD PTR 32[rsp]
	mov	ecx, DWORD PTR 36[rsp]
	mov	rdi, r13
	mov	esi, DWORD PTR 28[rsp]
	call	t3_open_rx_traffic@PLT
	mov	edx, DWORD PTR 8[rbx]
.L37:
	mov	eax, DWORD PTR 12[rsp]
	mov	r9d, DWORD PTR 12[rbx]
	test	DWORD PTR PAUSE_AUTONEG[rip], r9d
	jne	.L45
.L5:
	mov	ecx, DWORD PTR PAUSE_RX[rip]
	or	ecx, DWORD PTR PAUSE_TX[rip]
	and	r9d, ecx
	mov	DWORD PTR 24[rsp], r9d
	cmp	eax, edx
	jne	.L7
.L41:
	mov	r10d, DWORD PTR 16[rsp]
	mov	r8d, DWORD PTR 20[rsp]
	cmp	DWORD PTR 16[rbx], r10d
	jne	.L8
	cmp	DWORD PTR 20[rbx], r8d
	jne	.L8
	cmp	DWORD PTR 24[rbx], r9d
	jne	.L8
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdi, rbp
	call	uses_xaui@PLT
	test	rax, rax
	je	.L38
	mov	ecx, DWORD PTR 12[rsp]
	test	ecx, ecx
	jne	.L12
.L14:
	xor	edx, edx
.L13:
	mov	rsi, QWORD PTR A_XGM_XAUI_ACT_CTRL[rip]
	mov	rdi, rbp
	add	rsi, QWORD PTR 40[rbx]
	call	t3_write_reg@PLT
.L38:
	mov	eax, DWORD PTR 12[rsp]
	mov	r10d, DWORD PTR 16[rsp]
	mov	r8d, DWORD PTR 20[rsp]
	mov	r9d, DWORD PTR 24[rsp]
	mov	DWORD PTR 8[rbx], eax
	test	r10d, r10d
	jns	.L15
.L42:
	mov	edx, DWORD PTR SPEED_INVALID[rip]
	mov	DWORD PTR 16[rbx], edx
	test	r8d, r8d
	js	.L18
	mov	DWORD PTR 20[rbx], r8d
.L19:
	test	eax, eax
	jne	.L20
.L21:
	xor	edx, edx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L18:
	mov	edx, DWORD PTR DUPLEX_INVALID[rip]
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rdi, r13
	call	t3b_pcs_reset@PLT
	mov	edx, DWORD PTR 12[rsp]
	test	edx, edx
	je	.L14
	mov	edx, DWORD PTR F_TXACTENABLE[rip]
	or	edx, DWORD PTR F_RXEN[rip]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L43:
	mov	ecx, r9d
	mov	edx, r8d
	mov	esi, r10d
	mov	rdi, r13
	call	t3_mac_set_speed_duplex_fc@PLT
	mov	r9d, DWORD PTR 24[rsp]
	mov	r8d, DWORD PTR 20[rsp]
	mov	r10d, DWORD PTR 16[rsp]
	mov	eax, DWORD PTR 12[rsp]
	mov	DWORD PTR 24[rbx], r9d
	jmp	.L19
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	t3_link_changed, .-t3_link_changed
	.comm	SPEED_INVALID,4,4
	.comm	PAUSE_TX,4,4
	.comm	PAUSE_RX,4,4
	.comm	PAUSE_AUTONEG,4,4
	.comm	MAC_DIRECTION_RX,4,4
	.comm	F_TXACTENABLE,4,4
	.comm	F_RXEN,4,4
	.comm	F_LINKFAULTCHANGE,4,4
	.comm	DUPLEX_INVALID,4,4
	.comm	A_XGM_XAUI_ACT_CTRL,8,8
	.comm	A_XGM_RX_CTRL,8,8
	.comm	A_XGM_INT_STATUS,8,8
	.comm	AUTONEG_ENABLE,8,8
	.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_t3_hw.c_t3_link_changed.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	t3_link_changed
	.syntax unified
	.arm
	.fpu softvfp
	.type	t3_link_changed, %function
t3_link_changed:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L48
	sub	sp, sp, #44
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	mov	r6, r1
	mov	r5, r0
	bl	adap2pinfo
	mov	r4, r0
	ldr	r3, [r0, #36]
	add	r2, sp, #20
	str	r2, [sp]
	ldr	r7, [r3]
	add	r1, sp, #8
	add	r0, r0, #36
	add	r3, sp, #16
	add	r2, sp, #12
	blx	r7
	ldr	r1, [r4, #4]
	add	r7, r4, #28
	cmp	r1, #0
	bne	.L38
	ldr	r1, [sp, #8]
	cmp	r1, #0
	moveq	r2, r1
	bne	.L41
.L3:
	ldr	r3, .L48+4
	ldr	r0, [r4, #8]
	ldr	r3, [r3]
	tst	r0, r3
	ldreq	r3, .L48+8
	ldreq	ip, .L48+12
	ldreq	r3, [r3]
	ldreq	ip, [ip]
	ldrne	r3, [sp, #20]
	orreq	r3, r3, ip
	and	r3, r3, r0
	cmp	r2, r1
	str	r3, [sp, #20]
	beq	.L42
	ldr	r1, [r5]
	cmp	r1, #0
	bgt	.L10
	ldr	ip, [sp, #12]
	ldr	lr, [sp, #16]
.L8:
	cmp	ip, #0
	str	r2, [r4, #4]
	blt	.L43
.L14:
	cmp	lr, #0
	str	ip, [r4, #12]
	blt	.L17
	mov	r1, lr
.L16:
	mvn	r0, ip
	cmp	r2, #0
	lsr	r0, r0, #31
	moveq	r0, #0
	cmp	r0, #0
	str	r1, [r4, #16]
	bne	.L44
.L18:
	cmp	r2, #0
	bne	.L19
.L20:
	mov	r2, #0
.L21:
	str	r3, [sp, #4]
	mov	r1, r6
	mov	r3, ip
	mov	r0, r5
	str	lr, [sp]
	bl	t3_os_link_changed
.L1:
	ldr	r3, .L48
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L45
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L41:
	mov	r1, r6
	mov	r0, r5
	bl	t3_xgm_intr_enable
	add	r3, sp, #32
	add	r2, sp, #28
	add	r1, sp, #24
	mov	r0, r7
	bl	t3_gate_rx_traffic
	ldr	r3, .L48+16
	ldr	r1, [r4, #28]
	ldr	r3, [r3]
	mov	r2, #0
	add	r1, r1, r3
	mov	r0, r5
	bl	t3_write_reg
	ldr	r3, .L48+20
	mov	r0, r7
	ldr	r1, [r3]
	bl	t3_mac_enable
	ldr	r3, .L48+24
	ldr	r1, [r4, #28]
	ldr	r3, [r3]
	mov	r0, r5
	add	r1, r1, r3
	bl	t3_read_reg
	ldr	r3, .L48+28
	add	r1, sp, #24
	ldr	r3, [r3]
	tst	r0, r3
	movne	r2, #1
	ldrne	r3, [r4, #32]
	strne	r2, [r4]
	addne	r3, r3, r2
	strne	r3, [r4, #32]
	mov	r0, r7
	ldm	r1, {r1, r2, r3}
	bl	t3_open_rx_traffic
	ldr	r1, [r4, #4]
.L38:
	ldr	r2, [sp, #8]
	b	.L3
.L10:
	mov	r0, r5
	bl	uses_xaui
	cmp	r0, #0
	ldr	r2, [sp, #8]
	beq	.L39
	cmp	r2, #0
	bne	.L46
	ldr	r3, .L48+32
	ldr	r1, [r4, #28]
	ldr	r3, [r3]
	add	r1, r1, r3
.L13:
	mov	r0, r5
	bl	t3_write_reg
	ldr	r2, [sp, #8]
.L39:
	ldr	ip, [sp, #12]
	ldr	lr, [sp, #16]
	cmp	ip, #0
	ldr	r3, [sp, #20]
	str	r2, [r4, #4]
	bge	.L14
.L43:
	ldr	r1, .L48+36
	cmp	lr, #0
	ldr	r1, [r1]
	strge	lr, [r4, #16]
	str	r1, [r4, #12]
	bge	.L18
.L17:
	ldr	r1, .L48+40
	ldr	r1, [r1]
	b	.L16
.L44:
	ldr	r2, .L48+44
	ldr	r1, [r4, #24]
	ldr	r2, [r2]
	cmp	r1, r2
	beq	.L47
.L19:
	ldr	r2, [r4]
	cmp	r2, #0
	moveq	r2, #1
	beq	.L21
	b	.L20
.L42:
	ldr	ip, [sp, #12]
	ldr	r1, [r4, #12]
	ldr	lr, [sp, #16]
	cmp	r1, ip
	bne	.L8
	ldr	r1, [r4, #16]
	cmp	r1, lr
	bne	.L8
	ldr	r1, [r4, #20]
	cmp	r1, r3
	bne	.L8
	b	.L1
.L47:
	mov	r2, lr
	mov	r1, ip
	mov	r0, r7
	bl	t3_mac_set_speed_duplex_fc
	ldr	r3, [sp, #20]
	add	r2, sp, #8
	str	r3, [r4, #20]
	ldm	r2, {r2, ip, lr}
	b	.L18
.L46:
	mov	r0, r7
	bl	t3b_pcs_reset
	ldr	r3, .L48+32
	ldr	r2, [sp, #8]
	ldr	r3, [r3]
	ldr	r1, [r4, #28]
	cmp	r2, #0
	ldrne	r2, .L48+48
	add	r1, r1, r3
	ldrne	r3, .L48+52
	ldrne	r2, [r2]
	ldrne	r3, [r3]
	orrne	r2, r2, r3
	b	.L13
.L45:
	bl	__stack_chk_fail
.L49:
	.align	2
.L48:
	.word	.LC0
	.word	PAUSE_AUTONEG
	.word	PAUSE_RX
	.word	PAUSE_TX
	.word	A_XGM_RX_CTRL
	.word	MAC_DIRECTION_RX
	.word	A_XGM_INT_STATUS
	.word	F_LINKFAULTCHANGE
	.word	A_XGM_XAUI_ACT_CTRL
	.word	SPEED_INVALID
	.word	DUPLEX_INVALID
	.word	AUTONEG_ENABLE
	.word	F_TXACTENABLE
	.word	F_RXEN
	.size	t3_link_changed, .-t3_link_changed
	.comm	SPEED_INVALID,4,4
	.comm	PAUSE_TX,4,4
	.comm	PAUSE_RX,4,4
	.comm	PAUSE_AUTONEG,4,4
	.comm	MAC_DIRECTION_RX,4,4
	.comm	F_TXACTENABLE,4,4
	.comm	F_RXEN,4,4
	.comm	F_LINKFAULTCHANGE,4,4
	.comm	DUPLEX_INVALID,4,4
	.comm	A_XGM_XAUI_ACT_CTRL,4,4
	.comm	A_XGM_RX_CTRL,4,4
	.comm	A_XGM_INT_STATUS,4,4
	.comm	AUTONEG_ENABLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
