	.file	"extr_cxgb2.c_get_eeprom.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	get_eeprom, @function
get_eeprom:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	.cfi_offset 15, -24
	mov	r15, rsi
	push	r14
	push	r13
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	mov	r13, rdx
	push	r12
	push	rbx
	sub	rsp, 24
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR EEPROM_SIZE[rip]
	mov	rsi, rsp
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L3
.L14:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L14
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L15
.L4:
	mov	r14, QWORD PTR [rdi]
	mov	r12, rsp
	mov	rdi, r14
	call	EEPROM_MAGIC@PLT
	mov	edx, DWORD PTR 4[r15]
	mov	DWORD PTR 8[r15], eax
	movsx	rax, DWORD PTR [r15]
	mov	ebx, eax
	lea	ecx, [rax+rdx]
	and	ebx, -4
	cmp	ebx, ecx
	jge	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	movsx	rax, ebx
	mov	esi, ebx
	mov	rdi, r14
	add	ebx, 4
	lea	rdx, [r12+rax*4]
	call	t1_seeprom_read@PLT
	movsx	rax, DWORD PTR [r15]
	mov	edx, DWORD PTR 4[r15]
	lea	ecx, [rax+rdx]
	cmp	ecx, ebx
	jg	.L6
.L5:
	lea	rsi, [r12+rax*4]
	mov	rdi, r13
	call	memcpy@PLT
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L16
	lea	rsp, -40[rbp]
	xor	eax, eax
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	get_eeprom, .-get_eeprom
	.comm	EEPROM_SIZE,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_cxgb2.c_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	get_eeprom, %function
get_eeprom:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #8
	ldr	r3, .L9
	ldr	r7, [r0]
	ldr	r3, [r3]
	mov	r6, r1
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L9+4
	mov	r0, r7
	mov	r8, r2
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	bl	EEPROM_MAGIC
	ldm	r6, {r1, r2}
	bic	r4, r1, #3
	add	r3, r1, r2
	cmp	r4, r3
	mov	r9, sp
	str	r0, [r6, #8]
	bge	.L2
	add	r5, r9, r4, lsl #2
.L3:
	mov	r2, r5
	mov	r1, r4
	mov	r0, r7
	bl	t1_seeprom_read
	ldm	r6, {r1, r2}
	add	r4, r4, #4
	add	r3, r1, r2
	cmp	r4, r3
	add	r5, r5, #16
	blt	.L3
.L2:
	mov	r0, r8
	add	r1, r9, r1, lsl #2
	bl	memcpy
	ldr	r3, .L9+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	mov	r0, #0
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	EEPROM_SIZE
	.word	.LC0
	.size	get_eeprom, .-get_eeprom
	.comm	EEPROM_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
