	.file	"extr_mlx4_resource_tracker.c_srq_alloc_res.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	srq_alloc_res, @function
srq_alloc_res:
.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
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	r12d, DWORD PTR EINVAL[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	neg	r12d
	cmp	edx, 128
	je	.L9
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L10
	add	rsp, 24
	.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
.L9:
	.cfi_restore_state
	mov	edx, DWORD PTR RES_SRQ[rip]
	xor	r8d, r8d
	mov	rbp, rdi
	mov	r13d, esi
	mov	ecx, 1
	mov	r14, r9
	call	mlx4_grant_resource@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	lea	rsi, 4[rsp]
	mov	rdi, rbp
	call	__mlx4_srq_alloc_icm@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L11
	mov	r8d, DWORD PTR RES_SRQ[rip]
	xor	r9d, r9d
	mov	esi, r13d
	mov	rdi, rbp
	mov	edx, DWORD PTR 4[rsp]
	mov	ecx, 1
	call	add_res_range@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L5
	mov	edx, DWORD PTR RES_SRQ[rip]
	mov	esi, r13d
	mov	rdi, rbp
	xor	r8d, r8d
	mov	ecx, 1
	call	mlx4_release_resource@PLT
	mov	esi, DWORD PTR 4[rsp]
	mov	rdi, rbp
	call	__mlx4_srq_free_icm@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	edx, DWORD PTR RES_SRQ[rip]
	xor	r8d, r8d
	mov	esi, r13d
	mov	rdi, rbp
	mov	ecx, 1
	call	mlx4_release_resource@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	esi, DWORD PTR 4[rsp]
	mov	rdi, r14
	call	set_param_l@PLT
	jmp	.L1
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	srq_alloc_res, .-srq_alloc_res
	.comm	RES_SRQ,4,4
	.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_mlx4_resource_tracker.c_srq_alloc_res.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	srq_alloc_res, %function
srq_alloc_res:
	@ args = 8, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L12
	sub	sp, sp, #20
	cmp	r2, #128
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldr	r7, [sp, #52]
	beq	.L9
	ldr	r3, .L12+4
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	mov	r0, r4
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L9:
	mov	r9, #0
	ldr	r8, .L12+8
	mov	r3, #1
	ldr	r2, [r8]
	str	r9, [sp]
	mov	r5, r0
	mov	r6, r1
	bl	mlx4_grant_resource
	subs	r4, r0, #0
	bne	.L1
	mov	r0, r5
	add	r1, sp, #8
	bl	__mlx4_srq_alloc_icm
	subs	r4, r0, #0
	bne	.L11
	ldr	r3, [r8]
	mov	r1, r6
	stm	sp, {r3, r4}
	mov	r0, r5
	mov	r3, #1
	ldr	r2, [sp, #8]
	bl	add_res_range
	subs	r4, r0, #0
	beq	.L5
	mov	r1, r6
	mov	r3, #1
	mov	r0, r5
	ldr	r2, [r8]
	str	r9, [sp]
	bl	mlx4_release_resource
	mov	r0, r5
	ldr	r1, [sp, #8]
	bl	__mlx4_srq_free_icm
	b	.L1
.L11:
	mov	r1, r6
	mov	r0, r5
	mov	r3, #1
	ldr	r2, [r8]
	str	r9, [sp]
	bl	mlx4_release_resource
	b	.L1
.L5:
	mov	r0, r7
	ldr	r1, [sp, #8]
	bl	set_param_l
	b	.L1
.L10:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	EINVAL
	.word	RES_SRQ
	.size	srq_alloc_res, .-srq_alloc_res
	.comm	RES_SRQ,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
