	.file	"extr_if_bce.c_bce_init_rx_chain.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	bce_init_rx_chain, @function
bce_init_rx_chain:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR BCE_VERBOSE_RESET[rip]
	or	edi, DWORD PTR BCE_VERBOSE_RECV[rip]
	or	edi, DWORD PTR BCE_VERBOSE_LOAD[rip]
	or	edi, DWORD PTR BCE_VERBOSE_CTX[rip]
	call	DBENTER@PLT
	mov	rax, QWORD PTR USABLE_RX_BD_ALLOC[rip]
	mov	edx, DWORD PTR 0[rbp]
	mov	QWORD PTR 88[rbp], 0
	mov	QWORD PTR 80[rbp], 0
	mov	QWORD PTR 64[rbp], rax
	mov	QWORD PTR 56[rbp], rax
	xor	eax, eax
	mov	QWORD PTR 72[rbp], 0
	test	edx, edx
	jg	.L2
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L18:
	lea	rbx, 1[rax]
	lea	r13, 0[0+rbx*4]
.L5:
	mov	rax, QWORD PTR 40[rbp]
	mov	edi, DWORD PTR [rax+r13]
	call	BCE_ADDR_HI@PLT
	mov	edi, eax
	call	htole32@PLT
	mov	QWORD PTR 8[r12], rax
	mov	rax, QWORD PTR 40[rbp]
	mov	edi, DWORD PTR [rax+r13]
	call	BCE_ADDR_LO@PLT
	mov	edi, eax
	call	htole32@PLT
	mov	edx, DWORD PTR 0[rbp]
	mov	QWORD PTR [r12], rax
	mov	rax, rbx
	cmp	edx, ebx
	jle	.L6
.L2:
	mov	rcx, QWORD PTR 48[rbp]
	mov	r12, QWORD PTR USABLE_RX_BD_PER_PAGE[rip]
	sub	edx, 1
	sal	r12, 4
	add	r12, QWORD PTR [rcx+rax*8]
	cmp	edx, eax
	jne	.L18
	xor	r13d, r13d
	lea	rbx, 1[rax]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, rbp
	xor	ebx, ebx
	call	bce_fill_rx_chain@PLT
	mov	rdi, QWORD PTR USABLE_RX_BD_ALLOC[rip]
	mov	QWORD PTR 32[rbp], rdi
	call	DBRUN@PLT
	mov	QWORD PTR 24[rbp], 0
	xor	edi, edi
	call	DBRUN@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	eax, eax
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR 16[rbp]
	mov	edx, DWORD PTR BUS_DMASYNC_PREREAD[rip]
	or	edx, DWORD PTR BUS_DMASYNC_PREWRITE[rip]
	mov	esi, DWORD PTR [rax+rbx*4]
	add	rbx, 1
	call	bus_dmamap_sync@PLT
	cmp	DWORD PTR 0[rbp], ebx
	jg	.L3
.L4:
	mov	rdi, rbp
	call	bce_init_rx_context@PLT
	mov	edx, DWORD PTR TOTAL_RX_BD_ALLOC[rip]
	mov	rdi, rbp
	xor	esi, esi
	call	bce_dump_rx_bd_chain@PLT
	mov	edi, DWORD PTR BCE_EXTREME_RECV[rip]
	mov	esi, eax
	call	DBRUNMSG@PLT
	mov	edi, DWORD PTR BCE_VERBOSE_RESET[rip]
	or	edi, DWORD PTR BCE_VERBOSE_RECV[rip]
	or	edi, DWORD PTR BCE_VERBOSE_LOAD[rip]
	or	edi, DWORD PTR BCE_VERBOSE_CTX[rip]
	call	DBEXIT@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	bce_init_rx_chain, .-bce_init_rx_chain
	.comm	USABLE_RX_BD_PER_PAGE,8,8
	.comm	USABLE_RX_BD_ALLOC,8,8
	.comm	TOTAL_RX_BD_ALLOC,4,4
	.comm	BUS_DMASYNC_PREWRITE,4,4
	.comm	BUS_DMASYNC_PREREAD,4,4
	.comm	BCE_VERBOSE_RESET,4,4
	.comm	BCE_VERBOSE_RECV,4,4
	.comm	BCE_VERBOSE_LOAD,4,4
	.comm	BCE_VERBOSE_CTX,4,4
	.comm	BCE_EXTREME_RECV,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_init_rx_chain.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bce_init_rx_chain, %function
