	.file	"extr_qlcnic_sysfs.c_qlcnic_83xx_sysfs_flash_write.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	qlcnic_83xx_sysfs_flash_write, @function
qlcnic_83xx_sysfs_flash_write:
.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
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	mov	rdi, rcx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	mov	esi, 1
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rcx
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	call	kcalloc@PLT
	test	rax, rax
	je	.L23
	mov	rdx, rbx
	mov	rdi, rax
	mov	rsi, rbp
	shr	rbx, 2
	mov	r14, rax
	mov	r15d, ebx
	call	memcpy@PLT
	mov	rdi, r12
	call	qlcnic_83xx_lock_flash@PLT
	test	rax, rax
	jne	.L24
	mov	rax, QWORD PTR 8[r12]
	mov	rcx, QWORD PTR [r12]
	cmp	QWORD PTR [rax], rcx
	je	.L25
	test	ebx, ebx
	jle	.L12
.L7:
	mov	rbx, r14
	xor	ebp, ebp
	sub	r13d, r14d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L9:
	add	ebp, 1
	add	rbx, 4
	cmp	r15d, ebp
	jle	.L8
.L11:
	lea	esi, 0[r13+rbx]
	mov	rdx, rbx
	mov	rdi, r12
	call	qlcnic_83xx_flash_write32@PLT
	test	eax, eax
	je	.L9
	mov	rax, QWORD PTR 8[r12]
	mov	rcx, QWORD PTR [r12]
	cmp	QWORD PTR [rax], rcx
	je	.L26
.L21:
	mov	rdi, r14
	call	kfree@PLT
	mov	rdi, r12
	call	qlcnic_83xx_unlock_flash@PLT
	mov	eax, DWORD PTR EIO[rip]
	add	rsp, 8
	.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
.L23:
	.cfi_restore_state
	mov	eax, DWORD PTR ENOMEM[rip]
	add	rsp, 8
	.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
.L25:
	.cfi_restore_state
	mov	rdi, r12
	call	qlcnic_83xx_enable_flash_write@PLT
	test	eax, eax
	jne	.L21
	test	ebx, ebx
	jg	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rax, QWORD PTR 8[r12]
	mov	rcx, QWORD PTR [r12]
	cmp	QWORD PTR [rax], rcx
	jne	.L12
	mov	rdi, r12
	call	qlcnic_83xx_disable_flash_write@PLT
	test	eax, eax
	jne	.L21
.L12:
	mov	rdi, r14
	call	kfree@PLT
	mov	rdi, r12
	call	qlcnic_83xx_unlock_flash@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
.L26:
	.cfi_restore_state
	mov	rdi, r12
	call	qlcnic_83xx_disable_flash_write@PLT
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L24:
	mov	rdi, r14
	call	kfree@PLT
	mov	eax, DWORD PTR EIO[rip]
	add	rsp, 8
	.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
	.cfi_endproc
.LFE0:
	.size	qlcnic_83xx_sysfs_flash_write, .-qlcnic_83xx_sysfs_flash_write
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EIO,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_qlcnic_sysfs.c_qlcnic_83xx_sysfs_flash_write.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	qlcnic_83xx_sysfs_flash_write, %function
qlcnic_83xx_sysfs_flash_write:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r2
	ldr	r2, .L27
	mov	r6, r0
	mov	r5, r1
	mov	r0, r3
	mov	r1, #1
	ldr	r2, [r2]
	mov	r7, r3
	bl	kcalloc
	subs	r9, r0, #0
	beq	.L23
	mov	r2, r7
	mov	r1, r5
	bl	memcpy
	mov	r0, r6
	bl	qlcnic_83xx_lock_flash
	subs	r8, r0, #0
	lsr	r7, r7, #2
	bne	.L24
	ldr	r2, [r6, #4]
	ldr	r3, [r6]
	ldr	r2, [r2]
	cmp	r2, r3
	beq	.L25
	cmp	r7, #0
	beq	.L12
.L7:
	mov	r5, #0
	sub	r10, r9, r4
	b	.L11
.L9:
	cmp	r7, r5
	add	r4, r4, #4
	ble	.L8
.L11:
	mov	r1, r4
	mov	r0, r6
	add	r2, r10, r4
	bl	qlcnic_83xx_flash_write32
	cmp	r0, #0
	add	r5, r5, #1
	beq	.L9
	ldr	r2, [r6, #4]
	ldr	r3, [r6]
	ldr	r2, [r2]
	cmp	r2, r3
	beq	.L26
.L21:
	mov	r0, r9
	bl	kfree
	mov	r0, r6
	bl	qlcnic_83xx_unlock_flash
	ldr	r3, .L27+4
	ldr	r8, [r3]
	rsb	r8, r8, #0
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L23:
	ldr	r3, .L27+8
	ldr	r8, [r3]
	rsb	r8, r8, #0
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L25:
	mov	r0, r6
	bl	qlcnic_83xx_enable_flash_write
	cmp	r0, #0
	bne	.L21
	cmp	r7, #0
	bne	.L7
.L8:
	ldr	r2, [r6, #4]
	ldr	r3, [r6]
	ldr	r2, [r2]
	cmp	r2, r3
	bne	.L12
	mov	r0, r6
	bl	qlcnic_83xx_disable_flash_write
	cmp	r0, #0
	bne	.L21
.L12:
	mov	r0, r9
	bl	kfree
	mov	r0, r6
	bl	qlcnic_83xx_unlock_flash
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L26:
	mov	r0, r6
	bl	qlcnic_83xx_disable_flash_write
	b	.L21
.L24:
	mov	r0, r9
	bl	kfree
	ldr	r3, .L27+4
	ldr	r8, [r3]
	rsb	r8, r8, #0
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L28:
	.align	2
.L27:
	.word	GFP_KERNEL
	.word	EIO
	.word	ENOMEM
	.size	qlcnic_83xx_sysfs_flash_write, .-qlcnic_83xx_sysfs_flash_write
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
