	.file	"extr_bfa_ioc.c_bfa_flash_write_send.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	bfa_flash_write_send, @function
bfa_flash_write_send:
.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
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	r12, QWORD PTR 40[rdi]
	mov	rdi, QWORD PTR [rdi]
	call	be32_to_cpu@PLT
	mov	rdi, QWORD PTR 16[rbx]
	add	rdi, QWORD PTR 8[rbx]
	mov	QWORD PTR 40[r12], rax
	mov	eax, DWORD PTR 60[rbx]
	mov	DWORD PTR 32[r12], eax
	call	be32_to_cpu@PLT
	mov	rbp, QWORD PTR BFA_FLASH_DMA_BUF_SZ[rip]
	cmp	QWORD PTR 24[rbx], rbp
	mov	QWORD PTR 24[r12], rax
	cmovle	rbp, QWORD PTR 24[rbx]
	mov	rdi, rbp
	call	be32_to_cpu@PLT
	mov	edi, DWORD PTR 48[rbx]
	mov	QWORD PTR 16[r12], rax
	xor	eax, eax
	cmp	QWORD PTR 24[rbx], rbp
	sete	al
	mov	DWORD PTR [r12], eax
	call	bfa_ioc_portid@PLT
	mov	edi, DWORD PTR 8[r12]
	mov	edx, DWORD PTR BFI_FLASH_H2I_WRITE_REQ[rip]
	mov	esi, DWORD PTR BFI_MC_FLASH[rip]
	mov	ecx, eax
	call	bfi_h2i_set@PLT
	mov	edx, DWORD PTR 56[rbx]
	lea	rdi, 4[r12]
	mov	rsi, rbp
	call	bfa_alen_set@PLT
	mov	edi, DWORD PTR 52[rbx]
	mov	rsi, QWORD PTR 16[rbx]
	mov	rdx, rbp
	add	rsi, QWORD PTR 32[rbx]
	call	memcpy@PLT
	mov	edi, DWORD PTR 48[rbx]
	lea	rsi, 40[rbx]
	xor	ecx, ecx
	xor	edx, edx
	call	bfa_nw_ioc_mbox_queue@PLT
	sub	QWORD PTR 24[rbx], rbp
	add	QWORD PTR 16[rbx], rbp
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	bfa_flash_write_send, .-bfa_flash_write_send
	.comm	BFI_MC_FLASH,4,4
	.comm	BFI_FLASH_H2I_WRITE_REQ,4,4
	.comm	BFA_FLASH_DMA_BUF_SZ,8,8
	.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_bfa_ioc.c_bfa_flash_write_send.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bfa_flash_write_send, %function
bfa_flash_write_send:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r0
	ldr	r0, [r0]
	ldr	r6, [r4, #20]
	bl	be32_to_cpu
	ldmib	r4, {r2, r3}
	ldr	r1, [r4, #36]
	str	r0, [r6, #24]
	str	r1, [r6, #20]
	add	r0, r2, r3
	bl	be32_to_cpu
	ldr	r3, .L4
	ldr	r5, [r4, #12]
	ldr	r3, [r3]
	str	r0, [r6, #16]
	cmp	r5, r3
	movge	r5, r3
	mov	r0, r5
	bl	be32_to_cpu
	ldr	r3, [r4, #12]
	ldr	r1, .L4+4
	sub	r3, r3, r5
	clz	r3, r3
	ldr	r2, .L4+8
	lsr	r3, r3, #5
	str	r0, [r6, #12]
	str	r3, [r6]
	ldr	r0, [r4, #24]
	ldr	r7, [r6, #8]
	ldr	r8, [r1]
	ldr	r9, [r2]
	bl	bfa_ioc_portid
	mov	r2, r9
	mov	r3, r0
	mov	r1, r8
	mov	r0, r7
	bl	bfi_h2i_set
	mov	r1, r5
	ldr	r2, [r4, #32]
	add	r0, r6, #4
	bl	bfa_alen_set
	ldr	r3, [r4, #8]
	ldr	r1, [r4, #16]
	mov	r2, r5
	add	r1, r1, r3
	ldr	r0, [r4, #28]
	bl	memcpy
	mov	r3, #0
	ldr	r0, [r4, #24]
	mov	r2, r3
	add	r1, r4, #20
	bl	bfa_nw_ioc_mbox_queue
	ldr	r2, [r4, #12]
	ldr	r3, [r4, #8]
	sub	r2, r2, r5
	add	r5, r3, r5
	str	r2, [r4, #12]
	str	r5, [r4, #8]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L5:
	.align	2
.L4:
	.word	BFA_FLASH_DMA_BUF_SZ
	.word	BFI_MC_FLASH
	.word	BFI_FLASH_H2I_WRITE_REQ
	.size	bfa_flash_write_send, .-bfa_flash_write_send
	.comm	BFI_MC_FLASH,4,4
	.comm	BFI_FLASH_H2I_WRITE_REQ,4,4
	.comm	BFA_FLASH_DMA_BUF_SZ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
