	.file	"extr_smc911x.c_smc911x_ethtool_seteeprom.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	smc911x_ethtool_seteeprom, @function
smc911x_ethtool_seteeprom:
.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, rdx
	xor	edx, edx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rsi
	mov	esi, DWORD PTR E2P_CMD_EPC_CMD_EWEN_[rip]
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	smc911x_ethtool_write_eeprom_cmd@PLT
	mov	r14d, eax
	test	eax, eax
	jne	.L1
	mov	eax, DWORD PTR 4[r12]
	mov	ebx, DWORD PTR [r12]
	test	eax, eax
	jg	.L3
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	esi, DWORD PTR 0[r13]
	mov	rdi, rbp
	call	smc911x_ethtool_write_eeprom_byte@PLT
	test	eax, eax
	jne	.L7
	mov	esi, DWORD PTR E2P_CMD_EPC_CMD_WRITE_[rip]
	mov	edx, ebx
	mov	rdi, rbp
	call	smc911x_ethtool_write_eeprom_cmd@PLT
	test	eax, eax
	jne	.L7
	mov	eax, DWORD PTR 4[r12]
	add	ebx, 1
	add	eax, DWORD PTR [r12]
	cmp	eax, ebx
	jle	.L1
.L3:
	mov	esi, DWORD PTR E2P_CMD_EPC_CMD_ERASE_[rip]
	mov	edx, ebx
	mov	rdi, rbp
	call	smc911x_ethtool_write_eeprom_cmd@PLT
	test	eax, eax
	je	.L12
.L7:
	mov	r14d, eax
.L1:
	pop	rbx
	.cfi_def_cfa_offset 40
	mov	eax, r14d
	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
	.cfi_endproc
.LFE0:
	.size	smc911x_ethtool_seteeprom, .-smc911x_ethtool_seteeprom
	.comm	E2P_CMD_EPC_CMD_WRITE_,4,4
	.comm	E2P_CMD_EPC_CMD_EWEN_,4,4
	.comm	E2P_CMD_EPC_CMD_ERASE_,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_smc911x.c_smc911x_ethtool_seteeprom.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	smc911x_ethtool_seteeprom, %function
smc911x_ethtool_seteeprom:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L13
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r1
	mov	r7, r2
	ldr	r1, [r3]
	mov	r2, #0
	mov	r5, r0
	bl	smc911x_ethtool_write_eeprom_cmd
	subs	r10, r0, #0
	bne	.L1
	ldr	r3, [r6, #4]
	ldr	r4, [r6]
	cmp	r3, #0
	ble	.L1
	ldr	r8, .L13+4
	ldr	r9, .L13+8
	b	.L3
.L12:
	mov	r0, r5
	ldr	r1, [r7]
	bl	smc911x_ethtool_write_eeprom_byte
	cmp	r0, #0
	bne	.L7
	mov	r2, r4
	mov	r0, r5
	ldr	r1, [r9]
	bl	smc911x_ethtool_write_eeprom_cmd
	cmp	r0, #0
	add	r4, r4, #1
	bne	.L7
	ldm	r6, {r2, r3}
	add	r3, r3, r2
	cmp	r3, r4
	ble	.L1
.L3:
	mov	r2, r4
	mov	r0, r5
	ldr	r1, [r8]
	bl	smc911x_ethtool_write_eeprom_cmd
	cmp	r0, #0
	beq	.L12
.L7:
	mov	r10, r0
.L1:
	mov	r0, r10
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L14:
	.align	2
.L13:
	.word	E2P_CMD_EPC_CMD_EWEN_
	.word	E2P_CMD_EPC_CMD_ERASE_
	.word	E2P_CMD_EPC_CMD_WRITE_
	.size	smc911x_ethtool_seteeprom, .-smc911x_ethtool_seteeprom
	.comm	E2P_CMD_EPC_CMD_WRITE_,4,4
	.comm	E2P_CMD_EPC_CMD_EWEN_,4,4
	.comm	E2P_CMD_EPC_CMD_ERASE_,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
