	.file	"extr_en_tx.c_mlx4_en_build_dma_wqe.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"DMA mapping error\n"
	.text
	.p2align 4
	.type	mlx4_en_build_dma_wqe, @function
mlx4_en_build_dma_wqe:
.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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	eax, DWORD PTR [rsi]
	mov	r14, QWORD PTR [rdi]
	mov	QWORD PTR 24[rsp], rdi
	mov	ebp, eax
	mov	QWORD PTR 8[rsp], rsi
	mov	QWORD PTR 32[rsp], rcx
	mov	DWORD PTR 44[rsp], r8d
	mov	QWORD PTR 16[rsp], r9
	mov	DWORD PTR 40[rsp], eax
	sub	ebp, 1
	js	.L9
	movsx	r13, ebp
	sal	r13, 2
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, r15d
	sub	ebp, 1
	sub	rbx, 24
	sub	r13, 4
	call	cpu_to_be64@PLT
	mov	QWORD PTR 32[rbx], rax
	mov	rax, QWORD PTR 16[rsp]
	mov	QWORD PTR 40[rbx], rax
	xor	eax, eax
	call	dma_wmb@PLT
	mov	rdi, r12
	call	cpu_to_be32@PLT
	mov	QWORD PTR 24[rbx], rax
	cmp	ebp, -1
	je	.L2
.L4:
	mov	rax, QWORD PTR 8[rsp]
	mov	r15, QWORD PTR 8[rax]
	add	r15, r13
	mov	rdi, r15
	call	skb_frag_size@PLT
	mov	rsi, r15
	xor	edx, edx
	mov	rdi, r14
	mov	r8d, DWORD PTR DMA_TO_DEVICE[rip]
	mov	rcx, rax
	mov	r12, rax
	call	skb_frag_dma_map@PLT
	mov	rdi, r14
	mov	esi, eax
	mov	r15d, eax
	call	dma_mapping_error@PLT
	test	rax, rax
	je	.L15
.L3:
	mov	rdi, QWORD PTR 24[rsp]
	lea	rsi, .LC0[rip]
	add	ebp, 1
	call	en_err@PLT
	mov	r13, QWORD PTR 8[rsp]
	cmp	ebp, DWORD PTR 0[r13]
	jge	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdi, QWORD PTR 24[rbx]
	mov	r15d, DWORD PTR PCI_DMA_TODEVICE[rip]
	add	rbx, 24
	add	ebp, 1
	call	be32_to_cpu@PLT
	mov	rdi, QWORD PTR 8[rbx]
	mov	r12d, eax
	call	be64_to_cpu@PLT
	mov	ecx, r15d
	mov	edx, r12d
	mov	rdi, r14
	mov	rsi, rax
	call	dma_unmap_page@PLT
	cmp	DWORD PTR 0[r13], ebp
	jg	.L8
.L7:
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
.L9:
	.cfi_restore_state
	xor	r12d, r12d
	xor	r15d, r15d
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rax, QWORD PTR 112[rsp]
	cmp	QWORD PTR 16[rax], 0
	jne	.L16
.L5:
	mov	rax, QWORD PTR 112[rsp]
	mov	DWORD PTR 8[rax], r15d
	mov	QWORD PTR [rax], r12
	add	rsp, 56
	.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
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	r15, QWORD PTR 32[rsp]
	mov	rdi, r15
	call	skb_headlen@PLT
	movsx	rsi, DWORD PTR 44[rsp]
	mov	ecx, DWORD PTR PCI_DMA_TODEVICE[rip]
	mov	rdi, r14
	sub	rax, rsi
	add	rsi, QWORD PTR [r15]
	mov	rdx, rax
	mov	r12, rax
	call	dma_map_single@PLT
	mov	rdi, r14
	mov	esi, eax
	mov	r15d, eax
	call	dma_mapping_error@PLT
	test	rax, rax
	jne	.L3
	mov	edi, r15d
	call	cpu_to_be64@PLT
	mov	QWORD PTR 8[rbx], rax
	mov	rax, QWORD PTR 16[rsp]
	mov	QWORD PTR 16[rbx], rax
	xor	eax, eax
	call	dma_wmb@PLT
	mov	rdi, r12
	call	cpu_to_be32@PLT
	mov	QWORD PTR [rbx], rax
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	mlx4_en_build_dma_wqe, .-mlx4_en_build_dma_wqe
	.comm	PCI_DMA_TODEVICE,4,4
	.comm	DMA_TO_DEVICE,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_en_tx.c_mlx4_en_build_dma_wqe.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"DMA mapping error\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mlx4_en_build_dma_wqe, %function
