	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmci_ctx_get_chkpt_doorbells
_vmci_ctx_get_chkpt_doorbells:          ## @vmci_ctx_get_chkpt_doorbells
	.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	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movl	(%rdi), %edi
	callq	_vmci_handle_arr_get_size
	testl	%eax, %eax
	jle	LBB0_8
## %bb.1:
	movl	%eax, %r15d
	leaq	(,%r15,4), %r12
	movslq	(%rbx), %rax
	cmpq	%rax, %r12
	jbe	LBB0_3
## %bb.2:
	movl	%r12d, (%rbx)
	movq	_VMCI_ERROR_MORE_DATA@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movl	$0, (%rbx)
	movq	$0, (%r14)
	jmp	LBB0_9
LBB0_3:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	movl	%r14d, %esi
	callq	_vmci_handle_arr_get_entry
	movl	%eax, (%rbx,%r14,4)
	incq	%r14
	cmpq	%r14, %r15
	jne	LBB0_6
## %bb.7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%r12d, (%rax)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
LBB0_9:
	movq	_VMCI_SUCCESS@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_VMCI_ERROR_NO_MEM@GOTPCREL(%rip), %rax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_VMCI_ERROR_MORE_DATA,4,2       ## @VMCI_ERROR_MORE_DATA
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_VMCI_ERROR_NO_MEM,4,2          ## @VMCI_ERROR_NO_MEM
	.comm	_VMCI_SUCCESS,4,2               ## @VMCI_SUCCESS
	.no_dead_strip	_vmci_ctx_get_chkpt_doorbells
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmci_ctx_get_chkpt_doorbells
_vmci_ctx_get_chkpt_doorbells:          ; @vmci_ctx_get_chkpt_doorbells
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	w0, [x0]
	bl	_vmci_handle_arr_get_size
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.1:
	mov	w25, w0
	lsl	x22, x25, #2
	ldrsw	x8, [x20]
	cmp	x22, x8
	b.ls	LBB0_4
; %bb.2:
	str	w22, [x20]
Lloh0:
	adrp	x8, _VMCI_ERROR_MORE_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VMCI_ERROR_MORE_DATA@GOTPAGEOFF]
	b	LBB0_9
LBB0_3:
	str	wzr, [x20]
	str	xzr, [x19]
	b	LBB0_8
LBB0_4:
Lloh2:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_kmalloc
	cbz	x0, LBB0_10
; %bb.5:
	mov	x23, x0
	mov	x24, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	mov	x1, x24
	bl	_vmci_handle_arr_get_entry
	str	w0, [x23, x24, lsl #2]
	add	x24, x24, #1
	cmp	x25, x24
	b.ne	LBB0_6
; %bb.7:
	str	w22, [x20]
	str	x23, [x19]
LBB0_8:
Lloh5:
	adrp	x8, _VMCI_SUCCESS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VMCI_SUCCESS@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh7:
	adrp	x8, _VMCI_ERROR_NO_MEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _VMCI_ERROR_NO_MEM@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_VMCI_ERROR_MORE_DATA,4,2       ; @VMCI_ERROR_MORE_DATA
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_VMCI_ERROR_NO_MEM,4,2          ; @VMCI_ERROR_NO_MEM
	.comm	_VMCI_SUCCESS,4,2               ; @VMCI_SUCCESS
	.no_dead_strip	_vmci_ctx_get_chkpt_doorbells
.subsections_via_symbols
