	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_roce_v1_destroy_qp         ## -- Begin function hns_roce_v1_destroy_qp
	.p2align	4, 0x90
_hns_roce_v1_destroy_qp:                ## @hns_roce_v1_destroy_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
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_to_hr_dev
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_to_hr_qp
	movq	%rax, %r15
	movl	60(%rax), %ecx
	movq	_IB_QPS_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_hns_roce_v1_modify_qp
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.1:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	20(%r15), %edi
	callq	_to_hr_cq
	movq	%rax, %rbx
	movl	16(%r15), %edi
	callq	_to_hr_cq
	movq	%rax, %r12
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_hns_roce_lock_cqs
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	testq	%r13, %r13
	jne	LBB0_7
## %bb.2:
	movl	56(%r15), %r13d
	movq	8(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.4:
	callq	_to_hr_srq
	movq	%rax, %rdx
	jmp	LBB0_5
LBB0_3:
	xorl	%edx, %edx
LBB0_5:
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	___hns_roce_v1_cq_clean
	cmpq	%r12, %rbx
	je	LBB0_7
## %bb.6:
	movl	56(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	___hns_roce_v1_cq_clean
LBB0_7:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_hns_roce_unlock_cqs
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_hns_roce_qp_remove
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_hns_roce_qp_free
	movq	(%r15), %rax
	movq	_IB_QPT_RC@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_9
## %bb.8:
	movl	56(%r15), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_hns_roce_release_range_qp
LBB0_9:
	leaq	52(%r15), %rsi
	movq	%rbx, %rdi
	callq	_hns_roce_mtt_cleanup
	movl	48(%r15), %edi
	callq	_ib_umem_release
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_11
## %bb.10:
	movq	40(%r15), %rdi
	callq	_kfree
	movq	32(%r15), %rdi
	callq	_kfree
	movl	28(%r15), %esi
	movq	%r15, %rdx
	addq	$24, %rdx
	movq	%rbx, %rdi
	callq	_hns_roce_buf_free
LBB0_11:
	movq	(%r15), %rax
	cmpq	(%r12), %rax
	jne	LBB0_13
## %bb.12:
	movq	%r15, %rdi
	jmp	LBB0_14
LBB0_13:
	movq	%r15, %rdi
	callq	_hr_to_hr_sqp
	movq	%rax, %rdi
LBB0_14:
	callq	_kfree
LBB0_15:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_QPS_RESET,4,2               ## @IB_QPS_RESET
	.comm	_IB_QPT_RC,8,3                  ## @IB_QPT_RC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_roce_v1_destroy_qp         ; -- Begin function hns_roce_v1_destroy_qp
	.p2align	2
_hns_roce_v1_destroy_qp:                ; @hns_roce_v1_destroy_qp
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x1
	mov	x20, x0
	ldr	w0, [x0]
	bl	_to_hr_dev
	mov	x21, x0
	mov	x0, x20
	bl	_to_hr_qp
	mov	x19, x0
	ldr	w3, [x0, #60]
Lloh0:
	adrp	x8, _IB_QPS_RESET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_QPS_RESET@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	mov	x0, x20
	mov	x1, #0
	mov	w2, #0
	bl	_hns_roce_v1_modify_qp
	mov	x20, x0
	cbnz	w0, LBB0_14
; %bb.1:
	ldr	w0, [x19, #20]
	bl	_to_hr_cq
	mov	x23, x0
	ldr	w0, [x19, #16]
	bl	_to_hr_cq
	mov	x24, x0
	mov	x0, x23
	mov	x1, x24
	bl	_hns_roce_lock_cqs
	cbnz	x22, LBB0_7
; %bb.2:
	ldr	w25, [x19, #56]
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_to_hr_srq
	mov	x2, x0
	b	LBB0_5
LBB0_4:
	mov	x2, #0
LBB0_5:
	mov	x0, x24
	mov	x1, x25
	bl	___hns_roce_v1_cq_clean
	cmp	x23, x24
	b.eq	LBB0_7
; %bb.6:
	ldr	w1, [x19, #56]
	mov	x0, x23
	mov	x2, #0
	bl	___hns_roce_v1_cq_clean
LBB0_7:
	mov	x0, x23
	mov	x1, x24
	bl	_hns_roce_unlock_cqs
	mov	x0, x21
	mov	x1, x19
	bl	_hns_roce_qp_remove
	mov	x0, x21
	mov	x1, x19
	bl	_hns_roce_qp_free
	ldr	x8, [x19]
Lloh3:
	adrp	x23, _IB_QPT_RC@GOTPAGE
Lloh4:
	ldr	x23, [x23, _IB_QPT_RC@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
	ldr	w1, [x19, #56]
	mov	x0, x21
	mov	w2, #1
	bl	_hns_roce_release_range_qp
LBB0_9:
	add	x1, x19, #52
	mov	x0, x21
	bl	_hns_roce_mtt_cleanup
	ldr	w0, [x19, #48]
	bl	_ib_umem_release
	cbnz	x22, LBB0_11
; %bb.10:
	ldr	x0, [x19, #40]
	bl	_kfree
	ldr	x0, [x19, #32]
	bl	_kfree
	ldr	w1, [x19, #28]
	add	x2, x19, #24
	mov	x0, x21
	bl	_hns_roce_buf_free
LBB0_11:
	ldr	x8, [x19]
	ldr	x9, [x23]
	mov	x0, x19
	cmp	x8, x9
	b.eq	LBB0_13
; %bb.12:
	bl	_hr_to_hr_sqp
LBB0_13:
	bl	_kfree
LBB0_14:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_QPS_RESET,4,2               ; @IB_QPS_RESET
	.comm	_IB_QPT_RC,8,3                  ; @IB_QPT_RC
.subsections_via_symbols