mlx4_en_build_dma_wqe:
	@ args = 12, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r4, [r1]
	sub	sp, sp, #20
	subs	r4, r4, #1
	mov	r8, r1
	mov	r5, r2
	ldr	r7, [r0]
	ldr	r10, [sp, #60]
	str	r0, [sp, #8]
	str	r3, [sp, #12]
	bmi	.L9
	ldr	r9, .L20
	b	.L4
.L18:
	mov	r0, fp
	bl	cpu_to_be64
	stmib	r5, {r0, r10}
	bl	dma_wmb
	mov	r0, r6
	bl	cpu_to_be32
	sub	r4, r4, #1
	cmn	r4, #1
	str	r0, [r5], #-12
	beq	.L2
.L4:
	ldr	fp, [r8, #4]
	add	fp, fp, r4, lsl #2
	mov	r0, fp
	bl	skb_frag_size
	ldr	r2, [r9]
	mov	r1, fp
	mov	r3, r0
	str	r2, [sp]
	mov	r6, r0
	mov	r2, #0
	mov	r0, r7
	bl	skb_frag_dma_map
	mov	fp, r0
	mov	r0, r7
	mov	r1, fp
	bl	dma_mapping_error
	cmp	r0, #0
	beq	.L18
.L3:
	ldr	r0, [sp, #8]
	ldr	r1, .L20+4
	bl	en_err
	ldr	r3, [r8]
	add	r4, r4, #1
	cmp	r4, r3
	bge	.L7
	ldr	r9, .L20+8
.L8:
	ldr	r0, [r5, #16]
	bl	be64_to_cpu
	mov	r6, r0
	ldr	r0, [r5, #12]!
	bl	be32_to_cpu
	ldr	r3, [r9]
	mov	r2, r0
	mov	r1, r6
	mov	r0, r7
	bl	dma_unmap_page
	ldr	r3, [r8]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L8
.L7:
	mov	r0, #0
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L9:
	mov	r6, #0
	mov	fp, r6
.L2:
	ldr	r3, [sp, #64]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L19
.L5:
	mov	r0, #1
	ldr	r3, [sp, #64]
	stm	r3, {r6, fp}
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L19:
	ldr	r6, [sp, #12]
	ldr	r9, .L20+8
	mov	r0, r6
	bl	skb_headlen
	ldr	r3, [sp, #56]
	ldr	r1, [r6]
	sub	r6, r0, r3
	add	r1, r3, r1
	mov	r2, r6
	ldr	r3, [r9]
	mov	r0, r7
	bl	dma_map_single
	mov	fp, r0
	mov	r0, r7
	mov	r1, fp
	bl	dma_mapping_error
	cmp	r0, #0
	bne	.L3
	mov	r0, fp
	bl	cpu_to_be64
	stmib	r5, {r0, r10}
	bl	dma_wmb
	mov	r0, r6
	bl	cpu_to_be32
	str	r0, [r5]
	b	.L5
.L21:
	.align	2
.L20:
	.word	DMA_TO_DEVICE
	.word	.LC0
	.word	PCI_DMA_TODEVICE
	.size	mlx4_en_build_dma_wqe, .-mlx4_en_build_dma_wqe
	.comm	PCI_DMA_TODEVICE,4,4
	.comm	DMA_TO_DEVICE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
