	.file	"extr_lstate.c_close_state.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	close_state, @function
close_state:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	G@PLT
	mov	esi, DWORD PTR 0[rbp]
	mov	rdi, rbp
	mov	rbx, rax
	call	luaF_close@PLT
	mov	rdi, rbp
	call	luaC_freeallobjects@PLT
	cmp	QWORD PTR 24[rbx], 0
	jne	.L5
.L2:
	mov	rdi, rbp
	call	G@PLT
	mov	rdi, rbp
	mov	r12d, DWORD PTR 16[rax]
	call	G@PLT
	mov	rdi, rbp
	mov	esi, DWORD PTR 20[rax]
	mov	edx, r12d
	call	luaM_freearray@PLT
	mov	rdi, rbp
	call	freestack@PLT
	mov	rdi, rbx
	call	gettotalbytes@PLT
	xor	edi, edi
	cmp	eax, 4
	sete	dil
	call	lua_assert@PLT
	mov	r12, QWORD PTR 8[rbx]
	mov	rdi, rbp
	call	fromstate@PLT
	mov	edi, DWORD PTR [rbx]
	xor	ecx, ecx
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	esi, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	mov	rax, r12
	mov	edx, 4
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	rax
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	rdi, rbp
	call	luai_userstateclose@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	close_state, .-close_state
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_lstate.c_close_state.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	close_state, %function
close_state:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	bl	G
	mov	r5, r0
	ldr	r1, [r4]
	mov	r0, r4
	bl	luaF_close
	mov	r0, r4
	bl	luaC_freeallobjects
	ldr	r3, [r5, #16]
	cmp	r3, #0
	bne	.L8
.L2:
	mov	r0, r4
	bl	G
	mov	r3, r0
	mov	r0, r4
	ldr	r6, [r3, #12]
	bl	G
	mov	r1, r6
	ldr	r2, [r0, #8]
	mov	r0, r4
	bl	luaM_freearray
	mov	r0, r4
	bl	freestack
	mov	r0, r5
	bl	gettotalbytes
	sub	r0, r0, #4
	clz	r0, r0
	lsr	r0, r0, #5
	bl	lua_assert
	mov	r0, r4
	ldr	r4, [r5, #4]
	ldr	r5, [r5]
	bl	fromstate
	mov	ip, r4
	mov	r1, r0
	mov	r3, #0
	mov	r0, r5
	pop	{r4, r5, r6, lr}
	mov	r2, #4
	bx	ip
.L8:
	mov	r0, r4
	bl	luai_userstateclose
	b	.L2
	.size	close_state, .-close_state
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
