	.file	"extr_qp.c_mlx4_qp_alloc.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mlx4_qp_alloc
	.type	mlx4_qp_alloc, @function
mlx4_qp_alloc:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdx
	call	mlx4_priv@PLT
	test	ebp, ebp
	jne	.L2
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	DWORD PTR [rbx], ebp
	mov	esi, ebp
	mov	rdi, r13
	mov	r14, rax
	call	mlx4_qp_alloc_icm@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	rdi, r14
	call	spin_lock_irq@PLT
	mov	eax, DWORD PTR 0[r13]
	lea	rdi, 4[r13]
	mov	rdx, rbx
	lea	esi, -1[rax]
	and	esi, DWORD PTR [rbx]
	call	radix_tree_insert@PLT
	mov	rdi, r14
	mov	r12d, eax
	call	spin_unlock_irq@PLT
	test	r12d, r12d
	jne	.L7
	lea	rdi, 8[rbx]
	mov	esi, 1
	call	atomic_set@PLT
	lea	rdi, 4[rbx]
	call	init_completion@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	esi, ebp
	mov	rdi, r13
	call	mlx4_qp_free_icm@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	mlx4_qp_alloc, .-mlx4_qp_alloc
	.comm	EINVAL,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_mlx4_qp_alloc.c"
	.text
	.align	2
	.global	mlx4_qp_alloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	mlx4_qp_alloc, %function
mlx4_qp_alloc:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	mov	r6, r2
	mov	r8, r0
	bl	mlx4_priv
	cmp	r5, #0
	bne	.L2
	ldr	r3, .L8
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r7, r0
	mov	r1, r5
	mov	r0, r8
	str	r5, [r6]
	bl	mlx4_qp_alloc_icm
	subs	r4, r0, #0
	bne	.L1
	mov	r0, r7
	bl	spin_lock_irq
	mov	r0, r8
	ldr	r3, [r0], #4
	ldr	r1, [r6]
	sub	r3, r3, #1
	mov	r2, r6
	and	r1, r1, r3
	bl	radix_tree_insert
	mov	r4, r0
	mov	r0, r7
	bl	spin_unlock_irq
	cmp	r4, #0
	bne	.L7
	mov	r1, #1
	add	r0, r6, #8
	bl	atomic_set
	add	r0, r6, #4
	bl	init_completion
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	mov	r1, r5
	mov	r0, r8
	bl	mlx4_qp_free_icm
	b	.L1
.L9:
	.align	2
.L8:
	.word	EINVAL
	.size	mlx4_qp_alloc, .-mlx4_qp_alloc
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
