	.file	"extr_de4x5.c_de4x5_sw_reset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"%s: Setup frame timed out, status %08x\n"
	.text
	.p2align 4
	.type	de4x5_sw_reset, @function
de4x5_sw_reset:
.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
	mov	r13, rdi
	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
	call	netdev_priv@PLT
	mov	ecx, DWORD PTR 112[rax]
	mov	rbx, rax
	test	ecx, ecx
	jne	.L2
	mov	rcx, QWORD PTR [rbx]
	mov	rdx, QWORD PTR 104[rbx]
	mov	rax, QWORD PTR OMR_SDP[rip]
	cmp	QWORD PTR [rdx+rcx*8], 0
	jne	.L27
	or	rax, QWORD PTR OMR_TTM[rip]
.L4:
	mov	QWORD PTR 96[rbx], rax
	mov	rdi, r13
	call	de4x5_switch_mac_port@PLT
.L2:
	mov	eax, DWORD PTR 8[rbx]
	cmp	eax, DWORD PTR DC21140[rip]
	mov	rdx, QWORD PTR PBL_4[rip]
	jne	.L6
	mov	rdx, QWORD PTR PBL_8[rip]
.L6:
	mov	rdi, QWORD PTR DESC_SKIP_LEN[rip]
	or	rdi, QWORD PTR DE4X5_CACHE_ALIGN[rip]
	xor	al, al
	or	rdi, rdx
	cmp	eax, DWORD PTR DC2114x[rip]
	jne	.L7
	or	rdi, QWORD PTR BMR_RML[rip]
.L7:
	mov	esi, DWORD PTR DE4X5_BMR[rip]
	call	outl@PLT
	mov	edi, DWORD PTR DE4X5_OMR[rip]
	call	inl@PLT
	mov	r12, QWORD PTR OMR_PR[rip]
	not	r12
	and	r12, rax
	mov	eax, DWORD PTR DC21140[rip]
	cmp	DWORD PTR 8[rbx], eax
	jne	.L8
	mov	rax, QWORD PTR OMR_SDP[rip]
	or	rax, QWORD PTR OMR_SB[rip]
	or	r12, rax
.L8:
	mov	eax, DWORD PTR PERFECT[rip]
	mov	rdi, QWORD PTR 16[rbx]
	xor	ebp, ebp
	mov	esi, DWORD PTR DE4X5_RRBA[rip]
	mov	DWORD PTR 88[rbx], eax
	call	outl@PLT
	movsx	rdx, DWORD PTR NUM_RX_DESC[rip]
	mov	rax, QWORD PTR 16[rbx]
	mov	esi, DWORD PTR DE4X5_TRBA[rip]
	lea	rdi, [rax+rdx*4]
	call	outl@PLT
	mov	edx, DWORD PTR 40[rbx]
	mov	QWORD PTR 72[rbx], 0
	mov	QWORD PTR 80[rbx], 0
	mov	QWORD PTR 32[rbx], 0
	mov	QWORD PTR 24[rbx], 0
	test	edx, edx
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rax, QWORD PTR 64[rbx]
	mov	edi, DWORD PTR R_OWN[rip]
	lea	r14, [rax+rbp*8]
	add	rbp, 1
	call	cpu_to_le32@PLT
	mov	QWORD PTR [r14], rax
	cmp	DWORD PTR 40[rbx], ebp
	jg	.L9
.L12:
	mov	eax, DWORD PTR 44[rbx]
	xor	ebp, ebp
	test	eax, eax
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rax, QWORD PTR 48[rbx]
	xor	edi, edi
	lea	r14, [rax+rbp*8]
	add	rbp, 1
	call	cpu_to_le32@PLT
	mov	QWORD PTR [r14], rax
	cmp	DWORD PTR 44[rbx], ebp
	jg	.L10
.L11:
	xor	eax, eax
	xor	r14d, r14d
	call	barrier@PLT
	mov	rdi, r13
	call	SetMulticastFilter@PLT
	mov	esi, DWORD PTR 56[rbx]
	mov	ecx, 1
	mov	rdi, r13
	mov	edx, DWORD PTR PERFECT_F[rip]
	or	edx, DWORD PTR TD_SET[rip]
	or	edx, DWORD PTR SETUP_FRAME_LEN[rip]
	call	load_packet@PLT
	mov	rdi, QWORD PTR OMR_ST[rip]
	mov	esi, DWORD PTR DE4X5_OMR[rip]
	or	rdi, r12
	call	outl@PLT
	.p2align 4,,10
	.p2align 3
.L13:
	mov	edi, 1
	add	r14d, 1
	call	mdelay@PLT
	mov	rdx, QWORD PTR 24[rbx]
	mov	rax, QWORD PTR 48[rbx]
	mov	rdi, QWORD PTR [rax+rdx*8]
	call	le32_to_cpu@PLT
	mov	rbp, rax
	test	rax, rax
	jns	.L19
	cmp	r14d, 499
	jle	.L13
