	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmci_ctx_set_chkpt_state       ## -- Begin function vmci_ctx_set_chkpt_state
	.p2align	4, 0x90
_vmci_ctx_set_chkpt_state:              ## @vmci_ctx_set_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	%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
	movq	%rcx, %r15
	movl	%edi, %r12d
	cmpl	$4, %edx
	jl	LBB0_3
## %bb.1:
	movq	_VMCI_WELLKNOWN_CPT_STATE@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_pr_warn
	movq	_VMCI_ERROR_OBSOLETE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_12
LBB0_3:
	movq	_VMCI_NOTIFICATION_CPT_STATE@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_6
## %bb.4:
	movq	_VMCI_SUCCESS@GOTPCREL(%rip), %rdi
	cmpl	$4, %edx
	jl	LBB0_5
## %bb.7:
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	sarl	$2, %edx
	movslq	%edx, %r14
	movl	$1, %r13d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	-4(%r15,%r13,4), %esi
	movq	%rdi, %rbx
	movl	%r12d, %edi
	callq	_vmci_ctx_add_notification
	movq	%rbx, %rdi
	movl	%eax, %ebx
	movl	(%rdi), %eax
	cmpl	%eax, %ebx
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	leaq	1(%r13), %rcx
	cmpq	%r14, %r13
	movq	%rcx, %r13
	jl	LBB0_8
LBB0_10:
	cmpl	%eax, %ebx
	je	LBB0_12
## %bb.11:
	leaq	L_.str.2(%rip), %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_pr_devel
	movl	%ebx, %eax
	jmp	LBB0_12
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_devel
	movq	_VMCI_ERROR_INVALID_ARGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_12
LBB0_5:
	movl	(%rdi), %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VMCI_SUCCESS,4,2               ## @VMCI_SUCCESS
	.comm	_VMCI_WELLKNOWN_CPT_STATE,4,2   ## @VMCI_WELLKNOWN_CPT_STATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Attempt to restore checkpoint with obsolete wellknown handles\n"

	.comm	_VMCI_ERROR_OBSOLETE,4,2        ## @VMCI_ERROR_OBSOLETE
	.comm	_VMCI_NOTIFICATION_CPT_STATE,4,2 ## @VMCI_NOTIFICATION_CPT_STATE
L_.str.1:                               ## @.str.1
	.asciz	"Invalid cpt state (type=%d)\n"

	.comm	_VMCI_ERROR_INVALID_ARGS,4,2    ## @VMCI_ERROR_INVALID_ARGS
L_.str.2:                               ## @.str.2
	.asciz	"Failed to set cpt state (type=%d) (error=%d)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmci_ctx_set_chkpt_state       ; -- Begin function vmci_ctx_set_chkpt_state
	.p2align	2
_vmci_ctx_set_chkpt_state:              ; @vmci_ctx_set_chkpt_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x3
	mov	x19, x1
	mov	x21, x0
	cmp	w2, #4
	b.lt	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _VMCI_WELLKNOWN_CPT_STATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VMCI_WELLKNOWN_CPT_STATE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_3
; %bb.2:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
Lloh5:
	adrp	x8, _VMCI_ERROR_OBSOLETE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VMCI_ERROR_OBSOLETE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_11
LBB0_3:
Lloh8:
	adrp	x8, _VMCI_NOTIFICATION_CPT_STATE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VMCI_NOTIFICATION_CPT_STATE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_9
; %bb.4:
Lloh11:
	adrp	x23, _VMCI_SUCCESS@GOTPAGE
Lloh12:
	ldr	x23, [x23, _VMCI_SUCCESS@GOTPAGEOFF]
	cmp	w2, #4
	b.lt	LBB0_10
; %bb.5:
	mov	x24, #0
	asr	w8, w2, #2
	sxtw	x25, w8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20, x24, lsl #2]
	mov	x0, x21
	bl	_vmci_ctx_add_notification
	mov	x22, x0
	ldr	w0, [x23]
	add	x24, x24, #1
	cmp	w22, w0
	ccmp	x24, x25, #0, eq
	b.lt	LBB0_6
; %bb.7:
	cmp	w22, w0
	b.eq	LBB0_11
; %bb.8:
	str	x22, [sp]
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_pr_devel
	mov	x0, x22
	b	LBB0_11
LBB0_9:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_pr_devel
Lloh17:
	adrp	x8, _VMCI_ERROR_INVALID_ARGS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VMCI_ERROR_INVALID_ARGS@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	b	LBB0_11
LBB0_10:
	ldr	w0, [x23]
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_VMCI_SUCCESS,4,2               ; @VMCI_SUCCESS
	.comm	_VMCI_WELLKNOWN_CPT_STATE,4,2   ; @VMCI_WELLKNOWN_CPT_STATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Attempt to restore checkpoint with obsolete wellknown handles\n"

	.comm	_VMCI_ERROR_OBSOLETE,4,2        ; @VMCI_ERROR_OBSOLETE
	.comm	_VMCI_NOTIFICATION_CPT_STATE,4,2 ; @VMCI_NOTIFICATION_CPT_STATE
l_.str.1:                               ; @.str.1
	.asciz	"Invalid cpt state (type=%d)\n"

	.comm	_VMCI_ERROR_INVALID_ARGS,4,2    ; @VMCI_ERROR_INVALID_ARGS
l_.str.2:                               ; @.str.2
	.asciz	"Failed to set cpt state (type=%d) (error=%d)\n"

.subsections_via_symbols
