	.file	"extr_b44.c_b44_alloc_rx_skb.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	b44_alloc_rx_skb, @function
b44_alloc_rx_skb:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r13, QWORD PTR 48[rdi]
	mov	QWORD PTR [rsp], 0
	test	esi, esi
	js	.L2
	movsx	rsi, esi
	sal	rsi, 4
	lea	rax, 0[r13+rsi]
	mov	QWORD PTR [rsp], rax
.L2:
	mov	edi, DWORD PTR 40[rbx]
	mov	esi, DWORD PTR RX_PKT_BUF_SZ[rip]
	mov	r12d, DWORD PTR B44_RX_RING_SIZE[rip]
	call	netdev_alloc_skb@PLT
	mov	r15, rax
	test	rax, rax
	je	.L28
	mov	rax, QWORD PTR 16[rbx]
	mov	rsi, QWORD PTR [r15]
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	edx, DWORD PTR RX_PKT_BUF_SZ[rip]
	mov	edi, DWORD PTR [rax]
	call	dma_map_single@PLT
	mov	r14, rax
	mov	rax, QWORD PTR 16[rbx]
	mov	rsi, r14
	mov	edi, DWORD PTR [rax]
	call	dma_mapping_error@PLT
	test	rax, rax
	je	.L5
.L8:
	mov	rax, QWORD PTR 16[rbx]
	mov	rsi, r14
	mov	edi, DWORD PTR [rax]
	call	dma_mapping_error@PLT
	test	rax, rax
	je	.L30
.L7:
	mov	rdi, r15
	call	dev_kfree_skb_any@PLT
	mov	edi, DWORD PTR RX_PKT_BUF_SZ[rip]
	mov	esi, DWORD PTR GFP_ATOMIC[rip]
	or	esi, DWORD PTR GFP_DMA[rip]
	call	alloc_skb@PLT
	mov	r15, rax
	test	rax, rax
	je	.L28
	mov	rax, QWORD PTR 16[rbx]
	mov	rsi, QWORD PTR [r15]
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	edx, DWORD PTR RX_PKT_BUF_SZ[rip]
	mov	edi, DWORD PTR [rax]
	call	dma_map_single@PLT
	mov	r14, rax
	mov	rax, QWORD PTR 16[rbx]
	mov	rsi, r14
	mov	edi, DWORD PTR [rax]
	call	dma_mapping_error@PLT
	test	rax, rax
	jne	.L14
	movsx	rax, DWORD PTR RX_PKT_BUF_SZ[rip]
	mov	edi, 30
	add	rax, r14
	mov	QWORD PTR 8[rsp], rax
	call	DMA_BIT_MASK@PLT
	cmp	QWORD PTR 8[rsp], rax
	jg	.L14
	mov	DWORD PTR [rbx], 1
.L9:
	lea	edx, -1[r12]
	mov	rax, QWORD PTR [r15]
	and	ebp, edx
	movsx	r12, ebp
	mov	QWORD PTR 8[rax], 0
	mov	QWORD PTR [rax], 0
	sal	r12, 4
	mov	rax, QWORD PTR [rsp]
	add	r13, r12
	mov	QWORD PTR 0[r13], r15
	mov	QWORD PTR 8[r13], r14
	test	rax, rax
	je	.L16
	mov	QWORD PTR [rax], 0
.L16:
	mov	eax, DWORD PTR B44_RX_RING_SIZE[rip]
	mov	edi, DWORD PTR DESC_CTRL_LEN[rip]
	and	edi, DWORD PTR RX_PKT_BUF_SZ[rip]
	sub	eax, 1
	cmp	eax, ebp
	jne	.L17
	or	edi, DWORD PTR DESC_CTRL_EOT[rip]
.L17:
	add	r12, QWORD PTR 32[rbx]
	call	cpu_to_le32@PLT
	mov	edi, DWORD PTR 24[rbx]
	mov	QWORD PTR 8[r12], rax
	add	edi, r14d
	call	cpu_to_le32@PLT
	mov	QWORD PTR [r12], rax
	mov	eax, DWORD PTR 4[rbx]
	test	DWORD PTR B44_FLAG_RX_RING_HACK[rip], eax
	jne	.L31
