	.file	"extr_verbs.c_mlx5_create_wq.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Couldn't find free user index\n"
	.text
	.p2align 4
	.globl	mlx5_create_wq
	.type	mlx5_create_wq, @function
mlx5_create_wq:
.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, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	sub	rsp, 112
	.cfi_def_cfa_offset 160
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 104[rsp], rax
	xor	eax, eax
	call	to_mctx@PLT
	mov	r14, rax
	mov	rax, QWORD PTR IBV_WQT_RQ[rip]
	cmp	QWORD PTR 0[r13], rax
	jne	.L25
	mov	rdi, rsp
	mov	edx, 48
	xor	esi, esi
	mov	r15, QWORD PTR [r14]
	call	memset@PLT
	lea	rdi, 48[rsp]
	mov	edx, 48
	xor	esi, esi
	call	memset@PLT
	mov	esi, 96
	mov	edi, 1
	call	calloc@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L25
	mov	rdi, r12
	call	rwq_sig_enabled@PLT
	mov	QWORD PTR 88[rbp], rax
	test	rax, rax
	je	.L5
	mov	eax, DWORD PTR MLX5_RWQ_FLAG_SIGNATURE[rip]
	mov	DWORD PTR 32[rsp], eax
.L5:
	mov	rdx, r13
	mov	rsi, rbp
	mov	rdi, r14
	call	mlx5_calc_rwq_size@PLT
	mov	edx, eax
	test	eax, eax
	js	.L27
	mov	DWORD PTR 0[rbp], eax
	mov	rsi, rbp
	mov	rdi, r12
	call	mlx5_alloc_rwq_buf@PLT
	test	rax, rax
	jne	.L7
	mov	rdi, rbp
	call	mlx5_init_rwq_indices@PLT
	lea	rdi, 56[rbp]
	call	mlx5_spinlock_init@PLT
	test	rax, rax
	jne	.L9
	mov	rdi, r14
	call	mlx5_alloc_dbrec@PLT
	mov	QWORD PTR 8[rbp], rax
	test	rax, rax
	je	.L9
	mov	rdx, QWORD PTR MLX5_RCV_DBR[rip]
	mov	rsi, rbp
	mov	rdi, r14
	mov	QWORD PTR [rax+rdx*8], 0
	mov	rdx, QWORD PTR MLX5_SND_DBR[rip]
	mov	QWORD PTR [rax+rdx*8], 0
	mov	rdx, QWORD PTR 64[rbp]
	mov	rcx, QWORD PTR 48[rbp]
	mov	QWORD PTR 8[rsp], rax
	mov	QWORD PTR [rsp], rdx
	add	rcx, rdx
	mov	QWORD PTR 80[rbp], rcx
	mov	rcx, QWORD PTR MLX5_RCV_DBR[rip]
	lea	rcx, [rax+rcx*8]
	mov	rax, QWORD PTR 40[rbp]
	mov	QWORD PTR 72[rbp], rcx
	mov	QWORD PTR 24[rsp], rax
	call	mlx5_store_uidx@PLT
	test	rax, rax
	js	.L28
	mov	QWORD PTR 16[rsp], rax
	lea	rcx, 44[rsp]
	sub	rsp, 8
	.cfi_def_cfa_offset 168
	lea	r15, 16[rbp]
	push	48
	.cfi_def_cfa_offset 176
	mov	r9d, 48
	mov	rdx, r15
	mov	rsi, r13
	push	4
	.cfi_def_cfa_offset 184
	mov	r8d, 4
	mov	rdi, r12
	lea	rax, 112[rsp]
	push	rax
	.cfi_def_cfa_offset 192
	call	ibv_cmd_create_wq@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 160
	test	eax, eax
	jne	.L29
	mov	eax, DWORD PTR MLX5_RSC_TYPE_RWQ[rip]
	mov	DWORD PTR 32[rbp], eax
	mov	rax, QWORD PTR 16[rsp]
	mov	QWORD PTR 24[rbp], rax
	mov	eax, DWORD PTR mlx5_post_wq_recv[rip]
	mov	DWORD PTR 16[rbp], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L28:
	mov	esi, DWORD PTR MLX5_DBG_QP[rip]
	lea	rdx, .LC0[rip]
	mov	rdi, r15
	call	mlx5_dbg@PLT
.L12:
	mov	r13, QWORD PTR 8[rbp]
	mov	rdi, r12
	call	to_mctx@PLT
	mov	rdi, rax
	mov	rsi, r13
	call	mlx5_free_db@PLT
.L9:
	mov	rsi, r12
	mov	rdi, rbp
	call	mlx5_free_rwq_buf@PLT
.L7:
	mov	rdi, rbp
	call	free@PLT
.L25:
	xor	r15d, r15d
