	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmci_ctx_notify_dbell          ## -- Begin function vmci_ctx_notify_dbell
	.p2align	4, 0x90
_vmci_ctx_notify_dbell:                 ## @vmci_ctx_notify_dbell
	.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	%rcx, %r14
	movl	%edx, %r15d
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	%rsi, %rdi
	movl	%edx, %esi
	callq	_vmci_handle_is_invalid
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_VMCI_ERROR_INVALID_ARGS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_28
LBB0_2:
	movq	%r13, %rdi
	callq	_vmci_ctx_get
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	cmpq	%r13, %r12
	jne	LBB0_5
LBB0_17:
	movq	_VMCI_HOST_CONTEXT_ID@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jne	LBB0_19
## %bb.18:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%r15d, %edx
	callq	_vmci_dbell_host_context_notify
	movl	%eax, %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_27
LBB0_3:
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_pr_devel
	movq	_VMCI_ERROR_NOT_FOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_28
LBB0_5:
	movq	%r12, %rdi
	callq	_VMCI_CONTEXT_IS_VM
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	%r13, %rdi
	callq	_VMCI_CONTEXT_IS_VM
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_pr_devel
	movq	_VMCI_ERROR_DST_UNREACHABLE@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_8:
	leaq	-56(%rbp), %rdx
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_vmci_dbell_get_priv_flags
	movl	%eax, %ebx
	movq	_VMCI_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jge	LBB0_10
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
	movq	%r13, %rsi
	movl	%r15d, %edx
	callq	_pr_warn
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_27
LBB0_19:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_spin_lock
	movl	12(%r14), %edi
	movq	%r13, %rsi
	movl	%r15d, %edx
	callq	_vmci_handle_arr_has_entry
	testl	%eax, %eax
	je	LBB0_20
## %bb.21:
	movl	8(%r14), %edi
	movq	%r13, %rsi
	movl	%r15d, %edx
	callq	_vmci_handle_arr_has_entry
	testl	%eax, %eax
	je	LBB0_22
## %bb.24:
	movq	_VMCI_SUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_25
LBB0_10:
	movq	_VMCI_HOST_CONTEXT_ID@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	jne	LBB0_12
## %bb.11:
	movq	_VMCI_NO_PRIVILEGE_FLAGS@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jne	LBB0_13
LBB0_12:
	movq	%r12, %rdi
	callq	_vmci_context_get_priv_flags
	movq	%rax, %r14
LBB0_13:
	movq	-56(%rbp), %rsi
	movq	%r14, %rdi
	callq	_vmci_deny_interaction
	testq	%rax, %rax
	je	LBB0_17
## %bb.14:
	movq	_VMCI_ERROR_NO_ACCESS@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_27
LBB0_20:
	movq	_VMCI_ERROR_NOT_FOUND@GOTPCREL(%rip), %rax
LBB0_25:
	movl	(%rax), %ebx
LBB0_26:
	movq	%r14, %rdi
	callq	_spin_unlock
LBB0_27:
	movq	%r14, %rdi
	callq	_vmci_ctx_put
LBB0_28:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	leaq	8(%r14), %rdi
	movq	%r13, %rsi
	movl	%r15d, %edx
	callq	_vmci_handle_arr_append_entry
	movl	%eax, %ebx
	movq	_VMCI_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_26
## %bb.23:
	movq	%r14, %rdi
	callq	_ctx_signal_notify
	movq	%r14, %rdi
	addq	$4, %rdi
	callq	_wake_up
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_VMCI_ERROR_INVALID_ARGS,4,2    ## @VMCI_ERROR_INVALID_ARGS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid context (ID=0x%x)\n"

	.comm	_VMCI_ERROR_NOT_FOUND,4,2       ## @VMCI_ERROR_NOT_FOUND
L_.str.1:                               ## @.str.1
	.asciz	"Doorbell notification from VM to VM not supported (src=0x%x, dst=0x%x)\n"

	.comm	_VMCI_ERROR_DST_UNREACHABLE,4,2 ## @VMCI_ERROR_DST_UNREACHABLE
	.comm	_VMCI_SUCCESS,4,2               ## @VMCI_SUCCESS
L_.str.2:                               ## @.str.2
	.asciz	"Failed to get privilege flags for destination (handle=0x%x:0x%x)\n"

	.comm	_VMCI_HOST_CONTEXT_ID,8,3       ## @VMCI_HOST_CONTEXT_ID
	.comm	_VMCI_NO_PRIVILEGE_FLAGS,8,3    ## @VMCI_NO_PRIVILEGE_FLAGS
	.comm	_VMCI_ERROR_NO_ACCESS,4,2       ## @VMCI_ERROR_NO_ACCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmci_ctx_notify_dbell          ; -- Begin function vmci_ctx_notify_dbell
	.p2align	2
_vmci_ctx_notify_dbell:                 ; @vmci_ctx_notify_dbell
	.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
	mov	x24, x3
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
	mov	x0, x1
	mov	x1, x2
	bl	_vmci_handle_is_invalid
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _VMCI_ERROR_INVALID_ARGS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VMCI_ERROR_INVALID_ARGS@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	b	LBB0_23
LBB0_2:
	mov	x0, x20
	bl	_vmci_ctx_get
	cbz	x0, LBB0_6
; %bb.3:
	mov	x19, x0
	cmp	x20, x22
	b.ne	LBB0_7
LBB0_4:
Lloh3:
	adrp	x8, _VMCI_HOST_CONTEXT_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VMCI_HOST_CONTEXT_ID@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x20, x8
	b.ne	LBB0_12
