	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calc_left_cqes
_calc_left_cqes:                        ## @calc_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	%rdx, %rbx
	movq	%rsi, %r14
	movabsq	$9223372036854775807, %r15      ## imm = 0x7FFFFFFFFFFFFFFF
	andq	%rdi, %r15
	movq	%r15, %rdi
	callq	_abs_to_virt
	movq	%rax, %r12
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ipz_queue_abs_to_offset
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_ehca_gen_err
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_2:
	movl	(%rbx), %edi
	movl	8(%rbx), %esi
	callq	_next_index
	movl	%eax, %edi
	movq	-40(%rbp), %rax
	movq	(%r14), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_3
## %bb.4:
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %r14
	cmpl	%r14d, %edi
	jne	LBB0_6
	jmp	LBB0_9
LBB0_3:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r14d
	cmpl	%r14d, %edi
	jne	LBB0_6
LBB0_9:
	movl	%r14d, 4(%rbx)
	xorl	%eax, %eax
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	8(%rbx), %esi
	callq	_next_index
	movl	%eax, %edi
	cmpl	%r14d, %eax
	je	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %rax
	movl	%edi, %ecx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incl	12(%rbx)
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid offset for calculating left cqes wqe_p=%#llx wqe_v=%p\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_calc_left_cqes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_left_cqes
_calc_left_cqes:                        ; @calc_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, x2
	mov	x20, x1
	and	x21, x0, #0x7fffffffffffffff
	mov	x0, x21
	bl	_abs_to_virt
	mov	x22, x0
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x21
	bl	_ipz_queue_abs_to_offset
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x22
	bl	_ehca_gen_err
Lloh2:
	adrp	x8, _EFAULT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_2:
	ldr	w0, [x19]
	ldr	w1, [x19, #8]
	bl	_next_index
	ldr	x8, [sp, #8]
	ldr	x9, [x20]
	udiv	x20, x8, x9
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x19, #8]
	bl	_next_index
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w0, w20
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #16]
	ldr	x8, [x8, w0, uxtw #3]
	cbz	x8, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
	b	LBB0_3
LBB0_7:
	mov	w0, #0
	str	w20, [x19, #4]
LBB0_8:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid offset for calculating left cqes wqe_p=%#llx wqe_v=%p\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_calc_left_cqes
.subsections_via_symbols
