	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function unpackint
_unpackint:                             ## @unpackint
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %r10d
	movq	%rsi, %r11
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_SZINT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	cmpl	%ecx, %r9d
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	cmovll	%r9d, %r15d
	testl	%r15d, %r15d
	jle	LBB0_1
## %bb.2:
	movq	_NB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	$1, %r15d
	jne	LBB0_4
## %bb.3:
	xorl	%r12d, %r12d
	movl	%r15d, %edx
	jmp	LBB0_6
LBB0_1:
	xorl	%r12d, %r12d
	jmp	LBB0_8
LBB0_4:
	movl	%r15d, %esi
	andl	$-2, %esi
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %edi
	subl	%r15d, %edi
	xorl	%r12d, %r12d
	movl	%r15d, %edx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	shll	%cl, %r12d
	leal	-1(%rdx), %eax
	addl	$-2, %edx
	leal	1(%rdi), %ebx
	testl	%r10d, %r10d
	cmovel	%edi, %eax
	cltq
	movzbl	(%r11,%rax), %eax
	cmovnel	%edx, %ebx
	orl	%r12d, %eax
	shll	%cl, %eax
	movslq	%ebx, %rbx
	movzbl	(%r11,%rbx), %r12d
	orl	%eax, %r12d
	addl	$2, %edi
	addl	$-2, %esi
	jne	LBB0_5
LBB0_6:
	testb	$1, %r15b
	je	LBB0_8
## %bb.7:
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r12d
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	subl	%edx, %eax
	decl	%edx
	testl	%r10d, %r10d
	cmovel	%eax, %edx
	movslq	%edx, %rax
	movzbl	(%r11,%rax), %eax
	orl	%eax, %r12d
LBB0_8:
	cmpl	-44(%rbp), %r9d                 ## 4-byte Folded Reload
	jle	LBB0_11
## %bb.9:
	testl	%r8d, %r8d
	je	LBB0_18
## %bb.10:
	movq	_NB@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	imull	(%rax), %ecx
	decb	%cl
	movl	$1, %eax
	shll	%cl, %eax
	btcl	%ecx, %r12d
	subl	%eax, %r12d
	jmp	LBB0_18
LBB0_11:
	jge	LBB0_18
## %bb.12:
	xorl	%r13d, %r13d
	testl	%r12d, %r12d
	jns	LBB0_14
## %bb.13:
	movq	_MC@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_14:
	testl	%r8d, %r8d
	cmovel	%r8d, %r13d
	movl	%r15d, %r14d
	notl	%r14d
	addl	-44(%rbp), %r14d                ## 4-byte Folded Reload
	movq	%r11, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=1
	incl	%r15d
	addl	$-1, %r14d
	jae	LBB0_18
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	testl	%r10d, %r10d
	movl	%r15d, %eax
	cmovel	%r14d, %eax
	cltq
	movzbl	(%r11,%rax), %eax
	cmpl	%eax, %r13d
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r10d, %ebx
	callq	_luaL_error
	movq	-56(%rbp), %r11                 ## 8-byte Reload
	movl	%ebx, %r10d
	jmp	LBB0_17
LBB0_18:
	movslq	%r12d, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SZINT,4,2                      ## @SZINT
	.comm	_NB,4,2                         ## @NB
	.comm	_MC,4,2                         ## @MC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d-byte integer does not fit into Lua Integer"

	.no_dead_strip	_unpackint
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function unpackint
_unpackint:                             ; @unpackint
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _SZINT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SZINT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w3
	csel	w25, w8, w3, lt
	cmp	w25, #1
	b.lt	LBB0_6
; %bb.1:
	mov	w24, #0
Lloh3:
	adrp	x9, _NB@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NB@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	add	w10, w25, #1
	sub	w11, w19, w25
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sub	w12, w10, #2
	lsl	w13, w24, w9
	cmp	w20, #0
	csel	w12, w11, w12, eq
	ldrb	w12, [x21, w12, sxtw]
	orr	w24, w13, w12
	sub	w10, w10, #1
	add	w11, w11, #1
	cmp	w10, #1
	b.hi	LBB0_2
; %bb.3:
	cmp	w8, w19
	b.le	LBB0_7
LBB0_4:
	cbz	w4, LBB0_12
; %bb.5:
Lloh6:
	adrp	x8, _NB@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NB@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	mul	w8, w8, w19
	sub	w8, w8, #1
	mov	w9, #1
	lsl	w8, w9, w8
	eor	w9, w8, w24
	sub	w24, w9, w8
	b	LBB0_12
LBB0_6:
	mov	w24, #0
	cmp	w8, w19
	b.gt	LBB0_4
LBB0_7:
	b.ge	LBB0_12
; %bb.8:
	cmn	w24, #1
	ccmp	w4, #0, #4, le
Lloh9:
	adrp	x8, _MC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MC@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	csel	w26, wzr, w8, eq
	mvn	w8, w25
	add	w27, w8, w19
Lloh12:
	adrp	x23, l_.str@PAGE
Lloh13:
	add	x23, x23, l_.str@PAGEOFF
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	w25, w25, #1
	sub	w27, w27, #1
	cmn	w27, #1
	b.eq	LBB0_12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	cmp	w20, #0
	csel	w8, w27, w25, eq
	ldrb	w8, [x21, w8, sxtw]
	cmp	w26, w8
	b.eq	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x22
	mov	x1, x23
	mov	x2, x19
	bl	_luaL_error
	b	LBB0_9
LBB0_12:
	sxtw	x0, w24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SZINT,4,2                      ; @SZINT
	.comm	_NB,4,2                         ; @NB
	.comm	_MC,4,2                         ; @MC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d-byte integer does not fit into Lua Integer"

	.no_dead_strip	_unpackint
.subsections_via_symbols
