	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmci_handle_arr_append_entry   ## -- Begin function vmci_handle_arr_append_entry
	.p2align	4, 0x90
_vmci_handle_arr_append_entry:          ## @vmci_handle_arr_append_entry
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	(%rdi), %rbx
	movq	(%rbx), %rax
	xorl	%edi, %edi
	cmpq	8(%rbx), %rax
	setae	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	8(%rbx), %rsi
	movq	16(%rbx), %rdi
	subq	%rsi, %rdi
	callq	_min
	movq	%rax, %r12
	movq	8(%rbx), %rdi
	addq	%rax, %rdi
	callq	_handle_arr_calc_size
	movq	(%rbx), %rcx
	movq	_VMCI_ERROR_NO_MEM@GOTPCREL(%rip), %r13
	cmpq	16(%rbx), %rcx
	jae	LBB0_5
## %bb.2:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_krealloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%rax, %rbx
	addq	%r12, 8(%rax)
	movq	%rax, (%r15)
LBB0_4:
	movq	(%rbx), %rax
	movq	24(%rbx), %rcx
	movl	%r14d, (%rcx,%rax,4)
	incq	(%rbx)
	movq	_VMCI_SUCCESS@GOTPCREL(%rip), %r13
LBB0_5:
	movl	(%r13), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VMCI_ERROR_NO_MEM,4,2          ## @VMCI_ERROR_NO_MEM
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_VMCI_SUCCESS,4,2               ## @VMCI_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmci_handle_arr_append_entry   ; -- Begin function vmci_handle_arr_append_entry
	.p2align	2
_vmci_handle_arr_append_entry:          ; @vmci_handle_arr_append_entry
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
	mov	x21, x0
	ldr	x20, [x0]
	ldp	x8, x9, [x20]
	cmp	x8, x9
	cset	w0, hs
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.1:
	ldp	x1, x8, [x20, #8]
	sub	x0, x8, x1
	bl	_min
	mov	x22, x0
	ldr	x8, [x20, #8]
	add	x0, x8, x0
	bl	_handle_arr_calc_size
	ldr	x8, [x20]
	ldr	x9, [x20, #16]
	cmp	x8, x9
	b.hs	LBB0_5
; %bb.2:
	mov	x1, x0
Lloh0:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_krealloc
	cbz	x0, LBB0_5
; %bb.3:
	mov	x20, x0
	ldr	x8, [x0, #8]
	add	x8, x8, x22
	str	x8, [x0, #8]
	str	x0, [x21]
LBB0_4:
	ldr	x8, [x20, #24]
	ldr	x9, [x20]
	str	w19, [x8, x9, lsl #2]
	ldr	x8, [x20]
	add	x8, x8, #1
	str	x8, [x20]
Lloh3:
	adrp	x8, _VMCI_SUCCESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VMCI_SUCCESS@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh5:
	adrp	x8, _VMCI_ERROR_NO_MEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VMCI_ERROR_NO_MEM@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_VMCI_ERROR_NO_MEM,4,2          ; @VMCI_ERROR_NO_MEM
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_VMCI_SUCCESS,4,2               ; @VMCI_SUCCESS
.subsections_via_symbols
