	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function restore_stack_limit
_restore_stack_limit:                   ## @restore_stack_limit
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	subl	4(%rdi), %eax
	movq	_EXTRA_STACK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	addl	8(%rdi), %ecx
	xorl	%edi, %edi
	cmpl	%ecx, %eax
	sete	%dil
	callq	_lua_assert
	movl	12(%rbx), %eax
	movq	_LUAI_MAXCALLS@GOTPCREL(%rip), %r14
	cmpl	(%r14), %eax
	jle	LBB0_2
## %bb.1:
	movq	24(%rbx), %rdi
	subq	16(%rbx), %rdi
	callq	_cast_int
	incl	%eax
	movl	(%r14), %esi
	cmpl	%esi, %eax
	jge	LBB0_2
## %bb.3:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_luaD_reallocCI                 ## TAILCALL
LBB0_2:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXTRA_STACK,4,2                ## @EXTRA_STACK
	.comm	_LUAI_MAXCALLS,4,2              ## @LUAI_MAXCALLS
	.no_dead_strip	_restore_stack_limit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function restore_stack_limit
_restore_stack_limit:                   ; @restore_stack_limit
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldp	w8, w9, [x0]
	sub	w8, w8, w9
Lloh0:
	adrp	x9, _EXTRA_STACK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EXTRA_STACK@GOTPAGEOFF]
	ldr	w10, [x0, #8]
Lloh2:
	ldr	w9, [x9]
	mvn	w9, w9
	add	w9, w10, w9
	cmp	w8, w9
	cset	w0, eq
	bl	_lua_assert
	ldr	w8, [x19, #12]
Lloh3:
	adrp	x20, _LUAI_MAXCALLS@GOTPAGE
Lloh4:
	ldr	x20, [x20, _LUAI_MAXCALLS@GOTPAGEOFF]
	ldr	w9, [x20]
	cmp	w8, w9
	b.le	LBB0_3
; %bb.1:
	ldp	x9, x8, [x19, #16]
	sub	x0, x8, x9
	bl	_cast_int
	add	w8, w0, #1
	ldr	w1, [x20]
	cmp	w8, w1
	b.ge	LBB0_3
; %bb.2:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_luaD_reallocCI
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EXTRA_STACK,4,2                ; @EXTRA_STACK
	.comm	_LUAI_MAXCALLS,4,2              ; @LUAI_MAXCALLS
	.no_dead_strip	_restore_stack_limit
.subsections_via_symbols
