	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_roce_v2_modify_qp
_hns_roce_v2_modify_qp:                 ## @hns_roce_v2_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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r12d
	movl	%ecx, %r15d
	movl	%edx, -84(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	28(%rdi), %edi
	callq	_to_hr_dev
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	_to_hr_qp
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	leaq	-64(%rbp), %rcx
	movq	%rbx, -128(%rbp)                ## 8-byte Spill
	movq	(%rbx), %rax
	movq	%rcx, %rbx
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	leaq	-80(%rbp), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	%rbx, %rdi
	movl	$255, %esi
	movl	$16, %edx
	callq	_memset
	movq	%rbx, (%rsp)
	movl	-84(%rbp), %edx                 ## 4-byte Reload
	movq	%r13, %rdi
	movq	%r14, -112(%rbp)                ## 8-byte Spill
	movq	%r14, %rsi
	movl	%r15d, -100(%rbp)               ## 4-byte Spill
	movl	%r15d, %ecx
	movl	%r12d, %r15d
	movl	%r12d, %r8d
	leaq	-80(%rbp), %r9
	callq	_hns_roce_v2_set_abs_fields
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_16
## %bb.1:
	movq	_IB_QPS_ERR@GOTPCREL(%rip), %rax
	movl	%r15d, %ecx
	cmpl	%r15d, (%rax)
	jne	LBB0_4
## %bb.2:
	movl	-68(%rbp), %edi
	movq	_V2_QPC_BYTE_160_SQ_PRODUCER_IDX_M@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_V2_QPC_BYTE_160_SQ_PRODUCER_IDX_S@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	56(%rax), %ecx
	callq	_roce_set_field
	movl	-52(%rbp), %edi
	movl	(%r14), %esi
	movl	(%r12), %edx
	xorl	%ecx, %ecx
	callq	_roce_set_field
	cmpq	$0, 16(%r13)
	jne	LBB0_4
## %bb.3:
	movl	-72(%rbp), %edi
	movq	_V2_QPC_BYTE_84_RQ_PRODUCER_IDX_M@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_V2_QPC_BYTE_84_RQ_PRODUCER_IDX_S@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rax), %ecx
	callq	_roce_set_field
	movl	-56(%rbp), %edi
	movl	(%r14), %esi
	movl	(%r12), %edx
	xorl	%ecx, %ecx
	callq	_roce_set_field
LBB0_4:
	leaq	-80(%rbp), %rcx
	movq	%r13, %rdi
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	movl	-84(%rbp), %edx                 ## 4-byte Reload
	leaq	-64(%rbp), %r8
	callq	_hns_roce_v2_set_opt_fields
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_16
## %bb.5:
	movl	-76(%rbp), %edi
	movq	_V2_QPC_BYTE_108_INV_CREDIT_S@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	xorl	%edx, %edx
	cmpq	$0, 16(%r13)
	setne	%dl
	callq	_roce_set_bit
	movl	-60(%rbp), %edi
	movl	(%rbx), %esi
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	callq	_roce_set_bit
	movl	-80(%rbp), %edi
	movq	_V2_QPC_BYTE_60_QP_ST_M@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_V2_QPC_BYTE_60_QP_ST_S@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	%r15d, %ecx
	callq	_roce_set_field
	movl	-64(%rbp), %edi
	movl	(%r12), %esi
	movl	(%rbx), %edx
	xorl	%ecx, %ecx
	callq	_roce_set_field
	leaq	-80(%rbp), %rcx
	movq	-128(%rbp), %rdi                ## 8-byte Reload
	movl	-100(%rbp), %esi                ## 4-byte Reload
	movl	%r15d, %edx
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %r8
	callq	_hns_roce_v2_qp_modify
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	movl	%eax, %edx
	callq	_dev_err
	movl	%r12d, %r14d
	jmp	LBB0_16
LBB0_7:
	movl	%r15d, (%rbx)
	movq	%r13, %rdi
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	movl	-84(%rbp), %edx                 ## 4-byte Reload
	callq	_hns_roce_v2_record_opt_fields
	movq	_IB_QPS_RESET@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_16
## %bb.8:
	cmpl	$0, 24(%r13)
	jne	LBB0_16
