	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function close_state
_close_state:                           ## @close_state
	.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
	movq	%rdi, %rbx
	callq	_G
	movq	%rax, %r14
	movl	(%rbx), %esi
	movq	%rbx, %rdi
	callq	_luaF_close
	movq	%rbx, %rdi
	callq	_luaC_freeallobjects
	cmpq	$0, 24(%r14)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_luai_userstateclose
LBB0_2:
	movq	%rbx, %rdi
	callq	_G
	movl	20(%rax), %r15d
	movq	%rbx, %rdi
	callq	_G
	movl	16(%rax), %edx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_luaM_freearray
	movq	%rbx, %rdi
	callq	_freestack
	movq	%r14, %rdi
	callq	_gettotalbytes
	xorl	%edi, %edi
	cmpl	$4, %eax
	sete	%dil
	callq	_lua_assert
	movq	8(%r14), %r15
	movl	(%r14), %r14d
	movq	%rbx, %rdi
	callq	_fromstate
	movl	%r14d, %edi
	movl	%eax, %esi
	movl	$4, %edx
	xorl	%ecx, %ecx
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_close_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function close_state
_close_state:                           ; @close_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	bl	_G
	mov	x20, x0
	ldr	w1, [x19]
	mov	x0, x19
	bl	_luaF_close
	mov	x0, x19
	bl	_luaC_freeallobjects
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_luai_userstateclose
LBB0_2:
	mov	x0, x19
	bl	_G
	ldr	w21, [x0, #20]
	mov	x0, x19
	bl	_G
	ldr	w2, [x0, #16]
	mov	x0, x19
	mov	x1, x21
	bl	_luaM_freearray
	mov	x0, x19
	bl	_freestack
	mov	x0, x20
	bl	_gettotalbytes
	cmp	w0, #4
	cset	w0, eq
	bl	_lua_assert
	ldr	x0, [x20, #8]
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	ldr	w20, [x20]
	mov	x0, x19
	bl	_fromstate
	mov	x1, x0
	mov	x0, x20
	mov	w2, #4
	mov	w3, #0
	ldr	x4, [sp, #8]                    ; 8-byte Folded Reload
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	br	x4
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_close_state
.subsections_via_symbols
