	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dbell_index_table_add
_dbell_index_table_add:                 ## @dbell_index_table_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
	movq	%rdi, %r15
	addq	$8, %rdi
	callq	_vmci_resource_get
	movq	_vmci_doorbell_it@GOTPCREL(%rip), %r12
	movq	%r12, %rdi
	callq	_spin_lock_bh
	movq	_max_notify_idx@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_notify_idx_count@GOTPCREL(%rip), %rdi
	movl	(%rdi), %eax
	cmpl	%esi, %ecx
	jl	LBB0_2
## %bb.1:
	cmpl	%esi, %eax
	jl	LBB0_2
## %bb.11:
	movq	_last_notify_idx_reserved@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	incl	%eax
	cltd
	idivl	%esi
	movl	%edx, %ebx
	jmp	LBB0_12
LBB0_2:
	movq	_last_notify_idx_released@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	cmpl	%ecx, %edi
	jge	LBB0_5
## %bb.3:
	callq	_dbell_index_table_find
	testl	%eax, %eax
	je	LBB0_13
## %bb.4:
	movq	_notify_idx_count@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%r13), %ecx
LBB0_5:
	incl	%eax
	cmpl	%ecx, %eax
	jge	LBB0_10
## %bb.6:
	movq	_last_notify_idx_reserved@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_dbell_index_table_find
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	incl	%ebx
	movl	(%r13), %ecx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	movl	%edx, %ebx
	cmpl	(%r12), %edx
	jne	LBB0_7
LBB0_10:
	leal	1(%rcx), %eax
	movl	%eax, (%r13)
	movl	%ecx, %ebx
	jmp	LBB0_8
LBB0_13:
	movl	(%r12), %ebx
	movl	(%r14), %eax
	movl	%eax, (%r12)
LBB0_8:
	movq	_vmci_doorbell_it@GOTPCREL(%rip), %r12
	movq	_notify_idx_count@GOTPCREL(%rip), %rdi
LBB0_12:
	movq	_last_notify_idx_reserved@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	incl	(%rdi)
	movl	%ebx, (%r15)
	movl	%ebx, %edi
	callq	_VMCI_DOORBELL_HASH
	addq	$4, %r15
	movslq	%eax, %rsi
	shlq	$2, %rsi
	addq	8(%r12), %rsi
	movq	%r15, %rdi
	callq	_hlist_add_head
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_bh                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_vmci_doorbell_it,16,3          ## @vmci_doorbell_it
	.comm	_max_notify_idx,4,2             ## @max_notify_idx
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_notify_idx_count,4,2           ## @notify_idx_count
	.comm	_last_notify_idx_released,4,2   ## @last_notify_idx_released
	.comm	_last_notify_idx_reserved,4,2   ## @last_notify_idx_reserved
	.no_dead_strip	_dbell_index_table_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dbell_index_table_add
_dbell_index_table_add:                 ; @dbell_index_table_add
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
	add	x0, x0, #8
	bl	_vmci_resource_get
Lloh0:
	adrp	x20, _vmci_doorbell_it@GOTPAGE
Lloh1:
	ldr	x20, [x20, _vmci_doorbell_it@GOTPAGEOFF]
	mov	x0, x20
	bl	_spin_lock_bh
Lloh2:
	adrp	x24, _max_notify_idx@GOTPAGE
Lloh3:
	ldr	x24, [x24, _max_notify_idx@GOTPAGEOFF]
	ldr	w21, [x24]
Lloh4:
	adrp	x26, _PAGE_SIZE@GOTPAGE
Lloh5:
	ldr	x26, [x26, _PAGE_SIZE@GOTPAGEOFF]
Lloh6:
	adrp	x22, _notify_idx_count@GOTPAGE
Lloh7:
	ldr	x22, [x22, _notify_idx_count@GOTPAGEOFF]
	ldr	w9, [x26]
	ldr	w8, [x22]
	cmp	w21, w9
	ccmp	w8, w9, #8, ge
Lloh8:
	adrp	x23, _last_notify_idx_reserved@GOTPAGE
Lloh9:
	ldr	x23, [x23, _last_notify_idx_reserved@GOTPAGEOFF]
	b.ge	LBB0_10
; %bb.1:
Lloh10:
	adrp	x25, _last_notify_idx_released@GOTPAGE
Lloh11:
	ldr	x25, [x25, _last_notify_idx_released@GOTPAGEOFF]
	ldr	w0, [x25]
	cmp	w0, w21
	b.ge	LBB0_4
; %bb.2:
	bl	_dbell_index_table_find
	cbz	w0, LBB0_12
; %bb.3:
	ldr	w8, [x22]
	ldr	w21, [x24]
LBB0_4:
	add	w8, w8, #1
	cmp	w8, w21
	b.ge	LBB0_9
; %bb.5:
	ldr	w21, [x23]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_dbell_index_table_find
	cbz	w0, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w9, w21, #1
	ldr	w8, [x24]
	sdiv	w10, w9, w8
	msub	w21, w10, w8, w9
	ldr	w9, [x25]
	cmp	w21, w9
	b.ne	LBB0_6
; %bb.8:
	mov	x21, x8
LBB0_9:
	add	w8, w21, #1
	str	w8, [x24]
	b	LBB0_11
LBB0_10:
	ldr	w8, [x23]
	add	w8, w8, #1
	sdiv	w10, w8, w9
	msub	w21, w10, w9, w8
LBB0_11:
	str	w21, [x23]
	ldr	w8, [x22]
	add	w8, w8, #1
	str	w8, [x22]
	str	w21, [x19], #4
	mov	x0, x21
	bl	_VMCI_DOORBELL_HASH
	ldr	x8, [x20, #8]
	add	x1, x8, w0, sxtw #2
	mov	x0, x19
	bl	_hlist_add_head
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_spin_unlock_bh
LBB0_12:
	ldr	w21, [x25]
	ldr	w8, [x26]
	str	w8, [x25]
	b	LBB0_11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_vmci_doorbell_it,16,3          ; @vmci_doorbell_it
	.comm	_max_notify_idx,4,2             ; @max_notify_idx
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_notify_idx_count,4,2           ; @notify_idx_count
	.comm	_last_notify_idx_released,4,2   ; @last_notify_idx_released
	.comm	_last_notify_idx_reserved,4,2   ; @last_notify_idx_reserved
	.no_dead_strip	_dbell_index_table_add
.subsections_via_symbols
