	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_destroy_qp                ## -- Begin function mlx4_destroy_qp
	.p2align	4, 0x90
_mlx4_destroy_qp:                       ## @mlx4_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_mqp
	movq	%rax, %r15
	movl	16(%rbx), %edi
	callq	_to_mctx
	movq	%rax, %rdi
	callq	_pthread_mutex_lock
	movq	%rbx, %rdi
	callq	_ibv_cmd_destroy_qp
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	16(%rbx), %edi
	callq	_to_mctx
	movq	%rax, %rdi
	callq	_pthread_mutex_unlock
	jmp	LBB0_18
LBB0_2:
	movq	%rbx, %rdi
	callq	_mlx4_lock_cqs
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.3:
	callq	_to_mcq
	movl	%eax, %r12d
	movl	20(%rbx), %r13d
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.5:
	callq	_to_msrq
	movq	%rax, %rdx
	jmp	LBB0_6
LBB0_4:
	xorl	%edx, %edx
LBB0_6:
	movl	%r12d, %edi
	movl	%r13d, %esi
	callq	___mlx4_cq_clean
LBB0_7:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.8:
	cmpq	(%rbx), %rdi
	je	LBB0_10
## %bb.9:
	callq	_to_mcq
	movl	20(%rbx), %esi
	movl	%eax, %edi
	xorl	%edx, %edx
	callq	___mlx4_cq_clean
LBB0_10:
	cmpq	$0, 16(%r15)
	jne	LBB0_12
## %bb.11:
	cmpq	$0, 32(%r15)
	je	LBB0_13
LBB0_12:
	movl	16(%rbx), %edi
	callq	_to_mctx
	movl	20(%rbx), %esi
	movq	%rax, %rdi
	callq	_mlx4_clear_qp
LBB0_13:
	movq	%rbx, %rdi
	callq	_mlx4_unlock_cqs
	movl	16(%rbx), %edi
	callq	_to_mctx
	movq	%rax, %rdi
	callq	_pthread_mutex_unlock
	cmpq	$0, 32(%r15)
	je	LBB0_15
## %bb.14:
	movl	16(%rbx), %edi
	callq	_to_mctx
	movq	_MLX4_DB_TYPE_RQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	40(%r15), %edx
	movq	%rax, %rdi
	callq	_mlx4_free_db
	movq	24(%r15), %rdi
	callq	_free
LBB0_15:
	cmpq	$0, 16(%r15)
	je	LBB0_17
## %bb.16:
	movq	8(%r15), %rdi
	callq	_free
LBB0_17:
	movq	%r15, %rdi
	callq	_mlx4_free_buf
	movq	%r15, %rdi
	callq	_free
LBB0_18:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_DB_TYPE_RQ,4,2            ## @MLX4_DB_TYPE_RQ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_destroy_qp                ; -- Begin function mlx4_destroy_qp
	.p2align	2
_mlx4_destroy_qp:                       ; @mlx4_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	x20, x0
	ldr	w0, [x21, #16]
	bl	_to_mctx
	bl	_pthread_mutex_lock
	mov	x0, x21
	bl	_ibv_cmd_destroy_qp
	mov	x19, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x21, #16]
	bl	_to_mctx
	bl	_pthread_mutex_unlock
	b	LBB0_18
LBB0_2:
	mov	x0, x21
	bl	_mlx4_lock_cqs
	ldr	x0, [x21]
	cbz	x0, LBB0_7
; %bb.3:
	bl	_to_mcq
	mov	x22, x0
	ldr	w23, [x21, #20]
	ldr	x0, [x21, #24]
	cbz	x0, LBB0_5
; %bb.4:
	bl	_to_msrq
	mov	x2, x0
	b	LBB0_6
LBB0_5:
	mov	x2, #0
LBB0_6:
	mov	x0, x22
	mov	x1, x23
	bl	___mlx4_cq_clean
LBB0_7:
	ldr	x0, [x21, #8]
	cbz	x0, LBB0_10
; %bb.8:
	ldr	x8, [x21]
	cmp	x0, x8
	b.eq	LBB0_10
; %bb.9:
	bl	_to_mcq
	ldr	w1, [x21, #20]
	mov	x2, #0
	bl	___mlx4_cq_clean
LBB0_10:
	ldr	x8, [x20, #16]
	cbnz	x8, LBB0_12
; %bb.11:
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_13
LBB0_12:
	ldr	w0, [x21, #16]
	bl	_to_mctx
	ldr	w1, [x21, #20]
	bl	_mlx4_clear_qp
LBB0_13:
	mov	x0, x21
	bl	_mlx4_unlock_cqs
	ldr	w0, [x21, #16]
	bl	_to_mctx
	bl	_pthread_mutex_unlock
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_15
; %bb.14:
	ldr	w0, [x21, #16]
	bl	_to_mctx
Lloh0:
	adrp	x8, _MLX4_DB_TYPE_RQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX4_DB_TYPE_RQ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w2, [x20, #40]
	bl	_mlx4_free_db
	ldr	x0, [x20, #24]
	bl	_free
LBB0_15:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_17
; %bb.16:
	ldr	x0, [x20, #8]
	bl	_free
LBB0_17:
	mov	x0, x20
	bl	_mlx4_free_buf
	mov	x0, x20
	bl	_free
LBB0_18:
	mov	x0, x19
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_DB_TYPE_RQ,4,2            ; @MLX4_DB_TYPE_RQ
.subsections_via_symbols
