	.file	"extr_3c509.c_el3_up.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s: "
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Forcing 3c5x9b full-duplex mode"
	.align 8
.LC2:
	.string	"Setting 3c5x9b full-duplex mode (from EEPROM configuration bit)"
	.align 8
.LC3:
	.string	"Setting 3c5x9/3c5x9B half-duplex mode"
	.section	.rodata.str1.1
.LC4:
	.string	" if_port: %d, sw_info: %4.4x\n"
	.section	.rodata.str1.8
	.align 8
.LC5:
	.string	"%s: 3c5x9 net diag word is now: %4.4x.\n"
	.text
	.p2align 4
	.type	el3_up, @function
el3_up:
.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
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r12d, DWORD PTR [rdi]
	mov	edi, 1
	lea	esi, 4[r12]
	mov	ebx, r12d
	mov	r13d, r12d
	call	outw@PLT
	mov	edi, DWORD PTR 4[r14]
	mov	esi, DWORD PTR WN0_IRQ[rip]
	sal	edi, 12
	add	esi, r12d
	or	edi, 3840
	call	outw@PLT
	mov	edi, 2
	call	EL3WINDOW@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rax, QWORD PTR 16[r14]
	mov	esi, r13d
	add	r13d, 1
	mov	edi, DWORD PTR [rax+rbp]
	add	rbp, 4
	call	outb@PLT
	cmp	rbp, 24
	jne	.L2
	mov	eax, DWORD PTR 8[r14]
	and	eax, 3
	cmp	eax, 3
	je	.L23
	test	eax, eax
	je	.L24
.L4:
	mov	esi, DWORD PTR EL3_CMD[rip]
	mov	edi, DWORD PTR StatsDisable[rip]
	lea	ebp, 9[r12]
	add	esi, r12d
	call	outw@PLT
	mov	edi, 6
	call	EL3WINDOW@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edi, ebx
	add	ebx, 1
	call	inb@PLT
	cmp	ebp, ebx
	jne	.L9
	lea	edi, 10[r12]
	call	inw@PLT
	lea	edi, 12[r12]
	call	inw@PLT
	mov	edi, 1
	call	EL3WINDOW@PLT
	mov	esi, DWORD PTR EL3_CMD[rip]
	mov	edi, DWORD PTR SetRxFilter[rip]
	or	edi, DWORD PTR RxStation[rip]
	or	edi, DWORD PTR RxBroadcast[rip]
	add	esi, r12d
	call	outw@PLT
	mov	esi, DWORD PTR EL3_CMD[rip]
	mov	edi, DWORD PTR StatsEnable[rip]
	add	esi, r12d
	call	outw@PLT
	mov	esi, DWORD PTR EL3_CMD[rip]
	mov	edi, DWORD PTR RxEnable[rip]
	add	esi, r12d
	call	outw@PLT
	mov	esi, DWORD PTR EL3_CMD[rip]
	mov	edi, DWORD PTR TxEnable[rip]
	add	esi, r12d
	call	outw@PLT
	mov	esi, DWORD PTR EL3_CMD[rip]
	mov	edi, DWORD PTR SetStatusEnb[rip]
	add	esi, r12d
	or	dil, -1
	call	outw@PLT
	mov	esi, DWORD PTR EL3_CMD[rip]
	mov	edi, DWORD PTR AckIntr[rip]
	or	edi, DWORD PTR IntLatch[rip]
	or	edi, DWORD PTR TxAvailable[rip]
	add	esi, r12d
	or	edi, DWORD PTR RxEarly[rip]
	or	edi, DWORD PTR IntReq[rip]
	call	outw@PLT
	mov	esi, DWORD PTR EL3_CMD[rip]
	mov	edi, DWORD PTR SetIntrEnb[rip]
	or	edi, DWORD PTR IntLatch[rip]
	or	edi, DWORD PTR TxAvailable[rip]
	add	esi, r12d
	or	edi, DWORD PTR TxComplete[rip]
	or	edi, DWORD PTR RxComplete[rip]
	or	edi, DWORD PTR StatsFull[rip]
	call	outw@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, r14
	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	netif_start_queue@PLT
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	xor	edi, edi
	call	EL3WINDOW@PLT
	mov	esi, 20
	mov	edi, r12d
	call	read_eeprom@PLT
	mov	esi, 13
	mov	edi, r12d
	mov	r13d, eax
	call	read_eeprom@PLT
	and	r13d, 16399
	mov	edi, 4
	and	eax, 49136
	or	r13d, eax
	call	EL3WINDOW@PLT
	mov	edi, DWORD PTR WN4_NETDIAG[rip]
	add	edi, r12d
	call	inw@PLT
	mov	esi, DWORD PTR 12[r14]
	or	eax, DWORD PTR FD_ENABLE[rip]
	lea	rdi, .LC0[rip]
	mov	r15d, eax
	call	pr_info@PLT
	mov	eax, DWORD PTR 8[r14]
	and	eax, 12
	cmp	eax, 8
	je	.L5
	cmp	eax, 12
	je	.L25
