	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function checkstacksizes
_checkstacksizes:                       ## @checkstacksizes
	.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	%rsi, %rbx
	movq	%rdi, %r12
	movq	24(%rdi), %rdi
	subq	16(%r12), %rdi
	callq	_cast_int
	movl	%eax, %r15d
	subq	8(%r12), %rbx
	movq	%rbx, %rdi
	callq	_cast_int
	movl	%eax, %r14d
	movl	(%r12), %eax
	movq	_LUAI_MAXCALLS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_1
## %bb.8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leal	(,%r15,4), %ecx
	cmpl	%eax, %ecx
	jge	LBB0_4
## %bb.2:
	movq	_BASIC_CI_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%ecx, %ecx
	cmpl	%eax, %ecx
	jge	LBB0_4
## %bb.3:
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	movq	%r12, %rdi
	callq	_luaD_reallocCI
LBB0_4:
	incl	%r15d
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_luaD_reallocCI
	movl	%eax, %edi
	callq	_condhardstacktests
	movl	%r14d, %ecx
	shll	$2, %ecx
	movl	4(%r12), %eax
	cmpl	%eax, %ecx
	jge	LBB0_7
## %bb.5:
	movq	_BASIC_STACK_SIZE@GOTPCREL(%rip), %rcx
	movq	_EXTRA_STACK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	addl	(%rcx), %edx
	addl	%edx, %edx
	cmpl	%eax, %edx
	jge	LBB0_7
## %bb.6:
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	movq	%r12, %rdi
	callq	_luaD_reallocstack
LBB0_7:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_luaD_reallocstack
	movl	%eax, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_condhardstacktests             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LUAI_MAXCALLS,4,2              ## @LUAI_MAXCALLS
	.comm	_BASIC_CI_SIZE,4,2              ## @BASIC_CI_SIZE
	.comm	_BASIC_STACK_SIZE,4,2           ## @BASIC_STACK_SIZE
	.comm	_EXTRA_STACK,4,2                ## @EXTRA_STACK
	.no_dead_strip	_checkstacksizes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function checkstacksizes
_checkstacksizes:                       ; @checkstacksizes
	.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	x20, x1
	mov	x19, x0
	ldp	x9, x8, [x0, #16]
	sub	x0, x8, x9
	bl	_cast_int
	mov	x21, x0
	ldr	x8, [x19, #8]
	sub	x0, x20, x8
	bl	_cast_int
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _LUAI_MAXCALLS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LUAI_MAXCALLS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_2
; %bb.1:
	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_2:
	mov	x20, x0
	cmp	w8, w21, lsl #2
	b.le	LBB0_5
; %bb.3:
Lloh3:
	adrp	x9, _BASIC_CI_SIZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BASIC_CI_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9, lsl #1
	b.le	LBB0_5
; %bb.4:
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w1, w8, #1
	mov	x0, x19
	bl	_luaD_reallocCI
LBB0_5:
	add	w1, w21, #1
	mov	x0, x19
	bl	_luaD_reallocCI
	bl	_condhardstacktests
	ldr	w8, [x19, #4]
	cmp	w8, w20, lsl #2
	b.le	LBB0_8
; %bb.6:
Lloh6:
	adrp	x9, _BASIC_STACK_SIZE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BASIC_STACK_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _EXTRA_STACK@GOTPAGE
Lloh10:
	ldr	x10, [x10, _EXTRA_STACK@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	add	w9, w10, w9
	cmp	w8, w9, lsl #1
	b.le	LBB0_8
; %bb.7:
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w1, w8, #1
	mov	x0, x19
	bl	_luaD_reallocstack
LBB0_8:
	mov	x0, x19
	mov	x1, x20
	bl	_luaD_reallocstack
	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	_condhardstacktests
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_LUAI_MAXCALLS,4,2              ; @LUAI_MAXCALLS
	.comm	_BASIC_CI_SIZE,4,2              ; @BASIC_CI_SIZE
	.comm	_BASIC_STACK_SIZE,4,2           ; @BASIC_STACK_SIZE
	.comm	_EXTRA_STACK,4,2                ; @EXTRA_STACK
	.no_dead_strip	_checkstacksizes
.subsections_via_symbols
