	.file	"extr_myri10ge.c_myri10ge_alloc_rx_pages.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	myri10ge_alloc_rx_pages, @function
myri10ge_alloc_rx_pages:
.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
	mov	r13d, edx
	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
	mov	rbx, rsi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	eax, DWORD PTR [rsi]
	mov	QWORD PTR 8[rsp], rdi
	test	eax, eax
	setne	al
	xor	edi, edi
	test	ecx, ecx
	sete	dil
	and	edi, eax
	call	unlikely@PLT
	test	rax, rax
	jne	.L1
	mov	eax, DWORD PTR 12[rbx]
	mov	ecx, DWORD PTR 8[rbx]
	mov	edx, DWORD PTR 4[rbx]
	add	ecx, eax
	add	ecx, 1
	cmp	edx, ecx
	jne	.L11
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rdi, QWORD PTR 56[rbx]
	call	get_page@PLT
	mov	r14, QWORD PTR 56[rbx]
	mov	eax, DWORD PTR 16[rbx]
	mov	edx, DWORD PTR 40[rbx]
.L6:
	movsx	rcx, ebp
	mov	rdi, QWORD PTR 48[rbx]
	mov	esi, r12d
	mov	r15, rcx
	mov	QWORD PTR [rsp], rcx
	sal	r15, 4
	add	rdi, r15
	mov	QWORD PTR 8[rdi], r14
	mov	DWORD PTR [rdi], eax
	call	dma_unmap_addr_set@PLT
	mov	edi, DWORD PTR 40[rbx]
	call	MYRI10GE_LOWPART_TO_U32@PLT
	movsx	rdi, DWORD PTR 16[rbx]
	mov	r14, QWORD PTR 24[rbx]
	add	rdi, rax
	add	r14, r15
	call	htonl@PLT
	mov	edi, DWORD PTR 40[rbx]
	mov	QWORD PTR 8[r14], rax
	call	MYRI10GE_HIGHPART_TO_U32@PLT
	mov	r14, QWORD PTR 24[rbx]
	mov	rdi, rax
	call	htonl@PLT
	add	r14, r15
	mov	edi, r13d
	mov	QWORD PTR [r14], rax
	call	SKB_DATA_ALIGN@PLT
	add	DWORD PTR 16[rbx], eax
	mov	eax, DWORD PTR 4[rbx]
	mov	rcx, QWORD PTR [rsp]
	lea	edx, 1[rax]
	mov	eax, ebp
	and	eax, 7
	mov	DWORD PTR 4[rbx], edx
	cmp	eax, 7
	je	.L15
	mov	eax, DWORD PTR 12[rbx]
	mov	ecx, DWORD PTR 8[rbx]
	add	ecx, eax
	add	ecx, 1
	cmp	ecx, edx
	je	.L1
.L11:
	and	edx, eax
	mov	eax, DWORD PTR 16[rbx]
	mov	ebp, edx
	add	eax, r13d
	cmp	eax, DWORD PTR MYRI10GE_ALLOC_SIZE[rip]
	jle	.L16
	mov	esi, DWORD PTR MYRI10GE_ALLOC_ORDER[rip]
	mov	edi, DWORD PTR GFP_ATOMIC[rip]
	or	edi, DWORD PTR __GFP_COMP[rip]
	call	alloc_pages@PLT
	xor	edi, edi
	test	rax, rax
	mov	r14, rax
	sete	dil
	call	unlikely@PLT
	test	rax, rax
	jne	.L17
	mov	r15, QWORD PTR 8[rsp]
	mov	ecx, DWORD PTR MYRI10GE_ALLOC_SIZE[rip]
	xor	edx, edx
	mov	rsi, r14
	mov	r8d, DWORD PTR PCI_DMA_FROMDEVICE[rip]
	mov	edi, DWORD PTR [r15]
	call	pci_map_page@PLT
	mov	edi, DWORD PTR [r15]
	mov	esi, eax
	mov	r12d, eax
	call	pci_dma_mapping_error@PLT
	mov	edi, eax
	call	unlikely@PLT
	test	rax, rax
	jne	.L18
	mov	QWORD PTR 56[rbx], r14
	mov	edx, r12d
	xor	eax, eax
	mov	DWORD PTR 16[rbx], 0
	mov	DWORD PTR 40[rbx], r12d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rax, QWORD PTR 24[rbx]
	lea	rsi, -112[rax+r15]
	mov	rax, QWORD PTR 32[rbx]
	lea	rdi, -28[rax+rcx*4]
	call	myri10ge_submit_8rx@PLT
	mov	eax, DWORD PTR 12[rbx]
	mov	ecx, DWORD PTR 8[rbx]
	mov	edx, DWORD PTR 4[rbx]
	add	ecx, eax
	add	ecx, 1
	cmp	ecx, edx
	jne	.L11
.L1:
	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
.L17:
	.cfi_restore_state
	mov	eax, DWORD PTR 4[rbx]
	sub	eax, DWORD PTR 8[rbx]
	cmp	eax, 15
	jg	.L1
.L9:
	mov	DWORD PTR [rbx], 1
	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
