	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qedr_destroy_cq                ## -- Begin function qedr_destroy_cq
	.p2align	4, 0x90
_qedr_destroy_cq:                       ## @qedr_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	%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, %r15
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_get_qedr_dev
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_get_qedr_cq
	movq	%rax, %r12
	movq	_QEDR_MSG_CQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	36(%r12), %r8d
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movq	%r12, %rcx
	callq	_DP_DEBUG
	movl	$1, (%r12)
	movq	8(%r12), %rax
	movq	_QEDR_CQ_TYPE_GSI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_13
## %bb.1:
	movl	36(%r12), %eax
	movl	%eax, -56(%rbp)
	movq	8(%r14), %rax
	movl	16(%r14), %edi
	leaq	-56(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	callq	*8(%rax)
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movl	(%r14), %edi
	leaq	32(%r12), %rsi
	callq	*(%rax)
	testq	%r15, %r15
	je	LBB0_3
## %bb.2:
	movq	%r12, %rsi
	addq	$28, %rsi
	movl	24(%r12), %edx
	movq	%r14, %rdi
	callq	_qedr_free_pbl
	movl	20(%r12), %edi
	callq	_ib_umem_release
LBB0_3:
	movq	_QEDR_DESTROY_CQ_MAX_ITERATIONS@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	movq	-48(%rbp), %r15
	movl	16(%r12), %edi
	callq	_READ_ONCE
	cmpq	%rax, %r15
	je	LBB0_8
## %bb.4:
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.5:
	decl	%ebx
	movq	_QEDR_DESTROY_CQ_ITER_DURATION@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	callq	_udelay
	movq	-48(%rbp), %r13
	movl	16(%r12), %edi
	callq	_READ_ONCE
	addl	$-1, %ebx
	setb	%cl
	cmpq	%rax, %r13
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	testb	%cl, %cl
	jne	LBB0_6
LBB0_8:
	movl	(%r14), %ebx
	movq	-48(%rbp), %r14
	movl	16(%r12), %edi
	callq	_READ_ONCE
	cmpq	%rax, %r14
	je	LBB0_13
## %bb.9:
	testl	%ebx, %ebx
	je	LBB0_13
## %bb.10:
	decl	%ebx
	movq	_QEDR_DESTROY_CQ_ITER_DURATION@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	callq	_msleep
	movq	-48(%rbp), %r15
	movl	16(%r12), %edi
	callq	_READ_ONCE
	addl	$-1, %ebx
	setb	%cl
	cmpq	%rax, %r15
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	testb	%cl, %cl
	jne	LBB0_11
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QEDR_MSG_CQ,4,2                ## @QEDR_MSG_CQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"destroy cq %p (icid=%d)\n"

	.comm	_QEDR_CQ_TYPE_GSI,8,3           ## @QEDR_CQ_TYPE_GSI
	.comm	_QEDR_DESTROY_CQ_MAX_ITERATIONS,4,2 ## @QEDR_DESTROY_CQ_MAX_ITERATIONS
	.comm	_QEDR_DESTROY_CQ_ITER_DURATION,4,2 ## @QEDR_DESTROY_CQ_ITER_DURATION
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qedr_destroy_cq                ; -- Begin function qedr_destroy_cq
	.p2align	2
_qedr_destroy_cq:                       ; @qedr_destroy_cq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x1
	mov	x19, x0
	ldr	w0, [x0]
	bl	_get_qedr_dev
	mov	x21, x0
	mov	x0, x19
	bl	_get_qedr_cq
	mov	x19, x0
Lloh0:
	adrp	x8, _QEDR_MSG_CQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QEDR_MSG_CQ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w4, [x0, #36]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	mov	x3, x19
	bl	_DP_DEBUG
	mov	w8, #1
	str	w8, [x19]
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x9, _QEDR_CQ_TYPE_GSI@GOTPAGE
Lloh6:
	ldr	x9, [x9, _QEDR_CQ_TYPE_GSI@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_12
; %bb.1:
	ldr	w8, [x19, #36]
	str	w8, [sp]
	ldr	x8, [x21, #8]
	ldr	x8, [x8, #8]
	ldr	w0, [x21, #16]
	mov	x1, sp
	add	x2, sp, #8
	blr	x8
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	w0, [x21]
	add	x1, x19, #32
	blr	x8
	cbz	x20, LBB0_3
; %bb.2:
	add	x1, x19, #28
	ldr	w2, [x19, #24]
	mov	x0, x21
	bl	_qedr_free_pbl
	ldr	w0, [x19, #20]
	bl	_ib_umem_release
LBB0_3:
Lloh8:
	adrp	x21, _QEDR_DESTROY_CQ_MAX_ITERATIONS@GOTPAGE
Lloh9:
	ldr	x21, [x21, _QEDR_DESTROY_CQ_MAX_ITERATIONS@GOTPAGEOFF]
	ldr	w22, [x21]
	ldr	x23, [sp, #8]
	ldr	w0, [x19, #16]
	bl	_READ_ONCE
Lloh10:
	adrp	x20, _QEDR_DESTROY_CQ_ITER_DURATION@GOTPAGE
Lloh11:
	ldr	x20, [x20, _QEDR_DESTROY_CQ_ITER_DURATION@GOTPAGEOFF]
	cmp	x23, x0
	b.eq	LBB0_8
; %bb.4:
	cbz	w22, LBB0_8
; %bb.5:
	sub	w22, w22, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	bl	_udelay
	ldr	x23, [sp, #8]
	ldr	w0, [x19, #16]
	bl	_READ_ONCE
	subs	w22, w22, #1
	cset	w8, hs
	cmp	x23, x0
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	tbnz	w8, #0, LBB0_6
LBB0_8:
	ldr	w21, [x21]
	ldr	x22, [sp, #8]
	ldr	w0, [x19, #16]
	bl	_READ_ONCE
	cmp	x22, x0
	ccmp	w21, #0, #4, ne
	b.eq	LBB0_12
; %bb.9:
	sub	w21, w21, #1
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	bl	_msleep
	ldr	x22, [sp, #8]
	ldr	w0, [x19, #16]
	bl	_READ_ONCE
	subs	w21, w21, #1
	cset	w8, hs
	cmp	x22, x0
	b.eq	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	tbnz	w8, #0, LBB0_10
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_QEDR_MSG_CQ,4,2                ; @QEDR_MSG_CQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"destroy cq %p (icid=%d)\n"

	.comm	_QEDR_CQ_TYPE_GSI,8,3           ; @QEDR_CQ_TYPE_GSI
	.comm	_QEDR_DESTROY_CQ_MAX_ITERATIONS,4,2 ; @QEDR_DESTROY_CQ_MAX_ITERATIONS
	.comm	_QEDR_DESTROY_CQ_ITER_DURATION,4,2 ; @QEDR_DESTROY_CQ_ITER_DURATION
.subsections_via_symbols