.L6:
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	pr_cont@PLT
	mov	eax, DWORD PTR FD_ENABLE[rip]
	not	eax
	and	r15d, eax
.L7:
	mov	esi, DWORD PTR WN4_NETDIAG[rip]
	mov	edi, r15d
	add	esi, r12d
	call	outw@PLT
	mov	esi, DWORD PTR 8[r14]
	xor	eax, eax
	mov	edx, r13d
	lea	rdi, .LC4[rip]
	call	pr_cont@PLT
	cmp	DWORD PTR el3_debug[rip], 3
	jg	.L26
.L8:
	mov	ebp, DWORD PTR WN4_MEDIA[rip]
	add	ebp, r12d
	mov	edi, ebp
	call	inw@PLT
	or	eax, DWORD PTR MEDIA_TP[rip]
	mov	esi, ebp
	mov	edi, eax
	call	outw@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L23:
	mov	esi, DWORD PTR EL3_CMD[rip]
	mov	edi, DWORD PTR StartCoax[rip]
	add	esi, r12d
	call	outw@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L25:
	test	r13b, 15
	je	.L6
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	pr_cont@PLT
	jmp	.L7
.L5:
	test	r13b, 15
	je	.L6
	test	r13d, 32768
	je	.L6
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	pr_cont@PLT
	jmp	.L7
.L26:
	mov	esi, DWORD PTR 12[r14]
	mov	edx, r15d
	lea	rdi, .LC5[rip]
	call	pr_debug@PLT
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	el3_up, .-el3_up
	.comm	el3_debug,4,4
	.comm	WN4_NETDIAG,4,4
	.comm	WN4_MEDIA,4,4
	.comm	WN0_IRQ,4,4
	.comm	TxEnable,4,4
	.comm	TxComplete,4,4
	.comm	TxAvailable,4,4
	.comm	StatsFull,4,4
	.comm	StatsEnable,4,4
	.comm	StatsDisable,4,4
	.comm	StartCoax,4,4
	.comm	SetStatusEnb,4,4
	.comm	SetRxFilter,4,4
	.comm	SetIntrEnb,4,4
	.comm	RxStation,4,4
	.comm	RxEnable,4,4
	.comm	RxEarly,4,4
	.comm	RxComplete,4,4
	.comm	RxBroadcast,4,4
	.comm	MEDIA_TP,4,4
	.comm	IntReq,4,4
	.comm	IntLatch,4,4
	.comm	FD_ENABLE,4,4
	.comm	EL3_CMD,4,4
	.comm	AckIntr,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_3c509.c_el3_up.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s: \000"
	.align	2
.LC1:
	.ascii	"Forcing 3c5x9b full-duplex mode\000"
	.align	2
.LC2:
	.ascii	"Setting 3c5x9b full-duplex mode (from EEPROM config"
	.ascii	"uration bit)\000"
	.align	2
.LC3:
	.ascii	"Setting 3c5x9/3c5x9B half-duplex mode\000"
	.align	2
.LC4:
	.ascii	" if_port: %d, sw_info: %4.4x\012\000"
	.align	2
