	.file	"extr_txrx_edma.c_wil_rx_init_edma.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"compressed RX status cannot be used with SW reorder\n"
	.align 8
.LC1:
	.string	"rx_init, desc_ring_size=%u, status_ring_size=%u, elem_size=%zu\n"
	.align 8
.LC2:
	.string	"rx_init: allocate %d status rings\n"
	.align 8
.LC3:
	.string	"rx_buff_id_count %d exceeds sring_size %d. set it to %d\n"
	.text
	.p2align 4
	.type	wil_rx_init_edma, @function
wil_rx_init_edma:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	ecx, esi
	mov	r14d, 1
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	sal	r14d, cl
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	cmp	QWORD PTR 32[rdi], 0
	je	.L2
	mov	esi, DWORD PTR 28[rdi]
	test	esi, esi
	je	.L27
.L2:
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, ecx
	jg	.L4
	lea	eax, 1[rcx]
	mov	DWORD PTR 0[rbp], eax
.L4:
	cmp	DWORD PTR 4[rbp], r14d
	jg	.L5
	lea	edx, 512[r14]
	mov	DWORD PTR 4[rbp], edx
.L5:
	cmp	DWORD PTR WIL_SRING_SIZE_ORDER_MIN[rip], eax
	jle	.L28
.L6:
	mov	eax, DWORD PTR WIL_RX_SRING_SIZE_ORDER_DEFAULT[rip]
	mov	DWORD PTR 0[rbp], eax
.L7:
	mov	ecx, eax
	mov	r13d, 1
	mov	edx, r14d
	mov	rdi, rbp
	sal	r13d, cl
	mov	r8d, 4
	lea	rsi, .LC1[rip]
	xor	eax, eax
	mov	ecx, r13d
	call	wil_dbg_misc@PLT
	mov	rdi, rbp
	call	wil_rx_buf_len_init_edma@PLT
	mov	edx, DWORD PTR 8[rbp]
	mov	eax, DWORD PTR WIL6210_MAX_STATUS_RINGS[rip]
	cmp	edx, eax
	jge	.L29
