	.file	"extr_ocrdma_hw.c_ocrdma_qp_state_change.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ocrdma_qp_state_change
	.type	ocrdma_qp_state_change, @function
ocrdma_qp_state_change:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	mov	edi, esi
	lea	r13, 4[rbx]
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	get_ocrdma_qp_state@PLT
	xor	esi, esi
	mov	rdi, r13
	mov	ebp, eax
	call	spin_lock_irqsave@PLT
	test	r12, r12
	je	.L2
	mov	edi, DWORD PTR [rbx]
	call	get_ibqp_state@PLT
	mov	DWORD PTR [r12], eax
.L2:
	cmp	ebp, DWORD PTR [rbx]
	je	.L12
	cmp	ebp, DWORD PTR OCRDMA_QPS_INIT[rip]
	je	.L13
	cmp	ebp, DWORD PTR OCRDMA_QPS_ERR[rip]
	je	.L14
.L6:
	mov	DWORD PTR [rbx], ebp
	mov	rdi, r13
	xor	esi, esi
	call	spin_unlock_irqrestore@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	rdi, rbx
	call	ocrdma_init_hwq_ptr@PLT
	mov	rdi, rbx
	call	ocrdma_del_flush_qp@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdi, rbx
	call	ocrdma_flush_qp@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rdi, r13
	xor	esi, esi
	call	spin_unlock_irqrestore@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, 1
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ocrdma_qp_state_change, .-ocrdma_qp_state_change
	.comm	OCRDMA_QPS_INIT,4,4
	.comm	OCRDMA_QPS_ERR,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_ocrdma_hw.c_ocrdma_qp_state_change.c"
	.text
	.align	2
	.global	ocrdma_qp_state_change
	.syntax unified
	.arm
	.fpu softvfp
	.type	ocrdma_qp_state_change, %function
ocrdma_qp_state_change:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	mov	r0, r1
	mov	r6, r2
	bl	get_ocrdma_qp_state
	add	r7, r4, #4
	mov	r5, r0
	mov	r1, #0
	mov	r0, r7
	bl	spin_lock_irqsave
	cmp	r6, #0
	beq	.L2
	ldr	r0, [r4]
	bl	get_ibqp_state
	str	r0, [r6]
.L2:
	ldr	r3, [r4]
	cmp	r5, r3
	beq	.L12
	ldr	r3, .L15
	ldr	r3, [r3]
	cmp	r5, r3
	beq	.L13
	ldr	r3, .L15+4
	ldr	r3, [r3]
	cmp	r5, r3
	beq	.L14
.L6:
	mov	r0, r7
	mov	r1, #0
	str	r5, [r4]
	bl	spin_unlock_irqrestore
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	mov	r0, r4
	bl	ocrdma_init_hwq_ptr
	mov	r0, r4
	bl	ocrdma_del_flush_qp
	b	.L6
.L14:
	mov	r0, r4
	bl	ocrdma_flush_qp
	b	.L6
.L12:
	mov	r0, r7
	mov	r1, #0
	bl	spin_unlock_irqrestore
	mov	r0, #1
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	.align	2
.L15:
	.word	OCRDMA_QPS_INIT
	.word	OCRDMA_QPS_ERR
	.size	ocrdma_qp_state_change, .-ocrdma_qp_state_change
	.comm	OCRDMA_QPS_INIT,4,4
	.comm	OCRDMA_QPS_ERR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
