	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocrdma_qp_state_change         ## -- Begin function ocrdma_qp_state_change
	.p2align	4, 0x90
_ocrdma_qp_state_change:                ## @ocrdma_qp_state_change
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rdi, %r13
	movl	%esi, %edi
	callq	_get_ocrdma_qp_state
	movl	%eax, %r15d
	leaq	4(%r13), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	testq	%r12, %r12
	je	LBB0_2
## %bb.1:
	movl	(%r13), %edi
	callq	_get_ibqp_state
	movl	%eax, (%r12)
LBB0_2:
	movl	$1, %ebx
	cmpl	(%r13), %r15d
	je	LBB0_8
## %bb.3:
	movq	_OCRDMA_QPS_INIT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_5
## %bb.4:
	movq	%r13, %rdi
	callq	_ocrdma_init_hwq_ptr
	movq	%r13, %rdi
	callq	_ocrdma_del_flush_qp
	jmp	LBB0_7
LBB0_5:
	movq	_OCRDMA_QPS_ERR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_7
## %bb.6:
	movq	%r13, %rdi
	callq	_ocrdma_flush_qp
LBB0_7:
	movl	%r15d, (%r13)
	xorl	%ebx, %ebx
LBB0_8:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OCRDMA_QPS_INIT,4,2            ## @OCRDMA_QPS_INIT
	.comm	_OCRDMA_QPS_ERR,4,2             ## @OCRDMA_QPS_ERR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocrdma_qp_state_change         ; -- Begin function ocrdma_qp_state_change
	.p2align	2
_ocrdma_qp_state_change:                ; @ocrdma_qp_state_change
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x22, x2
	mov	x20, x0
	mov	x0, x1
	bl	_get_ocrdma_qp_state
	mov	x21, x0
	add	x19, x20, #4
	mov	x0, x19
	bl	_spin_lock_irqsave
	cbz	x22, LBB0_2
; %bb.1:
	ldr	w0, [x20]
	bl	_get_ibqp_state
	str	w0, [x22]
LBB0_2:
	ldr	w8, [x20]
	cmp	w21, w8
	b.ne	LBB0_4
; %bb.3:
	mov	w22, #1
	b	LBB0_9
LBB0_4:
Lloh0:
	adrp	x8, _OCRDMA_QPS_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OCRDMA_QPS_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w21, w8
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_ocrdma_init_hwq_ptr
	mov	x0, x20
	bl	_ocrdma_del_flush_qp
	b	LBB0_8
LBB0_6:
Lloh3:
	adrp	x8, _OCRDMA_QPS_ERR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OCRDMA_QPS_ERR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w21, w8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_ocrdma_flush_qp
LBB0_8:
	mov	w22, #0
	str	w21, [x20]
LBB0_9:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_OCRDMA_QPS_INIT,4,2            ; @OCRDMA_QPS_INIT
	.comm	_OCRDMA_QPS_ERR,4,2             ; @OCRDMA_QPS_ERR
.subsections_via_symbols
