	.file	"extr_verbs.c_mlx5_calc_send_wqe.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mlx5_calc_send_wqe, @function
mlx5_calc_send_wqe:
.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, rdx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	mov	edi, DWORD PTR 16[rsi]
	call	sq_overhead@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L1
	mov	r14d, DWORD PTR 8[rbp]
	test	r14d, r14d
	jne	.L16
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR IBV_QP_INIT_ATTR_MAX_TSO_HEADER[rip], eax
	jne	.L17
.L4:
	mov	eax, DWORD PTR [rbx]
	mov	edx, DWORD PTR 12[rbp]
	sub	eax, r12d
	cdqe
	shr	rax, 2
	cmp	edx, eax
	jle	.L5
.L14:
	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
.L5:
	.cfi_restore_state
	lea	edi, [r12+rdx*4]
	mov	esi, r14d
	call	max_int@PLT
	mov	edi, eax
	cmp	DWORD PTR [rbx], eax
	jl	.L14
	mov	esi, DWORD PTR MLX5_SEND_WQE_BB[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
	jmp	align@PLT
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	edi, DWORD PTR 4[rbp]
	mov	esi, 16
	call	align@PLT
	add	r12d, eax
	mov	eax, DWORD PTR 4[rbp]
	mov	DWORD PTR 0[r13], eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L16:
	lea	edi, 4[r14]
	mov	esi, 16
	call	align@PLT
	lea	r14d, [rax+r12]
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR IBV_QP_INIT_ATTR_MAX_TSO_HEADER[rip], eax
	je	.L4
	jmp	.L17
	.cfi_endproc
.LFE0:
	.size	mlx5_calc_send_wqe, .-mlx5_calc_send_wqe
	.comm	MLX5_SEND_WQE_BB,4,4
	.comm	IBV_QP_INIT_ATTR_MAX_TSO_HEADER,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_verbs.c_mlx5_calc_send_wqe.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mlx5_calc_send_wqe, %function
mlx5_calc_send_wqe:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r0
	ldr	r0, [r1, #16]
	mov	r5, r1
	mov	r8, r2
	bl	sq_overhead
	subs	r4, r0, #0
	blt	.L1
	ldr	r7, [r5, #8]
	cmp	r7, #0
	bne	.L16
.L3:
	ldr	r3, .L18
	ldr	r2, [r5]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L17
.L4:
	ldr	r3, [r6]
	ldr	r0, [r5, #12]
	sub	r3, r3, r4
	cmp	r0, r3, lsr #2
	ble	.L5
.L14:
	ldr	r3, .L18+4
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	mov	r1, r7
	add	r0, r4, r0, lsl #2
	bl	max_int
	ldr	r3, [r6]
	cmp	r3, r0
	blt	.L14
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L18+8
	ldr	r1, [r3]
	b	align
.L17:
	mov	r1, #16
	ldr	r0, [r5, #4]
	bl	align
	ldr	r3, [r5, #4]
	add	r4, r4, r0
	str	r3, [r8]
	b	.L4
.L16:
	add	r0, r7, #4
	mov	r1, #16
	bl	align
	add	r7, r0, r4
	b	.L3
.L19:
	.align	2
.L18:
	.word	IBV_QP_INIT_ATTR_MAX_TSO_HEADER
	.word	EINVAL
	.word	MLX5_SEND_WQE_BB
	.size	mlx5_calc_send_wqe, .-mlx5_calc_send_wqe
	.comm	MLX5_SEND_WQE_BB,4,4
	.comm	IBV_QP_INIT_ATTR_MAX_TSO_HEADER,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
