	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getfunc
_getfunc:                               ## @getfunc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	$1, %esi
	callq	_lua_isfunction
	testq	%rax, %rax
	je	LBB0_1
## %bb.9:
	movq	%rbx, %rdi
	movl	$1, %esi
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_lua_pushvalue                  ## TAILCALL
LBB0_1:
	movq	%rbx, %rdi
	movl	$1, %esi
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.2:
	movl	$1, %edx
	callq	_luaL_optint
	jmp	LBB0_4
LBB0_3:
	callq	_luaL_checkint
LBB0_4:
	movl	%eax, %r14d
	movl	%eax, %esi
	notl	%esi
	shrl	$31, %esi
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_luaL_argcheck
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_lua_getstack
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_luaL_argerror
LBB0_6:
	leaq	L_.str.2(%rip), %rsi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_lua_getinfo
	movq	%rbx, %rdi
	movl	$-1, %esi
	callq	_lua_isnil
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_luaL_error
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"level must be non-negative"

L_.str.1:                               ## @.str.1
	.asciz	"invalid level"

L_.str.2:                               ## @.str.2
	.asciz	"f"

L_.str.3:                               ## @.str.3
	.asciz	"no function environment for tail call at level %d"

	.no_dead_strip	_getfunc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getfunc
_getfunc:                               ; @getfunc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	mov	w1, #1
	bl	_lua_isfunction
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_lua_pushvalue
LBB0_2:
	mov	x0, x19
	mov	w1, #1
	cbz	w20, LBB0_4
; %bb.3:
	mov	w2, #1
	bl	_luaL_optint
	b	LBB0_5
LBB0_4:
	bl	_luaL_checkint
LBB0_5:
	mov	x20, x0
	mvn	w8, w0
	lsr	w1, w8, #31
Lloh0:
	adrp	x3, l_.str@PAGE
Lloh1:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	w2, #1
	bl	_luaL_argcheck
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	bl	_lua_getstack
	cbnz	x0, LBB0_7
; %bb.6:
Lloh2:
	adrp	x2, l_.str.1@PAGE
Lloh3:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w1, #1
	bl	_luaL_argerror
LBB0_7:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #12
	mov	x0, x19
	bl	_lua_getinfo
	mov	x0, x19
	mov	w1, #-1
	bl	_lua_isnil
	cbz	x0, LBB0_9
; %bb.8:
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_luaL_error
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"level must be non-negative"

l_.str.1:                               ; @.str.1
	.asciz	"invalid level"

l_.str.2:                               ; @.str.2
	.asciz	"f"

l_.str.3:                               ; @.str.3
	.asciz	"no function environment for tail call at level %d"

	.no_dead_strip	_getfunc
.subsections_via_symbols
