	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function LoadFunction
_LoadFunction:                          ## @LoadFunction
	.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	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rdi), %rdi
	movq	(%rdi), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, (%rdi)
	movq	_LUAI_MAXCCALLS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_error
	movq	(%r14), %rdi
LBB0_2:
	callq	_luaF_newproto
	movq	%rax, %rbx
	movq	(%r14), %rdi
	movl	8(%rdi), %esi
	movq	%rax, %rdx
	callq	_setptvalue2s
	movq	(%r14), %rdi
	callq	_incr_top
	movq	%r14, %rdi
	callq	_LoadString
	testq	%rax, %rax
	cmovneq	%rax, %r15
	movq	%r15, 48(%rbx)
	movq	%r14, %rdi
	callq	_LoadInt
	movq	%rax, 40(%rbx)
	movq	%r14, %rdi
	callq	_LoadInt
	movq	%rax, 32(%rbx)
	movq	%r14, %rdi
	callq	_LoadByte
	movq	%rax, 24(%rbx)
	movq	%r14, %rdi
	callq	_LoadByte
	movq	%rax, 16(%rbx)
	movq	%r14, %rdi
	callq	_LoadByte
	movq	%rax, 8(%rbx)
	movq	%r14, %rdi
	callq	_LoadByte
	movq	%rax, (%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_LoadCode
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_LoadConstants
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_LoadDebug
	movq	%rbx, %rdi
	callq	_luaG_checkcode
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_IF
	movq	(%r14), %rax
	decl	8(%rax)
	decq	(%rax)
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LUAI_MAXCCALLS,8,3             ## @LUAI_MAXCCALLS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"code too deep"

L_.str.1:                               ## @.str.1
	.asciz	"bad code"

	.no_dead_strip	_LoadFunction
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function LoadFunction
_LoadFunction:                          ; @LoadFunction
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x1
	mov	x19, x0
	ldr	x0, [x0]
	ldr	x8, [x0]
	add	x9, x8, #1
	str	x9, [x0]
Lloh0:
	adrp	x9, _LUAI_MAXCCALLS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LUAI_MAXCCALLS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_error
	ldr	x0, [x19]
LBB0_2:
	bl	_luaF_newproto
	mov	x20, x0
	ldr	x0, [x19]
	ldr	w1, [x0, #8]
	mov	x2, x20
	bl	_setptvalue2s
	ldr	x0, [x19]
	bl	_incr_top
	mov	x0, x19
	bl	_LoadString
	cmp	x0, #0
	csel	x8, x21, x0, eq
	str	x8, [x20, #48]
	mov	x0, x19
	bl	_LoadInt
	str	x0, [x20, #40]
	mov	x0, x19
	bl	_LoadInt
	str	x0, [x20, #32]
	mov	x0, x19
	bl	_LoadByte
	str	x0, [x20, #24]
	mov	x0, x19
	bl	_LoadByte
	str	x0, [x20, #16]
	mov	x0, x19
	bl	_LoadByte
	str	x0, [x20, #8]
	mov	x0, x19
	bl	_LoadByte
	str	x0, [x20]
	mov	x0, x19
	mov	x1, x20
	bl	_LoadCode
	mov	x0, x19
	mov	x1, x20
	bl	_LoadConstants
	mov	x0, x19
	mov	x1, x20
	bl	_LoadDebug
	mov	x0, x20
	bl	_luaG_checkcode
	cmp	w0, #0
	cset	w0, eq
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_IF
	ldr	x8, [x19]
	ldr	w9, [x8, #8]
	sub	w9, w9, #1
	str	w9, [x8, #8]
	ldr	x9, [x8]
	sub	x9, x9, #1
	str	x9, [x8]
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_LUAI_MAXCCALLS,8,3             ; @LUAI_MAXCCALLS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"code too deep"

l_.str.1:                               ; @.str.1
	.asciz	"bad code"

	.no_dead_strip	_LoadFunction
.subsections_via_symbols
