	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_luaM_realloc_                  ## -- Begin function luaM_realloc_
	.p2align	4, 0x90
_luaM_realloc_:                         ## @luaM_realloc_
	.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	%rcx, %r14
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_G
	movq	%rax, %r15
	testq	%r13, %r13
	sete	%al
	movq	%rbx, %r12
	cmoveq	%r13, %r12
	testq	%r12, %r12
	setne	%cl
	xorb	%al, %cl
	movzbl	%cl, %edi
	callq	_lua_assert
	movl	8(%r15), %edi
	movq	%r13, %rsi
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdx
	movq	%r15, %rbx
	movq	%r14, %rcx
	callq	*16(%r15)
	movq	%rax, %r15
	testq	%r14, %r14
	je	LBB0_5
## %bb.1:
	testq	%r15, %r15
	jne	LBB0_5
## %bb.2:
	xorl	%edi, %edi
	cmpq	%r14, %r12
	setb	%dil
	callq	_lua_assert
	cmpq	$0, 24(%rbx)
	je	LBB0_4
## %bb.3:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %esi
	callq	_luaC_fullgc
	movl	8(%rbx), %edi
	movq	%r13, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%r14, %rcx
	callq	*16(%rbx)
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_5
LBB0_4:
	movq	_LUA_ERRMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_luaD_throw
	xorl	%r15d, %r15d
LBB0_5:
	testq	%r14, %r14
	setne	%al
	testq	%r15, %r15
	sete	%cl
	xorb	%al, %cl
	movzbl	%cl, %edi
	callq	_lua_assert
	subq	%r12, %r14
	addq	%r14, (%rbx)
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LUA_ERRMEM,4,2                 ## @LUA_ERRMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_luaM_realloc_                  ; -- Begin function luaM_realloc_
	.p2align	2
_luaM_realloc_:                         ; @luaM_realloc_
	.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	x19, x3
	mov	x22, x2
	mov	x23, x1
	mov	x21, x0
	bl	_G
	mov	x20, x0
	cmp	x23, #0
	csel	x25, xzr, x22, eq
	cset	w8, eq
	cmp	x25, #0
	cset	w9, ne
	eor	w0, w8, w9
	bl	_lua_assert
	ldr	x8, [x20, #16]
	ldr	w0, [x20, #8]
	mov	x1, x23
	mov	x2, x22
	mov	x3, x19
	blr	x8
	mov	x24, x0
	cbz	x19, LBB0_5
; %bb.1:
	cbnz	x24, LBB0_5
; %bb.2:
	cmp	x25, x19
	cset	w0, lo
	bl	_lua_assert
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x21
	mov	w1, #1
	bl	_luaC_fullgc
	ldr	x8, [x20, #16]
	ldr	w0, [x20, #8]
	mov	x1, x23
	mov	x2, x22
	mov	x3, x19
	blr	x8
	mov	x24, x0
	cbnz	x0, LBB0_5
LBB0_4:
Lloh0:
	adrp	x8, _LUA_ERRMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LUA_ERRMEM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_luaD_throw
	mov	x24, #0
LBB0_5:
	cmp	x19, #0
	cset	w8, ne
	cmp	x24, #0
	cset	w9, eq
	eor	w0, w8, w9
	bl	_lua_assert
	ldr	x8, [x20]
	sub	x9, x19, x25
	add	x8, x9, x8
	str	x8, [x20]
	mov	x0, x24
	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	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_LUA_ERRMEM,4,2                 ; @LUA_ERRMEM
.subsections_via_symbols
