	.file	"extr_rtl_core.c__rtl92e_alloc_rx_ring.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Cannot allocate RX ring\n"
	.text
	.p2align 4
	.type	_rtl92e_alloc_rx_ring, @function
_rtl92e_alloc_rx_ring:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	r15d, r15d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	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
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	QWORD PTR 16[rsp], rdi
	call	rtllib_priv@PLT
	mov	edx, DWORD PTR MAX_RX_QUEUE[rip]
	mov	QWORD PTR 24[rsp], 0
	mov	rbx, rax
	test	edx, edx
	jle	.L7
.L2:
	mov	r14, QWORD PTR 24[rsp]
	mov	rax, QWORD PTR 40[rbx]
	mov	esi, DWORD PTR [rbx]
	mov	rbp, QWORD PTR 24[rbx]
	mov	edi, DWORD PTR 8[rbx]
	lea	r13, 0[0+r14*8]
	lea	rdx, [rax+r14*4]
	sal	esi, 4
	add	rbp, r13
	call	pci_zalloc_consistent@PLT
	mov	QWORD PTR 0[rbp], rax
	mov	rax, QWORD PTR 24[rbx]
	mov	r9, QWORD PTR [rax+r14*8]
	test	r9, r9
	je	.L4
	and	r9d, 255
	mov	r14, r9
	jne	.L4
	mov	rax, QWORD PTR 32[rbx]
	mov	QWORD PTR [rax+r13], 0
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	jle	.L6
	mov	edi, DWORD PTR 4[rbx]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L29:
	mov	rax, QWORD PTR 16[rsp]
	mov	ecx, DWORD PTR PCI_DMA_FROMDEVICE[rip]
	mov	rdi, rbp
	mov	edx, DWORD PTR 4[rbx]
	mov	r12, QWORD PTR 0[rbp]
	mov	QWORD PTR 8[rbp], rax
	mov	rax, QWORD PTR 16[rbx]
	mov	DWORD PTR 12[rsp], ecx
	mov	rax, QWORD PTR [rax+r13]
	mov	DWORD PTR 8[rsp], edx
	mov	QWORD PTR [rax+r14*8], rbp
	call	skb_tail_pointer_rsl@PLT
	mov	edi, DWORD PTR 8[rbx]
	mov	ecx, DWORD PTR 12[rsp]
	mov	edx, DWORD PTR 8[rsp]
	mov	esi, eax
	call	pci_map_single@PLT
	mov	DWORD PTR [r12], eax
	mov	edi, DWORD PTR 8[rbx]
	mov	esi, eax
	call	pci_dma_mapping_error@PLT
	test	rax, rax
	jne	.L28
	mov	eax, DWORD PTR [r12]
	mov	edi, DWORD PTR 4[rbx]
	add	r14, 1
	mov	DWORD PTR [r15], 1
	mov	DWORD PTR 12[r15], eax
	mov	DWORD PTR 8[r15], edi
	cmp	DWORD PTR [rbx], r14d
	jle	.L10
.L9:
	call	dev_alloc_skb@PLT
	mov	r8, r14
	mov	rbp, rax
	mov	rax, QWORD PTR 24[rbx]
	sal	r8, 4
	mov	r15, QWORD PTR [rax+r13]
	add	r15, r8
	test	rbp, rbp
	jne	.L29
.L7:
	xor	eax, eax
.L1:
	add	rsp, 40
	.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
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	mov	rdi, rbp
	call	dev_kfree_skb_any@PLT
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, -1
	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
.L6:
	.cfi_restore_state
	test	r15, r15
	je	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	mov	DWORD PTR 4[r15], 1
.L11:
	add	QWORD PTR 24[rsp], 1
	mov	rax, QWORD PTR 24[rsp]
	cmp	DWORD PTR MAX_RX_QUEUE[rip], eax
	jg	.L2
	jmp	.L7
