	.file	"extr_if_tsec.c_tsec_miibus_statchg.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"up"
.LC1:
	.string	"down"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"No speed selected but link active!\n"
	.section	.rodata.str1.1
.LC3:
	.string	"Unknown speed (%d), link %s!\n"
	.text
	.p2align 4
	.globl	tsec_miibus_statchg
	.type	tsec_miibus_statchg, @function
tsec_miibus_statchg:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	xor	r13d, r13d
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	device_get_softc@PLT
	mov	esi, DWORD PTR TSEC_REG_MACCFG2[rip]
	mov	r15, QWORD PTR 8[rax]
	mov	rdi, rax
	mov	r14, rax
	mov	ebp, DWORD PTR [r15]
	and	ebp, DWORD PTR IFM_ACTIVE[rip]
	setne	r13b
	call	TSEC_READ@PLT
	mov	ebx, DWORD PTR TSEC_MACCFG2_IF[rip]
	mov	edi, DWORD PTR 4[r15]
	not	ebx
	and	ebx, eax
	mov	eax, DWORD PTR IFM_GMASK[rip]
	and	eax, edi
	cmp	eax, DWORD PTR IFM_FDX[rip]
	je	.L24
	mov	eax, DWORD PTR TSEC_MACCFG2_FULLDUPLEX[rip]
	not	eax
	and	ebx, eax
.L3:
	call	IFM_SUBTYPE@PLT
	cmp	eax, 130
	jg	.L4
	cmp	eax, 128
	jg	.L5
	jne	.L7
	test	ebp, ebp
	jne	.L25
.L9:
	mov	DWORD PTR [r14], 0
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	sub	eax, 131
	cmp	eax, 1
	ja	.L7
	or	ebx, DWORD PTR TSEC_MACCFG2_GMII[rip]
	mov	DWORD PTR [r14], r13d
.L8:
	mov	esi, DWORD PTR TSEC_REG_MACCFG2[rip]
	mov	rdi, r14
	mov	edx, ebx
	call	TSEC_WRITE@PLT
	mov	esi, DWORD PTR TSEC_REG_ID2[rip]
	mov	rdi, r14
	call	TSEC_READ@PLT
	test	ax, ax
	je	.L1
	mov	esi, DWORD PTR TSEC_REG_ECNTRL[rip]
	mov	rdi, r14
	call	TSEC_READ@PLT
	mov	ecx, DWORD PTR TSEC_ECNTRL_R100M[rip]
	mov	esi, DWORD PTR TSEC_REG_ECNTRL[rip]
	mov	rdi, r14
	mov	edx, ecx
	not	edx
	and	edx, eax
	or	eax, ecx
	test	DWORD PTR TSEC_MACCFG2_MII[rip], ebx
	cmovne	edx, eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	TSEC_WRITE@PLT
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	or	ebx, DWORD PTR TSEC_MACCFG2_FULLDUPLEX[rip]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L7:
	mov	DWORD PTR [r14], 0
	test	ebp, ebp
	mov	edi, DWORD PTR 4[r15]
	lea	rcx, .LC1[rip]
	lea	r13, .LC0[rip]
	cmove	r13, rcx
	call	IFM_SUBTYPE@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	edi, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	mov	edx, eax
	pop	rbp
	.cfi_def_cfa_offset 40
	mov	rcx, r13
	pop	r12
	.cfi_def_cfa_offset 32
	lea	rsi, .LC3[rip]
	pop	r13
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	device_printf@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	or	ebx, DWORD PTR TSEC_MACCFG2_MII[rip]
	mov	DWORD PTR [r14], r13d
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L25:
	lea	rsi, .LC2[rip]
	mov	edi, r12d
	xor	eax, eax
	call	device_printf@PLT
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	tsec_miibus_statchg, .-tsec_miibus_statchg
	.comm	TSEC_REG_MACCFG2,4,4
	.comm	TSEC_REG_ID2,4,4
	.comm	TSEC_REG_ECNTRL,4,4
	.comm	TSEC_MACCFG2_MII,4,4
	.comm	TSEC_MACCFG2_IF,4,4
	.comm	TSEC_MACCFG2_GMII,4,4
	.comm	TSEC_MACCFG2_FULLDUPLEX,4,4
	.comm	TSEC_ECNTRL_R100M,4,4
	.comm	IFM_GMASK,4,4
	.comm	IFM_FDX,4,4
	.comm	IFM_ACTIVE,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_if_tsec.c_tsec_miibus_statchg.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"up\000"
	.align	2
