	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmci_send_datagram             ## -- Begin function vmci_send_datagram
	.p2align	4, 0x90
_vmci_send_datagram:                    ## @vmci_send_datagram
	.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_1
## %bb.2:
	movq	%rdi, %rbx
	movq	_vmci_dev_spinlock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movq	_vmci_dev_g@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_VMCI_DATA_OUT_ADDR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r14
	addq	(%rax), %r14
	movq	%rbx, %rdi
	callq	_VMCI_DG_SIZE
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_iowrite8_rep
	movq	(%r15), %rax
	movq	_VMCI_RESULT_LOW_ADDR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	addq	(%rax), %rdi
	callq	_ioread32
	movl	%eax, %ebx
	jmp	LBB0_5
LBB0_1:
	movq	_VMCI_ERROR_INVALID_ARGS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_6
LBB0_4:
	movq	_VMCI_ERROR_UNAVAILABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_5:
	movq	_vmci_dev_spinlock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VMCI_ERROR_INVALID_ARGS,4,2    ## @VMCI_ERROR_INVALID_ARGS
	.comm	_vmci_dev_spinlock,4,2          ## @vmci_dev_spinlock
	.comm	_vmci_dev_g,8,3                 ## @vmci_dev_g
	.comm	_VMCI_DATA_OUT_ADDR,8,3         ## @VMCI_DATA_OUT_ADDR
	.comm	_VMCI_RESULT_LOW_ADDR,8,3       ## @VMCI_RESULT_LOW_ADDR
	.comm	_VMCI_ERROR_UNAVAILABLE,4,2     ## @VMCI_ERROR_UNAVAILABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmci_send_datagram             ; -- Begin function vmci_send_datagram
	.p2align	2
_vmci_send_datagram:                    ; @vmci_send_datagram
	.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_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x0, _vmci_dev_spinlock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _vmci_dev_spinlock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
Lloh2:
	adrp	x21, _vmci_dev_g@GOTPAGE
Lloh3:
	ldr	x21, [x21, _vmci_dev_g@GOTPAGEOFF]
	ldr	x8, [x21]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	x8, [x8]
Lloh4:
	adrp	x9, _VMCI_DATA_OUT_ADDR@GOTPAGE
Lloh5:
	ldr	x9, [x9, _VMCI_DATA_OUT_ADDR@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	add	x20, x9, x8
	mov	x0, x19
	bl	_VMCI_DG_SIZE
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	bl	_iowrite8_rep
	ldr	x8, [x21]
	ldr	x8, [x8]
Lloh7:
	adrp	x9, _VMCI_RESULT_LOW_ADDR@GOTPAGE
Lloh8:
	ldr	x9, [x9, _VMCI_RESULT_LOW_ADDR@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_ioread32
	mov	x19, x0
	b	LBB0_5
LBB0_3:
Lloh10:
	adrp	x8, _VMCI_ERROR_INVALID_ARGS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VMCI_ERROR_INVALID_ARGS@GOTPAGEOFF]
Lloh12:
	ldr	w19, [x8]
	b	LBB0_6
LBB0_4:
Lloh13:
	adrp	x8, _VMCI_ERROR_UNAVAILABLE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VMCI_ERROR_UNAVAILABLE@GOTPAGEOFF]
Lloh15:
	ldr	w19, [x8]
LBB0_5:
Lloh16:
	adrp	x0, _vmci_dev_spinlock@GOTPAGE
Lloh17:
	ldr	x0, [x0, _vmci_dev_spinlock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
LBB0_6:
	mov	x0, x19
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_VMCI_ERROR_INVALID_ARGS,4,2    ; @VMCI_ERROR_INVALID_ARGS
	.comm	_vmci_dev_spinlock,4,2          ; @vmci_dev_spinlock
	.comm	_vmci_dev_g,8,3                 ; @vmci_dev_g
	.comm	_VMCI_DATA_OUT_ADDR,8,3         ; @VMCI_DATA_OUT_ADDR
	.comm	_VMCI_RESULT_LOW_ADDR,8,3       ; @VMCI_RESULT_LOW_ADDR
	.comm	_VMCI_ERROR_UNAVAILABLE,4,2     ; @VMCI_ERROR_UNAVAILABLE
.subsections_via_symbols
