	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmci_qpair_get_produce_indexes ## -- Begin function vmci_qpair_get_produce_indexes
	.p2align	4, 0x90
_vmci_qpair_get_produce_indexes:        ## @vmci_qpair_get_produce_indexes
	.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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_qp_lock
	leaq	-56(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_qp_get_queue_headers
	movl	%eax, %r15d
	movq	_VMCI_SUCCESS@GOTPCREL(%rip), %r13
	cmpl	(%r13), %eax
	jne	LBB0_4
## %bb.3:
	movq	-56(%rbp), %rdi
	movq	-48(%rbp), %rsi
	movq	%r12, %rdx
	movq	%r14, %rcx
	callq	_vmci_q_header_get_pointers
LBB0_4:
	movq	%rbx, %rdi
	callq	_qp_unlock
	cmpl	(%r13), %r15d
	jne	LBB0_11
## %bb.5:
	testq	%r12, %r12
	je	LBB0_7
## %bb.6:
	movq	(%r12), %rax
	cmpq	(%rbx), %rax
	jge	LBB0_9
LBB0_7:
	testq	%r14, %r14
	je	LBB0_11
## %bb.8:
	movq	(%r14), %rax
	cmpq	(%rbx), %rax
	jl	LBB0_11
LBB0_9:
	movq	_VMCI_ERROR_INVALID_SIZE@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_1:
	movq	_VMCI_ERROR_INVALID_ARGS@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %r15d
LBB0_11:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VMCI_ERROR_INVALID_ARGS,4,2    ## @VMCI_ERROR_INVALID_ARGS
	.comm	_VMCI_SUCCESS,4,2               ## @VMCI_SUCCESS
	.comm	_VMCI_ERROR_INVALID_SIZE,4,2    ## @VMCI_ERROR_INVALID_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmci_qpair_get_produce_indexes ; -- Begin function vmci_qpair_get_produce_indexes
	.p2align	2
_vmci_qpair_get_produce_indexes:        ; @vmci_qpair_get_produce_indexes
	.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
	cbz	x0, LBB0_9
; %bb.1:
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	bl	_qp_lock
	add	x1, sp, #8
	mov	x2, sp
	mov	x0, x21
	bl	_qp_get_queue_headers
	mov	x19, x0
Lloh0:
	adrp	x23, _VMCI_SUCCESS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _VMCI_SUCCESS@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.2:
	ldp	x1, x0, [sp]
	mov	x2, x22
	mov	x3, x20
	bl	_vmci_q_header_get_pointers
LBB0_3:
	mov	x0, x21
	bl	_qp_unlock
	ldr	w8, [x23]
	cmp	w19, w8
	b.ne	LBB0_11
; %bb.4:
	cbz	x22, LBB0_6
; %bb.5:
	ldr	x8, [x22]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ge	LBB0_8
LBB0_6:
	cbz	x20, LBB0_11
; %bb.7:
	ldr	x8, [x20]
	ldr	x9, [x21]
	cmp	x8, x9
	b.lt	LBB0_11
LBB0_8:
Lloh2:
	adrp	x8, _VMCI_ERROR_INVALID_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VMCI_ERROR_INVALID_SIZE@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh4:
	adrp	x8, _VMCI_ERROR_INVALID_ARGS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VMCI_ERROR_INVALID_ARGS@GOTPAGEOFF]
LBB0_10:
	ldr	w19, [x8]
LBB0_11:
	mov	x0, x19
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_VMCI_ERROR_INVALID_ARGS,4,2    ; @VMCI_ERROR_INVALID_ARGS
	.comm	_VMCI_SUCCESS,4,2               ; @VMCI_SUCCESS
	.comm	_VMCI_ERROR_INVALID_SIZE,4,2    ; @VMCI_ERROR_INVALID_SIZE
.subsections_via_symbols
