	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function unpack
_unpack:                                ## @unpack
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	$2, %esi
	movl	$1, %edx
	callq	_luaL_optinteger
	movq	%rax, %rbx
	movq	_luaL_checkinteger@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_luaL_len
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	$3, %edx
	movl	%eax, %ecx
	callq	_luaL_opt
	movq	%rax, %r15
	xorl	%r12d, %r12d
	subq	%rbx, %rax
	jl	LBB0_6
## %bb.1:
	movq	_INT_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpq	%rcx, %rax
	jge	LBB0_7
## %bb.2:
	movl	%eax, %r12d
	incl	%r12d
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_lua_checkstack
	testl	%eax, %eax
	je	LBB0_7
## %bb.3:
	cmpq	%rbx, %r15
	jle	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	callq	_lua_geti
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_4
LBB0_5:
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	callq	_lua_geti
LBB0_6:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_luaL_error                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_luaL_checkinteger,4,2          ## @luaL_checkinteger
	.comm	_INT_MAX,8,3                    ## @INT_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"too many results to unpack"

	.no_dead_strip	_unpack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function unpack
_unpack:                                ; @unpack
	.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	x19, x0
	mov	w1, #2
	mov	w2, #1
	bl	_luaL_optinteger
	mov	x20, x0
Lloh0:
	adrp	x8, _luaL_checkinteger@GOTPAGE
Lloh1:
	ldr	x8, [x8, _luaL_checkinteger@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	mov	x0, x19
	mov	w1, #1
	bl	_luaL_len
	mov	x3, x0
	mov	x0, x19
	mov	x1, x21
	mov	w2, #3
	bl	_luaL_opt
	subs	x8, x0, x20
	b.ge	LBB0_2
; %bb.1:
	mov	w22, #0
	b	LBB0_7
LBB0_2:
Lloh3:
	adrp	x9, _INT_MAX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _INT_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	x8, x9
	b.ge	LBB0_8
; %bb.3:
	mov	x21, x0
	add	w22, w8, #1
	mov	x0, x19
	mov	x1, x22
	bl	_lua_checkstack
	cbz	w0, LBB0_8
; %bb.4:
	cmp	x21, x20
	b.le	LBB0_6
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #1
	mov	x2, x20
	bl	_lua_geti
	add	x20, x20, #1
	cmp	x21, x20
	b.ne	LBB0_5
LBB0_6:
	mov	x0, x19
	mov	w1, #1
	mov	x2, x21
	bl	_lua_geti
LBB0_7:
	mov	x0, x22
	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
LBB0_8:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	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
	b	_luaL_error
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_luaL_checkinteger,4,2          ; @luaL_checkinteger
	.comm	_INT_MAX,8,3                    ; @INT_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"too many results to unpack"

	.no_dead_strip	_unpack
.subsections_via_symbols
