	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmci_ctx_create                ## -- Begin function vmci_ctx_create
	.p2align	4, 0x90
_vmci_ctx_create:                       ## @vmci_ctx_create
	.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	_VMCI_INVALID_ID@GOTPCREL(%rip), %r14
	cmpq	%rdi, (%r14)
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_devel
	jmp	LBB0_8
LBB0_2:
	movq	%rsi, %r13
	movq	_VMCI_PRIVILEGE_ALL_FLAGS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	notq	%rax
	testq	%rsi, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_pr_devel
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_17:
	negl	%ebx
	movl	%ebx, %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_4:
	movl	%ecx, %r15d
	testl	%ecx, %ecx
	je	LBB0_5
## %bb.6:
	movq	%r8, %r12
	movq	%rdi, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$104, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	96(%rax), %rdi
	callq	_kref_init
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	92(%rax), %rdi
	callq	_spin_lock_init
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	24(%rax), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_INIT_LIST_HEAD
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	88(%rax), %rdi
	callq	_INIT_LIST_HEAD
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	84(%rax), %rdi
	callq	_INIT_LIST_HEAD
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	addq	$80, %rdi
	callq	_init_waitqueue_head
	movq	_VMCI_MAX_GUEST_QP_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_vmci_handle_arr_create
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, 8(%rdi)
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	_VMCI_MAX_GUEST_DOORBELL_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_vmci_handle_arr_create
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 16(%rcx)
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	_VMCI_MAX_GUEST_DOORBELL_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_vmci_handle_arr_create
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 72(%rcx)
	testq	%rax, %rax
	je	LBB0_14
## %bb.18:
	movl	%r15d, (%rcx)
	movq	%r13, 64(%rcx)
	testq	%r12, %r12
	je	LBB0_20
## %bb.19:
	movq	%r12, %rdi
	callq	_get_cred
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 56(%rcx)
LBB0_20:
	movq	_ctx_dummy_notify@GOTPCREL(%rip), %rax
	movq	%rax, 48(%rcx)
	movq	$0, 40(%rcx)
	movq	_ctx_list@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_spin_lock
	movq	%rbx, %rdi
	callq	_vmci_ctx_exists
	testq	%rax, %rax
	je	LBB0_25
## %bb.21:
	movq	_VMCI_RESERVED_CID_LIMIT@GOTPCREL(%rip), %r12
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_22 Depth=1
	movq	%rbx, %rdi
	callq	_vmci_ctx_exists
	testq	%rax, %rax
	je	LBB0_25
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rsi
	decq	%rsi
	movq	%rbx, %rdi
	callq	_max
	movq	%rax, %rbx
	incq	%rbx
	cmpq	(%r14), %rbx
	jne	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	movq	(%r12), %rbx
	jmp	LBB0_24
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_pr_devel
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str.3(%rip), %rdi
	callq	_pr_warn
	jmp	LBB0_8
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_16
LBB0_25:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%rbx, 32(%r14)
	leaq	4(%r15), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_list_add_tail_rcu
	movq	%r15, %rdi
	callq	_spin_unlock
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_15
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rdi
	callq	_vmci_handle_arr_destroy
LBB0_15:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	callq	_vmci_handle_arr_destroy
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_16:
	callq	_kfree
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_VMCI_INVALID_ID,8,3            ## @VMCI_INVALID_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid context ID for VMCI context\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VMCI_PRIVILEGE_ALL_FLAGS,8,3   ## @VMCI_PRIVILEGE_ALL_FLAGS
L_.str.1:                               ## @.str.1
	.asciz	"Invalid flag (flags=0x%x) for VMCI context\n"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid suer_version %d\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.3:                               ## @.str.3
	.asciz	"Failed to allocate memory for VMCI context\n"

	.comm	_VMCI_MAX_GUEST_QP_COUNT,4,2    ## @VMCI_MAX_GUEST_QP_COUNT
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_VMCI_MAX_GUEST_DOORBELL_COUNT,4,2 ## @VMCI_MAX_GUEST_DOORBELL_COUNT
	.comm	_ctx_dummy_notify,4,2           ## @ctx_dummy_notify
	.comm	_ctx_list,8,2                   ## @ctx_list
	.comm	_VMCI_RESERVED_CID_LIMIT,8,3    ## @VMCI_RESERVED_CID_LIMIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmci_ctx_create                ; -- Begin function vmci_ctx_create
	.p2align	2
_vmci_ctx_create:                       ; @vmci_ctx_create
	.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
Lloh0:
	adrp	x25, _VMCI_INVALID_ID@GOTPAGE
Lloh1:
	ldr	x25, [x25, _VMCI_INVALID_ID@GOTPAGEOFF]
	ldr	x8, [x25]
	cmp	x8, x0
	b.ne	LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	mov	x23, x1
Lloh4:
	adrp	x8, _VMCI_PRIVILEGE_ALL_FLAGS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VMCI_PRIVILEGE_ALL_FLAGS@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	bics	xzr, x1, x8
	b.eq	LBB0_7
; %bb.3:
	str	x23, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_4:
	bl	_pr_devel
LBB0_5:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
LBB0_6:
	neg	w0, w20
	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
	b	_ERR_PTR
