	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_luaD_growstack                 ## -- Begin function luaD_growstack
	.p2align	4, 0x90
_luaD_growstack:                        ## @luaD_growstack
	.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	%rdi, %r14
	movl	(%rdi), %ebx
	movq	_LUAI_MAXSTACK@GOTPCREL(%rip), %r12
	cmpl	(%r12), %ebx
	jle	LBB0_1
## %bb.3:
	movq	_LUA_ERRERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_luaD_throw                     ## TAILCALL
LBB0_1:
	movl	%esi, %r15d
	movq	16(%r14), %rdi
	subq	8(%r14), %rdi
	callq	_cast_int
	addl	%r15d, %eax
	movq	_EXTRA_STACK@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	addl	%ebx, %ebx
	movl	(%r12), %ecx
	cmpl	%ecx, %ebx
	cmovgel	%ecx, %ebx
	cmpl	%eax, %ebx
	cmovlel	%eax, %ebx
	cmpl	%ecx, %ebx
	jle	LBB0_2
## %bb.4:
	movq	_ERRORSTACKSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_luaD_reallocstack
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_luaG_runerror                  ## TAILCALL
LBB0_2:
	movq	%r14, %rdi
	movl	%ebx, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_luaD_reallocstack              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LUAI_MAXSTACK,4,2              ## @LUAI_MAXSTACK
	.comm	_LUA_ERRERR,4,2                 ## @LUA_ERRERR
	.comm	_EXTRA_STACK,4,2                ## @EXTRA_STACK
	.comm	_ERRORSTACKSIZE,4,2             ## @ERRORSTACKSIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stack overflow"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_luaD_growstack                 ; -- Begin function luaD_growstack
	.p2align	2
_luaD_growstack:                        ; @luaD_growstack
	.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	x19, x0
	ldr	w21, [x0]
Lloh0:
	adrp	x22, _LUAI_MAXSTACK@GOTPAGE
Lloh1:
	ldr	x22, [x22, _LUAI_MAXSTACK@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w21, w8
	b.le	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _LUA_ERRERR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LUA_ERRERR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	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	_luaD_throw
LBB0_2:
	mov	x20, x1
	ldp	x9, x8, [x19, #8]
	sub	x0, x8, x9
	bl	_cast_int
Lloh5:
	adrp	x8, _EXTRA_STACK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EXTRA_STACK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	add	w9, w0, w20
	add	w8, w9, w8
	lsl	w9, w21, #1
	ldr	w10, [x22]
	cmp	w9, w10
	csel	w9, w9, w10, lt
	cmp	w9, w8
	csel	w1, w9, w8, gt
	cmp	w1, w10
	b.le	LBB0_4
; %bb.3:
Lloh8:
	adrp	x8, _ERRORSTACKSIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERRORSTACKSIZE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_luaD_reallocstack
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	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	_luaG_runerror
LBB0_4:
	mov	x0, x19
	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	_luaD_reallocstack
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_LUAI_MAXSTACK,4,2              ; @LUAI_MAXSTACK
	.comm	_LUA_ERRERR,4,2                 ; @LUA_ERRERR
	.comm	_EXTRA_STACK,4,2                ; @EXTRA_STACK
	.comm	_ERRORSTACKSIZE,4,2             ; @ERRORSTACKSIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stack overflow"

.subsections_via_symbols