.L8:
	lea	rsi, .LC2[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	wil_dbg_misc@PLT
	mov	esi, DWORD PTR 24[rbp]
	mov	rdi, rbp
	call	wil_wmi_cfg_def_rx_offload@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	edx, DWORD PTR 8[rbp]
	test	edx, edx
	jg	.L9
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edx, 4
	mov	esi, r13d
	mov	rdi, rbp
	call	wil_init_rx_sring@PLT
	test	eax, eax
	jne	.L17
	add	r12d, 1
	cmp	DWORD PTR 8[rbp], r12d
	jle	.L13
.L9:
	mov	rdi, rbp
	call	wil_find_free_sring@PLT
	mov	ecx, eax
	test	eax, eax
	jns	.L12
	mov	r12d, DWORD PTR EFAULT[rip]
	neg	r12d
.L10:
	mov	eax, DWORD PTR 8[rbp]
	test	eax, eax
	jle	.L1
	xor	r13d, r13d
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rax, QWORD PTR 16[rbp]
	mov	rdi, rbp
	lea	rsi, [rax+r13*4]
	add	r13, 1
	call	wil_sring_free@PLT
	cmp	DWORD PTR 8[rbp], r13d
	jg	.L16
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L29:
	.cfi_restore_state
	lea	edx, -1[rax]
	mov	DWORD PTR 8[rbp], edx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L28:
	cmp	DWORD PTR WIL_SRING_SIZE_ORDER_MAX[rip], eax
	jge	.L7
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L13:
	mov	edx, DWORD PTR WIL_DEFAULT_RX_STATUS_RING_ID[rip]
	mov	esi, r14d
	mov	rdi, rbp
	call	wil_init_rx_desc_ring@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L10
	mov	esi, DWORD PTR 4[rbp]
	cmp	esi, r13d
	jge	.L30
.L14:
	mov	rdi, rbp
	call	wil_init_rx_buff_arr@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L15
	mov	rdi, rbp
	call	wil_rx_refill_edma@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L1
	mov	rdi, rbp
	call	wil_free_rx_buff_arr@PLT
	.p2align 4,,10
	.p2align 3
.L15:
	lea	rsi, 40[rbp]
	mov	rdi, rbp
	call	wil_ring_free_edma@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L27:
	lea	rsi, .LC0[rip]
	call	wil_err@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	r12d, eax
	jmp	.L10
.L30:
	lea	r12d, -1[r13]
	mov	edx, esi
	mov	ecx, r13d
	mov	rdi, rbp
	lea	rsi, .LC3[rip]
	mov	r8d, r12d
	call	wil_info@PLT
	mov	DWORD PTR 4[rbp], r12d
	mov	esi, r12d
	jmp	.L14
	.cfi_endproc
.LFE0:
	.size	wil_rx_init_edma, .-wil_rx_init_edma
	.comm	WIL_SRING_SIZE_ORDER_MIN,4,4
	.comm	WIL_SRING_SIZE_ORDER_MAX,4,4
	.comm	WIL_RX_SRING_SIZE_ORDER_DEFAULT,4,4
	.comm	WIL_DEFAULT_RX_STATUS_RING_ID,4,4
	.comm	WIL6210_MAX_STATUS_RINGS,4,4
	.comm	EINVAL,4,4
	.comm	EFAULT,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_txrx_edma.c_wil_rx_init_edma.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"compressed RX status cannot be used with SW reorder"
	.ascii	"\012\000"
	.align	2
.LC1:
	.ascii	"rx_init, desc_ring_size=%u, status_ring_size=%u, el"
	.ascii	"em_size=%zu\012\000"
	.align	2
.LC2:
	.ascii	"rx_init: allocate %d status rings\012\000"
	.align	2
.LC3:
	.ascii	"rx_buff_id_count %d exceeds sring_size %d. set it t"
	.ascii	"o %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	wil_rx_init_edma, %function
wil_rx_init_edma:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r8, #1
	ldr	r3, [r0, #24]
	mov	r4, r0
	cmp	r3, #0
	sub	sp, sp, #12
	lsl	r8, r8, r1
	beq	.L2
	ldr	r3, [r0, #20]
	cmp	r3, #0
	beq	.L30
.L2:
	ldr	r3, [r4]
	ldr	r2, [r4, #4]
	cmp	r3, r1
	addle	r3, r1, #1
	strle	r3, [r4]
	cmp	r2, r8
	addle	r2, r8, #512
	strle	r2, [r4, #4]
	ldr	r2, .L33
	ldr	r2, [r2]
	cmp	r2, r3
	ble	.L31
.L6:
	ldr	r3, .L33+4
	ldr	r3, [r3]
	str	r3, [r4]
.L7:
	mov	r7, #1
	mov	r2, #4
	lsl	r7, r7, r3
	mov	r3, r7
	ldr	r1, .L33+8
	str	r2, [sp]
	mov	r0, r4
	mov	r2, r8
	bl	wil_dbg_misc
	mov	r0, r4
	bl	wil_rx_buf_len_init_edma
	ldr	r3, .L33+12
	ldr	r2, [r4, #8]
	ldr	r3, [r3]
	ldr	r1, .L33+16
	cmp	r2, r3
	subge	r2, r3, #1
	strge	r2, [r4, #8]
	mov	r0, r4
	bl	wil_dbg_misc
	mov	r0, r4
	ldr	r1, [r4, #16]
	bl	wil_wmi_cfg_def_rx_offload
	subs	r5, r0, #0
	movne	r9, r5
	bne	.L1
	ldr	r3, [r4, #8]
	cmp	r3, #0
	movgt	r6, r5
	bgt	.L9
	b	.L13
.L12:
	mov	r2, #4
	mov	r1, r7
	mov	r0, r4
	bl	wil_init_rx_sring
	subs	r9, r0, #0
	bne	.L10
	ldr	r3, [r4, #8]
	cmp	r3, r6
	ble	.L13
.L9:
	mov	r0, r4
	bl	wil_find_free_sring
	subs	r3, r0, #0
	add	r6, r6, #1
	bge	.L12
	ldr	r3, .L33+20
	ldr	r0, [r3]
	rsb	r9, r0, #0
.L10:
	ldr	r3, [r4, #8]
	cmp	r3, #0
	ble	.L1
.L16:
	ldr	r1, [r4, #12]
	mov	r0, r4
	add	r1, r1, r5, lsl #2
	bl	wil_sring_free
	ldr	r3, [r4, #8]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L16
.L1:
	mov	r0, r9
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L31:
	ldr	r2, .L33+24
	ldr	r2, [r2]
	cmp	r2, r3
	bge	.L7
	b	.L6
.L13:
	ldr	r3, .L33+28
	mov	r1, r8
	mov	r0, r4
	ldr	r2, [r3]
	bl	wil_init_rx_desc_ring
	subs	r9, r0, #0
	bne	.L10
	ldr	r1, [r4, #4]
	cmp	r1, r7
	bge	.L32
.L14:
	mov	r0, r4
	bl	wil_init_rx_buff_arr
	subs	r9, r0, #0
	bne	.L15
	mov	r0, r4
	bl	wil_rx_refill_edma
	subs	r9, r0, #0
	beq	.L1
	mov	r0, r4
	bl	wil_free_rx_buff_arr
.L15:
	mov	r0, r4
	add	r1, r4, #28
	bl	wil_ring_free_edma
	b	.L10
.L30:
	ldr	r1, .L33+32
	bl	wil_err
	ldr	r3, .L33+36
	ldr	r0, [r3]
	rsb	r9, r0, #0
	mov	r0, r9
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L32:
	sub	r6, r7, #1
	mov	r2, r1
	mov	r3, r7
	ldr	r1, .L33+40
	mov	r0, r4
	str	r6, [sp]
	bl	wil_info
	mov	r1, r6
	str	r6, [r4, #4]
	b	.L14
.L34:
	.align	2
.L33:
	.word	WIL_SRING_SIZE_ORDER_MIN
	.word	WIL_RX_SRING_SIZE_ORDER_DEFAULT
	.word	.LC1
	.word	WIL6210_MAX_STATUS_RINGS
	.word	.LC2
	.word	EFAULT
	.word	WIL_SRING_SIZE_ORDER_MAX
	.word	WIL_DEFAULT_RX_STATUS_RING_ID
	.word	.LC0
	.word	EINVAL
	.word	.LC3
	.size	wil_rx_init_edma, .-wil_rx_init_edma
	.comm	WIL_SRING_SIZE_ORDER_MIN,4,4
	.comm	WIL_SRING_SIZE_ORDER_MAX,4,4
	.comm	WIL_RX_SRING_SIZE_ORDER_DEFAULT,4,4
	.comm	WIL_DEFAULT_RX_STATUS_RING_ID,4,4
	.comm	WIL6210_MAX_STATUS_RINGS,4,4
	.comm	EINVAL,4,4
	.comm	EFAULT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
