	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmci_resource_add              ## -- Begin function vmci_resource_add
	.p2align	4, 0x90
_vmci_resource_add:                     ## @vmci_resource_add
	.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
	movl	%ecx, %r15d
	movq	%rdx, %rbx
	movl	%esi, %r12d
	movq	%rdi, %r13
	movq	_vmci_resource_table@GOTPCREL(%rip), %rdi
	callq	_spin_lock
	movq	_VMCI_INVALID_ID@GOTPCREL(%rip), %r14
	cmpq	%rbx, (%r14)
	jne	LBB0_3
## %bb.1:
	movl	%r15d, %edi
	movl	%r12d, %esi
	callq	_vmci_resource_find_id
	movq	%rax, %rbx
	cmpq	(%r14), %rax
	jne	LBB0_5
## %bb.2:
	movq	_VMCI_ERROR_NO_HANDLE@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_3:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	callq	_vmci_resource_lookup
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_VMCI_ERROR_ALREADY_EXISTS@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	%rbx, 8(%r13)
	movl	%r15d, 16(%r13)
	movl	%r12d, (%r13)
	leaq	4(%r13), %r15
	movq	%r15, %rdi
	callq	_INIT_HLIST_NODE
	leaq	28(%r13), %rdi
	callq	_kref_init
	leaq	24(%r13), %rdi
	callq	_init_completion
	movq	8(%r13), %rdi
	movl	16(%r13), %esi
	callq	_vmci_resource_hash
	movl	%eax, %esi
	shlq	$2, %rsi
	movq	_vmci_resource_table@GOTPCREL(%rip), %rax
	addq	8(%rax), %rsi
	movq	%r15, %rdi
	callq	_hlist_add_head_rcu
	movq	_VMCI_SUCCESS@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %ebx
	movq	_vmci_resource_table@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vmci_resource_table,16,3       ## @vmci_resource_table
	.comm	_VMCI_INVALID_ID,8,3            ## @VMCI_INVALID_ID
	.comm	_VMCI_ERROR_NO_HANDLE,4,2       ## @VMCI_ERROR_NO_HANDLE
	.comm	_VMCI_ERROR_ALREADY_EXISTS,4,2  ## @VMCI_ERROR_ALREADY_EXISTS
	.comm	_VMCI_SUCCESS,4,2               ## @VMCI_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmci_resource_add              ; -- Begin function vmci_resource_add
	.p2align	2
_vmci_resource_add:                     ; @vmci_resource_add
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x22, x3
	mov	x23, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x19, _vmci_resource_table@GOTPAGE
Lloh1:
	ldr	x19, [x19, _vmci_resource_table@GOTPAGEOFF]
	mov	x0, x19
	bl	_spin_lock
Lloh2:
	adrp	x24, _VMCI_INVALID_ID@GOTPAGE
Lloh3:
	ldr	x24, [x24, _VMCI_INVALID_ID@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x23, x8
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x22
	mov	x1, x21
	bl	_vmci_resource_find_id
	mov	x23, x0
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.2:
Lloh4:
	adrp	x8, _VMCI_ERROR_NO_HANDLE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VMCI_ERROR_NO_HANDLE@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	bl	_vmci_resource_lookup
	cbz	x0, LBB0_5
; %bb.4:
Lloh6:
	adrp	x8, _VMCI_ERROR_ALREADY_EXISTS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VMCI_ERROR_ALREADY_EXISTS@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	stp	x23, x22, [x20, #8]
	add	x22, x20, #4
	str	w21, [x20]
	mov	x0, x22
	bl	_INIT_HLIST_NODE
	add	x0, x20, #28
	bl	_kref_init
	add	x0, x20, #24
	bl	_init_completion
	ldp	x0, x1, [x20, #8]
	bl	_vmci_resource_hash
	ldr	x8, [x19, #8]
	add	x1, x8, w0, uxtw #2
	mov	x0, x22
	bl	_hlist_add_head_rcu
Lloh8:
	adrp	x8, _VMCI_SUCCESS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VMCI_SUCCESS@GOTPAGEOFF]
LBB0_6:
	ldr	w19, [x8]
Lloh10:
	adrp	x0, _vmci_resource_table@GOTPAGE
Lloh11:
	ldr	x0, [x0, _vmci_resource_table@GOTPAGEOFF]
	bl	_spin_unlock
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_vmci_resource_table,16,3       ; @vmci_resource_table
	.comm	_VMCI_INVALID_ID,8,3            ; @VMCI_INVALID_ID
	.comm	_VMCI_ERROR_NO_HANDLE,4,2       ; @VMCI_ERROR_NO_HANDLE
	.comm	_VMCI_ERROR_ALREADY_EXISTS,4,2  ; @VMCI_ERROR_ALREADY_EXISTS
	.comm	_VMCI_SUCCESS,4,2               ; @VMCI_SUCCESS
.subsections_via_symbols
