	.file	"extr_ethtool.c_lbs_ethtool_get_eeprom.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	lbs_ethtool_get_eeprom, @function
lbs_ethtool_get_eeprom:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 48
	.cfi_def_cfa_offset 80
	mov	rdx, QWORD PTR [rsi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 8[rsi]
	add	rdx, rax
	cmp	rdx, QWORD PTR LBS_EEPROM_LEN[rip]
	jg	.L2
	movsx	rcx, DWORD PTR LBS_EEPROM_READ_LEN[rip]
	cmp	rax, rcx
	jle	.L3
.L2:
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L8
	add	rsp, 48
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	sub	eax, ecx
	mov	r12, QWORD PTR [rdi]
	mov	rbx, rsi
	lea	edi, 40[rax]
	call	cpu_to_le16@PLT
	mov	edi, DWORD PTR CMD_ACT_GET[rip]
	mov	QWORD PTR 32[rsp], rax
	call	cpu_to_le16@PLT
	mov	edi, DWORD PTR [rbx]
	mov	QWORD PTR 24[rsp], rax
	call	cpu_to_le16@PLT
	mov	edi, DWORD PTR 8[rbx]
	mov	QWORD PTR 16[rsp], rax
	call	cpu_to_le16@PLT
	mov	esi, DWORD PTR CMD_802_11_EEPROM_ACCESS[rip]
	mov	rdi, r12
	mov	rdx, rsp
	mov	QWORD PTR 8[rsp], rax
	call	lbs_cmd_with_response@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
.L4:
	endbr64
	mov	rdx, QWORD PTR 8[rbx]
	mov	esi, DWORD PTR [rsp]
	mov	rdi, rbp
	call	memcpy@PLT
	jmp	.L1
.L8:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	lbs_ethtool_get_eeprom, .-lbs_ethtool_get_eeprom
	.comm	LBS_EEPROM_READ_LEN,4,4
	.comm	LBS_EEPROM_LEN,8,8
	.comm	EINVAL,4,4
	.comm	CMD_ACT_GET,4,4
	.comm	CMD_802_11_EEPROM_ACCESS,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_ethtool.c_lbs_ethtool_get_eeprom.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lbs_ethtool_get_eeprom, %function
lbs_ethtool_get_eeprom:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r1
	ldr	ip, .L9
	ldr	r1, [r1, #4]
	ldr	r3, [r4]
	ldr	ip, [ip]
	mov	r6, r2
	add	r3, r1, r3
	ldr	r2, .L9+4
	sub	sp, sp, #24
	cmp	r3, ip
	ldr	r2, [r2]
	str	r2, [sp, #20]
	mov	r2,#0
	bgt	.L2
	ldr	r2, .L9+8
	mov	r3, r0
	ldr	r0, [r2]
	cmp	r1, r0
	ble	.L3
.L2:
	ldr	r3, .L9+12
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L1:
	ldr	r3, .L9+4
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	mov	r0, r5
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, pc}
.L3:
	rsb	r0, r0, #20
	add	r0, r0, r1
	ldr	r5, [r3]
	bl	cpu_to_le16
	ldr	r3, .L9+16
	str	r0, [sp, #16]
	ldr	r0, [r3]
	bl	cpu_to_le16
	mov	r3, r0
	ldr	r0, [r4]
	str	r3, [sp, #12]
	bl	cpu_to_le16
	mov	r3, r0
	ldr	r0, [r4, #4]
	str	r3, [sp, #8]
	bl	cpu_to_le16
	mov	r3, r0
	ldr	r2, .L9+20
	mov	r0, r5
	ldr	r1, [r2]
	mov	r2, sp
	str	r3, [sp, #4]
	bl	lbs_cmd_with_response
	subs	r5, r0, #0
	bne	.L1
.L4:
	mov	r0, r6
	ldr	r2, [r4, #4]
	ldr	r1, [sp]
	bl	memcpy
	b	.L1
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	LBS_EEPROM_LEN
	.word	.LC0
	.word	LBS_EEPROM_READ_LEN
	.word	EINVAL
	.word	CMD_ACT_GET
	.word	CMD_802_11_EEPROM_ACCESS
	.size	lbs_ethtool_get_eeprom, .-lbs_ethtool_get_eeprom
	.comm	LBS_EEPROM_READ_LEN,4,4
	.comm	LBS_EEPROM_LEN,4,4
	.comm	EINVAL,4,4
	.comm	CMD_ACT_GET,4,4
	.comm	CMD_802_11_EEPROM_ACCESS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
