	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function db_getlocal
_db_getlocal:                           ## @db_getlocal
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	-36(%rbp), %rsi
	callq	_getthread
	movq	%rax, %r14
	movl	-36(%rbp), %esi
	addl	$2, %esi
	movq	%rbx, %rdi
	callq	_luaL_checkinteger
	movq	%rax, %r15
	movl	-36(%rbp), %esi
	incl	%esi
	movq	%rbx, %rdi
	callq	_lua_isfunction
	movl	-36(%rbp), %esi
	incl	%esi
	movq	%rbx, %rdi
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	callq	_lua_pushvalue
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_lua_getlocal
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_lua_pushstring
	movl	$1, %r12d
LBB0_7:
	movl	%r12d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	callq	_luaL_checkinteger
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_lua_getstack
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	$1, %r12d
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_checkstack
	leaq	-40(%rbp), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_lua_getlocal
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rax, %r15
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_lua_xmove
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_lua_pushstring
	movq	%rbx, %rdi
	movl	$-2, %esi
	movl	$1, %edx
	callq	_lua_rotate
	movl	$2, %r12d
	jmp	LBB0_7
LBB0_3:
	movl	-36(%rbp), %esi
	incl	%esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_luaL_argerror
	movl	%eax, %r12d
	jmp	LBB0_7
LBB0_6:
	movq	%rbx, %rdi
	callq	_lua_pushnil
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"level out of range"

	.no_dead_strip	_db_getlocal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function db_getlocal
_db_getlocal:                           ; @db_getlocal
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	add	x1, sp, #12
	bl	_getthread
	mov	x20, x0
	ldr	w8, [sp, #12]
	add	w1, w8, #2
	mov	x0, x19
	bl	_luaL_checkinteger
	mov	x21, x0
	ldr	w8, [sp, #12]
	add	w1, w8, #1
	mov	x0, x19
	bl	_lua_isfunction
	ldr	w8, [sp, #12]
	add	w1, w8, #1
	cbz	x0, LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_lua_pushvalue
	mov	x0, x19
	mov	x1, #0
	mov	x2, x21
	bl	_lua_getlocal
	mov	x1, x0
	mov	x0, x19
	bl	_lua_pushstring
LBB0_2:
	mov	w0, #1
LBB0_3:
	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
	add	sp, sp, #64
	ret
LBB0_4:
	mov	x0, x19
	bl	_luaL_checkinteger
	mov	x1, x0
	add	x2, sp, #8
	mov	x0, x20
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_lua_getstack
	cbz	w0, LBB0_7
; %bb.5:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_checkstack
	add	x1, sp, #8
	mov	x0, x20
	mov	x2, x21
	bl	_lua_getlocal
	cbz	x0, LBB0_8
; %bb.6:
	mov	x21, x0
	mov	x0, x20
	mov	x1, x19
	mov	w2, #1
	bl	_lua_xmove
	mov	x0, x19
	mov	x1, x21
	bl	_lua_pushstring
	mov	x0, x19
	mov	w1, #-2
	mov	w2, #1
	bl	_lua_rotate
	mov	w0, #2
	b	LBB0_3
LBB0_7:
	ldr	w8, [sp, #12]
	add	w1, w8, #1
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_luaL_argerror
	b	LBB0_3
LBB0_8:
	mov	x0, x19
	bl	_lua_pushnil
	b	LBB0_2
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"level out of range"

	.no_dead_strip	_db_getlocal
.subsections_via_symbols
