	.file	"extr_atl2.c_atl2_set_eeprom.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	atl2_set_eeprom, @function
atl2_set_eeprom:
.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, rdx
	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
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	netdev_priv@PLT
	mov	r13d, DWORD PTR 8[rbp]
	test	r13d, r13d
	je	.L24
	mov	rbx, rax
	mov	eax, DWORD PTR 4[rax]
	sal	eax, 16
	or	eax, DWORD PTR [rbx]
	cmp	DWORD PTR 0[rbp], eax
	je	.L4
	mov	eax, DWORD PTR EFAULT[rip]
	neg	eax
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	r12d, DWORD PTR 4[rbp]
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 512
	mov	eax, r12d
	sar	eax, 2
	mov	DWORD PTR 4[rsp], eax
	call	kmalloc@PLT
	mov	r15, rax
	mov	eax, DWORD PTR ENOMEM[rip]
	neg	eax
	test	r15, r15
	je	.L1
	mov	eax, DWORD PTR 4[rbp]
	mov	r8, r15
	test	al, 3
	jne	.L25
.L6:
	mov	edx, DWORD PTR 8[rbp]
	lea	esi, -1[r13+r12]
	sar	esi, 2
	add	eax, edx
	mov	r13d, esi
	sub	r13d, DWORD PTR 4[rsp]
	test	al, 3
	je	.L8
	movsx	rax, r13d
	sal	esi, 2
	mov	rdi, rbx
	mov	QWORD PTR 8[rsp], r8
	lea	rdx, [r15+rax*4]
	call	atl2_read_eeprom@PLT
	test	eax, eax
	je	.L22
	mov	edx, DWORD PTR 8[rbp]
	mov	r8, QWORD PTR 8[rsp]
.L8:
	mov	rsi, r14
	mov	rdi, r8
	xor	ebp, ebp
	call	memcpy@PLT
	mov	r12d, DWORD PTR 4[rsp]
	sal	r12d, 2
	test	r13d, r13d
	jns	.L12
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L11:
	add	rbp, 1
	add	r12d, 4
	cmp	r13d, ebp
	jl	.L13
.L12:
	mov	edx, DWORD PTR [r15+rbp*4]
	mov	esi, r12d
	mov	rdi, rbx
	call	atl2_write_eeprom@PLT
	test	eax, eax
	jne	.L11
.L22:
	mov	eax, DWORD PTR EIO[rip]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	eax
	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
	ret
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	mov	eax, DWORD PTR EOPNOTSUPP[rip]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	eax
	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
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	rdi, r15
	call	kfree@PLT
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	mov	eax, DWORD PTR 4[rsp]
	mov	rdx, r15
	mov	rdi, rbx
	lea	esi, 0[0+rax*4]
	call	atl2_read_eeprom@PLT
	test	eax, eax
	je	.L22
	mov	eax, DWORD PTR 4[rbp]
	lea	r8, 4[r15]
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	atl2_set_eeprom, .-atl2_set_eeprom
	.comm	GFP_KERNEL,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	ENOMEM,4,4
	.comm	EIO,4,4
	.comm	EFAULT,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_atl2.c_atl2_set_eeprom.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	atl2_set_eeprom, %function
atl2_set_eeprom:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r1
	mov	r9, r2
	bl	netdev_priv
	ldr	r6, [r5, #8]
	cmp	r6, #0
	beq	.L22
	ldr	r1, [r0, #4]
	ldr	r3, [r0]
	ldr	r2, [r5]
	orr	r3, r3, r1, lsl #16
	cmp	r2, r3
	mov	r4, r0
	beq	.L4
	ldr	r3, .L25
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	ldr	r3, .L25+4
	mov	r0, #512
	ldr	r1, [r3]
	ldr	r7, [r5, #4]
	bl	kmalloc
	subs	r8, r0, #0
	asr	r10, r7, #2
	beq	.L23
	ldr	r3, [r5, #4]
	tst	r3, #3
	moveq	fp, r8
	bne	.L24
.L6:
	ldr	r2, [r5, #8]
	add	r7, r6, r7
	add	r3, r2, r3
	sub	r7, r7, #1
	tst	r3, #3
	asr	r1, r7, #2
	rsb	r7, r10, r7, asr #2
	beq	.L8
	mov	r0, r4
	lsl	r1, r1, #2
	add	r2, r8, r7, lsl #2
	bl	atl2_read_eeprom
	cmp	r0, #0
	beq	.L20
	ldr	r2, [r5, #8]
.L8:
	mov	r1, r9
	mov	r0, fp
	bl	memcpy
	cmp	r7, #0
	rsbge	r10, r8, r10, lsl #2
	movge	r6, #0
	addge	r10, r10, #4
	subge	r5, r8, #4
	bge	.L12
	b	.L13
.L11:
	cmp	r6, r7
	bgt	.L13
.L12:
	add	r1, r10, r5
	mov	r0, r4
	ldr	r2, [r5, #4]!
	bl	atl2_write_eeprom
	cmp	r0, #0
	add	r6, r6, #1
	bne	.L11
.L20:
	ldr	r3, .L25+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	ldr	r3, .L25+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	mov	r0, r8
	bl	kfree
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L24:
	mov	r2, r8
	mov	r0, r4
	lsl	r1, r10, #2
	bl	atl2_read_eeprom
	cmp	r0, #0
	beq	.L20
	ldr	r3, [r5, #4]
	add	fp, r8, #4
	b	.L6
.L23:
	ldr	r3, .L25+16
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L26:
	.align	2
.L25:
	.word	EFAULT
	.word	GFP_KERNEL
	.word	EIO
	.word	EOPNOTSUPP
	.word	ENOMEM
	.size	atl2_set_eeprom, .-atl2_set_eeprom
	.comm	GFP_KERNEL,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	ENOMEM,4,4
	.comm	EIO,4,4
	.comm	EFAULT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