bce_init_rx_chain:
	@ 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	r4, r0
	mov	r5, #0
	ldr	r2, .L15
	ldr	r3, .L15+4
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, .L15+8
	orr	r3, r3, r1
	ldr	r1, .L15+12
	ldr	r2, [r2]
	ldr	r0, [r1]
	orr	r3, r3, r2
	orr	r0, r3, r0
	ldr	fp, .L15+16
	bl	DBENTER
	ldr	r1, [r4]
	ldr	r3, [fp]
	cmp	r1, r5
	ldrgt	r7, .L15+20
	str	r5, [r4, #44]
	str	r5, [r4, #40]
	str	r5, [r4, #36]
	str	r3, [r4, #32]
	str	r3, [r4, #28]
	ble	.L6
.L2:
	sub	r1, r1, #1
	cmp	r1, r5
	lsl	r6, r5, #2
	moveq	r6, #0
	ldr	r3, [r4, #20]
	addne	r6, r6, #4
	ldr	r2, [r4, #24]
	ldr	r0, [r3, r6]
	ldr	r8, [r2, r5, lsl #2]
	ldr	r9, [r7]
	bl	BCE_ADDR_HI
	bl	htole32
	ldr	r3, [r4, #20]
	add	r10, r8, r9, lsl #3
	str	r0, [r10, #4]
	ldr	r0, [r3, r6]
	bl	BCE_ADDR_LO
	bl	htole32
	ldr	r1, [r4]
	add	r5, r5, #1
	cmp	r1, r5
	str	r0, [r8, r9, lsl #3]
	bgt	.L2
.L6:
	mov	r5, #0
	mov	r0, r4
	bl	bce_fill_rx_chain
	ldr	r0, [fp]
	str	r0, [r4, #16]
	bl	DBRUN
	mov	r0, r5
	str	r5, [r4, #12]
	bl	DBRUN
	ldr	r3, [r4]
	cmp	r3, r5
	ble	.L4
	ldr	r7, .L15+24
	ldr	r6, .L15+28
.L3:
	ldr	r1, [r7]
	ldr	r3, [r4, #4]
	ldr	r2, [r6]
	ldr	r0, [r4, #8]
	orr	r2, r1, r2
	ldr	r1, [r3, r5, lsl #2]
	bl	bus_dmamap_sync
	ldr	r3, [r4]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L3
.L4:
	mov	r0, r4
	bl	bce_init_rx_context
	ldr	r3, .L15+32
	ldr	r2, .L15+36
	mov	r0, r4
	mov	r1, #0
	ldr	r4, [r2]
	ldr	r2, [r3]
	bl	bce_dump_rx_bd_chain
	mov	r1, r0
	mov	r0, r4
	bl	DBRUNMSG
	ldr	r2, .L15
	ldr	r3, .L15+4
	ldr	r0, [r2]
	ldr	r2, .L15+8
	ldr	r1, .L15+12
	ldr	r3, [r3]
	ldr	r2, [r2]
	orr	r3, r3, r0
	ldr	r0, [r1]
	orr	r3, r3, r2
	orr	r0, r3, r0
	bl	DBEXIT
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	.align	2
.L15:
	.word	BCE_VERBOSE_RECV
	.word	BCE_VERBOSE_RESET
	.word	BCE_VERBOSE_LOAD
	.word	BCE_VERBOSE_CTX
	.word	USABLE_RX_BD_ALLOC
	.word	USABLE_RX_BD_PER_PAGE
	.word	BUS_DMASYNC_PREREAD
	.word	BUS_DMASYNC_PREWRITE
	.word	TOTAL_RX_BD_ALLOC
	.word	BCE_EXTREME_RECV
	.size	bce_init_rx_chain, .-bce_init_rx_chain
	.comm	USABLE_RX_BD_PER_PAGE,4,4
	.comm	USABLE_RX_BD_ALLOC,4,4
	.comm	TOTAL_RX_BD_ALLOC,4,4
	.comm	BUS_DMASYNC_PREWRITE,4,4
	.comm	BUS_DMASYNC_PREREAD,4,4
	.comm	BCE_VERBOSE_RESET,4,4
	.comm	BCE_VERBOSE_RECV,4,4
	.comm	BCE_VERBOSE_LOAD,4,4
	.comm	BCE_VERBOSE_CTX,4,4
	.comm	BCE_EXTREME_RECV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
