	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function db_setlocal
_db_setlocal:                           ## @db_setlocal
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	-28(%rbp), %rsi
	callq	_getthread
	movq	%rax, %r14
	movl	-28(%rbp), %esi
	incl	%esi
	movq	%rbx, %rdi
	callq	_luaL_checkint
	leaq	-32(%rbp), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_lua_getstack
	movl	-28(%rbp), %esi
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	addl	$3, %esi
	movq	%rbx, %rdi
	callq	_luaL_checkany
	movl	-28(%rbp), %esi
	addl	$3, %esi
	movq	%rbx, %rdi
	callq	_lua_settop
	movl	$1, %r15d
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_lua_xmove
	movl	-28(%rbp), %esi
	addl	$2, %esi
	movq	%rbx, %rdi
	callq	_luaL_checkint
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_lua_setlocal
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_lua_pushstring
	jmp	LBB0_3
LBB0_1:
	incl	%esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_luaL_argerror
	movl	%eax, %r15d
LBB0_3:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"level out of range"

	.no_dead_strip	_db_setlocal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function db_setlocal
_db_setlocal:                           ; @db_setlocal
	.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, #1
	mov	x0, x19
	bl	_luaL_checkint
	mov	x1, x0
	add	x2, sp, #8
	mov	x0, x20
	bl	_lua_getstack
	ldr	w8, [sp, #12]
	cbz	w0, LBB0_2
; %bb.1:
	add	w1, w8, #3
	mov	x0, x19
	bl	_luaL_checkany
	ldr	w8, [sp, #12]
	add	w1, w8, #3
	mov	x0, x19
	bl	_lua_settop
	mov	w21, #1
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_lua_xmove
	ldr	w8, [sp, #12]
	add	w1, w8, #2
	mov	x0, x19
	bl	_luaL_checkint
	mov	x2, x0
	add	x1, sp, #8
	mov	x0, x20
	bl	_lua_setlocal
	mov	x1, x0
	mov	x0, x19
	bl	_lua_pushstring
	b	LBB0_3
LBB0_2:
	add	w1, w8, #1
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_luaL_argerror
	mov	x21, x0
LBB0_3:
	mov	x0, x21
	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
	.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_setlocal
.subsections_via_symbols