.L4:
	mov	rdi, QWORD PTR 16[rsp]
	lea	rsi, .LC0[rip]
	call	netdev_warn@PLT
	movzx	eax, WORD PTR ENOMEM[rip]
	neg	eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	_rtl92e_alloc_rx_ring, .-_rtl92e_alloc_rx_ring
	.comm	PCI_DMA_FROMDEVICE,4,4
	.comm	MAX_RX_QUEUE,4,4
	.comm	ENOMEM,2,2
	.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_rtl_core.c__rtl92e_alloc_rx_ring.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Cannot allocate RX ring\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	_rtl92e_alloc_rx_ring, %function
_rtl92e_alloc_rx_ring:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #20
	str	r0, [sp, #8]
	bl	rtllib_priv
	ldr	r3, .L28
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L7
	mov	r3, #0
	mov	r4, r0
	mov	r7, r3
	ldr	r1, [r0]
	str	r3, [sp, #12]
.L2:
	ldr	r6, [sp, #12]
	ldr	r2, [r4, #24]
	ldr	r0, [r4, #8]
	add	r2, r2, r6, lsl #2
	lsl	r1, r1, #4
	ldr	r5, [r4, #16]
	bl	pci_zalloc_consistent
	mov	r2, r6
	ldr	r3, [r4, #16]
	str	r0, [r5, r6, lsl #2]
	ldr	r6, [r3, r6, lsl #2]
	lsl	r10, r2, #2
	cmp	r6, #0
	beq	.L4
	ands	r6, r6, #255
	bne	.L4
	ldr	r1, [r4]
	ldr	r3, [r4, #20]
	cmp	r1, #0
	str	r6, [r3, r10]
	ble	.L6
	ldr	r0, [r4, #4]
	b	.L9
.L27:
	ldr	r3, [r4, #12]
	ldr	r2, [sp, #8]
	ldr	r3, [r3, r10]
	str	r2, [r5, #4]
	ldr	r2, [r4, #8]
	ldr	r9, [r5]
	str	r5, [r3, r6, lsl #2]
	str	r2, [sp, #4]
	bl	skb_tail_pointer_rsl
	ldr	r2, [sp, #4]
	ldr	r3, .L28+4
	mov	r1, r0
	ldr	r3, [r3]
	mov	r0, r2
	ldr	r2, [r4, #4]
	bl	pci_map_single
	str	r0, [r9]
	mov	r1, r0
	ldr	r0, [r4, #8]
	bl	pci_dma_mapping_error
	cmp	r0, #0
	add	r6, r6, #1
	bne	.L26
	ldr	r3, [r9]
	ldr	r1, [r4]
	ldr	r0, [r4, #4]
	str	r3, [r7, #12]
	mov	r3, #1
	cmp	r1, r6
	str	r0, [r7, #8]
	str	r3, [r8, fp]
	ble	.L10
.L9:
	bl	dev_alloc_skb
	ldr	r3, [r4, #16]
	subs	r5, r0, #0
	ldr	r8, [r3, r10]
	lsl	fp, r6, #4
	add	r7, r8, r6, lsl #4
	bne	.L27
.L7:
	mov	r0, #0
.L3:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L26:
	mov	r0, r5
	bl	dev_kfree_skb_any
	mvn	r0, #0
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	cmp	r7, #0
	beq	.L11
.L10:
	mov	r3, #1
	str	r3, [r7, #4]
.L11:
	ldr	r3, .L28
	ldr	r2, [sp, #12]
	ldr	r3, [r3]
	add	r2, r2, #1
	cmp	r3, r2
	str	r2, [sp, #12]
	bgt	.L2
	b	.L7
.L4:
	ldr	r0, [sp, #8]
	ldr	r1, .L28+8
	bl	netdev_warn
	ldr	r3, .L28+12
	ldrh	r0, [r3]
	rsb	r0, r0, #0
	lsl	r0, r0, #16
	asr	r0, r0, #16
	b	.L3
.L29:
	.align	2
.L28:
	.word	MAX_RX_QUEUE
	.word	PCI_DMA_FROMDEVICE
	.word	.LC0
	.word	ENOMEM
	.size	_rtl92e_alloc_rx_ring, .-_rtl92e_alloc_rx_ring
	.comm	PCI_DMA_FROMDEVICE,4,4
	.comm	MAX_RX_QUEUE,4,4
	.comm	ENOMEM,2,2
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
