	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function newupvalue
_newupvalue:                            ## @newupvalue
	.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
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	16(%rdi), %r15
	movslq	(%r15), %r14
	movl	(%rdi), %esi
	incl	%esi
	movq	_MAXUPVAL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	L_.str(%rip), %r13
	movq	%r13, %rcx
	callq	_checklimit
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	movq	8(%r15), %rsi
	movl	(%rbx), %edx
	movl	(%r15), %ecx
	movq	_Upvaldesc@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	(%r12), %r9d
	movq	%r13, (%rsp)
	callq	_luaM_growvector
	movslq	(%r15), %rcx
	movq	8(%r15), %r8
	cmpl	%ecx, %r14d
	jge	LBB0_8
## %bb.1:
	movl	%ecx, %esi
	subl	%r14d, %esi
	movq	%r14, %rdx
	notq	%rdx
	addq	%rcx, %rdx
	andq	$3, %rsi
	je	LBB0_5
## %bb.2:
	leaq	(%r14,%r14,2), %rax
	leaq	(%r8,%rax,8), %rdi
	addq	$8, %rdi
	negq	%rsi
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	$0, (%rdi)
	addq	$24, %rdi
	decq	%rax
	cmpq	%rax, %rsi
	jne	LBB0_3
## %bb.4:
	subq	%rax, %r14
LBB0_5:
	cmpq	$3, %rdx
	jb	LBB0_8
## %bb.6:
	subq	%r14, %rcx
	leaq	(%r14,%r14,2), %rax
	leaq	(%r8,%rax,8), %rax
	addq	$80, %rax
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	$0, -72(%rax)
	movq	$0, -48(%rax)
	movq	$0, -24(%rax)
	movq	$0, (%rax)
	addq	$96, %rax
	addq	$-4, %rcx
	jne	LBB0_7
LBB0_8:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	(%rsi), %rax
	movq	_VLOCAL@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	sete	%dl
	movslq	(%rbx), %rax
	leaq	(%rax,%rax,2), %rax
	movl	%edx, (%r8,%rax,8)
	movl	8(%rsi), %edi
	callq	_cast_byte
	movq	8(%r15), %rcx
	movslq	(%rbx), %rdx
	leaq	(%rdx,%rdx,2), %rsi
	movl	%eax, 16(%rcx,%rsi,8)
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, 8(%rcx,%rsi,8)
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_luaC_objbarrier
	movl	(%rbx), %eax
	leal	1(%rax), %ecx
	movl	%ecx, (%rbx)
                                        ## kill: def $eax killed $eax killed $rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXUPVAL,4,2                   ## @MAXUPVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"upvalues"

	.comm	_Upvaldesc,4,2                  ## @Upvaldesc
	.comm	_VLOCAL,8,3                     ## @VLOCAL
	.no_dead_strip	_newupvalue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function newupvalue
_newupvalue:                            ; @newupvalue
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #16]
	ldrsw	x24, [x21]
	ldr	w8, [x0]
	add	w1, w8, #1
Lloh0:
	adrp	x25, _MAXUPVAL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _MAXUPVAL@GOTPAGEOFF]
	ldr	w2, [x25]
Lloh2:
	adrp	x23, l_.str@PAGE
Lloh3:
	add	x23, x23, l_.str@PAGEOFF
	mov	x3, x23
	bl	_checklimit
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	ldr	x1, [x21, #8]
	ldr	w2, [x19]
	ldr	w3, [x21]
Lloh4:
	adrp	x8, _Upvaldesc@GOTPAGE
Lloh5:
	ldr	x8, [x8, _Upvaldesc@GOTPAGEOFF]
Lloh6:
	ldr	w4, [x8]
	ldr	w5, [x25]
	mov	x6, x23
	bl	_luaM_growvector
	ldrsw	x9, [x21]
	ldr	x8, [x21, #8]
	cmp	w24, w9
	b.ge	LBB0_7
; %bb.1:
	sub	x11, x9, x24
	mov	x10, x24
	cmp	x11, #4
	b.lo	LBB0_5
; %bb.2:
	and	x12, x11, #0xfffffffffffffffc
	add	x10, x12, x24
	mov	w13, #24
	madd	x13, x24, x13, x8
	add	x13, x13, #56
	mov	x14, x12
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	stur	xzr, [x13, #-48]
	stur	xzr, [x13, #-24]
	str	xzr, [x13]
	str	xzr, [x13, #24]
	add	x13, x13, #96
	subs	x14, x14, #4
	b.ne	LBB0_3
; %bb.4:
	cmp	x11, x12
	b.eq	LBB0_7
LBB0_5:
	mov	w11, #24
	mul	x11, x10, x11
	add	x11, x8, x11
	add	x11, x11, #8
	sub	x9, x9, x10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	str	xzr, [x11], #24
	subs	x9, x9, #1
	b.ne	LBB0_6
LBB0_7:
	ldr	x9, [x22]
Lloh7:
	adrp	x10, _VLOCAL@GOTPAGE
Lloh8:
	ldr	x10, [x10, _VLOCAL@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
	cmp	x9, x10
	cset	w9, eq
	ldrsw	x10, [x19]
	mov	w23, #24
	mul	x10, x10, x23
	str	w9, [x8, x10]
	ldr	w0, [x22, #8]
	bl	_cast_byte
	ldr	x8, [x21, #8]
	ldrsw	x9, [x19]
	madd	x8, x9, x23, x8
	str	w0, [x8, #16]
	str	x20, [x8, #8]
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	mov	x1, x21
	mov	x2, x20
	bl	_luaC_objbarrier
	ldr	w0, [x19]
	add	w8, w0, #1
	str	w8, [x19]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXUPVAL,4,2                   ; @MAXUPVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"upvalues"

	.comm	_Upvaldesc,4,2                  ; @Upvaldesc
	.comm	_VLOCAL,8,3                     ; @VLOCAL
	.no_dead_strip	_newupvalue
.subsections_via_symbols