.L19:
	mov	esi, DWORD PTR DE4X5_OMR[rip]
	mov	rdi, r12
	call	outl@PLT
	xor	r8d, r8d
	test	rbp, rbp
	js	.L28
.L15:
	mov	rax, QWORD PTR 24[rbx]
	movsx	rcx, DWORD PTR 44[rbx]
	xor	edx, edx
	add	rax, 1
	div	rcx
	mov	eax, r8d
	mov	QWORD PTR 24[rbx], rdx
	mov	QWORD PTR 32[rbx], rdx
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
.L27:
	.cfi_restore_state
	or	rax, QWORD PTR OMR_PS[rip]
	or	rax, QWORD PTR OMR_HBD[rip]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L28:
	mov	edi, DWORD PTR DE4X5_STS[rip]
	call	inl@PLT
	mov	esi, DWORD PTR 0[r13]
	lea	rdi, .LC0[rip]
	mov	rdx, rax
	call	printk@PLT
	mov	r8d, DWORD PTR EIO[rip]
	neg	r8d
	jmp	.L15
	.cfi_endproc
.LFE0:
	.size	de4x5_sw_reset, .-de4x5_sw_reset
	.comm	TD_SET,4,4
	.comm	SETUP_FRAME_LEN,4,4
	.comm	R_OWN,4,4
	.comm	PERFECT_F,4,4
	.comm	PERFECT,4,4
	.comm	PBL_8,8,8
	.comm	PBL_4,8,8
	.comm	OMR_TTM,8,8
	.comm	OMR_ST,8,8
	.comm	OMR_SDP,8,8
	.comm	OMR_SB,8,8
	.comm	OMR_PS,8,8
	.comm	OMR_PR,8,8
	.comm	OMR_HBD,8,8
	.comm	NUM_RX_DESC,4,4
	.comm	EIO,4,4
	.comm	DESC_SKIP_LEN,8,8
	.comm	DE4X5_TRBA,4,4
	.comm	DE4X5_STS,4,4
	.comm	DE4X5_RRBA,4,4
	.comm	DE4X5_OMR,4,4
	.comm	DE4X5_CACHE_ALIGN,8,8
	.comm	DE4X5_BMR,4,4
	.comm	DC2114x,4,4
	.comm	DC21140,4,4
	.comm	BMR_RML,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_de4x5.c_de4x5_sw_reset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s: Setup frame timed out, status %08x\012\000"
	.global	__aeabi_uidivmod
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	de4x5_sw_reset, %function
de4x5_sw_reset:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r0
	bl	netdev_priv
	ldr	r3, [r0, #60]
	mov	r4, r0
	cmp	r3, #0
	bne	.L2
	ldr	r1, [r0]
	ldr	r2, [r0, #56]
	ldr	r3, .L24
	ldr	r2, [r2, r1, lsl #2]
	ldr	r3, [r3]
	cmp	r2, #0
	ldrne	r1, .L24+4
	ldrne	r2, .L24+8
	ldreq	r2, .L24+12
	ldrne	r1, [r1]
	ldrne	r2, [r2]
	ldreq	r2, [r2]
	orrne	r3, r3, r1
	orr	r3, r3, r2
	str	r3, [r0, #52]
	mov	r0, r6
	bl	de4x5_switch_mac_port
.L2:
	ldr	r5, .L24+16
	ldr	r3, [r4, #4]
	ldr	r2, [r5]
	ldr	r1, .L24+20
	cmp	r3, r2
	ldreq	r2, .L24+24
	ldrne	r2, .L24+28
	ldr	r1, [r1]
	bic	r3, r3, #255
	ldr	lr, [r2]
	ldr	ip, .L24+32
	ldr	r2, .L24+36
	cmp	r3, r1
	ldreq	r3, .L24+40
	ldr	r2, [r2]
	ldr	r0, [ip]
	ldreq	r3, [r3]
	orr	r0, r0, r2
	orr	r0, r0, lr
	orreq	r0, r0, r3
	ldr	r3, .L24+44
	ldr	r8, .L24+48
	ldr	r1, [r3]
	bl	outl
	ldr	r0, [r8]
	bl	inl
	ldr	r1, .L24+52
	ldr	r3, [r5]
	ldr	r2, [r4, #4]
	ldr	r7, [r1]
	cmp	r2, r3
	bic	r7, r0, r7
	bne	.L8
	ldr	r3, .L24
	ldr	r2, .L24+56
	ldr	r3, [r3]
	ldr	r2, [r2]
	orr	r3, r3, r2
	orr	r7, r7, r3
.L8:
	mov	r5, #0
	ldr	r3, .L24+60
	ldr	r2, .L24+64
	ldr	r3, [r3]
	ldr	r1, [r2]
	str	r3, [r4, #48]
	ldr	r0, [r4, #8]
	bl	outl
	ldr	r3, .L24+68
	ldr	r2, [r4, #8]
	ldr	r0, [r3]
	ldr	r3, .L24+72
	add	r0, r2, r0, lsl #2
	ldr	r1, [r3]
	bl	outl
	ldr	r3, [r4, #20]
	str	r5, [r4, #40]
	cmp	r3, r5
	ldrgt	r10, .L24+76
	str	r5, [r4, #44]
	str	r5, [r4, #16]
	str	r5, [r4, #12]
	ble	.L12
.L9:
	ldr	r0, [r10]
	ldr	r9, [r4, #36]
	bl	cpu_to_le32
	ldr	r3, [r4, #20]
	str	r0, [r9, r5, lsl #2]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L9
.L12:
	ldr	r3, [r4, #24]
	cmp	r3, #0
	movgt	r5, #0
	ble	.L11
.L10:
	mov	r0, #0
	ldr	r9, [r4, #28]
	bl	cpu_to_le32
	ldr	r3, [r4, #24]
	str	r0, [r9, r5, lsl #2]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L10
.L11:
	bl	barrier
	mov	r0, r6
	bl	SetMulticastFilter
	ldr	r3, .L24+80
	ldr	r1, .L24+84
	ldr	r2, .L24+88
	ldr	r1, [r1]
	ldr	r3, [r3]
	ldr	r2, [r2]
	orr	r3, r3, r1
	orr	r2, r3, r2
	ldr	r1, [r4, #32]
	mov	r3, #1
	mov	r0, r6
	bl	load_packet
	ldr	r3, .L24+92
	ldr	r1, [r8]
	ldr	r0, [r3]
	mov	r9, #0
	orr	r0, r7, r0
	bl	outl
.L13:
	mov	r0, #1
	bl	mdelay
	ldr	r3, [r4, #28]
	ldr	r2, [r4, #12]
	add	r9, r9, #1
	ldr	r0, [r3, r2, lsl #2]
	bl	le32_to_cpu
	cmp	r9, #500
	movge	r3, #0
	movlt	r3, #1
	ands	r10, r3, r0, lsr #31
	mov	r5, r0
	bne	.L13
	mov	r0, r7
	ldr	r1, [r8]
	bl	outl
	cmp	r5, #0
	blt	.L23
.L14:
	ldr	r0, [r4, #12]
	ldr	r1, [r4, #24]
	add	r0, r0, #1
	bl	__aeabi_uidivmod
	mov	r0, r10
	str	r1, [r4, #12]
	str	r1, [r4, #16]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L23:
	ldr	r3, .L24+96
	ldr	r5, [r6]
	ldr	r0, [r3]
	bl	inl
	mov	r1, r5
	mov	r2, r0
	ldr	r0, .L24+100
	bl	printk
	ldr	r3, .L24+104
	ldr	r10, [r3]
	rsb	r10, r10, #0
	b	.L14
.L25:
	.align	2
.L24:
	.word	OMR_SDP
	.word	OMR_PS
	.word	OMR_HBD
	.word	OMR_TTM
	.word	DC21140
	.word	DC2114x
	.word	PBL_8
	.word	PBL_4
	.word	DESC_SKIP_LEN
	.word	DE4X5_CACHE_ALIGN
	.word	BMR_RML
	.word	DE4X5_BMR
	.word	DE4X5_OMR
	.word	OMR_PR
	.word	OMR_SB
	.word	PERFECT
	.word	DE4X5_RRBA
	.word	NUM_RX_DESC
	.word	DE4X5_TRBA
	.word	R_OWN
	.word	PERFECT_F
	.word	TD_SET
	.word	SETUP_FRAME_LEN
	.word	OMR_ST
	.word	DE4X5_STS
	.word	.LC0
	.word	EIO
	.size	de4x5_sw_reset, .-de4x5_sw_reset
	.comm	TD_SET,4,4
	.comm	SETUP_FRAME_LEN,4,4
	.comm	R_OWN,4,4
	.comm	PERFECT_F,4,4
	.comm	PERFECT,4,4
	.comm	PBL_8,4,4
	.comm	PBL_4,4,4
	.comm	OMR_TTM,4,4
	.comm	OMR_ST,4,4
	.comm	OMR_SDP,4,4
	.comm	OMR_SB,4,4
	.comm	OMR_PS,4,4
	.comm	OMR_PR,4,4
	.comm	OMR_HBD,4,4
	.comm	NUM_RX_DESC,4,4
	.comm	EIO,4,4
	.comm	DESC_SKIP_LEN,4,4
	.comm	DE4X5_TRBA,4,4
	.comm	DE4X5_STS,4,4
	.comm	DE4X5_RRBA,4,4
	.comm	DE4X5_OMR,4,4
	.comm	DE4X5_CACHE_ALIGN,4,4
	.comm	DE4X5_BMR,4,4
	.comm	DC2114x,4,4
	.comm	DC21140,4,4
	.comm	BMR_RML,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
