	.file	"extr_i40iw_ctrl.c_i40iw_sc_qp_modify.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"QP_MODIFY WQE"
	.text
	.p2align 4
	.type	i40iw_sc_qp_modify, @function
i40iw_sc_qp_modify:
.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
	mov	esi, edx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR 32[rdi]
	mov	DWORD PTR 4[rsp], ecx
	mov	rax, QWORD PTR [rax]
	mov	rbp, QWORD PTR [rax]
	mov	rdi, rbp
	call	i40iw_sc_cqp_get_next_send_wqe@PLT
	test	rax, rax
	je	.L16
	mov	r12, rax
	xor	edi, edi
	mov	rax, QWORD PTR I40IW_QP_STATE_TERMINATE[rip]
	xor	r8d, r8d
	cmp	QWORD PTR 0[r13], rax
	je	.L17
.L4:
	mov	esi, DWORD PTR I40IW_CQPSQ_QP_TERMLEN[rip]
	mov	QWORD PTR 8[rsp], r8
	call	LS_64@PLT
	mov	esi, 8
	mov	rdi, r12
	mov	edx, eax
	call	set_64bit_val@PLT
	mov	edx, DWORD PTR [r14]
	mov	esi, 16
	mov	rdi, r12
	call	set_64bit_val@PLT
	mov	edx, DWORD PTR 4[r14]
	mov	esi, 40
	mov	rdi, r12
	call	set_64bit_val@PLT
	mov	esi, DWORD PTR I40IW_CQPSQ_OPCODE[rip]
	mov	rdi, QWORD PTR I40IW_CQP_OP_MODIFY_QP[rip]
	mov	r15d, DWORD PTR 24[r14]
	call	LS_64@PLT
	mov	rdi, QWORD PTR 16[r13]
	mov	esi, DWORD PTR I40IW_CQPSQ_QP_ORDVALID[rip]
	mov	ebx, eax
	call	LS_64@PLT
	mov	rdi, QWORD PTR 24[r13]
	mov	esi, DWORD PTR I40IW_CQPSQ_QP_TOECTXVALID[rip]
	or	ebx, eax
	call	LS_64@PLT
	mov	rdi, QWORD PTR 32[r13]
	mov	esi, DWORD PTR I40IW_CQPSQ_QP_CACHEDVARVALID[rip]
	or	r15d, ebx
	or	r15d, eax
	call	LS_64@PLT
	mov	rdi, QWORD PTR 8[r14]
	mov	esi, DWORD PTR I40IW_CQPSQ_QP_VQ[rip]
	or	r15d, eax
	call	LS_64@PLT
	mov	rdi, QWORD PTR 40[r13]
	mov	esi, DWORD PTR I40IW_CQPSQ_QP_CQNUMVALID[rip]
	or	r15d, eax
	call	LS_64@PLT
	mov	rdi, QWORD PTR 48[r13]
	mov	esi, DWORD PTR I40IW_CQPSQ_QP_FORCELOOPBACK[rip]
	mov	ebx, r15d
	or	ebx, eax
	call	LS_64@PLT
	mov	rdi, QWORD PTR 16[r14]
	mov	esi, DWORD PTR I40IW_CQPSQ_QP_QPTYPE[rip]
	or	ebx, eax
	call	LS_64@PLT
	mov	rdi, QWORD PTR 56[r13]
	mov	esi, DWORD PTR I40IW_CQPSQ_QP_REMOVEHASHENTRY[rip]
	or	ebx, eax
	call	LS_64@PLT
	mov	r8, QWORD PTR 8[rsp]
	mov	esi, DWORD PTR I40IW_CQPSQ_QP_TERMACT[rip]
	or	ebx, eax
	mov	rdi, r8
	call	LS_64@PLT
	mov	rdi, QWORD PTR 64[r13]
	mov	esi, DWORD PTR I40IW_CQPSQ_QP_RESETCON[rip]
	or	ebx, eax
	call	LS_64@PLT
	mov	rdi, QWORD PTR 72[r13]
	mov	esi, DWORD PTR I40IW_CQPSQ_QP_ARPTABIDXVALID[rip]
	or	ebx, eax
	call	LS_64@PLT
	mov	rdi, QWORD PTR 0[r13]
	mov	esi, DWORD PTR I40IW_CQPSQ_QP_NEXTIWSTATE[rip]
	or	ebx, eax
	call	LS_64@PLT
	mov	esi, DWORD PTR I40IW_CQPSQ_WQEVALID[rip]
	mov	rdi, QWORD PTR 0[rbp]
	or	ebx, eax
	call	LS_64@PLT
	mov	rdi, r12
	or	ebx, eax
	mov	esi, ebx
	call	i40iw_insert_wqe_hdr@PLT
	mov	edi, DWORD PTR 8[rbp]
	mov	rcx, r12
	xor	r13d, r13d
	mov	r8d, DWORD PTR I40IW_CQP_WQE_SIZE[rip]
	mov	esi, DWORD PTR I40IW_DEBUG_WQE[rip]
	lea	rdx, .LC0[rip]
	sal	r8d, 3
	call	i40iw_debug_buf@PLT
	mov	eax, DWORD PTR 4[rsp]
	test	eax, eax
	jne	.L18
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	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
.L17:
	.cfi_restore_state
	mov	r8, QWORD PTR 88[r13]
	test	r8, r8
	cmovne	r8, QWORD PTR I40IWQP_TERM_SEND_TERM_ONLY[rip]
	cmp	QWORD PTR 80[r13], 0
	je	.L6
	add	r8, QWORD PTR I40IWQP_TERM_SEND_FIN_ONLY[rip]
