	.file	"extr_qp.c_alloc_proxy_bufs.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	alloc_proxy_bufs, @function
alloc_proxy_bufs:
.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	r13, rdi
	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, 8
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR 8[rsi]
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	mov	esi, 4
	call	kmalloc_array@PLT
	mov	QWORD PTR [rbx], rax
	test	rax, rax
	je	.L20
	mov	edx, DWORD PTR 8[rbx]
	xor	ebp, ebp
	test	edx, edx
	jg	.L3
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L23:
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	rdi, r13
	mov	edx, 4
	call	ib_dma_map_single@PLT
	mov	rdi, r13
	mov	DWORD PTR 8[r15], eax
	mov	rax, QWORD PTR [rbx]
	mov	esi, DWORD PTR 8[rax+r12]
	call	ib_dma_mapping_error@PLT
	test	rax, rax
	jne	.L22
	add	rbp, 1
	cmp	DWORD PTR 8[rbx], ebp
	jle	.L9
	mov	rax, QWORD PTR [rbx]
.L3:
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	r12, rbp
	mov	edi, 4
	movsx	r14, ebp
	sal	r12, 4
	lea	r15, [rax+r12]
	call	kmalloc@PLT
	mov	rdi, QWORD PTR [rbx]
	mov	QWORD PTR [r15], rax
	lea	r15, [rdi+r12]
	mov	rsi, QWORD PTR [r15]
	test	rsi, rsi
	jne	.L23
	test	r14d, r14d
	je	.L7
.L24:
	lea	eax, -1[rbp]
	lea	r12, -1[r14]
	sub	r14, rax
	sal	r12, 4
	sal	r14, 4
	sub	r14, 32
	.p2align 4,,10
	.p2align 3
.L8:
	mov	esi, DWORD PTR 8[rdi+r12]
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	edx, 4
	mov	rdi, r13
	call	ib_dma_unmap_single@PLT
	mov	rax, QWORD PTR [rbx]
	mov	rdi, QWORD PTR [rax+r12]
	sub	r12, 16
	call	kfree@PLT
	mov	rdi, QWORD PTR [rbx]
	cmp	r14, r12
	jne	.L8
.L7:
	call	kfree@PLT
	mov	QWORD PTR [rbx], 0
.L20:
	mov	eax, DWORD PTR ENOMEM[rip]
	add	rsp, 8
	.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
.L9:
	.cfi_restore_state
	add	rsp, 8
	.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
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	mov	rax, QWORD PTR [rbx]
	mov	rdi, QWORD PTR [rax+r12]
	call	kfree@PLT
	mov	rdi, QWORD PTR [rbx]
	test	r14d, r14d
	jne	.L24
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	alloc_proxy_bufs, .-alloc_proxy_bufs
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	DMA_FROM_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_qp.c_alloc_proxy_bufs.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	alloc_proxy_bufs, %function
alloc_proxy_bufs:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r9, .L21
	mov	r5, r1
	mov	r7, r0
	ldr	r2, [r9]
	ldr	r0, [r1, #4]
	mov	r1, #4
	bl	kmalloc_array
	cmp	r0, #0
	str	r0, [r5]
	beq	.L2
	ldr	r3, [r5, #4]
	cmp	r3, #0
	ble	.L9
	mov	r6, r0
	mov	r4, #0
	ldr	r10, .L21+4
	b	.L3
.L19:
	mov	r2, #4
	ldr	r3, [r10]
	mov	r0, r7
	bl	ib_dma_map_single
	ldr	r3, [r5]
	str	r0, [r8, #4]
	add	r3, r3, r6
	mov	r0, r7
	ldr	r1, [r3, #4]
	bl	ib_dma_mapping_error
	cmp	r0, #0
	bne	.L18
	ldr	r3, [r5, #4]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L9
	ldr	r6, [r5]
.L3:
	ldr	r1, [r9]
	mov	r0, #4
	bl	kmalloc
	ldr	r3, [r5]
	str	r0, [r6, r4, lsl #3]
	ldr	r1, [r3, r4, lsl #3]
	lsl	r6, r4, #3
	cmp	r1, #0
	add	r8, r3, r6
	bne	.L19
	cmp	r4, #0
	beq	.L8
.L20:
	ldr	r6, .L21+4
.L7:
	sub	r4, r4, #1
	add	r3, r3, r4, lsl #3
	ldr	r1, [r3, #4]
	mov	r2, #4
	ldr	r3, [r6]
	mov	r0, r7
	bl	ib_dma_unmap_single
	ldr	r3, [r5]
	ldr	r0, [r3, r4, lsl #3]
	bl	kfree
	cmp	r4, #0
	ldr	r3, [r5]
	bne	.L7
.L8:
	mov	r0, r3
	bl	kfree
	mov	r2, #0
	ldr	r3, .L21+8
	str	r2, [r5]
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L9:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L18:
	ldr	r3, [r5]
	ldr	r0, [r3, r6]
	bl	kfree
	cmp	r4, #0
	ldr	r3, [r5]
	bne	.L20
	b	.L8
.L2:
	ldr	r3, .L21+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L22:
	.align	2
.L21:
	.word	GFP_KERNEL
	.word	DMA_FROM_DEVICE
	.word	ENOMEM
	.size	alloc_proxy_bufs, .-alloc_proxy_bufs
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
