	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_divas_um_idi_delete_entity     ## -- Begin function divas_um_idi_delete_entity
	.p2align	4, 0x90
_divas_um_idi_delete_entity:            ## @divas_um_idi_delete_entity
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	movq	_adapter_lock@GOTPCREL(%rip), %rdi
	leaq	L_.str(%rip), %rdx
	leaq	-20(%rbp), %rsi
	callq	_diva_os_enter_spin_lock
	cmpq	$0, 16(%rbx)
	je	LBB0_4
## %bb.3:
	leaq	8(%rbx), %rdi
	callq	_list_del
LBB0_4:
	movq	_adapter_lock@GOTPCREL(%rip), %rdi
	leaq	L_.str(%rip), %rdx
	leaq	-20(%rbp), %rsi
	callq	_diva_os_leave_spin_lock
	movq	%rbx, %rdi
	callq	_diva_um_idi_stop_wdog
	movq	%rbx, %rdi
	callq	_cleanup_entity
	movq	(%rbx), %rsi
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_diva_os_free
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	xorl	%edi, %edi
	movq	%rbx, %rsi
	callq	_diva_os_free
	movq	%rbx, %rdi
	callq	_DBG_LOG
	jmp	LBB0_5
LBB0_1:
	movl	$-1, %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_adapter_lock,4,2               ## @adapter_lock
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"delete_entity"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_divas_um_idi_delete_entity     ; -- Begin function divas_um_idi_delete_entity
	.p2align	2
_divas_um_idi_delete_entity:            ; @divas_um_idi_delete_entity
	.cfi_startproc
; %bb.0:
	cbz	x1, LBB0_4
; %bb.1:
	sub	sp, sp, #48
	.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
	mov	x19, x1
Lloh0:
	adrp	x0, _adapter_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _adapter_lock@GOTPAGEOFF]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	add	x1, sp, #12
	bl	_diva_os_enter_spin_lock
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_3
; %bb.2:
	add	x0, x19, #8
	bl	_list_del
LBB0_3:
Lloh4:
	adrp	x0, _adapter_lock@GOTPAGE
Lloh5:
	ldr	x0, [x0, _adapter_lock@GOTPAGEOFF]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	add	x1, sp, #12
	bl	_diva_os_leave_spin_lock
	mov	x0, x19
	bl	_diva_um_idi_stop_wdog
	mov	x0, x19
	bl	_cleanup_entity
	ldr	x1, [x19]
	mov	w0, #0
	bl	_diva_os_free
	mov	x0, x19
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	mov	w0, #0
	mov	x1, x19
	bl	_diva_os_free
	mov	x0, x19
	bl	_DBG_LOG
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	mov	w0, #-1
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_adapter_lock,4,2               ; @adapter_lock
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"delete_entity"

.subsections_via_symbols
