	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nsim_map_get_next_key
_nsim_map_get_next_key:                 ## @nsim_map_get_next_key
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	8(%rdi), %r14
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	leaq	8(%r14), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	testq	%r13, %r13
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_nsim_map_key_find
	movl	%eax, %r15d
LBB0_2:
	leal	1(%r15), %ebx
	movq	_ENOENT@GOTPCREL(%rip), %r13
	addl	(%r13), %r15d
	movl	$0, %eax
	cmovel	%eax, %ebx
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	jge	LBB0_7
## %bb.3:
	movslq	%ebx, %rbx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	movq	(%rdi,%rbx,8), %rsi
	testq	%rsi, %rsi
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_4
	jmp	LBB0_7
LBB0_5:
	movl	(%r12), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_memcpy
LBB0_7:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	xorl	%ecx, %ecx
	subl	(%r13), %ecx
	xorl	%edx, %edx
	cmpl	%eax, %ebx
	cmovnel	%edx, %ecx
	movl	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.no_dead_strip	_nsim_map_get_next_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nsim_map_get_next_key
_nsim_map_get_next_key:                 ; @nsim_map_get_next_key
	.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	x20, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x24, [x0, #8]
Lloh0:
	adrp	x23, _ENOENT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ENOENT@GOTPAGEOFF]
	ldr	w25, [x23]
	add	x19, x24, #8
	mov	x0, x19
	bl	_mutex_lock
	cbz	x22, LBB0_2
; %bb.1:
	mov	x0, x21
	mov	x1, x22
	bl	_nsim_map_key_find
	b	LBB0_3
LBB0_2:
	neg	w0, w25
LBB0_3:
	ldr	w8, [x23]
	cmn	w0, w8
	csinc	w22, wzr, w0, eq
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	w22, w0
	b.ge	LBB0_9
; %bb.4:
	sxtw	x22, w22
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x24]
	ldr	x1, [x0, x22, lsl #3]
	cbnz	x1, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, #1
	bl	_ARRAY_SIZE
	cmp	x22, w0, sxtw
	b.lt	LBB0_5
	b	LBB0_8
LBB0_7:
	ldr	w2, [x21]
	mov	x0, x20
	bl	_memcpy
LBB0_8:
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	ldr	w8, [x23]
	cmp	w22, w0
	csneg	w0, wzr, w8, ne
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.no_dead_strip	_nsim_map_get_next_key
.subsections_via_symbols
