	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_for_left_cqes
_check_for_left_cqes:                   ## @check_for_left_cqes
	.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
	movq	(%rdi), %rax
	movq	_EQPT_SRQBASE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.5:
	movq	16(%rbx), %rdi
	callq	_spin_lock_irqsave
	movq	$0, 48(%rbx)
	movl	56(%rbx), %esi
	movl	60(%rbx), %edi
	callq	_next_index
	movq	%rax, 64(%rbx)
	movq	16(%rbx), %rdi
	callq	_spin_unlock_irqrestore
	movq	8(%rbx), %rdi
	callq	_spin_lock_irqsave
	movq	$0, 24(%rbx)
	movl	32(%rbx), %esi
	movl	36(%rbx), %edi
	callq	_next_index
	movq	%rax, 40(%rbx)
	movq	8(%rbx), %rdi
	callq	_spin_unlock_irqrestore
LBB0_6:
	xorl	%r14d, %r14d
	cmpq	$0, 48(%rbx)
	jne	LBB0_10
## %bb.7:
	cmpq	$0, 24(%rbx)
	jne	LBB0_10
## %bb.8:
	movq	16(%rbx), %rdi
	callq	_spin_lock_irqsave
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ehca_add_to_err_list
	movq	16(%rbx), %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	callq	_HAS_RQ
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	8(%rbx), %rdi
	callq	_spin_lock_irqsave
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ehca_add_to_err_list
	movq	8(%rbx), %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_10
LBB0_1:
	movq	%rsi, %r14
	movl	88(%rbx), %r15d
	movl	4(%rsi), %edi
	movl	84(%rbx), %esi
	leaq	80(%rbx), %rdx
	leaq	-48(%rbp), %rcx
	leaq	-40(%rbp), %r8
	movl	$4, %r9d
	callq	_hipz_h_disable_and_get_wqe
	movq	%rax, %r12
	movq	_H_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jne	LBB0_2
## %bb.3:
	movq	16(%rbx), %rdi
	callq	_spin_lock_irqsave
	movq	-48(%rbp), %rdi
	leaq	76(%rbx), %rsi
	leaq	48(%rbx), %rdx
	callq	_calc_left_cqes
	movl	%eax, %r14d
	movq	16(%rbx), %rdi
	callq	_spin_unlock_irqrestore
	testl	%r14d, %r14d
	jne	LBB0_10
## %bb.4:
	movq	8(%rbx), %rdi
	callq	_spin_lock_irqsave
	movq	-40(%rbp), %rdi
	leaq	72(%rbx), %rsi
	leaq	24(%rbx), %rdx
	callq	_calc_left_cqes
	movl	%eax, %r14d
	movq	8(%rbx), %rdi
	callq	_spin_unlock_irqrestore
	testl	%r14d, %r14d
	jne	LBB0_10
	jmp	LBB0_6
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	movl	%r15d, %ecx
	movq	%r12, %r8
	callq	_ehca_err
	movq	%r12, %rdi
	callq	_ehca2ib_return_code
	movl	%eax, %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EQPT_SRQBASE,8,3               ## @EQPT_SRQBASE
	.comm	_H_SUCCESS,8,3                  ## @H_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"disable_and_get_wqe() failed ehca_qp=%p qp_num=%x h_ret=%lli"

	.no_dead_strip	_check_for_left_cqes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_for_left_cqes
_check_for_left_cqes:                   ; @check_for_left_cqes
	.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	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _EQPT_SRQBASE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EQPT_SRQBASE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.1:
	ldr	x0, [x19, #16]
	bl	_spin_lock_irqsave
	str	xzr, [x19, #48]
	ldp	w1, w0, [x19, #56]
	bl	_next_index
	str	x0, [x19, #64]
	ldr	x0, [x19, #16]
	bl	_spin_unlock_irqrestore
	ldr	x0, [x19, #8]
	bl	_spin_lock_irqsave
	str	xzr, [x19, #24]
	ldp	w1, w0, [x19, #32]
	bl	_next_index
	str	x0, [x19, #40]
	ldr	x0, [x19, #8]
	bl	_spin_unlock_irqrestore
LBB0_2:
	ldr	x8, [x19, #48]
	cbnz	x8, LBB0_6
; %bb.3:
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_6
; %bb.4:
	ldr	x0, [x19, #16]
	bl	_spin_lock_irqsave
	mov	x0, x19
	mov	w1, #1
	bl	_ehca_add_to_err_list
	ldr	x0, [x19, #16]
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_HAS_RQ
	cbz	x0, LBB0_6
; %bb.5:
	ldr	x0, [x19, #8]
	bl	_spin_lock_irqsave
	mov	x0, x19
	mov	w1, #0
	bl	_ehca_add_to_err_list
	ldr	x0, [x19, #8]
	bl	_spin_unlock_irqrestore
LBB0_6:
	mov	w20, #0
	b	LBB0_11
LBB0_7:
	mov	x20, x1
	ldr	w0, [x1, #4]
	add	x2, x19, #80
	ldp	w1, w21, [x19, #84]
	add	x3, sp, #8
	mov	x4, sp
	mov	w5, #4
	bl	_hipz_h_disable_and_get_wqe
Lloh3:
	adrp	x8, _H_SUCCESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _H_SUCCESS@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.8:
	ldr	x0, [x19, #16]
	bl	_spin_lock_irqsave
	ldr	x0, [sp, #8]
	add	x1, x19, #76
	add	x2, x19, #48
	bl	_calc_left_cqes
	mov	x20, x0
	ldr	x0, [x19, #16]
	bl	_spin_unlock_irqrestore
	cbnz	w20, LBB0_11
; %bb.9:
	ldr	x0, [x19, #8]
	bl	_spin_lock_irqsave
	ldr	x0, [sp]
	add	x1, x19, #72
	add	x2, x19, #24
	bl	_calc_left_cqes
	mov	x20, x0
	ldr	x0, [x19, #8]
	bl	_spin_unlock_irqrestore
	cbnz	w20, LBB0_11
	b	LBB0_2
LBB0_10:
	mov	x22, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	mov	x3, x21
	mov	x4, x22
	bl	_ehca_err
	mov	x0, x22
	bl	_ehca2ib_return_code
	mov	x20, x0
LBB0_11:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EQPT_SRQBASE,8,3               ; @EQPT_SRQBASE
	.comm	_H_SUCCESS,8,3                  ; @H_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"disable_and_get_wqe() failed ehca_qp=%p qp_num=%x h_ret=%lli"

	.no_dead_strip	_check_for_left_cqes
.subsections_via_symbols
