	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_destroy_qp                 ## -- Begin function qib_destroy_qp
	.p2align	4, 0x90
_qib_destroy_qp:                        ## @qib_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_to_iqp
	movq	%rax, %r12
	movl	(%rbx), %edi
	callq	_to_idev
	movq	%rax, %r14
	leaq	44(%r12), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irq
	movq	_IB_QPS_RESET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, (%r12)
	jne	LBB0_1
## %bb.6:
	movq	%r15, %rdi
	callq	_spin_unlock_irq
	jmp	LBB0_7
LBB0_1:
	movq	%rax, (%r12)
	leaq	12(%r14), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock
	leaq	80(%r12), %r13
	movq	%r13, %rdi
	callq	_list_empty
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	%r13, %rdi
	callq	_list_del_init
LBB0_3:
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	_QIB_S_TIMER@GOTPCREL(%rip), %rax
	movq	_QIB_S_ANY_WAIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, 8(%r12)
	movq	%r15, %rdi
	callq	_spin_unlock_irq
	leaq	76(%r12), %rdi
	callq	_cancel_work_sync
	leaq	72(%r12), %rdi
	callq	_del_timer_sync
	movl	68(%r12), %ebx
	leaq	64(%r12), %rdi
	callq	_atomic_read
	xorl	%esi, %esi
	testl	%eax, %eax
	sete	%sil
	movl	%ebx, %edi
	callq	_wait_event
	movq	56(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	callq	_qib_put_txreq
	movq	$0, 56(%r12)
LBB0_5:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_remove_qp
	movl	52(%r12), %ebx
	movq	%r12, %rdi
	addq	$48, %rdi
	callq	_atomic_read
	xorl	%esi, %esi
	testl	%eax, %eax
	sete	%sil
	movl	%ebx, %edi
	callq	_wait_event
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_clear_mr_refs
LBB0_7:
	movq	%r14, %rdi
	addq	$8, %rdi
	movl	40(%r12), %esi
	callq	_free_qpn
	movq	%r14, %rdi
	callq	_spin_lock
	decl	4(%r14)
	movq	%r14, %rdi
	callq	_spin_unlock
	movq	32(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	movq	_qib_release_mmap_info@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kref_put
	jmp	LBB0_10
LBB0_9:
	movl	28(%r12), %edi
	callq	_vfree
LBB0_10:
	movl	24(%r12), %edi
	callq	_vfree
	movq	16(%r12), %rdi
	callq	_kfree
	movq	%r12, %rdi
	callq	_kfree
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_QPS_RESET,8,3               ## @IB_QPS_RESET
	.comm	_QIB_S_TIMER,4,2                ## @QIB_S_TIMER
	.comm	_QIB_S_ANY_WAIT,4,2             ## @QIB_S_ANY_WAIT
	.comm	_qib_release_mmap_info,4,2      ## @qib_release_mmap_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_destroy_qp                 ; -- Begin function qib_destroy_qp
	.p2align	2
_qib_destroy_qp:                        ; @qib_destroy_qp
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
	bl	_to_iqp
	mov	x19, x0
	ldr	w0, [x20]
	bl	_to_idev
	mov	x20, x0
	add	x21, x19, #44
	mov	x0, x21
	bl	_spin_lock_irq
	ldr	x9, [x19]
Lloh0:
	adrp	x8, _IB_QPS_RESET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_QPS_RESET@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_spin_unlock_irq
	b	LBB0_7
LBB0_2:
	mov	x23, x19
	str	x8, [x23], #80
	add	x22, x20, #12
	mov	x0, x22
	bl	_spin_lock
	mov	x0, x23
	bl	_list_empty
	cbnz	w0, LBB0_4
; %bb.3:
	mov	x0, x23
	bl	_list_del_init
LBB0_4:
	mov	x0, x22
	bl	_spin_unlock
Lloh3:
	adrp	x8, _QIB_S_TIMER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _QIB_S_TIMER@GOTPAGEOFF]
Lloh5:
	adrp	x9, _QIB_S_ANY_WAIT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _QIB_S_ANY_WAIT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x19, #8]
	bic	w8, w9, w8
	str	w8, [x19, #8]
	mov	x0, x21
	bl	_spin_unlock_irq
	add	x0, x19, #76
	bl	_cancel_work_sync
	add	x0, x19, #72
	bl	_del_timer_sync
	ldr	w21, [x19, #68]
	add	x0, x19, #64
	bl	_atomic_read
	cmp	w0, #0
	cset	w1, eq
	mov	x0, x21
	bl	_wait_event
	ldr	x0, [x19, #56]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_qib_put_txreq
	str	xzr, [x19, #56]
LBB0_6:
	mov	x0, x20
	mov	x1, x19
	bl	_remove_qp
	ldr	w21, [x19, #52]
	add	x0, x19, #48
	bl	_atomic_read
	cmp	w0, #0
	cset	w1, eq
	mov	x0, x21
	bl	_wait_event
	mov	x0, x19
	mov	w1, #1
	bl	_clear_mr_refs
LBB0_7:
	add	x0, x20, #8
	ldr	w1, [x19, #40]
	bl	_free_qpn
	mov	x0, x20
	bl	_spin_lock
	ldr	w8, [x20, #4]
	sub	w8, w8, #1
	str	w8, [x20, #4]
	mov	x0, x20
	bl	_spin_unlock
	ldr	x0, [x19, #32]
	cbz	x0, LBB0_9
; %bb.8:
Lloh9:
	adrp	x8, _qib_release_mmap_info@GOTPAGE
Lloh10:
	ldr	x8, [x8, _qib_release_mmap_info@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_kref_put
	b	LBB0_10
LBB0_9:
	ldr	w0, [x19, #28]
	bl	_vfree
LBB0_10:
	ldr	w0, [x19, #24]
	bl	_vfree
	ldr	x0, [x19, #16]
	bl	_kfree
	mov	x0, x19
	bl	_kfree
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_QPS_RESET,8,3               ; @IB_QPS_RESET
	.comm	_QIB_S_TIMER,4,2                ; @QIB_S_TIMER
	.comm	_QIB_S_ANY_WAIT,4,2             ; @QIB_S_ANY_WAIT
	.comm	_qib_release_mmap_info,4,2      ; @qib_release_mmap_info
.subsections_via_symbols