.L6:
	cmp	QWORD PTR I40IWQP_TERM_SEND_TERM_AND_FIN[rip], r8
	je	.L7
	xor	edi, edi
	cmp	QWORD PTR I40IWQP_TERM_SEND_TERM_ONLY[rip], r8
	jne	.L4
.L7:
	mov	rdi, QWORD PTR 8[r13]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rdi, rbp
	call	i40iw_sc_cqp_post_sq@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	mov	r13d, DWORD PTR I40IW_ERR_RING_FULL[rip]
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	i40iw_sc_qp_modify, .-i40iw_sc_qp_modify
	.comm	I40IW_QP_STATE_TERMINATE,8,8
	.comm	I40IW_ERR_RING_FULL,4,4
	.comm	I40IW_DEBUG_WQE,4,4
	.comm	I40IW_CQP_WQE_SIZE,4,4
	.comm	I40IW_CQP_OP_MODIFY_QP,8,8
	.comm	I40IW_CQPSQ_WQEVALID,4,4
	.comm	I40IW_CQPSQ_QP_VQ,4,4
	.comm	I40IW_CQPSQ_QP_TOECTXVALID,4,4
	.comm	I40IW_CQPSQ_QP_TERMLEN,4,4
	.comm	I40IW_CQPSQ_QP_TERMACT,4,4
	.comm	I40IW_CQPSQ_QP_RESETCON,4,4
	.comm	I40IW_CQPSQ_QP_REMOVEHASHENTRY,4,4
	.comm	I40IW_CQPSQ_QP_QPTYPE,4,4
	.comm	I40IW_CQPSQ_QP_ORDVALID,4,4
	.comm	I40IW_CQPSQ_QP_NEXTIWSTATE,4,4
	.comm	I40IW_CQPSQ_QP_FORCELOOPBACK,4,4
	.comm	I40IW_CQPSQ_QP_CQNUMVALID,4,4
	.comm	I40IW_CQPSQ_QP_CACHEDVARVALID,4,4
	.comm	I40IW_CQPSQ_QP_ARPTABIDXVALID,4,4
	.comm	I40IW_CQPSQ_OPCODE,4,4
	.comm	I40IWQP_TERM_SEND_TERM_ONLY,8,8
	.comm	I40IWQP_TERM_SEND_TERM_AND_FIN,8,8
	.comm	I40IWQP_TERM_SEND_FIN_ONLY,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_i40iw_ctrl.c_i40iw_sc_qp_modify.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"QP_MODIFY WQE\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	i40iw_sc_qp_modify, %function
