	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmci_ctx_get_chkpt_state       ## -- Begin function vmci_ctx_get_chkpt_state
	.p2align	4, 0x90
_vmci_ctx_get_chkpt_state:              ## @vmci_ctx_get_chkpt_state
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r15
	movl	%esi, %r12d
	callq	_vmci_ctx_get
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_spin_lock
	cmpl	$128, %r12d
	je	LBB0_6
## %bb.3:
	cmpl	$130, %r12d
	je	LBB0_7
## %bb.4:
	cmpl	$129, %r12d
	jne	LBB0_8
## %bb.5:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_vmci_ctx_get_chkpt_notifiers
	movl	%eax, %r14d
	jmp	LBB0_10
LBB0_1:
	movq	_VMCI_ERROR_NOT_FOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_11
LBB0_6:
	movl	$0, (%r15)
	movq	$0, (%r14)
	movq	_VMCI_SUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_vmci_ctx_get_chkpt_doorbells
	movl	%eax, %r14d
	jmp	LBB0_10
LBB0_8:
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	callq	_pr_devel
	movq	_VMCI_ERROR_INVALID_ARGS@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %r14d
LBB0_10:
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	%rbx, %rdi
	callq	_vmci_ctx_put
LBB0_11:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VMCI_ERROR_NOT_FOUND,4,2       ## @VMCI_ERROR_NOT_FOUND
	.comm	_VMCI_SUCCESS,4,2               ## @VMCI_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid cpt state (type=%d)\n"

	.comm	_VMCI_ERROR_INVALID_ARGS,4,2    ## @VMCI_ERROR_INVALID_ARGS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmci_ctx_get_chkpt_state       ; -- Begin function vmci_ctx_get_chkpt_state
	.p2align	2
_vmci_ctx_get_chkpt_state:              ; @vmci_ctx_get_chkpt_state
	.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	x20, x3
	mov	x21, x2
	mov	x22, x1
	bl	_vmci_ctx_get
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	bl	_spin_lock
	cmp	w22, #128
	b.eq	LBB0_6
; %bb.2:
	cmp	w22, #130
	b.eq	LBB0_7
; %bb.3:
	cmp	w22, #129
	b.ne	LBB0_8
; %bb.4:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_vmci_ctx_get_chkpt_notifiers
	mov	x20, x0
	b	LBB0_10
LBB0_5:
Lloh0:
	adrp	x8, _VMCI_ERROR_NOT_FOUND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VMCI_ERROR_NOT_FOUND@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	b	LBB0_11
LBB0_6:
	str	wzr, [x21]
	str	xzr, [x20]
Lloh3:
	adrp	x8, _VMCI_SUCCESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VMCI_SUCCESS@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_vmci_ctx_get_chkpt_doorbells
	mov	x20, x0
	b	LBB0_10
LBB0_8:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_pr_devel
Lloh7:
	adrp	x8, _VMCI_ERROR_INVALID_ARGS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _VMCI_ERROR_INVALID_ARGS@GOTPAGEOFF]
LBB0_9:
	ldr	w20, [x8]
LBB0_10:
	mov	x0, x19
	bl	_spin_unlock
	mov	x0, x19
	bl	_vmci_ctx_put
LBB0_11:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_VMCI_ERROR_NOT_FOUND,4,2       ; @VMCI_ERROR_NOT_FOUND
	.comm	_VMCI_SUCCESS,4,2               ; @VMCI_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid cpt state (type=%d)\n"

	.comm	_VMCI_ERROR_INVALID_ARGS,4,2    ; @VMCI_ERROR_INVALID_ARGS
.subsections_via_symbols