.LC1:
	.ascii	"down\000"
	.align	2
.LC2:
	.ascii	"No speed selected but link active!\012\000"
	.align	2
.LC3:
	.ascii	"Unknown speed (%d), link %s!\012\000"
	.text
	.align	2
	.global	tsec_miibus_statchg
	.syntax unified
	.arm
	.fpu softvfp
	.type	tsec_miibus_statchg, %function
tsec_miibus_statchg:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r7, r0
	bl	device_get_softc
	ldr	r3, .L26
	ldr	r10, [r0, #4]
	ldr	r3, [r3]
	ldr	r6, [r10]
	ldr	r8, .L26+4
	ands	r6, r6, r3
	ldr	r1, [r8]
	movne	r9, #1
	moveq	r9, #0
	mov	r4, r0
	bl	TSEC_READ
	mov	r5, r0
	ldr	r3, .L26+8
	ldr	r1, .L26+12
	ldr	r3, [r3]
	ldr	r0, [r10, #4]
	ldr	r1, [r1]
	ldr	r2, .L26+16
	and	r3, r3, r0
	cmp	r3, r1
	ldr	r2, [r2]
	ldr	r3, .L26+20
	bic	r5, r5, r2
	ldr	r2, [r3]
	orreq	r5, r5, r2
	bicne	r5, r5, r2
	bl	IFM_SUBTYPE
	cmp	r0, #130
	bgt	.L4
	cmp	r0, #128
	bgt	.L5
	bne	.L7
	cmp	r6, #0
	bne	.L25
.L9:
	mov	r3, #0
	str	r3, [r4]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L4:
	sub	r3, r0, #131
	cmp	r3, #1
	bhi	.L7
	ldr	r3, .L26+24
	ldr	r2, [r3]
	str	r9, [r4]
	orr	r5, r5, r2
.L8:
	mov	r2, r5
	ldr	r1, [r8]
	mov	r0, r4
	bl	TSEC_WRITE
	ldr	r3, .L26+28
	mov	r0, r4
	ldr	r1, [r3]
	bl	TSEC_READ
	lsl	r0, r0, #16
	lsr	r0, r0, #16
	cmp	r0, #0
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	ldr	r6, .L26+32
	mov	r0, r4
	ldr	r1, [r6]
	bl	TSEC_READ
	ldr	r2, .L26+36
	ldr	r3, .L26+40
	ldr	r2, [r2]
	ldr	r3, [r3]
	tst	r5, r2
	ldr	r1, [r6]
	bic	r2, r0, r3
	orrne	r2, r0, r3
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	TSEC_WRITE
.L5:
	ldr	r3, .L26+36
	ldr	r2, [r3]
	str	r9, [r4]
	orr	r5, r5, r2
	b	.L8
.L7:
	mov	r3, #0
	ldr	r0, [r10, #4]
	str	r3, [r4]
	bl	IFM_SUBTYPE
	ldr	r1, .L26+44
	cmp	r6, #0
	mov	r2, r0
	ldr	r3, .L26+48
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	movne	r3, r1
	ldr	r1, .L26+52
	b	device_printf
.L25:
	mov	r0, r7
	ldr	r1, .L26+56
	bl	device_printf
	b	.L9
.L27:
	.align	2
.L26:
	.word	IFM_ACTIVE
	.word	TSEC_REG_MACCFG2
	.word	IFM_GMASK
	.word	IFM_FDX
	.word	TSEC_MACCFG2_IF
	.word	TSEC_MACCFG2_FULLDUPLEX
	.word	TSEC_MACCFG2_GMII
	.word	TSEC_REG_ID2
	.word	TSEC_REG_ECNTRL
	.word	TSEC_MACCFG2_MII
	.word	TSEC_ECNTRL_R100M
	.word	.LC0
	.word	.LC1
	.word	.LC3
	.word	.LC2
	.size	tsec_miibus_statchg, .-tsec_miibus_statchg
	.comm	TSEC_REG_MACCFG2,4,4
	.comm	TSEC_REG_ID2,4,4
	.comm	TSEC_REG_ECNTRL,4,4
	.comm	TSEC_MACCFG2_MII,4,4
	.comm	TSEC_MACCFG2_IF,4,4
	.comm	TSEC_MACCFG2_GMII,4,4
	.comm	TSEC_MACCFG2_FULLDUPLEX,4,4
	.comm	TSEC_ECNTRL_R100M,4,4
	.comm	IFM_GMASK,4,4
	.comm	IFM_FDX,4,4
	.comm	IFM_ACTIVE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
