	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lua_checkstack
_lua_checkstack:                        ## @lua_checkstack
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r14d, %r14d
	cmpl	$8000, %esi                     ## imm = 0x1F40
	jg	LBB0_5
## %bb.1:
	movl	%esi, %ebx
	movq	%rdi, %r15
	movl	(%rdi), %eax
	addl	%esi, %eax
	subl	4(%rdi), %eax
	cmpl	$8000, %eax                     ## imm = 0x1F40
	jg	LBB0_5
## %bb.2:
	movl	$1, %r14d
	testl	%ebx, %ebx
	jle	LBB0_5
## %bb.3:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_luaD_checkstack
	movq	8(%r15), %rax
	movslq	(%r15), %rdx
	movslq	%ebx, %rcx
	addq	%rdx, %rcx
	cmpq	%rcx, (%rax)
	jge	LBB0_5
## %bb.4:
	movq	%rcx, (%rax)
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_lua_checkstack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lua_checkstack
_lua_checkstack:                        ; @lua_checkstack
	.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	w8, #8000
	cmp	w1, w8
	b.gt	LBB0_2
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldp	w9, w10, [x0]
	add	w9, w9, w1
	sub	w9, w9, w10
	cmp	w9, w8
	b.le	LBB0_3
LBB0_2:
	mov	w0, #0
	b	LBB0_7
LBB0_3:
	cmp	w19, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x0, x20
	mov	x1, x19
	bl	_luaD_checkstack
	ldr	x8, [x20, #8]
	ldr	x10, [x8]
	ldrsw	x9, [x20]
	add	x9, x9, w19, sxtw
	cmp	x10, x9
	b.ge	LBB0_6
; %bb.5:
	str	x9, [x8]
LBB0_6:
	mov	w0, #1
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_lua_checkstack
.subsections_via_symbols
