	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_roce_modify_qp             ## -- Begin function hns_roce_modify_qp
	.p2align	4, 0x90
_hns_roce_modify_qp:                    ## @hns_roce_modify_qp
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	16(%rdi), %edi
	callq	_to_hr_dev
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_to_hr_qp
	movq	%rax, %r14
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, %rbx
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	_IB_QP_CUR_STATE@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.1:
	movl	(%r12), %ebx
	jmp	LBB0_3
LBB0_2:
	movl	48(%r14), %ebx
LBB0_3:
	movq	_IB_QP_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%ebx, %esi
	testl	%r13d, %eax
	je	LBB0_5
## %bb.4:
	movl	4(%r12), %esi
LBB0_5:
	cmpq	$0, 8(%r15)
	je	LBB0_11
## %bb.6:
	testl	%r13d, %eax
	je	LBB0_11
## %bb.7:
	movq	_IB_QPS_ERR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jne	LBB0_11
## %bb.8:
	cmpl	$1, (%r14)
	jne	LBB0_21
## %bb.9:
	movq	32(%r14), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r14)
	cmpl	$1, 4(%r14)
	jne	LBB0_11
## %bb.10:
	movq	16(%r14), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
LBB0_11:
	movq	%r12, %r14
	movl	(%r15), %edx
	movl	%ebx, %edi
	movl	%esi, %r12d
	movl	%r13d, %ecx
	callq	_ib_modify_qp_is_ok
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	_hns_roce_check_qp_attr
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
## %bb.14:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%r12d, %ecx
	jne	LBB0_19
## %bb.15:
	movq	_IB_QPS_RESET@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_19
## %bb.16:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	cmpq	$0, 16(%rdi)
	je	LBB0_17
## %bb.18:
	movq	_EPERM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	addq	$8, %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%ecx, %edx
	xorl	%eax, %eax
	callq	_ibdev_err
	jmp	LBB0_20
LBB0_12:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	$8, %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_ibdev_err
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_20
LBB0_21:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	$8, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_ibdev_warn
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_20
LBB0_19:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	movl	%r12d, %r8d
	callq	*(%rax)
	movl	%eax, %ebx
	jmp	LBB0_20
LBB0_17:
	xorl	%ebx, %ebx
LBB0_20:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IB_QP_CUR_STATE,4,2            ## @IB_QP_CUR_STATE
	.comm	_IB_QP_STATE,4,2                ## @IB_QP_STATE
	.comm	_IB_QPS_ERR,4,2                 ## @IB_QPS_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"flush cqe is not supported in userspace!\n"

L_.str.1:                               ## @.str.1
	.asciz	"ib_modify_qp_is_ok failed\n"

	.comm	_IB_QPS_RESET,4,2               ## @IB_QPS_RESET
	.comm	_EPERM,4,2                      ## @EPERM
L_.str.2:                               ## @.str.2
	.asciz	"cur_state=%d new_state=%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_roce_modify_qp             ; -- Begin function hns_roce_modify_qp
	.p2align	2
_hns_roce_modify_qp:                    ; @hns_roce_modify_qp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
	ldr	w0, [x0, #16]
	bl	_to_hr_dev
	mov	x21, x0
	mov	x0, x23
	bl	_to_hr_qp
	mov	x27, x0
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w25, [x8]
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
Lloh3:
	adrp	x8, _IB_QP_CUR_STATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_QP_CUR_STATE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_2
; %bb.1:
	ldr	w24, [x22]
	b	LBB0_3
LBB0_2:
	ldr	w24, [x27, #48]
LBB0_3:
	neg	w25, w25
Lloh6:
	adrp	x8, _IB_QP_STATE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IB_QP_STATE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	mov	x26, x24
	ands	w8, w8, w20
	b.eq	LBB0_5
; %bb.4:
	ldr	w26, [x22, #4]
LBB0_5:
	ldr	x9, [x23, #8]
	cbz	x9, LBB0_7
; %bb.6:
Lloh9:
	adrp	x9, _IB_QPS_ERR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IB_QPS_ERR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, #0
	ccmp	w26, w9, #0, ne
	b.eq	LBB0_14
LBB0_7:
	ldr	w2, [x23]
	mov	x0, x24
	mov	x1, x26
	mov	x3, x20
	bl	_ib_modify_qp_is_ok
	cbz	w0, LBB0_13
; %bb.8:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x20
	bl	_hns_roce_check_qp_attr
	mov	x25, x0
	cbnz	w0, LBB0_20
; %bb.9:
	cmp	w24, w26
	b.ne	LBB0_18
; %bb.10:
Lloh12:
	adrp	x8, _IB_QPS_RESET@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IB_QPS_RESET@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w24, w8
	b.ne	LBB0_18
; %bb.11:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_19
; %bb.12:
Lloh15:
	adrp	x8, _EPERM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w25, w8
	add	x0, x21, #8
	stp	x24, x24, [sp]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_ibdev_err
	b	LBB0_20
LBB0_13:
	add	x0, x21, #8
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_ibdev_err
	b	LBB0_20
LBB0_14:
	ldr	w8, [x27]
	cmp	w8, #1
	b.ne	LBB0_17
; %bb.15:
	ldr	x8, [x27, #32]
	ldr	w8, [x8]
	str	w8, [x27, #40]
	ldr	w8, [x27, #4]
	cmp	w8, #1
	b.ne	LBB0_7
; %bb.16:
	ldr	x8, [x27, #16]
	ldr	w8, [x8]
	str	w8, [x27, #24]
	b	LBB0_7
LBB0_17:
	add	x0, x21, #8
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ibdev_warn
	b	LBB0_20
LBB0_18:
	ldr	x8, [x21]
	ldr	x8, [x8]
	mov	x0, x23
	mov	x1, x22
	mov	x2, x20
	mov	x3, x24
	mov	x4, x26
	blr	x8
	mov	x25, x0
	b	LBB0_20
LBB0_19:
	mov	w25, #0
LBB0_20:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x25
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IB_QP_CUR_STATE,4,2            ; @IB_QP_CUR_STATE
	.comm	_IB_QP_STATE,4,2                ; @IB_QP_STATE
	.comm	_IB_QPS_ERR,4,2                 ; @IB_QPS_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"flush cqe is not supported in userspace!\n"

l_.str.1:                               ; @.str.1
	.asciz	"ib_modify_qp_is_ok failed\n"

	.comm	_IB_QPS_RESET,4,2               ; @IB_QPS_RESET
	.comm	_EPERM,4,2                      ; @EPERM
l_.str.2:                               ; @.str.2
	.asciz	"cur_state=%d new_state=%d\n"

.subsections_via_symbols
