	.file	"extr_dm9000.c_dm9000_write_eeprom.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	dm9000_write_eeprom, @function
dm9000_write_eeprom:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR [rdi]
	test	DWORD PTR DM9000_PLATF_NO_EEPROM[rip], eax
	je	.L7
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	r15, 4[rdi]
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xor	r14d, r14d
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	mov	rdi, r15
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	lea	r13, 8[rbp]
	mov	rbx, rdx
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	mutex_lock@PLT
	mov	rsi, r14
	mov	rdi, r13
	call	spin_lock_irqsave@PLT
	mov	esi, DWORD PTR DM9000_EPAR[rip]
	mov	edx, r12d
	mov	rdi, rbp
	call	iow@PLT
	mov	edx, DWORD PTR 4[rbx]
	mov	esi, DWORD PTR DM9000_EPDRH[rip]
	mov	rdi, rbp
	call	iow@PLT
	mov	edx, DWORD PTR [rbx]
	mov	esi, DWORD PTR DM9000_EPDRL[rip]
	mov	rdi, rbp
	call	iow@PLT
	mov	esi, DWORD PTR DM9000_EPCR[rip]
	mov	rdi, rbp
	mov	edx, DWORD PTR EPCR_WEP[rip]
	or	edx, DWORD PTR EPCR_ERPRW[rip]
	call	iow@PLT
	mov	rsi, r14
	mov	rdi, r13
	call	spin_unlock_irqrestore@PLT
	mov	rdi, rbp
	call	dm9000_wait_eeprom@PLT
	mov	edi, 1
	call	mdelay@PLT
	mov	rsi, r14
	mov	rdi, r13
	call	spin_lock_irqsave@PLT
	mov	esi, DWORD PTR DM9000_EPCR[rip]
	mov	rdi, rbp
	xor	edx, edx
	call	iow@PLT
	mov	rdi, r13
	mov	rsi, r14
	call	spin_unlock_irqrestore@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 56
	mov	rdi, r15
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_restore 14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_restore 15
	.cfi_def_cfa_offset 8
	jmp	mutex_unlock@PLT
	.cfi_endproc
.LFE0:
	.size	dm9000_write_eeprom, .-dm9000_write_eeprom
	.comm	EPCR_WEP,4,4
	.comm	EPCR_ERPRW,4,4
	.comm	DM9000_PLATF_NO_EEPROM,4,4
	.comm	DM9000_EPDRL,4,4
	.comm	DM9000_EPDRH,4,4
	.comm	DM9000_EPCR,4,4
	.comm	DM9000_EPAR,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_dm9000.c_dm9000_write_eeprom.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dm9000_write_eeprom, %function
dm9000_write_eeprom:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L5
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, [r3]
	mov	r4, r0
	ldr	r0, [r0]
	ands	r5, r0, r3
	popne	{r4, r5, r6, r7, r8, r9, r10, pc}
	mov	r9, #0
	mov	r7, r1
	mov	r6, r2
	add	r10, r4, #4
	add	r8, r4, #8
	mov	r0, r10
	bl	mutex_lock
	mov	r1, r9
	mov	r0, r8
	bl	spin_lock_irqsave
	ldr	r3, .L5+4
	mov	r2, r7
	ldr	r1, [r3]
	mov	r0, r4
	bl	iow
	ldr	r3, .L5+8
	ldr	r2, [r6, #4]
	ldr	r1, [r3]
	mov	r0, r4
	bl	iow
	ldr	r3, .L5+12
	ldr	r2, [r6]
	ldr	r1, [r3]
	mov	r0, r4
	bl	iow
	ldr	r2, .L5+16
	ldr	r3, .L5+20
	ldr	r6, .L5+24
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, [r6]
	orr	r2, r2, r3
	mov	r0, r4
	bl	iow
	mov	r1, r9
	mov	r0, r8
	bl	spin_unlock_irqrestore
	mov	r0, r4
	bl	dm9000_wait_eeprom
	mov	r0, #1
	bl	mdelay
	mov	r1, r9
	mov	r0, r8
	bl	spin_lock_irqsave
	mov	r2, r5
	ldr	r1, [r6]
	mov	r0, r4
	bl	iow
	mov	r1, r9
	mov	r0, r8
	bl	spin_unlock_irqrestore
	mov	r0, r10
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	mutex_unlock
.L6:
	.align	2
.L5:
	.word	DM9000_PLATF_NO_EEPROM
	.word	DM9000_EPAR
	.word	DM9000_EPDRH
	.word	DM9000_EPDRL
	.word	EPCR_WEP
	.word	EPCR_ERPRW
	.word	DM9000_EPCR
	.size	dm9000_write_eeprom, .-dm9000_write_eeprom
	.comm	EPCR_WEP,4,4
	.comm	EPCR_ERPRW,4,4
	.comm	DM9000_PLATF_NO_EEPROM,4,4
	.comm	DM9000_EPDRL,4,4
	.comm	DM9000_EPDRH,4,4
	.comm	DM9000_EPCR,4,4
	.comm	DM9000_EPAR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
