	.file	"extr_be_cmds.c_be_fw_download.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Flash image is not compatible with adapter\n"
	.align 8
.LC1:
	.string	"Firmware flashed successfully\n"
	.text
	.p2align 4
	.globl	be_fw_download
	.type	be_fw_download, @function
be_fw_download:
.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	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	rbp, QWORD PTR [rsi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR [rdi]
	mov	rsi, rbp
	mov	QWORD PTR 16[rsp], rax
	call	be_check_ufi_compatibility@PLT
	test	eax, eax
	je	.L18
	mov	ecx, DWORD PTR GFP_KERNEL[rip]
	mov	rdi, QWORD PTR 16[rsp]
	lea	rdx, 48[rsp]
	mov	esi, 4
	mov	DWORD PTR 44[rsp], 4
	call	dma_alloc_coherent@PLT
	mov	DWORD PTR 52[rsp], eax
	test	eax, eax
	jne	.L4
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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	edi, DWORD PTR 0[rbp]
	call	le32_to_cpu@PLT
	mov	r15d, eax
	test	eax, eax
	jle	.L5
	lea	eax, -1[rax]
	mov	ebp, 4
	xor	r12d, r12d
	lea	rax, 8[0+rax*4]
	mov	QWORD PTR 8[rsp], rax
	lea	rax, 44[rsp]
	mov	QWORD PTR 24[rsp], rax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rdx, QWORD PTR 24[rsp]
	mov	ecx, r15d
	mov	rsi, r13
	mov	rdi, rbx
	call	be_flash_skyhawk@PLT
	mov	r12d, eax
.L9:
	add	rbp, 4
	cmp	QWORD PTR 8[rsp], rbp
	je	.L20
.L11:
	mov	rdi, rbx
	mov	r14, QWORD PTR 0[r13]
	call	BE2_chip@PLT
	test	eax, eax
	jne	.L10
	mov	edi, DWORD PTR [r14+rbp]
	call	le32_to_cpu@PLT
	cmp	eax, 1
	jne	.L9
.L10:
	mov	rdi, rbx
	call	skyhawk_chip@PLT
	test	rax, rax
	jne	.L7
	mov	rdx, QWORD PTR 24[rsp]
	mov	ecx, r15d
	mov	rsi, r13
	mov	rdi, rbx
	add	rbp, 4
	call	be_flash_BEx@PLT
	mov	r12d, eax
	cmp	QWORD PTR 8[rsp], rbp
	jne	.L11
.L20:
	mov	ecx, DWORD PTR 48[rsp]
	mov	edx, DWORD PTR 52[rsp]
	mov	esi, DWORD PTR 44[rsp]
	mov	rdi, QWORD PTR 16[rsp]
	call	dma_free_coherent@PLT
	test	r12d, r12d
	jne	.L1
.L12:
	mov	rdi, QWORD PTR 16[rsp]
	lea	rsi, .LC1[rip]
	xor	r12d, r12d
	call	dev_info@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rdi, QWORD PTR 16[rsp]
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	ecx, DWORD PTR 48[rsp]
	mov	edx, DWORD PTR 52[rsp]
	mov	esi, DWORD PTR 44[rsp]
	mov	rdi, QWORD PTR 16[rsp]
	call	dma_free_coherent@PLT
	jmp	.L12
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	be_fw_download, .-be_fw_download
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,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_be_cmds.c_be_fw_download.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Flash image is not compatible with adapter\012\000"
	.align	2
.LC1:
	.ascii	"Firmware flashed successfully\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	be_fw_download
	.syntax unified
	.arm
	.fpu softvfp
	.type	be_fw_download, %function
be_fw_download:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r4, [r1]
	ldr	r3, .L21
	sub	sp, sp, #16
	mov	r7, r1
	mov	r1, r4
	mov	r6, r0
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldr	r9, [r0]
	bl	be_check_ufi_compatibility
	cmp	r0, #0
	beq	.L18
	mov	r1, #4
	ldr	r3, .L21+4
	mov	r0, r9
	ldr	r3, [r3]
	add	r2, sp, r1
	str	r1, [sp]
	bl	dma_alloc_coherent
	cmp	r0, #0
	str	r0, [sp, #8]
	bne	.L4
	ldr	r3, .L21+8
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L1:
	ldr	r3, .L21
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	mov	r0, r5
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L4:
	ldr	r0, [r4]
	bl	le32_to_cpu
	subs	r8, r0, #0
	ble	.L5
	mov	r4, #1
	mov	r5, #0
	b	.L11
.L7:
	mov	r3, r8
	mov	r2, sp
	mov	r1, r7
	mov	r0, r6
	bl	be_flash_skyhawk
	mov	r5, r0
.L9:
	cmp	r8, r4
	add	r4, r4, #1
	beq	.L20
.L11:
	mov	r0, r6
	ldr	r10, [r7]
	bl	BE2_chip
	cmp	r0, #0
	bne	.L10
	ldr	r0, [r10, r4, lsl #2]
	bl	le32_to_cpu
	cmp	r0, #1
	bne	.L9
.L10:
	mov	r0, r6
	bl	skyhawk_chip
	cmp	r0, #0
	bne	.L7
	mov	r3, r8
	mov	r2, sp
	mov	r1, r7
	mov	r0, r6
	bl	be_flash_BEx
	cmp	r8, r4
	mov	r5, r0
	add	r4, r4, #1
	bne	.L11
.L20:
	mov	r0, r9
	ldr	r3, [sp, #4]
	ldr	r2, [sp, #8]
	ldr	r1, [sp]
	bl	dma_free_coherent
	cmp	r5, #0
	bne	.L1
.L12:
	mov	r0, r9
	ldr	r1, .L21+12
	bl	dev_info
	mov	r5, #0
	b	.L1
.L18:
	mov	r0, r9
	ldr	r1, .L21+16
	bl	dev_err
	ldr	r3, .L21+20
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L1
.L5:
	mov	r0, r9
	ldr	r3, [sp, #4]
	ldr	r2, [sp, #8]
	ldr	r1, [sp]
	bl	dma_free_coherent
	b	.L12
.L19:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	.LC2
	.word	GFP_KERNEL
	.word	ENOMEM
	.word	.LC1
	.word	.LC0
	.word	EINVAL
	.size	be_fw_download, .-be_fw_download
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
