	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qedr_destroy_qp                ## -- Begin function qedr_destroy_qp
	.p2align	4, 0x90
_qedr_destroy_qp:                       ## @qedr_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, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	callq	_get_qedr_qp
	movq	%rax, %rbx
	movq	32(%rax), %r14
	movq	_QEDR_MSG_QP@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	(%rax), %r8
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_DP_DEBUG
	leaq	4(%r14), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	$1, %esi
	callq	_rdma_protocol_roce
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	8(%rbx), %rax
	movq	_QED_ROCE_QP_STATE_RESET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.2:
	movq	_QED_ROCE_QP_STATE_ERR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.3:
	movq	_QED_ROCE_QP_STATE_INIT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.4:
	movq	_IB_QPS_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_IB_QP_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	xorl	%ecx, %ecx
	callq	_qedr_modify_qp
	jmp	LBB0_11
LBB0_5:
	movq	24(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.7:
	movl	$201, %r12d
	leaq	L_.str.1(%rip), %r13
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%r14, %rdi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_DP_DEBUG
	movl	$100, %edi
	callq	_msleep
	decl	%r12d
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	24(%rbx), %rax
	cmpq	$0, (%rax)
	jne	LBB0_8
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_DP_NOTICE
LBB0_11:
	movq	(%rbx), %rax
	movq	_IB_QPT_GSI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	_qedr_destroy_gsi_qp
LBB0_13:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_qedr_free_qp_resources
	movq	%rbx, %rdi
	addq	$20, %rdi
	callq	_atomic_dec_and_test
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %esi
	callq	_rdma_protocol_iwarp
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movl	16(%rbx), %esi
	movq	%r14, %rdi
	callq	_xa_erase_irq
	movq	%rbx, %rdi
	callq	_kfree
LBB0_16:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QEDR_MSG_QP,4,2                ## @QEDR_MSG_QP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"destroy qp: destroying %p, qp type=%d\n"

	.comm	_QED_ROCE_QP_STATE_RESET,8,3    ## @QED_ROCE_QP_STATE_RESET
	.comm	_QED_ROCE_QP_STATE_ERR,8,3      ## @QED_ROCE_QP_STATE_ERR
	.comm	_QED_ROCE_QP_STATE_INIT,8,3     ## @QED_ROCE_QP_STATE_INIT
	.comm	_IB_QPS_ERR,4,2                 ## @IB_QPS_ERR
	.comm	_IB_QP_STATE,4,2                ## @IB_QP_STATE
L_.str.1:                               ## @.str.1
	.asciz	"Still in during connect/accept\n"

L_.str.2:                               ## @.str.2
	.asciz	"during connect timeout\n"

	.comm	_IB_QPT_GSI,8,3                 ## @IB_QPT_GSI
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qedr_destroy_qp                ; -- Begin function qedr_destroy_qp
	.p2align	2
_qedr_destroy_qp:                       ; @qedr_destroy_qp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x21, x1
	mov	x23, x0
	bl	_get_qedr_qp
	mov	x19, x0
	ldr	x20, [x0, #32]
Lloh0:
	adrp	x24, _QEDR_MSG_QP@GOTPAGE
Lloh1:
	ldr	x24, [x24, _QEDR_MSG_QP@GOTPAGEOFF]
	ldr	w1, [x24]
	ldr	x8, [x0]
	stp	x0, x8, [sp]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_DP_DEBUG
	add	x22, x20, #4
	mov	x0, x22
	mov	w1, #1
	bl	_rdma_protocol_roce
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x19, #8]
Lloh4:
	adrp	x9, _QED_ROCE_QP_STATE_RESET@GOTPAGE
Lloh5:
	ldr	x9, [x9, _QED_ROCE_QP_STATE_RESET@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
Lloh7:
	adrp	x10, _QED_ROCE_QP_STATE_ERR@GOTPAGE
Lloh8:
	ldr	x10, [x10, _QED_ROCE_QP_STATE_ERR@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
Lloh10:
	adrp	x11, _QED_ROCE_QP_STATE_INIT@GOTPAGE
Lloh11:
	ldr	x11, [x11, _QED_ROCE_QP_STATE_INIT@GOTPAGEOFF]
Lloh12:
	ldr	x11, [x11]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	b.eq	LBB0_9
; %bb.2:
Lloh13:
	adrp	x8, _IB_QPS_ERR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IB_QPS_ERR@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [sp, #24]
Lloh16:
	adrp	x8, _IB_QP_STATE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IB_QP_STATE@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	add	x1, sp, #24
	mov	x0, x23
	mov	x3, #0
	bl	_qedr_modify_qp
	b	LBB0_9
LBB0_3:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_9
; %bb.4:
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.5:
	mov	w25, #201
Lloh19:
	adrp	x23, l_.str.1@PAGE
Lloh20:
	add	x23, x23, l_.str.1@PAGEOFF
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	x0, x20
	mov	x2, x23
	bl	_DP_DEBUG
	mov	w0, #100
	bl	_msleep
	subs	w25, w25, #1
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	cbnz	x8, LBB0_6
	b	LBB0_9
LBB0_8:
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_DP_NOTICE
LBB0_9:
	ldr	x8, [x19]
Lloh23:
	adrp	x9, _IB_QPT_GSI@GOTPAGE
Lloh24:
	ldr	x9, [x9, _IB_QPT_GSI@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_qedr_destroy_gsi_qp
LBB0_11:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_qedr_free_qp_resources
	add	x0, x19, #20
	bl	_atomic_dec_and_test
	cbz	x0, LBB0_14
; %bb.12:
	mov	x0, x22
	mov	w1, #1
	bl	_rdma_protocol_iwarp
	cbz	x0, LBB0_14
; %bb.13:
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_xa_erase_irq
	mov	x0, x19
	bl	_kfree
LBB0_14:
	mov	w0, #0
	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
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_QEDR_MSG_QP,4,2                ; @QEDR_MSG_QP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"destroy qp: destroying %p, qp type=%d\n"

	.comm	_QED_ROCE_QP_STATE_RESET,8,3    ; @QED_ROCE_QP_STATE_RESET
	.comm	_QED_ROCE_QP_STATE_ERR,8,3      ; @QED_ROCE_QP_STATE_ERR
	.comm	_QED_ROCE_QP_STATE_INIT,8,3     ; @QED_ROCE_QP_STATE_INIT
	.comm	_IB_QPS_ERR,4,2                 ; @IB_QPS_ERR
	.comm	_IB_QP_STATE,4,2                ; @IB_QP_STATE
l_.str.1:                               ; @.str.1
	.asciz	"Still in during connect/accept\n"

l_.str.2:                               ; @.str.2
	.asciz	"during connect timeout\n"

	.comm	_IB_QPT_GSI,8,3                 ; @IB_QPT_GSI
.subsections_via_symbols
