	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_destroy_qp                ## -- Begin function mlx5_destroy_qp
	.p2align	4, 0x90
_mlx5_destroy_qp:                       ## @mlx5_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, %r12
	callq	_to_mqp
	movq	%rax, %r15
	movl	32(%r12), %edi
	callq	_to_mctx
	cmpq	$0, 24(%r15)
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_ibv_cmd_destroy_qp
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_22
	jmp	LBB0_21
LBB0_2:
	movq	%rax, %r14
	cmpl	$0, 4(%rax)
	jne	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_pthread_mutex_lock
LBB0_4:
	movq	%r12, %rdi
	callq	_ibv_cmd_destroy_qp
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	%eax, %ebx
	cmpl	$0, 4(%r14)
	jne	LBB0_22
## %bb.6:
	movq	%r14, %rdi
	callq	_pthread_mutex_unlock
	jmp	LBB0_22
LBB0_7:
	movq	%r12, %rdi
	callq	_mlx5_lock_cqs
	movq	(%r12), %rdi
	callq	_to_mcq
	movl	%eax, %r13d
	movl	4(%r15), %ebx
	movq	24(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.9:
	callq	_to_msrq
	movq	%rax, %rdx
	jmp	LBB0_10
LBB0_8:
	xorl	%edx, %edx
LBB0_10:
	movl	%r13d, %edi
	movl	%ebx, %esi
	callq	___mlx5_cq_clean
	movq	8(%r12), %rdi
	cmpq	(%r12), %rdi
	je	LBB0_12
## %bb.11:
	callq	_to_mcq
	movl	4(%r15), %esi
	movl	%eax, %edi
	xorl	%edx, %edx
	callq	___mlx5_cq_clean
LBB0_12:
	cmpl	$0, 4(%r14)
	jne	LBB0_16
## %bb.13:
	cmpq	$0, 16(%r15)
	jne	LBB0_15
## %bb.14:
	cmpq	$0, 8(%r15)
	je	LBB0_16
LBB0_15:
	movl	20(%r12), %esi
	movq	%r14, %rdi
	callq	_mlx5_clear_qp
LBB0_16:
	movq	%r12, %rdi
	callq	_mlx5_unlock_cqs
	cmpl	$0, 4(%r14)
	je	LBB0_17
## %bb.18:
	movl	16(%r12), %edi
	callq	_is_xrc_tgt
	testl	%eax, %eax
	jne	LBB0_20
## %bb.19:
	movl	4(%r15), %esi
	movq	%r14, %rdi
	callq	_mlx5_clear_uidx
	jmp	LBB0_20
LBB0_17:
	movq	%r14, %rdi
	callq	_pthread_mutex_unlock
LBB0_20:
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_mlx5_free_db
	movq	%r15, %rdi
	callq	_mlx5_free_qp_buf
LBB0_21:
	movq	%r15, %rdi
	callq	_free
	xorl	%ebx, %ebx
LBB0_22:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_destroy_qp                ; -- Begin function mlx5_destroy_qp
	.p2align	2
_mlx5_destroy_qp:                       ; @mlx5_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	x21, x0
	bl	_to_mqp
	mov	x19, x0
	ldr	w0, [x21, #32]
	bl	_to_mctx
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_ibv_cmd_destroy_qp
	mov	x22, x0
	cbnz	w0, LBB0_22
	b	LBB0_21
LBB0_2:
	mov	x20, x0
	ldr	w8, [x0, #4]
	cbnz	w8, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_pthread_mutex_lock
LBB0_4:
	mov	x0, x21
	bl	_ibv_cmd_destroy_qp
	cbz	w0, LBB0_7
; %bb.5:
	mov	x22, x0
	ldr	w8, [x20, #4]
	cbnz	w8, LBB0_22
; %bb.6:
	mov	x0, x20
	bl	_pthread_mutex_unlock
	b	LBB0_22
LBB0_7:
	mov	x0, x21
	bl	_mlx5_lock_cqs
	ldr	x0, [x21]
	bl	_to_mcq
	mov	x22, x0
	ldr	w23, [x19, #4]
	ldr	x0, [x21, #24]
	cbz	x0, LBB0_9
; %bb.8:
	bl	_to_msrq
	mov	x2, x0
	b	LBB0_10
LBB0_9:
	mov	x2, #0
LBB0_10:
	mov	x0, x22
	mov	x1, x23
	bl	___mlx5_cq_clean
	ldp	x8, x0, [x21]
	cmp	x0, x8
	b.eq	LBB0_12
; %bb.11:
	bl	_to_mcq
	ldr	w1, [x19, #4]
	mov	x2, #0
	bl	___mlx5_cq_clean
LBB0_12:
	ldr	w8, [x20, #4]
	cbnz	w8, LBB0_16
; %bb.13:
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_15
; %bb.14:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_16
LBB0_15:
	ldr	w1, [x21, #20]
	mov	x0, x20
	bl	_mlx5_clear_qp
LBB0_16:
	mov	x0, x21
	bl	_mlx5_unlock_cqs
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_19
; %bb.17:
	ldr	w0, [x21, #16]
	bl	_is_xrc_tgt
	cbnz	w0, LBB0_20
; %bb.18:
	ldr	w1, [x19, #4]
	mov	x0, x20
	bl	_mlx5_clear_uidx
	b	LBB0_20
LBB0_19:
	mov	x0, x20
	bl	_pthread_mutex_unlock
LBB0_20:
	ldr	w1, [x19]
	mov	x0, x20
	bl	_mlx5_free_db
	mov	x0, x19
	bl	_mlx5_free_qp_buf
LBB0_21:
	mov	x0, x19
	bl	_free
	mov	w22, #0
LBB0_22:
	mov	x0, x22
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
