	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qp_alloc_hypercall
_qp_alloc_hypercall:                    ## @qp_alloc_hypercall
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rdi, %rbx
	cmpl	$2, (%rdi)
	jg	LBB0_3
LBB0_2:
	movq	_VMCI_ERROR_INVALID_ARGS@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	xorl	%eax, %eax
	callq	_vmci_use_ppn64
	movslq	(%rbx), %rax
	leaq	48(,%rax,4), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	%rax, %r14
	movq	_VMCI_HYPERVISOR_CONTEXT_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_VMCI_QUEUEPAIR_ALLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_vmci_make_handle
	movl	%eax, 20(%r14)
	movq	_VMCI_ANON_SRC_HANDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movq	_VMCI_DG_HEADERSIZE@GOTPCREL(%rip), %rax
	subq	(%rax), %r15
	movq	%r15, 8(%r14)
	movl	24(%rbx), %eax
	movl	%eax, 40(%r14)
	movups	8(%rbx), %xmm0
	movups	%xmm0, 24(%r14)
	movl	(%rbx), %eax
	movl	%eax, (%r14)
	leaq	192(%r14), %rdi
	addq	$4, %rbx
	movq	%rbx, %rsi
	callq	_qp_populate_ppn_set
	movl	%eax, %ebx
	movq	_VMCI_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	addq	$8, %rdi
	callq	_vmci_send_datagram
	movl	%eax, %ebx
LBB0_6:
	movq	%r14, %rdi
	callq	_kfree
	jmp	LBB0_9
LBB0_7:
	movq	_VMCI_ERROR_NO_MEM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_VMCI_ERROR_INVALID_ARGS,4,2    ## @VMCI_ERROR_INVALID_ARGS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_VMCI_ERROR_NO_MEM,4,2          ## @VMCI_ERROR_NO_MEM
	.comm	_VMCI_HYPERVISOR_CONTEXT_ID,4,2 ## @VMCI_HYPERVISOR_CONTEXT_ID
	.comm	_VMCI_QUEUEPAIR_ALLOC,4,2       ## @VMCI_QUEUEPAIR_ALLOC
	.comm	_VMCI_ANON_SRC_HANDLE,4,2       ## @VMCI_ANON_SRC_HANDLE
	.comm	_VMCI_DG_HEADERSIZE,8,3         ## @VMCI_DG_HEADERSIZE
	.comm	_VMCI_SUCCESS,4,2               ## @VMCI_SUCCESS
	.no_dead_strip	_qp_alloc_hypercall
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qp_alloc_hypercall
_qp_alloc_hypercall:                    ; @qp_alloc_hypercall
	.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
	cbz	x0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, #2
	b.gt	LBB0_5
LBB0_2:
Lloh0:
	adrp	x8, _VMCI_ERROR_INVALID_ARGS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VMCI_ERROR_INVALID_ARGS@GOTPAGEOFF]
LBB0_3:
	ldr	w20, [x8]
LBB0_4:
	mov	x0, x20
	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
LBB0_5:
	bl	_vmci_use_ppn64
	ldrsw	x8, [x20]
	lsl	x8, x8, #2
	add	x21, x8, #48
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_kmalloc
	cbz	x0, LBB0_9
; %bb.6:
	mov	x19, x0
Lloh5:
	adrp	x8, _VMCI_HYPERVISOR_CONTEXT_ID@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VMCI_HYPERVISOR_CONTEXT_ID@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _VMCI_QUEUEPAIR_ALLOC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VMCI_QUEUEPAIR_ALLOC@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_vmci_make_handle
Lloh11:
	adrp	x8, _VMCI_DG_HEADERSIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VMCI_DG_HEADERSIZE@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	sub	x8, x21, x8
	mov	x21, x19
	str	x8, [x21, #8]!
Lloh14:
	adrp	x8, _VMCI_ANON_SRC_HANDLE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VMCI_ANON_SRC_HANDLE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	stp	w8, w0, [x19, #16]
	ldr	w8, [x20, #24]
	str	w8, [x19, #40]
	ldur	q0, [x20, #8]
	stur	q0, [x19, #24]
	ldr	w8, [x20]
	str	w8, [x19]
	add	x0, x19, #192
	add	x1, x20, #4
	bl	_qp_populate_ppn_set
	mov	x20, x0
Lloh17:
	adrp	x8, _VMCI_SUCCESS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VMCI_SUCCESS@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x21
	bl	_vmci_send_datagram
	mov	x20, x0
LBB0_8:
	mov	x0, x19
	bl	_kfree
	b	LBB0_4
LBB0_9:
Lloh20:
	adrp	x8, _VMCI_ERROR_NO_MEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _VMCI_ERROR_NO_MEM@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_VMCI_ERROR_INVALID_ARGS,4,2    ; @VMCI_ERROR_INVALID_ARGS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_VMCI_ERROR_NO_MEM,4,2          ; @VMCI_ERROR_NO_MEM
	.comm	_VMCI_HYPERVISOR_CONTEXT_ID,4,2 ; @VMCI_HYPERVISOR_CONTEXT_ID
	.comm	_VMCI_QUEUEPAIR_ALLOC,4,2       ; @VMCI_QUEUEPAIR_ALLOC
	.comm	_VMCI_ANON_SRC_HANDLE,4,2       ; @VMCI_ANON_SRC_HANDLE
	.comm	_VMCI_DG_HEADERSIZE,8,3         ; @VMCI_DG_HEADERSIZE
	.comm	_VMCI_SUCCESS,4,2               ; @VMCI_SUCCESS
	.no_dead_strip	_qp_alloc_hypercall
.subsections_via_symbols