i40iw_sc_qp_modify:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r10, r0
	ldr	r0, [r0, #20]
	mov	r8, r1
	mov	r1, r2
	ldr	r2, [r0]
	sub	sp, sp, #12
	ldr	r6, [r2]
	mov	r5, r3
	mov	r0, r6
	bl	i40iw_sc_cqp_get_next_send_wqe
	subs	r7, r0, #0
	beq	.L19
	ldr	r3, .L22
	ldr	r2, [r8]
	ldr	r3, [r3]
	cmp	r2, r3
	movne	r0, #0
	movne	r9, r0
	beq	.L20
.L4:
	ldr	r3, .L22+4
	ldr	r1, [r3]
	bl	LS_64
	mov	r1, #8
	mov	r2, r0
	mov	r0, r7
	bl	set_64bit_val
	mov	r1, #16
	ldr	r2, [r10]
	mov	r0, r7
	bl	set_64bit_val
	mov	r1, #40
	ldr	r2, [r10, #4]
	mov	r0, r7
	bl	set_64bit_val
	ldr	r2, .L22+8
	ldr	r3, .L22+12
	ldr	r1, [r2]
	ldr	r0, [r3]
	ldr	fp, [r10, #16]
	bl	LS_64
	ldr	r3, .L22+16
	mov	r4, r0
	ldr	r1, [r3]
	ldr	r0, [r8, #8]
	bl	LS_64
	ldr	r3, .L22+20
	orr	r4, r4, r0
	ldr	r1, [r3]
	ldr	r0, [r8, #12]
	bl	LS_64
	mov	r3, r0
	ldr	r2, .L22+24
	ldr	r0, [r8, #16]
	ldr	r1, [r2]
	orr	r4, r4, fp
	orr	r4, r4, r3
	bl	LS_64
	mov	r3, r0
	ldr	r2, .L22+28
	ldr	r0, [r10, #8]
	ldr	r1, [r2]
	orr	r4, r4, r3
	bl	LS_64
	mov	r3, r0
	ldr	r2, .L22+32
	ldr	r0, [r8, #20]
	ldr	r1, [r2]
	orr	r4, r4, r3
	bl	LS_64
	mov	r3, r0
	ldr	r2, .L22+36
	ldr	r0, [r8, #24]
	ldr	r1, [r2]
	orr	r4, r4, r3
	bl	LS_64
	mov	r3, r0
	ldr	r2, .L22+40
	ldr	r0, [r10, #12]
	ldr	r1, [r2]
	orr	r4, r4, r3
	bl	LS_64
	mov	r3, r0
	ldr	r2, .L22+44
	ldr	r0, [r8, #28]
	ldr	r1, [r2]
	orr	r4, r4, r3
	bl	LS_64
	mov	r3, r0
	ldr	r2, .L22+48
	mov	r0, r9
	ldr	r1, [r2]
	orr	r4, r4, r3
	bl	LS_64
	mov	r3, r0
	ldr	r2, .L22+52
	ldr	r0, [r8, #32]
	ldr	r1, [r2]
	orr	r4, r4, r3
	bl	LS_64
	mov	r3, r0
	ldr	r2, .L22+56
	ldr	r0, [r8, #36]
	ldr	r1, [r2]
	orr	r4, r4, r3
	bl	LS_64
	mov	r3, r0
	ldr	r2, .L22+60
	ldr	r0, [r8]
	ldr	r1, [r2]
	orr	r4, r4, r3
	bl	LS_64
	mov	r3, r0
	ldr	r2, .L22+64
	ldr	r0, [r6]
	ldr	r1, [r2]
	orr	r4, r4, r3
	bl	LS_64
	mov	r1, r0
	mov	r0, r7
	orr	r1, r4, r1
	bl	i40iw_insert_wqe_hdr
	ldr	r3, .L22+68
	ldr	r1, .L22+72
	ldr	r2, [r3]
	ldr	r0, [r6, #4]
	lsl	r2, r2, #3
	str	r2, [sp]
	mov	r3, r7
	ldr	r1, [r1]
	ldr	r2, .L22+76
	bl	i40iw_debug_buf
	cmp	r5, #0
	moveq	r0, r5
	bne	.L21
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	ldr	r9, [r8, #44]
	cmp	r9, #0
	ldrne	r3, .L22+80
	ldrne	r9, [r3]
	ldr	r3, [r8, #40]
	cmp	r3, #0
	ldrne	r3, .L22+84
	ldrne	r3, [r3]
	addne	r9, r9, r3
	ldr	r3, .L22+88
	ldr	r3, [r3]
	cmp	r3, r9
	beq	.L7
	ldr	r3, .L22+80
	ldr	r3, [r3]
	cmp	r3, r9
	movne	r0, #0
	bne	.L4
.L7:
	ldr	r0, [r8, #4]
	b	.L4
.L21:
	mov	r0, r6
	bl	i40iw_sc_cqp_post_sq
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L19:
	ldr	r3, .L22+92
	ldr	r0, [r3]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L23:
	.align	2
.L22:
	.word	I40IW_QP_STATE_TERMINATE
	.word	I40IW_CQPSQ_QP_TERMLEN
	.word	I40IW_CQPSQ_OPCODE
	.word	I40IW_CQP_OP_MODIFY_QP
	.word	I40IW_CQPSQ_QP_ORDVALID
	.word	I40IW_CQPSQ_QP_TOECTXVALID
	.word	I40IW_CQPSQ_QP_CACHEDVARVALID
	.word	I40IW_CQPSQ_QP_VQ
	.word	I40IW_CQPSQ_QP_CQNUMVALID
	.word	I40IW_CQPSQ_QP_FORCELOOPBACK
	.word	I40IW_CQPSQ_QP_QPTYPE
	.word	I40IW_CQPSQ_QP_REMOVEHASHENTRY
	.word	I40IW_CQPSQ_QP_TERMACT
	.word	I40IW_CQPSQ_QP_RESETCON
	.word	I40IW_CQPSQ_QP_ARPTABIDXVALID
	.word	I40IW_CQPSQ_QP_NEXTIWSTATE
	.word	I40IW_CQPSQ_WQEVALID
	.word	I40IW_CQP_WQE_SIZE
	.word	I40IW_DEBUG_WQE
	.word	.LC0
	.word	I40IWQP_TERM_SEND_TERM_ONLY
	.word	I40IWQP_TERM_SEND_FIN_ONLY
	.word	I40IWQP_TERM_SEND_TERM_AND_FIN
	.word	I40IW_ERR_RING_FULL
	.size	i40iw_sc_qp_modify, .-i40iw_sc_qp_modify
	.comm	I40IW_QP_STATE_TERMINATE,4,4
	.comm	I40IW_ERR_RING_FULL,4,4
	.comm	I40IW_DEBUG_WQE,4,4
	.comm	I40IW_CQP_WQE_SIZE,4,4
	.comm	I40IW_CQP_OP_MODIFY_QP,4,4
	.comm	I40IW_CQPSQ_WQEVALID,4,4
	.comm	I40IW_CQPSQ_QP_VQ,4,4
	.comm	I40IW_CQPSQ_QP_TOECTXVALID,4,4
	.comm	I40IW_CQPSQ_QP_TERMLEN,4,4
	.comm	I40IW_CQPSQ_QP_TERMACT,4,4
	.comm	I40IW_CQPSQ_QP_RESETCON,4,4
	.comm	I40IW_CQPSQ_QP_REMOVEHASHENTRY,4,4
	.comm	I40IW_CQPSQ_QP_QPTYPE,4,4
	.comm	I40IW_CQPSQ_QP_ORDVALID,4,4
	.comm	I40IW_CQPSQ_QP_NEXTIWSTATE,4,4
	.comm	I40IW_CQPSQ_QP_FORCELOOPBACK,4,4
	.comm	I40IW_CQPSQ_QP_CQNUMVALID,4,4
	.comm	I40IW_CQPSQ_QP_CACHEDVARVALID,4,4
	.comm	I40IW_CQPSQ_QP_ARPTABIDXVALID,4,4
	.comm	I40IW_CQPSQ_OPCODE,4,4
	.comm	I40IWQP_TERM_SEND_TERM_ONLY,4,4
	.comm	I40IWQP_TERM_SEND_TERM_AND_FIN,4,4
	.comm	I40IWQP_TERM_SEND_FIN_ONLY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