.L18:
	mov	eax, DWORD PTR RX_PKT_BUF_SZ[rip]
	add	rsp, 24
	.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
.L14:
	.cfi_restore_state
	mov	rax, QWORD PTR 16[rbx]
	mov	rsi, r14
	mov	edi, DWORD PTR [rax]
	call	dma_mapping_error@PLT
	test	rax, rax
	jne	.L13
	mov	rax, QWORD PTR 16[rbx]
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	rsi, r14
	mov	edx, DWORD PTR RX_PKT_BUF_SZ[rip]
	mov	edi, DWORD PTR [rax]
	call	dma_unmap_single@PLT
.L13:
	mov	rdi, r15
	call	dev_kfree_skb_any@PLT
.L28:
	mov	eax, DWORD PTR ENOMEM[rip]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	eax
	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
.L5:
	.cfi_restore_state
	movsx	rax, DWORD PTR RX_PKT_BUF_SZ[rip]
	mov	edi, 30
	add	rax, r14
	mov	QWORD PTR 8[rsp], rax
	call	DMA_BIT_MASK@PLT
	cmp	QWORD PTR 8[rsp], rax
	jg	.L8
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L30:
	mov	rax, QWORD PTR 16[rbx]
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	rsi, r14
	mov	edx, DWORD PTR RX_PKT_BUF_SZ[rip]
	mov	edi, DWORD PTR [rax]
	call	dma_unmap_single@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L31:
	mov	edx, ebp
	mov	esi, DWORD PTR 8[rbx]
	mov	rdi, QWORD PTR 16[rbx]
	mov	ecx, DWORD PTR DMA_BIDIRECTIONAL[rip]
	sal	edx, 4
	call	b44_sync_dma_desc_for_device@PLT
	jmp	.L18
	.cfi_endproc
.LFE0:
	.size	b44_alloc_rx_skb, .-b44_alloc_rx_skb
	.comm	RX_PKT_BUF_SZ,4,4
	.comm	GFP_DMA,4,4
	.comm	GFP_ATOMIC,4,4
	.comm	ENOMEM,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.comm	DMA_BIDIRECTIONAL,4,4
	.comm	DESC_CTRL_LEN,4,4
	.comm	DESC_CTRL_EOT,4,4
	.comm	B44_RX_RING_SIZE,4,4
	.comm	B44_FLAG_RX_RING_HACK,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_b44.c_b44_alloc_rx_skb.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	b44_alloc_rx_skb, %function
