	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvrdma_destroy_cq              ## -- Begin function pvrdma_destroy_cq
	.p2align	4, 0x90
_pvrdma_destroy_cq:                     ## @pvrdma_destroy_cq
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_to_vcq
	movq	%rax, %r14
	movl	(%rbx), %edi
	callq	_to_vdev
	movq	%rax, %r12
	leaq	-48(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_PVRDMA_CMD_DESTROY_CQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	(%r14), %rax
	movq	%rax, -48(%rbp)
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_pvrdma_cmd_post
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movq	16(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_warn
LBB0_2:
	movq	%r12, %rbx
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	8(%r12), %rax
	movq	(%r14), %rcx
	movq	$0, (%rax,%rcx,8)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_pvrdma_free_cq
	movq	%r12, %rdi
	callq	_atomic_dec
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PVRDMA_CMD_DESTROY_CQ,4,2      ## @PVRDMA_CMD_DESTROY_CQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not destroy completion queue, error: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvrdma_destroy_cq              ; -- Begin function pvrdma_destroy_cq
	.p2align	2
_pvrdma_destroy_cq:                     ; @pvrdma_destroy_cq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	bl	_to_vcq
	mov	x19, x0
	ldr	w0, [x20]
	bl	_to_vdev
	mov	x20, x0
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh0:
	adrp	x8, _PVRDMA_CMD_DESTROY_CQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PVRDMA_CMD_DESTROY_CQ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	ldr	x8, [x19]
	str	x8, [sp]
	mov	x1, sp
	mov	x0, x20
	mov	x2, #0
	mov	w3, #0
	bl	_pvrdma_cmd_post
	tbz	w0, #31, LBB0_2
; %bb.1:
	mov	x2, x0
	ldr	x0, [x20, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_2:
	add	x21, x20, #4
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x8, [x20, #8]
	ldr	x9, [x19]
	str	xzr, [x8, x9, lsl #3]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	mov	x1, x19
	bl	_pvrdma_free_cq
	mov	x0, x20
	bl	_atomic_dec
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PVRDMA_CMD_DESTROY_CQ,4,2      ; @PVRDMA_CMD_DESTROY_CQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not destroy completion queue, error: %d\n"

.subsections_via_symbols