.L1:
	mov	rax, QWORD PTR 104[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L30
	add	rsp, 112
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	rax, r15
	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
.L27:
	.cfi_restore_state
	neg	edx
	mov	rdi, rbp
	mov	DWORD PTR errno[rip], edx
	call	free@PLT
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L29:
	mov	rsi, QWORD PTR 16[rsp]
	mov	rdi, r14
	call	mlx5_clear_uidx@PLT
	jmp	.L12
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mlx5_create_wq, .-mlx5_create_wq
	.comm	mlx5_post_wq_recv,4,4
	.comm	errno,4,4
	.comm	MLX5_SND_DBR,8,8
	.comm	MLX5_RWQ_FLAG_SIGNATURE,4,4
	.comm	MLX5_RSC_TYPE_RWQ,4,4
	.comm	MLX5_RCV_DBR,8,8
	.comm	MLX5_DBG_QP,4,4
	.comm	IBV_WQT_RQ,8,8
	.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_verbs.c_mlx5_create_wq.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Couldn't find free user index\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mlx5_create_wq
	.syntax unified
	.arm
	.fpu softvfp
	.type	mlx5_create_wq, %function
mlx5_create_wq:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r5, r1
	ldr	r3, .L31
	sub	sp, sp, #100
	ldr	r3, [r3]
	str	r3, [sp, #92]
	mov	r3,#0
	mov	r7, r0
	bl	to_mctx
	ldr	r3, .L31+4
	ldr	r2, [r5]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L25
	mov	r6, r0
	mov	r2, #32
	mov	r1, #0
	add	r0, sp, #28
	ldr	r8, [r6]
	bl	memset
	mov	r2, #32
	mov	r1, #0
	add	r0, sp, #60
	bl	memset
	mov	r1, #52
	mov	r0, #1
	bl	calloc
	subs	r4, r0, #0
	beq	.L25
	mov	r0, r7
	bl	rwq_sig_enabled
	cmp	r0, #0
	ldrne	r3, .L31+8
	mov	r2, r5
	ldrne	r3, [r3]
	str	r0, [r4, #48]
	mov	r1, r4
	mov	r0, r6
	strne	r3, [sp, #48]
	bl	mlx5_calc_rwq_size
	subs	r2, r0, #0
	blt	.L27
	mov	r1, r4
	mov	r0, r7
	str	r2, [r4]
	bl	mlx5_alloc_rwq_buf
	cmp	r0, #0
	bne	.L7
	mov	r0, r4
	bl	mlx5_init_rwq_indices
	add	r0, r4, #32
	bl	mlx5_spinlock_init
	subs	r9, r0, #0
	bne	.L9
	mov	r0, r6
	bl	mlx5_alloc_dbrec
	cmp	r0, #0
	str	r0, [r4, #4]
	beq	.L9
	ldr	r3, .L31+12
	ldr	r2, .L31+16
	ldr	r1, [r3]
	ldr	ip, [r4, #24]
	str	r9, [r0, r1, lsl #2]
	ldr	r2, [r2]
	mov	r1, r4
	str	r9, [r0, r2, lsl #2]
	ldr	r2, [r3]
	ldr	lr, [r4, #36]
	ldr	r3, [r4, #28]
	add	r2, r0, r2, lsl #2
	add	r3, r3, lr
	str	r2, [r4, #40]
	ldr	r2, [r4, #20]
	str	r0, [sp, #32]
	str	r3, [r4, #44]
	mov	r0, r6
	str	ip, [sp, #44]
	str	lr, [sp, #28]
	str	r2, [sp, #40]
	bl	mlx5_store_uidx
	subs	ip, r0, #0
	blt	.L28
	mov	r2, #32
	mov	r3, #4
	add	r0, sp, #84
	add	r8, r4, #8
	str	r2, [sp, #16]
	str	r2, [sp, #4]
	str	r3, [sp, #12]
	str	r3, [sp]
	str	r0, [sp, #8]
	mov	r1, r5
	mov	r2, r8
	mov	r0, r7
	add	r3, sp, #56
	str	ip, [sp, #36]
	bl	ibv_cmd_create_wq
	cmp	r0, #0
	bne	.L29
	ldr	r2, .L31+20
	ldr	r3, .L31+24
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	str	r1, [r4, #16]
	str	r2, [r4, #8]
	str	r3, [r4, #12]
	b	.L1
.L28:
	ldr	r3, .L31+28
	mov	r0, r8
	ldr	r1, [r3]
	ldr	r2, .L31+32
	bl	mlx5_dbg
.L12:
	mov	r0, r7
	bl	to_mctx
	ldr	r1, [r4, #4]
	bl	mlx5_free_db
.L9:
	mov	r1, r7
	mov	r0, r4
	bl	mlx5_free_rwq_buf
.L7:
	mov	r0, r4
	bl	free
.L25:
	mov	r8, #0
.L1:
	ldr	r3, .L31
	ldr	r2, [r3]
	ldr	r3, [sp, #92]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L30
	mov	r0, r8
	add	sp, sp, #100
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L27:
	ldr	r3, .L31+36
	rsb	r0, r2, #0
	str	r0, [r3]
	mov	r0, r4
	bl	free
	b	.L25
.L29:
	mov	r0, r6
	ldr	r1, [sp, #36]
	bl	mlx5_clear_uidx
	b	.L12
.L30:
	bl	__stack_chk_fail
.L32:
	.align	2
.L31:
	.word	.LC1
	.word	IBV_WQT_RQ
	.word	MLX5_RWQ_FLAG_SIGNATURE
	.word	MLX5_RCV_DBR
	.word	MLX5_SND_DBR
	.word	MLX5_RSC_TYPE_RWQ
	.word	mlx5_post_wq_recv
	.word	MLX5_DBG_QP
	.word	.LC0
	.word	errno
	.size	mlx5_create_wq, .-mlx5_create_wq
	.comm	mlx5_post_wq_recv,4,4
	.comm	errno,4,4
	.comm	MLX5_SND_DBR,4,4
	.comm	MLX5_RWQ_FLAG_SIGNATURE,4,4
	.comm	MLX5_RSC_TYPE_RWQ,4,4
	.comm	MLX5_RCV_DBR,4,4
	.comm	MLX5_DBG_QP,4,4
	.comm	IBV_WQT_RQ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