## %bb.9:
	movq	(%r13), %rdi
	callq	_to_hr_cq
	movl	%eax, %r14d
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movl	72(%rbx), %r15d
	movq	16(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.11:
	callq	_to_hr_srq
	movq	%rax, %rdx
	jmp	LBB0_12
LBB0_10:
	xorl	%edx, %edx
LBB0_12:
	movl	%r14d, %edi
	movl	%r15d, %esi
	callq	_hns_roce_v2_cq_clean
	movq	8(%r13), %rdi
	cmpq	(%r13), %rdi
	je	LBB0_14
## %bb.13:
	callq	_to_hr_cq
	movl	72(%rbx), %esi
	movl	%eax, %edi
	xorl	%edx, %edx
	callq	_hns_roce_v2_cq_clean
LBB0_14:
	movl	$0, 16(%rbx)
	movq	$0, 64(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rbx)
	movups	%xmm0, 44(%rbx)
	xorl	%r14d, %r14d
	cmpq	$0, 24(%rbx)
	je	LBB0_16
## %bb.15:
	movq	8(%rbx), %rax
	movq	$0, (%rax)
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	movl	%r14d, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_QPS_ERR,4,2                 ## @IB_QPS_ERR
	.comm	_V2_QPC_BYTE_160_SQ_PRODUCER_IDX_M,4,2 ## @V2_QPC_BYTE_160_SQ_PRODUCER_IDX_M
	.comm	_V2_QPC_BYTE_160_SQ_PRODUCER_IDX_S,4,2 ## @V2_QPC_BYTE_160_SQ_PRODUCER_IDX_S
	.comm	_V2_QPC_BYTE_84_RQ_PRODUCER_IDX_M,4,2 ## @V2_QPC_BYTE_84_RQ_PRODUCER_IDX_M
	.comm	_V2_QPC_BYTE_84_RQ_PRODUCER_IDX_S,4,2 ## @V2_QPC_BYTE_84_RQ_PRODUCER_IDX_S
	.comm	_V2_QPC_BYTE_108_INV_CREDIT_S,4,2 ## @V2_QPC_BYTE_108_INV_CREDIT_S
	.comm	_V2_QPC_BYTE_60_QP_ST_M,4,2     ## @V2_QPC_BYTE_60_QP_ST_M
	.comm	_V2_QPC_BYTE_60_QP_ST_S,4,2     ## @V2_QPC_BYTE_60_QP_ST_S
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hns_roce_qp_modify failed(%d)\n"

	.comm	_IB_QPS_RESET,4,2               ## @IB_QPS_RESET
	.no_dead_strip	_hns_roce_v2_modify_qp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_roce_v2_modify_qp
_hns_roce_v2_modify_qp:                 ; @hns_roce_v2_modify_qp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x21, x4
	mov	x24, x3
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	w0, [x0, #28]
	bl	_to_hr_dev
	mov	x26, x0
	mov	x0, x20
	bl	_to_hr_qp
	mov	x19, x0
	add	x8, sp, #8
	add	x27, x8, #16
	ldr	x25, [x26]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	mov	x0, x27
	mov	w1, #255
	mov	w2, #16
	bl	_memset
	add	x5, sp, #8
	mov	x0, x20
	mov	x1, x23
	mov	x2, x22
	mov	x3, x24
	mov	x4, x21
	mov	x6, x27
	bl	_hns_roce_v2_set_abs_fields
	mov	x28, x0
	cbnz	w0, LBB0_10
; %bb.1:
Lloh3:
	adrp	x8, _IB_QPS_ERR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_QPS_ERR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_4
; %bb.2:
Lloh6:
	adrp	x28, _V2_QPC_BYTE_160_SQ_PRODUCER_IDX_M@GOTPAGE
Lloh7:
	ldr	x28, [x28, _V2_QPC_BYTE_160_SQ_PRODUCER_IDX_M@GOTPAGEOFF]
	ldr	w0, [sp, #20]
	ldr	w1, [x28]
	str	x25, [sp]                       ; 8-byte Folded Spill
Lloh8:
	adrp	x25, _V2_QPC_BYTE_160_SQ_PRODUCER_IDX_S@GOTPAGE
Lloh9:
	ldr	x25, [x25, _V2_QPC_BYTE_160_SQ_PRODUCER_IDX_S@GOTPAGEOFF]
	ldr	w2, [x25]
	ldr	w3, [x19, #56]
	bl	_roce_set_field
	ldr	w0, [sp, #36]
	ldr	w1, [x28]
	ldr	w2, [x25]
	ldr	x25, [sp]                       ; 8-byte Folded Reload
	mov	w3, #0
	bl	_roce_set_field
	ldr	x8, [x20, #16]
	cbnz	x8, LBB0_4
; %bb.3:
Lloh10:
	adrp	x25, _V2_QPC_BYTE_84_RQ_PRODUCER_IDX_M@GOTPAGE
Lloh11:
	ldr	x25, [x25, _V2_QPC_BYTE_84_RQ_PRODUCER_IDX_M@GOTPAGEOFF]
	ldr	w0, [sp, #16]
	ldr	w1, [x25]
Lloh12:
	adrp	x28, _V2_QPC_BYTE_84_RQ_PRODUCER_IDX_S@GOTPAGE
Lloh13:
	ldr	x28, [x28, _V2_QPC_BYTE_84_RQ_PRODUCER_IDX_S@GOTPAGEOFF]
	ldr	w2, [x28]
	ldr	w3, [x19, #16]
	bl	_roce_set_field
	ldr	w0, [sp, #32]
	ldr	w1, [x25]
	ldr	x25, [sp]                       ; 8-byte Folded Reload
	ldr	w2, [x28]
	mov	w3, #0
	bl	_roce_set_field
LBB0_4:
	add	x3, sp, #8
	mov	x0, x20
	mov	x1, x23
	mov	x2, x22
	mov	x4, x27
	bl	_hns_roce_v2_set_opt_fields
	mov	x28, x0
	cbnz	w0, LBB0_10
; %bb.5:
	str	x25, [sp]                       ; 8-byte Folded Spill
	ldr	w0, [sp, #12]
Lloh14:
	adrp	x25, _V2_QPC_BYTE_108_INV_CREDIT_S@GOTPAGE
Lloh15:
	ldr	x25, [x25, _V2_QPC_BYTE_108_INV_CREDIT_S@GOTPAGEOFF]
	ldr	w1, [x25]
	ldr	x8, [x20, #16]
	cmp	x8, #0
	cset	w2, ne
	bl	_roce_set_bit
	ldr	w0, [sp, #28]
	ldr	w1, [x25]
	mov	w2, #0
	bl	_roce_set_bit
	ldr	w0, [sp, #8]
Lloh16:
	adrp	x25, _V2_QPC_BYTE_60_QP_ST_M@GOTPAGE
Lloh17:
	ldr	x25, [x25, _V2_QPC_BYTE_60_QP_ST_M@GOTPAGEOFF]
	ldr	w1, [x25]
Lloh18:
	adrp	x27, _V2_QPC_BYTE_60_QP_ST_S@GOTPAGE
Lloh19:
	ldr	x27, [x27, _V2_QPC_BYTE_60_QP_ST_S@GOTPAGEOFF]
	ldr	w2, [x27]
	mov	x3, x21
	bl	_roce_set_field
	ldr	w0, [sp, #24]
	ldr	w1, [x25]
	ldr	w2, [x27]
	mov	w3, #0
	bl	_roce_set_field
	add	x3, sp, #8
	mov	x0, x26
	mov	x1, x24
	mov	x2, x21
	mov	x4, x19
	bl	_hns_roce_v2_qp_modify
	cbz	w0, LBB0_7
; %bb.6:
	mov	x28, x0
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	mov	x2, x28
	bl	_dev_err
	b	LBB0_10
LBB0_7:
	str	w21, [x19]
	mov	x0, x20
	mov	x1, x23
	mov	x2, x22
	bl	_hns_roce_v2_record_opt_fields
Lloh22:
	adrp	x8, _IB_QPS_RESET@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IB_QPS_RESET@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_9
; %bb.8:
	ldr	w8, [x20, #24]
	cbz	w8, LBB0_12
LBB0_9:
	mov	w28, #0
LBB0_10:
	ldr	x8, [sp, #40]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.11:
	mov	x0, x28
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_12:
	ldr	x0, [x20]
	bl	_to_hr_cq
	mov	x21, x0
	ldr	w22, [x19, #72]
	ldr	x0, [x20, #16]
	cbz	x0, LBB0_14
; %bb.13:
	bl	_to_hr_srq
	mov	x2, x0
	b	LBB0_15
LBB0_14:
	mov	x2, #0
LBB0_15:
	mov	x0, x21
	mov	x1, x22
	bl	_hns_roce_v2_cq_clean
	ldp	x8, x0, [x20]
	cmp	x0, x8
	b.eq	LBB0_17
; %bb.16:
	bl	_to_hr_cq
	ldr	w1, [x19, #72]
	mov	x2, #0
	bl	_hns_roce_v2_cq_clean
LBB0_17:
	str	wzr, [x19, #16]
	str	xzr, [x19, #64]
	stp	xzr, xzr, [x19, #40]
	str	xzr, [x19, #32]
	str	wzr, [x19, #56]
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_9
; %bb.18:
	mov	w28, #0
	ldr	x8, [x19, #8]
	str	xzr, [x8]
	b	LBB0_10
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_QPS_ERR,4,2                 ; @IB_QPS_ERR
	.comm	_V2_QPC_BYTE_160_SQ_PRODUCER_IDX_M,4,2 ; @V2_QPC_BYTE_160_SQ_PRODUCER_IDX_M
	.comm	_V2_QPC_BYTE_160_SQ_PRODUCER_IDX_S,4,2 ; @V2_QPC_BYTE_160_SQ_PRODUCER_IDX_S
	.comm	_V2_QPC_BYTE_84_RQ_PRODUCER_IDX_M,4,2 ; @V2_QPC_BYTE_84_RQ_PRODUCER_IDX_M
	.comm	_V2_QPC_BYTE_84_RQ_PRODUCER_IDX_S,4,2 ; @V2_QPC_BYTE_84_RQ_PRODUCER_IDX_S
	.comm	_V2_QPC_BYTE_108_INV_CREDIT_S,4,2 ; @V2_QPC_BYTE_108_INV_CREDIT_S
	.comm	_V2_QPC_BYTE_60_QP_ST_M,4,2     ; @V2_QPC_BYTE_60_QP_ST_M
	.comm	_V2_QPC_BYTE_60_QP_ST_S,4,2     ; @V2_QPC_BYTE_60_QP_ST_S
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hns_roce_qp_modify failed(%d)\n"

	.comm	_IB_QPS_RESET,4,2               ; @IB_QPS_RESET
	.no_dead_strip	_hns_roce_v2_modify_qp
.subsections_via_symbols