.L18:
	.cfi_restore_state
	mov	esi, DWORD PTR MYRI10GE_ALLOC_ORDER[rip]
	mov	rdi, r14
	call	__free_pages@PLT
	mov	eax, DWORD PTR 4[rbx]
	sub	eax, DWORD PTR 8[rbx]
	cmp	eax, 15
	jle	.L9
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	myri10ge_alloc_rx_pages, .-myri10ge_alloc_rx_pages
	.comm	__GFP_COMP,4,4
	.comm	PCI_DMA_FROMDEVICE,4,4
	.comm	MYRI10GE_ALLOC_SIZE,4,4
	.comm	MYRI10GE_ALLOC_ORDER,4,4
	.comm	GFP_ATOMIC,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_myri10ge.c_myri10ge_alloc_rx_pages.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	myri10ge_alloc_rx_pages, %function
myri10ge_alloc_rx_pages:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	clz	r3, r3
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r10, r0
	ldr	r0, [r1]
	lsr	r3, r3, #5
	cmp	r0, #0
	movne	r0, r3
	moveq	r0, #0
	sub	sp, sp, #12
	mov	r4, r1
	mov	r8, r2
	bl	unlikely
	cmp	r0, #0
	bne	.L1
	ldr	r5, [r4, #12]
	ldr	r2, [r4, #8]
	ldr	r3, [r4, #4]
	add	r2, r5, r2
	add	r2, r2, #1
	cmp	r3, r2
	beq	.L1
	ldr	r9, .L19
	b	.L11
.L17:
	ldr	r0, [r4, #36]
	bl	get_page
	ldr	r6, [r4, #36]
	ldr	r3, [r4, #16]
	ldr	r2, [r4, #28]
.L6:
	ldr	r1, [r4, #32]
	add	r0, r1, r5, lsl #3
	str	r6, [r0, #4]
	str	r3, [r1, r5, lsl #3]
	mov	r1, r7
	bl	dma_unmap_addr_set
	ldr	r0, [r4, #28]
	bl	MYRI10GE_LOWPART_TO_U32
	ldr	r3, [r4, #16]
	ldr	fp, [r4, #20]
	add	r0, r0, r3
	bl	htonl
	mov	r3, r0
	lsl	r6, r5, #3
	add	fp, fp, r6
	ldr	r0, [r4, #28]
	str	r3, [fp, #4]
	bl	MYRI10GE_HIGHPART_TO_U32
	ldr	fp, [r4, #20]
	bl	htonl
	mov	r3, r0
	mov	r0, r8
	str	r3, [fp, r5, lsl #3]
	bl	SKB_DATA_ALIGN
	ldr	r2, [r4, #16]
	ldr	r3, [r4, #4]
	and	ip, r5, #7
	add	r2, r2, r0
	add	r3, r3, #1
	cmp	ip, #7
	str	r2, [r4, #16]
	str	r3, [r4, #4]
	beq	.L16
.L10:
	ldr	r5, [r4, #12]
	ldr	r2, [r4, #8]
	add	r2, r5, r2
	add	r2, r2, #1
	cmp	r2, r3
	beq	.L1
.L11:
	ldr	r2, [r4, #16]
	ldr	r1, [r9]
	add	r2, r8, r2
	cmp	r2, r1
	and	r5, r5, r3
	ble	.L17
	ldr	r3, .L19+4
	ldr	r2, .L19+8
	ldr	r0, [r3]
	ldr	r3, .L19+12
	ldr	r1, [r2]
	ldr	r3, [r3]
	orr	r0, r0, r3
	bl	alloc_pages
	mov	r6, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	unlikely
	subs	r2, r0, #0
	bne	.L14
	ldr	r3, .L19+16
	mov	r1, r6
	ldr	r3, [r3]
	str	r3, [sp]
	ldr	r0, [r10]
	ldr	r3, [r9]
	bl	pci_map_page
	mov	r7, r0
	ldr	r0, [r10]
	mov	r1, r7
	bl	pci_dma_mapping_error
	bl	unlikely
	subs	r3, r0, #0
	bne	.L18
	mov	r2, r7
	str	r6, [r4, #36]
	str	r3, [r4, #16]
	str	r7, [r4, #28]
	b	.L6
.L16:
	ldr	r1, [r4, #20]
	ldr	r0, [r4, #24]
	sub	r6, r6, #56
	sub	r5, r5, #-1073741817
	add	r1, r1, r6
	add	r0, r0, r5, lsl #2
	bl	myri10ge_submit_8rx
	ldr	r3, [r4, #4]
	b	.L10
.L18:
	ldr	r3, .L19+8
	mov	r0, r6
	ldr	r1, [r3]
	bl	__free_pages
.L14:
	ldr	r3, [r4, #4]
	ldr	r2, [r4, #8]
	sub	r3, r3, r2
	cmp	r3, #15
	movle	r3, #1
	strle	r3, [r4]
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	.align	2
.L19:
	.word	MYRI10GE_ALLOC_SIZE
	.word	GFP_ATOMIC
	.word	MYRI10GE_ALLOC_ORDER
	.word	__GFP_COMP
	.word	PCI_DMA_FROMDEVICE
	.size	myri10ge_alloc_rx_pages, .-myri10ge_alloc_rx_pages
	.comm	__GFP_COMP,4,4
	.comm	PCI_DMA_FROMDEVICE,4,4
	.comm	MYRI10GE_ALLOC_SIZE,4,4
	.comm	MYRI10GE_ALLOC_ORDER,4,4
	.comm	GFP_ATOMIC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
