	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nsim_map_delete_elem
_nsim_map_delete_elem:                  ## @nsim_map_delete_elem
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	_BPF_MAP_TYPE_ARRAY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_2
LBB0_3:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_nsim_map_key_find
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_5
## %bb.4:
	movq	8(%r15), %rax
	movl	%r14d, %ebx
	leaq	(,%rbx,8), %r12
	movl	4(%rax,%rbx,8), %edi
	callq	_kfree
	movq	8(%r15), %rax
	movl	(%rax,%rbx,8), %edi
	callq	_kfree
	addq	8(%r15), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
LBB0_5:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%r14d, %eax
	sarl	$31, %eax
	andl	%r14d, %eax
LBB0_2:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BPF_MAP_TYPE_ARRAY,8,3         ## @BPF_MAP_TYPE_ARRAY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_nsim_map_delete_elem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nsim_map_delete_elem
_nsim_map_delete_elem:                  ; @nsim_map_delete_elem
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _BPF_MAP_TYPE_ARRAY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BPF_MAP_TYPE_ARRAY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
	mov	x20, x1
	mov	x21, x0
	ldr	x19, [x0, #8]
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x21
	mov	x1, x20
	bl	_nsim_map_key_find
	mov	x20, x0
	tbnz	w0, #31, LBB0_4
; %bb.3:
	ldr	x8, [x19, #8]
	mov	w9, w20
	lsl	x21, x9, #3
	add	x8, x8, x21
	ldr	w0, [x8, #4]
	bl	_kfree
	ldr	x8, [x19, #8]
	ldr	w0, [x8, x21]
	bl	_kfree
	ldr	x8, [x19, #8]
	add	x0, x8, x21
	mov	w1, #0
	mov	w2, #8
	bl	_memset
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
	cmp	w20, #0
	csel	w0, w20, wzr, lt
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_BPF_MAP_TYPE_ARRAY,8,3         ; @BPF_MAP_TYPE_ARRAY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_nsim_map_delete_elem
.subsections_via_symbols