.LC5:
	.ascii	"%s: 3c5x9 net diag word is now: %4.4x.\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	el3_up, %function
el3_up:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r8, r0
	ldr	r7, [r0]
	mov	r0, #1
	add	r1, r7, #4
	bl	outw
	ldr	r3, .L28
	ldr	r0, [r8, #4]
	ldr	r1, [r3]
	lsl	r0, r0, #12
	add	r1, r7, r1
	orr	r0, r0, #3840
	bl	outw
	mov	r0, #2
	mov	r4, r7
	mov	r6, r7
	bl	EL3WINDOW
	mov	r5, #0
.L2:
	ldr	r3, [r8, #16]
	mov	r1, r6
	ldr	r0, [r3, r5]
	add	r5, r5, #4
	bl	outb
	cmp	r5, #24
	add	r6, r6, #1
	bne	.L2
	ldr	r0, [r8, #8]
	and	r0, r0, #3
	cmp	r0, #3
	beq	.L25
	cmp	r0, #0
	beq	.L22
	ldr	r6, .L28+4
.L4:
	ldr	r3, .L28+8
	ldr	r1, [r6]
	ldr	r0, [r3]
	add	r1, r7, r1
	bl	outw
	mov	r0, #6
	bl	EL3WINDOW
	add	r5, r7, #9
.L9:
	mov	r0, r4
	add	r4, r4, #1
	bl	inb
	cmp	r5, r4
	bne	.L9
	add	r0, r7, #10
	bl	inw
	add	r0, r7, #12
	bl	inw
	mov	r0, #1
	bl	EL3WINDOW
	ldr	r3, .L28+12
	ldr	r2, .L28+16
	ldr	r1, .L28+20
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r0, [r1]
	ldr	r1, [r6]
	orr	r3, r3, r2
	add	r1, r7, r1
	orr	r0, r3, r0
	bl	outw
	ldr	r1, [r6]
	ldr	r3, .L28+24
	add	r1, r7, r1
	ldr	r0, [r3]
	bl	outw
	ldr	r1, [r6]
	ldr	r3, .L28+28
	add	r1, r7, r1
	ldr	r0, [r3]
	bl	outw
	ldr	r1, [r6]
	ldr	r3, .L28+32
	add	r1, r7, r1
	ldr	r0, [r3]
	bl	outw
	ldr	r3, .L28+36
	ldr	r1, [r6]
	ldr	r0, [r3]
	add	r1, r7, r1
	orr	r0, r0, #255
	bl	outw
	ldr	r5, .L28+40
	ldr	r3, .L28+44
	ldr	r4, .L28+48
	ldr	r0, [r5]
	ldr	r3, [r3]
	ldr	r2, [r4]
	ldr	r1, .L28+52
	orr	r3, r3, r0
	orr	r3, r3, r2
	ldr	r0, [r1]
	ldr	r2, .L28+56
	orr	r3, r3, r0
	ldr	r1, [r6]
	ldr	r0, [r2]
	add	r1, r7, r1
	orr	r0, r3, r0
	bl	outw
	ldr	r3, .L28+60
	ldr	ip, [r5]
	ldr	r3, [r3]
	ldr	r0, .L28+64
	ldr	r1, [r4]
	ldr	r2, .L28+68
	ldr	r0, [r0]
	orr	r3, r3, ip
	ldr	ip, .L28+72
	ldr	r2, [r2]
	orr	r3, r3, r1
	orr	r3, r3, r0
	ldr	r1, [r6]
	ldr	r0, [ip]
	orr	r3, r3, r2
	add	r1, r7, r1
	orr	r0, r3, r0
	bl	outw
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	netif_start_queue
.L22:
	bl	EL3WINDOW
	mov	r1, #20
	mov	r0, r7
	bl	read_eeprom
	mov	r1, #13
	mov	r5, r0
	mov	r0, r7
	bl	read_eeprom
	ldr	r2, .L28+76
	ldr	r3, .L28+80
	ldr	r9, .L28+84
	and	r3, r3, r0
	and	r5, r5, r2
	mov	r0, #4
	orr	r5, r5, r3
	bl	EL3WINDOW
	ldr	r0, [r9]
	ldr	r10, .L28+88
	add	r0, r7, r0
	bl	inw
	mov	r6, r0
	ldr	r3, [r10]
	ldr	r1, [r8, #12]
	ldr	r0, .L28+92
	orr	r6, r6, r3
	bl	pr_info
	ldr	r3, [r8, #8]
	and	r3, r3, #12
	cmp	r3, #8
	beq	.L5
	cmp	r3, #12
	beq	.L26
.L6:
	ldr	r0, .L28+96
	bl	pr_cont
	ldr	r3, [r10]
	bic	r6, r6, r3
.L7:
	ldr	r1, [r9]
	mov	r0, r6
	add	r1, r7, r1
	bl	outw
	mov	r2, r5
	ldr	r1, [r8, #8]
	ldr	r0, .L28+100
	bl	pr_cont
	ldr	r3, .L28+104
	ldr	r3, [r3]
	cmp	r3, #3
	bgt	.L27
.L8:
	ldr	r5, .L28+108
	ldr	r6, .L28+4
	ldr	r0, [r5]
	add	r0, r7, r0
	bl	inw
	ldr	r3, .L28+112
	ldr	r1, [r5]
	ldr	r3, [r3]
	add	r1, r7, r1
	orr	r0, r0, r3
	bl	outw
	b	.L4
.L25:
	ldr	r6, .L28+4
	ldr	r3, .L28+116
	ldr	r1, [r6]
	ldr	r0, [r3]
	add	r1, r7, r1
	bl	outw
	b	.L4
.L26:
	tst	r5, #15
	beq	.L6
	ldr	r0, .L28+120
	bl	pr_cont
	b	.L7
.L5:
	tst	r5, #15
	beq	.L6
	tst	r5, #32768
	beq	.L6
	ldr	r0, .L28+124
	bl	pr_cont
	b	.L7
.L27:
	mov	r2, r6
	ldr	r1, [r8, #12]
	ldr	r0, .L28+128
	bl	pr_debug
	b	.L8
.L29:
	.align	2
.L28:
	.word	WN0_IRQ
	.word	EL3_CMD
	.word	StatsDisable
	.word	SetRxFilter
	.word	RxStation
	.word	RxBroadcast
	.word	StatsEnable
	.word	RxEnable
	.word	TxEnable
	.word	SetStatusEnb
	.word	IntLatch
	.word	AckIntr
	.word	TxAvailable
	.word	RxEarly
	.word	IntReq
	.word	SetIntrEnb
	.word	TxComplete
	.word	RxComplete
	.word	StatsFull
	.word	16399
	.word	49136
	.word	WN4_NETDIAG
	.word	FD_ENABLE
	.word	.LC0
	.word	.LC3
	.word	.LC4
	.word	el3_debug
	.word	WN4_MEDIA
	.word	MEDIA_TP
	.word	StartCoax
	.word	.LC1
	.word	.LC2
	.word	.LC5
	.size	el3_up, .-el3_up
	.comm	el3_debug,4,4
	.comm	WN4_NETDIAG,4,4
	.comm	WN4_MEDIA,4,4
	.comm	WN0_IRQ,4,4
	.comm	TxEnable,4,4
	.comm	TxComplete,4,4
	.comm	TxAvailable,4,4
	.comm	StatsFull,4,4
	.comm	StatsEnable,4,4
	.comm	StatsDisable,4,4
	.comm	StartCoax,4,4
	.comm	SetStatusEnb,4,4
	.comm	SetRxFilter,4,4
	.comm	SetIntrEnb,4,4
	.comm	RxStation,4,4
	.comm	RxEnable,4,4
	.comm	RxEarly,4,4
	.comm	RxComplete,4,4
	.comm	RxBroadcast,4,4
	.comm	MEDIA_TP,4,4
	.comm	IntReq,4,4
	.comm	IntLatch,4,4
	.comm	FD_ENABLE,4,4
	.comm	EL3_CMD,4,4
	.comm	AckIntr,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