; %bb.5:
	mov	x0, x22
	mov	x1, x20
	mov	x2, x21
	bl	_vmci_dbell_host_context_notify
	mov	x23, x0
	b	LBB0_22
LBB0_6:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_pr_devel
Lloh8:
	adrp	x8, _VMCI_ERROR_NOT_FOUND@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VMCI_ERROR_NOT_FOUND@GOTPAGEOFF]
Lloh10:
	ldr	w23, [x8]
	b	LBB0_23
LBB0_7:
	mov	x0, x22
	bl	_VMCI_CONTEXT_IS_VM
	cbz	x0, LBB0_10
; %bb.8:
	mov	x0, x20
	bl	_VMCI_CONTEXT_IS_VM
	cbz	x0, LBB0_10
; %bb.9:
	str	x20, [sp]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	bl	_pr_devel
Lloh13:
	adrp	x8, _VMCI_ERROR_DST_UNREACHABLE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VMCI_ERROR_DST_UNREACHABLE@GOTPAGEOFF]
Lloh15:
	ldr	w23, [x8]
	b	LBB0_22
LBB0_10:
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x21
	bl	_vmci_dbell_get_priv_flags
Lloh16:
	adrp	x8, _VMCI_SUCCESS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _VMCI_SUCCESS@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ge	LBB0_15
; %bb.11:
	mov	x23, x0
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	bl	_pr_warn
	b	LBB0_22
LBB0_12:
	mov	x0, x19
	bl	_spin_lock
	ldr	w0, [x19, #12]
	mov	x1, x20
	mov	x2, x21
	bl	_vmci_handle_arr_has_entry
	cbz	w0, LBB0_19
; %bb.13:
	mov	x22, x19
	ldr	w0, [x22, #8]!
	mov	x1, x20
	mov	x2, x21
	bl	_vmci_handle_arr_has_entry
	cbz	w0, LBB0_24
; %bb.14:
Lloh21:
	adrp	x8, _VMCI_SUCCESS@GOTPAGE
Lloh22:
	ldr	x8, [x8, _VMCI_SUCCESS@GOTPAGEOFF]
	b	LBB0_20
LBB0_15:
Lloh23:
	adrp	x8, _VMCI_HOST_CONTEXT_ID@GOTPAGE
Lloh24:
	ldr	x8, [x8, _VMCI_HOST_CONTEXT_ID@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
Lloh26:
	adrp	x9, _VMCI_NO_PRIVILEGE_FLAGS@GOTPAGE
Lloh27:
	ldr	x9, [x9, _VMCI_NO_PRIVILEGE_FLAGS@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x8, x22
	ccmp	x9, x24, #4, eq
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x22
	bl	_vmci_context_get_priv_flags
	mov	x24, x0
LBB0_17:
	ldr	x1, [sp, #8]
	mov	x0, x24
	bl	_vmci_deny_interaction
	cbz	x0, LBB0_4
; %bb.18:
Lloh29:
	adrp	x8, _VMCI_ERROR_NO_ACCESS@GOTPAGE
Lloh30:
	ldr	x8, [x8, _VMCI_ERROR_NO_ACCESS@GOTPAGEOFF]
Lloh31:
	ldr	w23, [x8]
	b	LBB0_22
LBB0_19:
Lloh32:
	adrp	x8, _VMCI_ERROR_NOT_FOUND@GOTPAGE
Lloh33:
	ldr	x8, [x8, _VMCI_ERROR_NOT_FOUND@GOTPAGEOFF]
LBB0_20:
	ldr	w23, [x8]
LBB0_21:
	mov	x0, x19
	bl	_spin_unlock
LBB0_22:
	mov	x0, x19
	bl	_vmci_ctx_put
LBB0_23:
	mov	x0, x23
	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
LBB0_24:
	mov	x0, x22
	mov	x1, x20
	mov	x2, x21
	bl	_vmci_handle_arr_append_entry
	mov	x23, x0
Lloh34:
	adrp	x8, _VMCI_SUCCESS@GOTPAGE
Lloh35:
	ldr	x8, [x8, _VMCI_SUCCESS@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_21
; %bb.25:
	mov	x0, x19
	bl	_ctx_signal_notify
	add	x0, x19, #4
	bl	_wake_up
	b	LBB0_21
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_VMCI_ERROR_INVALID_ARGS,4,2    ; @VMCI_ERROR_INVALID_ARGS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid context (ID=0x%x)\n"

	.comm	_VMCI_ERROR_NOT_FOUND,4,2       ; @VMCI_ERROR_NOT_FOUND
l_.str.1:                               ; @.str.1
	.asciz	"Doorbell notification from VM to VM not supported (src=0x%x, dst=0x%x)\n"

	.comm	_VMCI_ERROR_DST_UNREACHABLE,4,2 ; @VMCI_ERROR_DST_UNREACHABLE
	.comm	_VMCI_SUCCESS,4,2               ; @VMCI_SUCCESS
l_.str.2:                               ; @.str.2
	.asciz	"Failed to get privilege flags for destination (handle=0x%x:0x%x)\n"

	.comm	_VMCI_HOST_CONTEXT_ID,8,3       ; @VMCI_HOST_CONTEXT_ID
	.comm	_VMCI_NO_PRIVILEGE_FLAGS,8,3    ; @VMCI_NO_PRIVILEGE_FLAGS
	.comm	_VMCI_ERROR_NO_ACCESS,4,2       ; @VMCI_ERROR_NO_ACCESS
.subsections_via_symbols