b44_alloc_rx_skb:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r1, #0
	movlt	r3, #0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r10, [r0, #28]
	ldr	r7, .L32
	ldr	r9, .L32+4
	addge	r3, r10, r1, lsl #3
	sub	sp, sp, #20
	mov	r4, r0
	ldr	r1, [r7]
	ldr	r0, [r0, #24]
	ldr	r8, [r9]
	str	r2, [sp, #8]
	str	r3, [sp, #4]
	bl	netdev_alloc_skb
	subs	r5, r0, #0
	beq	.L28
	ldr	r2, [r4, #12]
	ldr	fp, .L32+8
	ldr	r0, [r2]
	ldr	r3, [fp]
	ldr	r2, [r7]
	ldr	r1, [r5]
	bl	dma_map_single
	ldr	r3, [r4, #12]
	mov	r1, r0
	mov	r6, r0
	ldr	r0, [r3]
	bl	dma_mapping_error
	cmp	r0, #0
	beq	.L5
.L8:
	ldr	r3, [r4, #12]
	mov	r1, r6
	ldr	r0, [r3]
	bl	dma_mapping_error
	cmp	r0, #0
	beq	.L30
.L7:
	mov	r0, r5
	bl	dev_kfree_skb_any
	ldr	r2, .L32+12
	ldr	r3, .L32+16
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r0, [r7]
	orr	r1, r1, r3
	bl	alloc_skb
	subs	r5, r0, #0
	beq	.L28
	ldr	r2, [r4, #12]
	ldr	r3, [fp]
	ldr	r0, [r2]
	ldr	r1, [r5]
	ldr	r2, [r7]
	bl	dma_map_single
	ldr	r3, [r4, #12]
	mov	r1, r0
	mov	r6, r0
	ldr	r0, [r3]
	bl	dma_mapping_error
	cmp	r0, #0
	bne	.L14
	ldr	r3, [r7]
	mov	r0, #30
	add	r3, r6, r3
	str	r3, [sp, #12]
	bl	DMA_BIT_MASK
	ldr	r3, [sp, #12]
	cmp	r3, r0
	movle	r3, #1
	strle	r3, [r4]
	bgt	.L14
.L9:
	mov	r3, #0
	ldr	r2, [sp, #8]
	ldr	r1, [sp, #4]
	sub	r8, r8, #1
	and	r8, r8, r2
	ldr	r2, [r5]
	cmp	r1, r3
	add	r0, r10, r8, lsl #3
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r5, [r10, r8, lsl #3]
	str	r6, [r0, #4]
	strne	r3, [r1]
	ldr	r3, [r9]
	ldr	r2, .L32+20
	sub	r3, r3, #1
	cmp	r3, r8
	ldreq	r3, .L32+24
	ldr	r0, [r2]
	ldr	r2, [r7]
	ldreq	r3, [r3]
	and	r0, r0, r2
	orreq	r0, r0, r3
	ldr	r5, [r4, #20]
	bl	cpu_to_le32
	lsl	fp, r8, #3
	ldr	r3, [r4, #16]
	add	r2, r5, fp
	str	r0, [r2, #4]
	add	r0, r6, r3
	bl	cpu_to_le32
	ldr	r3, .L32+28
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	str	r0, [r5, r8, lsl #3]
	tst	r2, r3
	bne	.L31
.L18:
	ldr	r0, [r7]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	ldr	r3, [r4, #12]
	mov	r1, r6
	ldr	r0, [r3]
	bl	dma_mapping_error
	cmp	r0, #0
	bne	.L13
	ldr	r2, [r4, #12]
	mov	r1, r6
	ldr	r0, [r2]
	ldr	r3, [fp]
	ldr	r2, [r7]
	bl	dma_unmap_single
.L13:
	mov	r0, r5
	bl	dev_kfree_skb_any
.L28:
	ldr	r3, .L32+32
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L5:
	ldr	r3, [r7]
	mov	r0, #30
	add	r3, r6, r3
	str	r3, [sp, #12]
	bl	DMA_BIT_MASK
	ldr	r3, [sp, #12]
	cmp	r3, r0
	bgt	.L8
	b	.L9
.L30:
	ldr	r3, [r4, #12]
	mov	r1, r6
	ldr	r0, [r3]
	ldr	r2, [r7]
	ldr	r3, [fp]
	bl	dma_unmap_single
	b	.L7
.L31:
	ldr	r3, .L32+36
	mov	r2, fp
	ldr	r3, [r3]
	ldr	r1, [r4, #8]
	ldr	r0, [r4, #12]
	bl	b44_sync_dma_desc_for_device
	b	.L18
.L33:
	.align	2
.L32:
	.word	RX_PKT_BUF_SZ
	.word	B44_RX_RING_SIZE
	.word	DMA_FROM_DEVICE
	.word	GFP_ATOMIC
	.word	GFP_DMA
	.word	DESC_CTRL_LEN
	.word	DESC_CTRL_EOT
	.word	B44_FLAG_RX_RING_HACK
	.word	ENOMEM
	.word	DMA_BIDIRECTIONAL
	.size	b44_alloc_rx_skb, .-b44_alloc_rx_skb
	.comm	RX_PKT_BUF_SZ,4,4
	.comm	GFP_DMA,4,4
	.comm	GFP_ATOMIC,4,4
	.comm	ENOMEM,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.comm	DMA_BIDIRECTIONAL,4,4
	.comm	DESC_CTRL_LEN,4,4
	.comm	DESC_CTRL_EOT,4,4
	.comm	B44_RX_RING_SIZE,4,4
	.comm	B44_FLAG_RX_RING_HACK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
