	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nsim_map_update_elem
_nsim_map_update_elem:                  ## @nsim_map_update_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	%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	%rcx, %r14
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	8(%rdi), %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_nsim_map_key_find
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_3
## %bb.1:
	movq	_BPF_EXIST@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jne	LBB0_3
## %bb.2:
	movl	%ebx, %r14d
	jmp	LBB0_15
LBB0_3:
	testl	%ebx, %ebx
	js	LBB0_7
## %bb.4:
	movq	_BPF_NOEXIST@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jne	LBB0_7
## %bb.5:
	movq	_EEXIST@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_15
LBB0_7:
	testl	%ebx, %ebx
	js	LBB0_8
LBB0_14:
	movq	8(%r13), %rax
	movslq	%ebx, %rbx
	movl	4(%rax,%rbx,8), %edi
	movl	4(%r15), %edx
	movq	%r12, %rsi
	callq	_memcpy
	movq	8(%r13), %rax
	movl	(%rax,%rbx,8), %edi
	movl	(%r15), %edx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_memcpy
	xorl	%r14d, %r14d
LBB0_15:
	movq	%r13, %rdi
	callq	_mutex_unlock
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	8(%r13), %rdi
	callq	_ARRAY_SIZE
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	LBB0_11
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rdi
	cmpl	$0, 4(%rdi,%rbx,8)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_9
LBB0_11:
	movq	8(%r13), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	jne	LBB0_13
## %bb.12:
	movq	_E2BIG@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_13:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_nsim_map_alloc_elem
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_15
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_BPF_EXIST,8,3                  ## @BPF_EXIST
	.comm	_BPF_NOEXIST,8,3                ## @BPF_NOEXIST
	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_E2BIG,4,2                      ## @E2BIG
	.no_dead_strip	_nsim_map_update_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_update_elem
_nsim_map_update_elem:                  ; @nsim_map_update_elem
	.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	x24, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x19, [x0, #8]
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x21
	mov	x1, x22
	bl	_nsim_map_key_find
	mov	x23, x0
	tbz	w0, #31, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _BPF_EXIST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BPF_EXIST@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x24
	b.ne	LBB0_3
; %bb.2:
	mov	x24, x23
	b	LBB0_9
LBB0_3:
	tbnz	w23, #31, LBB0_7
; %bb.4:
Lloh3:
	adrp	x8, _BPF_NOEXIST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BPF_NOEXIST@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x24
	b.ne	LBB0_7
; %bb.5:
Lloh6:
	adrp	x8, _EEXIST@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_9
LBB0_7:
	tbnz	w23, #31, LBB0_10
LBB0_8:
	ldr	x8, [x19, #8]
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	sbfiz	x23, x23, #3, #32
	add	x8, x8, x23
	ldr	w0, [x8, #4]
	ldr	w2, [x21, #4]
	mov	x1, x22
	bl	_memcpy
	ldr	x8, [x19, #8]
	ldr	w0, [x8, x23]
	ldr	w2, [x21]
	mov	x1, x20
	bl	_memcpy
	mov	w24, #0
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x24
	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
LBB0_10:
	ldr	x0, [x19, #8]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_14
; %bb.11:
	mov	x23, #0
	mov	w24, #4
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, #8]
	ldr	w8, [x0, x24]
	cbz	w8, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x23, x23, #1
	bl	_ARRAY_SIZE
	add	x24, x24, #8
	cmp	x23, w0, sxtw
	b.lt	LBB0_12
	b	LBB0_15
LBB0_14:
	mov	w23, #0
LBB0_15:
	ldr	x0, [x19, #8]
	bl	_ARRAY_SIZE
	cmp	w23, w0
	b.ne	LBB0_17
; %bb.16:
Lloh8:
	adrp	x8, _E2BIG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _E2BIG@GOTPAGEOFF]
	b	LBB0_6
LBB0_17:
	mov	x0, x21
	mov	x1, x23
	bl	_nsim_map_alloc_elem
	mov	x24, x0
	cbnz	w0, LBB0_9
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_BPF_EXIST,8,3                  ; @BPF_EXIST
	.comm	_BPF_NOEXIST,8,3                ; @BPF_NOEXIST
	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_E2BIG,4,2                      ; @E2BIG
	.no_dead_strip	_nsim_map_update_elem
.subsections_via_symbols
