	.file	"extr_if_bce.c_bce_load_rv2p_fw.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	bce_load_rv2p_fw, @function
bce_load_rv2p_fw:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rcx
	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, 8
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR BCE_VERBOSE_RESET[rip]
	call	DBENTER@PLT
	cmp	QWORD PTR RV2P_PROC2[rip], r12
	je	.L16
.L2:
	lea	r13, -1[r15]
	xor	ebx, ebx
	and	r13, -8
	test	r15, r15
	jg	.L8
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	or	edx, DWORD PTR BCE_RV2P_PROC2_ADDR_CMD_RDWR[rip]
	mov	esi, DWORD PTR BCE_RV2P_PROC2_ADDR_CMD[rip]
	mov	rdi, r14
	movsx	rdx, edx
	call	REG_WR@PLT
	lea	rax, 8[rbx]
	cmp	r13, rbx
	je	.L9
.L11:
	mov	rbx, rax
.L8:
	mov	rdx, QWORD PTR 0[rbp+rbx*2]
	mov	esi, DWORD PTR BCE_RV2P_INSTR_HIGH[rip]
	mov	rdi, r14
	call	REG_WR@PLT
	mov	rdx, QWORD PTR 8[rbp+rbx*2]
	mov	esi, DWORD PTR BCE_RV2P_INSTR_LOW[rip]
	mov	rdi, r14
	call	REG_WR@PLT
	mov	edx, ebx
	sar	edx, 3
	cmp	QWORD PTR RV2P_PROC1[rip], r12
	jne	.L6
	or	edx, DWORD PTR BCE_RV2P_PROC1_ADDR_CMD_RDWR[rip]
	mov	esi, DWORD PTR BCE_RV2P_PROC1_ADDR_CMD[rip]
	mov	rdi, r14
	movsx	rdx, edx
	call	REG_WR@PLT
	lea	rax, 8[rbx]
	cmp	r13, rbx
	jne	.L11
.L9:
	cmp	QWORD PTR RV2P_PROC1[rip], r12
	mov	esi, DWORD PTR BCE_RV2P_COMMAND[rip]
	je	.L17
	mov	rdx, QWORD PTR BCE_RV2P_COMMAND_PROC2_RESET[rip]
	mov	rdi, r14
	call	REG_WR@PLT
