	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function luaB_unpack
_luaB_unpack:                           ## @luaB_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	$1, %esi
	movl	$5, %edx
	callq	_luaL_checktype
	movq	%r14, %rdi
	movl	$2, %esi
	movl	$1, %edx
	callq	_luaL_optint
	movl	%eax, %ebx
	movq	_luaL_checkint@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_luaL_getn
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	$3, %edx
	movl	%eax, %ecx
	callq	_luaL_opt
	movl	%eax, %r12d
	xorl	%eax, %eax
	movl	%r12d, %r15d
	subl	%ebx, %r15d
	jl	LBB0_7
## %bb.1:
	js	LBB0_8
## %bb.2:
	incl	%r15d
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_lua_checkstack
	testl	%eax, %eax
	je	LBB0_8
## %bb.3:
	movq	%r14, %rdi
	movl	$1, %esi
	movl	%ebx, %edx
	callq	_lua_rawgeti
	cmpl	%ebx, %r12d
	jle	LBB0_6
## %bb.4:
	negl	%r12d
	incl	%ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	$1, %esi
	movl	%ebx, %edx
	callq	_lua_rawgeti
	leal	(%r12,%rbx), %eax
	incl	%eax
	movl	%ebx, %ecx
	incl	%ecx
	movl	%ecx, %ebx
	cmpl	$1, %eax
	jne	LBB0_5
LBB0_6:
	movl	%r15d, %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	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_checkint,4,2              ## @luaL_checkint
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"too many results to unpack"

	.no_dead_strip	_luaB_unpack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function luaB_unpack
_luaB_unpack:                           ; @luaB_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, #1
	mov	w2, #5
	bl	_luaL_checktype
	mov	x0, x19
	mov	w1, #2
	mov	w2, #1
	bl	_luaL_optint
	mov	x20, x0
Lloh0:
	adrp	x8, _luaL_checkint@GOTPAGE
Lloh1:
	ldr	x8, [x8, _luaL_checkint@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	mov	x0, x19
	mov	w1, #1
	bl	_luaL_getn
	mov	x3, x0
	mov	x0, x19
	mov	x1, x21
	mov	w2, #3
	bl	_luaL_opt
	subs	w8, w0, w20
	b.ge	LBB0_3
; %bb.1:
	mov	w21, #0
LBB0_2:
	mov	x0, x21
	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_3:
	b.mi	LBB0_7
; %bb.4:
	mov	x22, x0
	add	w21, w8, #1
	mov	x0, x19
	mov	x1, x21
	bl	_lua_checkstack
	cbz	w0, LBB0_7
; %bb.5:
	mov	x0, x19
	mov	w1, #1
	mov	x2, x20
	bl	_lua_rawgeti
	cmp	w22, w20
	b.le	LBB0_2
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	w20, w20, #1
	mov	x0, x19
	mov	w1, #1
	mov	x2, x20
	bl	_lua_rawgeti
	cmp	w22, w20
	b.ne	LBB0_6
	b	LBB0_2
LBB0_7:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	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 AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_luaL_checkint,4,2              ; @luaL_checkint
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"too many results to unpack"

	.no_dead_strip	_luaB_unpack
.subsections_via_symbols