LBB0_7:
	mov	x24, x3
	cbz	w3, LBB0_18
; %bb.8:
	mov	x22, x4
	mov	x20, x0
Lloh12:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	w0, #104
	bl	_kzalloc
	cbz	x0, LBB0_19
; %bb.9:
	mov	x19, x0
	add	x0, x0, #96
	bl	_kref_init
	add	x0, x19, #92
	bl	_spin_lock_init
	add	x21, x19, #24
	mov	x0, x21
	bl	_INIT_LIST_HEAD
	add	x0, x19, #88
	bl	_INIT_LIST_HEAD
	add	x0, x19, #84
	bl	_INIT_LIST_HEAD
	add	x0, x19, #80
	bl	_init_waitqueue_head
Lloh15:
	adrp	x8, _VMCI_MAX_GUEST_QP_COUNT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VMCI_MAX_GUEST_QP_COUNT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	w0, #0
	bl	_vmci_handle_arr_create
	str	x0, [x19, #8]
	cbz	x0, LBB0_20
; %bb.10:
Lloh18:
	adrp	x26, _VMCI_MAX_GUEST_DOORBELL_COUNT@GOTPAGE
Lloh19:
	ldr	x26, [x26, _VMCI_MAX_GUEST_DOORBELL_COUNT@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	w0, #0
	bl	_vmci_handle_arr_create
	str	x0, [x19, #16]
	cbz	x0, LBB0_21
; %bb.11:
	ldr	w1, [x26]
	mov	w0, #0
	bl	_vmci_handle_arr_create
	str	x0, [x19, #72]
	cbz	x0, LBB0_22
; %bb.12:
	str	w24, [x19]
	str	x23, [x19, #64]
	cbz	x22, LBB0_14
; %bb.13:
	mov	x0, x22
	bl	_get_cred
	str	w0, [x19, #56]
LBB0_14:
Lloh20:
	adrp	x8, _ctx_dummy_notify@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ctx_dummy_notify@GOTPAGEOFF]
	stp	xzr, x8, [x19, #40]
Lloh22:
	adrp	x22, _ctx_list@GOTPAGE
Lloh23:
	ldr	x22, [x22, _ctx_list@GOTPAGEOFF]
	mov	x0, x22
	bl	_spin_lock
	mov	x0, x20
	bl	_vmci_ctx_exists
	cbz	x0, LBB0_17
; %bb.15:
Lloh24:
	adrp	x23, _VMCI_RESERVED_CID_LIMIT@GOTPAGE
Lloh25:
	ldr	x23, [x23, _VMCI_RESERVED_CID_LIMIT@GOTPAGEOFF]
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	sub	x1, x8, #1
	mov	x0, x20
	bl	_max
	add	x8, x0, #1
	ldr	x9, [x25]
	ldr	x10, [x23]
	cmp	x8, x9
	csinc	x20, x10, x0, eq
	mov	x0, x20
	bl	_vmci_ctx_exists
	cbnz	x0, LBB0_16
LBB0_17:
	str	x20, [x19, #32]
	add	x1, x22, #4
	mov	x0, x21
	bl	_list_add_tail_rcu
	mov	x0, x22
	bl	_spin_unlock
	mov	x0, x19
	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
LBB0_18:
	str	xzr, [sp]
Lloh26:
	adrp	x0, l_.str.2@PAGE
Lloh27:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_19:
Lloh28:
	adrp	x0, l_.str.3@PAGE
Lloh29:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_warn
	b	LBB0_5
LBB0_20:
Lloh30:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh32:
	ldr	w20, [x8]
	b	LBB0_24
LBB0_21:
Lloh33:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh35:
	ldr	w20, [x8]
	b	LBB0_23
LBB0_22:
Lloh36:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh38:
	ldr	w20, [x8]
	ldr	x0, [x19, #16]
	bl	_vmci_handle_arr_destroy
LBB0_23:
	ldr	x0, [x19, #8]
	bl	_vmci_handle_arr_destroy
LBB0_24:
	mov	x0, x19
	bl	_kfree
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_VMCI_INVALID_ID,8,3            ; @VMCI_INVALID_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid context ID for VMCI context\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VMCI_PRIVILEGE_ALL_FLAGS,8,3   ; @VMCI_PRIVILEGE_ALL_FLAGS
l_.str.1:                               ; @.str.1
	.asciz	"Invalid flag (flags=0x%x) for VMCI context\n"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid suer_version %d\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.3:                               ; @.str.3
	.asciz	"Failed to allocate memory for VMCI context\n"

	.comm	_VMCI_MAX_GUEST_QP_COUNT,4,2    ; @VMCI_MAX_GUEST_QP_COUNT
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_VMCI_MAX_GUEST_DOORBELL_COUNT,4,2 ; @VMCI_MAX_GUEST_DOORBELL_COUNT
	.comm	_ctx_dummy_notify,4,2           ; @ctx_dummy_notify
	.comm	_ctx_list,8,2                   ; @ctx_list
	.comm	_VMCI_RESERVED_CID_LIMIT,8,3    ; @VMCI_RESERVED_CID_LIMIT
.subsections_via_symbols