.L10:
	mov	edi, DWORD PTR BCE_VERBOSE_RESET[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
	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
	jmp	DBEXIT@PLT
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	rdx, QWORD PTR BCE_RV2P_COMMAND_PROC1_RESET[rip]
	mov	rdi, r14
	call	REG_WR@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L16:
	mov	edi, DWORD PTR USABLE_RX_BD_PER_PAGE[rip]
	call	BCE_RV2P_PROC2_CHG_MAX_BD_PAGE@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	bce_load_rv2p_fw, .-bce_load_rv2p_fw
	.comm	USABLE_RX_BD_PER_PAGE,4,4
	.comm	RV2P_PROC2,8,8
	.comm	RV2P_PROC1,8,8
	.comm	BCE_VERBOSE_RESET,4,4
	.comm	BCE_RV2P_PROC2_ADDR_CMD_RDWR,4,4
	.comm	BCE_RV2P_PROC2_ADDR_CMD,4,4
	.comm	BCE_RV2P_PROC1_ADDR_CMD_RDWR,4,4
	.comm	BCE_RV2P_PROC1_ADDR_CMD,4,4
	.comm	BCE_RV2P_INSTR_LOW,4,4
	.comm	BCE_RV2P_INSTR_HIGH,4,4
	.comm	BCE_RV2P_COMMAND_PROC2_RESET,8,8
	.comm	BCE_RV2P_COMMAND_PROC1_RESET,8,8
	.comm	BCE_RV2P_COMMAND,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_if_bce.c_bce_load_rv2p_fw.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bce_load_rv2p_fw, %function
bce_load_rv2p_fw:
	@ 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	r6, r3
	ldr	r3, .L18
	mov	r4, r0
	ldr	r0, [r3]
	mov	r9, r1
	mov	r5, r2
	bl	DBENTER
	ldr	r3, .L18+4
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L15
	cmp	r5, #0
	ble	.L16
.L3:
	mvn	r7, #7
	sub	r5, r5, #1
	and	r5, r5, r7
	add	r3, r9, #16
	ldr	r8, .L18+8
	ldr	r10, .L18+12
	ldr	fp, .L18+16
	sub	r7, r7, r9
	add	r5, r5, r3
	add	r9, r9, #8
.L8:
	ldr	r2, [r9, #-8]
	ldr	r1, [r10]
	mov	r0, r4
	bl	REG_WR
	ldr	r3, .L18+20
	ldr	r2, [r9, #-4]
	ldr	r1, [r3]
	mov	r0, r4
	bl	REG_WR
	ldr	r3, [r8]
	add	r2, r7, r9
	cmp	r3, r6
	ldreq	r3, .L18+24
	ldreq	r1, .L18+28
	ldreq	r3, [r3]
	ldrne	r3, [fp]
	ldrne	r1, .L18+32
	asr	r2, r2, #3
	mov	r0, r4
	ldr	r1, [r1]
	orr	r2, r2, r3
	add	r9, r9, #8
	bl	REG_WR
	cmp	r9, r5
	bne	.L8
.L9:
	ldr	r2, [r8]
	ldr	r3, .L18+36
	cmp	r2, r6
	ldr	r1, [r3]
	beq	.L17
	ldr	r3, .L18+40
	mov	r0, r4
	ldr	r2, [r3]
	bl	REG_WR
	ldr	r3, .L18
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	DBEXIT
.L17:
	ldr	r3, .L18+44
	mov	r0, r4
	ldr	r2, [r3]
	bl	REG_WR
	ldr	r3, .L18
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	DBEXIT
.L15:
	ldr	r3, .L18+48
	ldr	r0, [r3]
	bl	BCE_RV2P_PROC2_CHG_MAX_BD_PAGE
	cmp	r5, #0
	bgt	.L3
.L16:
	ldr	r8, .L18+8
	b	.L9
.L19:
	.align	2
.L18:
	.word	BCE_VERBOSE_RESET
	.word	RV2P_PROC2
	.word	RV2P_PROC1
	.word	BCE_RV2P_INSTR_HIGH
	.word	BCE_RV2P_PROC2_ADDR_CMD_RDWR
	.word	BCE_RV2P_INSTR_LOW
	.word	BCE_RV2P_PROC1_ADDR_CMD_RDWR
	.word	BCE_RV2P_PROC1_ADDR_CMD
	.word	BCE_RV2P_PROC2_ADDR_CMD
	.word	BCE_RV2P_COMMAND
	.word	BCE_RV2P_COMMAND_PROC2_RESET
	.word	BCE_RV2P_COMMAND_PROC1_RESET
	.word	USABLE_RX_BD_PER_PAGE
	.size	bce_load_rv2p_fw, .-bce_load_rv2p_fw
	.comm	USABLE_RX_BD_PER_PAGE,4,4
	.comm	RV2P_PROC2,4,4
	.comm	RV2P_PROC1,4,4
	.comm	BCE_VERBOSE_RESET,4,4
	.comm	BCE_RV2P_PROC2_ADDR_CMD_RDWR,4,4
	.comm	BCE_RV2P_PROC2_ADDR_CMD,4,4
	.comm	BCE_RV2P_PROC1_ADDR_CMD_RDWR,4,4
	.comm	BCE_RV2P_PROC1_ADDR_CMD,4,4
	.comm	BCE_RV2P_INSTR_LOW,4,4
	.comm	BCE_RV2P_INSTR_HIGH,4,4
	.comm	BCE_RV2P_COMMAND_PROC2_RESET,4,4
	.comm	BCE_RV2P_COMMAND_PROC1_RESET,4,4
	.comm	BCE_RV2P_COMMAND,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
