	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_roce_set_qps_to_err
_hns_roce_set_qps_to_err:               ## @hns_roce_set_qps_to_err
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	___hns_roce_qp_lookup
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	cmpq	$0, 16(%rax)
	je	LBB0_7
## %bb.4:
	cmpl	$1, (%rax)
	jne	LBB0_10
## %bb.5:
	movq	40(%rax), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 48(%rax)
	cmpl	$1, 4(%rax)
	jne	LBB0_7
## %bb.6:
	movq	24(%rax), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 32(%rax)
LBB0_7:
	movq	%rax, %rdi
	addq	$16, %rdi
	movq	_IB_QP_STATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_IB_QPS_ERR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movl	%r8d, -24(%rbp)
	movl	8(%rax), %ecx
	leaq	-24(%rbp), %rsi
	callq	_hns_roce_v2_modify_qp
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_err
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_10:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dev_warn                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no hr_qp can be found!\n"

L_.str.1:                               ## @.str.1
	.asciz	"flush cqe is unsupported in userspace!\n"

	.comm	_IB_QP_STATE,4,2                ## @IB_QP_STATE
	.comm	_IB_QPS_ERR,4,2                 ## @IB_QPS_ERR
L_.str.2:                               ## @.str.2
	.asciz	"failed to modify qp %d to err state.\n"

	.no_dead_strip	_hns_roce_set_qps_to_err
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_roce_set_qps_to_err
_hns_roce_set_qps_to_err:               ; @hns_roce_set_qps_to_err
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	bl	___hns_roce_qp_lookup
	cbz	x0, LBB0_8
; %bb.1:
	mov	x8, x0
	ldr	x9, [x8, #16]!
	cbz	x9, LBB0_5
; %bb.2:
	ldr	w9, [x0]
	cmp	w9, #1
	b.ne	LBB0_9
; %bb.3:
	ldr	x9, [x0, #40]
	ldr	w9, [x9]
	str	w9, [x0, #48]
	ldr	w9, [x0, #4]
	cmp	w9, #1
	b.ne	LBB0_5
; %bb.4:
	ldr	x9, [x0, #24]
	ldr	w9, [x9]
	str	w9, [x0, #32]
LBB0_5:
Lloh0:
	adrp	x9, _IB_QP_STATE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IB_QP_STATE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x9]
Lloh3:
	adrp	x9, _IB_QPS_ERR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IB_QPS_ERR@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x9]
	str	w4, [sp, #8]
	ldr	w3, [x0, #8]
	add	x1, sp, #8
	mov	x0, x8
	bl	_hns_roce_v2_modify_qp
	cbz	w0, LBB0_7
; %bb.6:
	ldr	w0, [x20]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	bl	_dev_err
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_8:
	ldr	w0, [x20]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_9:
	ldr	w0, [x20]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_dev_warn
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no hr_qp can be found!\n"

l_.str.1:                               ; @.str.1
	.asciz	"flush cqe is unsupported in userspace!\n"

	.comm	_IB_QP_STATE,4,2                ; @IB_QP_STATE
	.comm	_IB_QPS_ERR,4,2                 ; @IB_QPS_ERR
l_.str.2:                               ; @.str.2
	.asciz	"failed to modify qp %d to err state.\n"

	.no_dead_strip	_hns_roce_set_qps_to_err
.subsections_via_symbols
