	.file	"extr_alloc.c_mlx4_alloc_hwq_res.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mlx4_alloc_hwq_res
	.type	mlx4_alloc_hwq_res, @function
mlx4_alloc_hwq_res:
.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
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, edx
	mov	edx, 1
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	mlx4_db_alloc@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L10
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L10:
	.cfi_restore_state
	mov	rax, QWORD PTR 0[r13]
	lea	r15, 8[r13]
	mov	esi, ebp
	mov	rdi, r14
	mov	rdx, r15
	mov	QWORD PTR [rax], 0
	call	mlx4_buf_direct_alloc@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L3
	mov	edx, DWORD PTR 8[r13]
	mov	esi, DWORD PTR 12[r13]
	lea	rbx, 16[r13]
	mov	rdi, r14
	mov	rcx, rbx
	call	mlx4_mtt_init@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L11
.L4:
	mov	rdx, r15
	mov	esi, ebp
	mov	rdi, r14
	call	mlx4_buf_free@PLT
.L3:
	mov	rsi, r13
	mov	rdi, r14
	call	mlx4_db_free@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdx, r15
	mov	rsi, rbx
	mov	rdi, r14
	call	mlx4_buf_write_mtt@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L1
	mov	rsi, rbx
	mov	rdi, r14
	call	mlx4_mtt_cleanup@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	mlx4_alloc_hwq_res, .-mlx4_alloc_hwq_res
	.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_alloc.c_mlx4_alloc_hwq_res.c"
	.text
	.align	2
	.global	mlx4_alloc_hwq_res
	.syntax unified
	.arm
	.fpu softvfp
	.type	mlx4_alloc_hwq_res, %function
mlx4_alloc_hwq_res:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r7, r2
	mov	r2, #1
	mov	r6, r0
	mov	r5, r1
	bl	mlx4_db_alloc
	subs	r4, r0, #0
	beq	.L10
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	mov	r8, r5
	ldr	r3, [r8], #4
	mov	r1, r7
	str	r4, [r3]
	mov	r2, r8
	mov	r0, r6
	bl	mlx4_buf_direct_alloc
	subs	r4, r0, #0
	bne	.L3
	add	r9, r5, #12
	mov	r3, r9
	mov	r0, r6
	ldr	r2, [r5, #4]
	ldr	r1, [r5, #8]
	bl	mlx4_mtt_init
	subs	r4, r0, #0
	beq	.L11
.L4:
	mov	r2, r8
	mov	r1, r7
	mov	r0, r6
	bl	mlx4_buf_free
.L3:
	mov	r1, r5
	mov	r0, r6
	bl	mlx4_db_free
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	mov	r2, r8
	mov	r1, r9
	mov	r0, r6
	bl	mlx4_buf_write_mtt
	subs	r4, r0, #0
	beq	.L1
	mov	r1, r9
	mov	r0, r6
	bl	mlx4_mtt_cleanup
	b	.L4
	.size	mlx4_alloc_hwq_res, .-mlx4_alloc_hwq_res
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
