	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function findindex
_findindex:                             ## @findindex
	.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
	movl	%edx, %r12d
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	%edx, %edi
	callq	_ttisnil
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_9
## %bb.1:
	movl	%r12d, %edi
	callq	_arrayindex
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	cmpl	(%r14), %eax
	jbe	LBB0_9
LBB0_3:
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_mainposition
	movq	%rax, %rbx
	movq	%rax, %rdi
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	cltq
	leaq	(%rbx,%rax,4), %rbx
	movq	%rbx, %rdi
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	callq	_gkey
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_luaV_rawequalobj
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	callq	_gkey
	movl	%eax, %edi
	callq	_ttisdeadkey
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%r12d, %edi
	callq	_iscollectable
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	callq	_gkey
	movl	%eax, %edi
	callq	_deadvalue
	movq	%rax, %r13
	movl	%r12d, %edi
	callq	_gcvalue
	cmpq	%rax, %r13
	je	LBB0_8
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	callq	_gnext
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_luaG_runerror
	movq	%rbx, %rdi
	jmp	LBB0_4
LBB0_8:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_gnode
	cltq
	shlq	$2, %rax
	subq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_cast_int
                                        ## kill: def $eax killed $eax def $rax
	movl	(%r14), %ecx
	addl	%ecx, %eax
	incl	%eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid key to 'next'"

	.no_dead_strip	_findindex
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function findindex
_findindex:                             ; @findindex
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	mov	x0, x2
	bl	_ttisnil
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_6
LBB0_2:
	mov	x0, x20
	bl	_arrayindex
	cbz	w0, LBB0_4
; %bb.3:
	ldr	w8, [x19]
	cmp	w0, w8
	b.ls	LBB0_6
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	bl	_mainposition
	mov	x22, x0
	bl	_gkey
	mov	x1, x20
	bl	_luaV_rawequalobj
	cbz	x0, LBB0_7
LBB0_5:
	mov	x0, x19
	mov	w1, #0
	bl	_gnode
	sub	x0, x22, w0, sxtw #2
	bl	_cast_int
	ldr	w8, [x19]
	add	w8, w0, w8
	add	w0, w8, #1
LBB0_6:
	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_7:
Lloh0:
	adrp	x23, l_.str@PAGE
Lloh1:
	add	x23, x23, l_.str@PAGEOFF
	b	LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x22
	bl	_gnext
	cbz	w0, LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x22, x22, w0, sxtw #2
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x22
	bl	_gkey
	mov	x1, x20
	bl	_luaV_rawequalobj
	cbnz	x0, LBB0_5
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_gkey
	bl	_ttisdeadkey
	cbz	x0, LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x20
	bl	_iscollectable
	cbz	x0, LBB0_8
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x22
	bl	_gkey
	bl	_deadvalue
	mov	x24, x0
	mov	x0, x20
	bl	_gcvalue
	cmp	x24, x0
	b.ne	LBB0_8
	b	LBB0_5
LBB0_14:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x21
	mov	x1, x23
	bl	_luaG_runerror
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid key to 'next'"

	.no_dead_strip	_findindex
.subsections_via_symbols
