// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/lua-5.1.5/src/lparser.c
// Function: close_func
static void close_func (LexState *ls) {
  lua_State *L = ls->L;
  FuncState *fs = ls->fs;
  Proto *f = fs->f;
  removevars(ls, 0);
  luaK_ret(fs, 0, 0);  /* final return */
  luaM_reallocvector(L, f->code, f->sizecode, fs->pc, Instruction);
  f->sizecode = fs->pc;
  luaM_reallocvector(L, f->lineinfo, f->sizelineinfo, fs->pc, int);
  f->sizelineinfo = fs->pc;
  luaM_reallocvector(L, f->k, f->sizek, fs->nk, TValue);
  f->sizek = fs->nk;
  luaM_reallocvector(L, f->p, f->sizep, fs->np, Proto *);
  f->sizep = fs->np;
  luaM_reallocvector(L, f->locvars, f->sizelocvars, fs->nlocvars, LocVar);
  f->sizelocvars = fs->nlocvars;
  luaM_reallocvector(L, f->upvalues, f->sizeupvalues, f->nups, TString *);
  f->sizeupvalues = f->nups;
  lua_assert(luaG_checkcode(f));
  lua_assert(fs->bl == NULL);
  ls->fs = fs->prev;
  /* last token read was anchored in defunct function; must reanchor it */
  if (fs) anchor_token(ls);
  L->top -= 2;  /* remove table and prototype from the stack */
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x30(%rdi), %r15
movq 0x38(%rdi), %rbx
movq (%r15), %r12
movzbl 0x4a(%r15), %eax
testq %rax, %rax
je 0x6162c
movl 0x30(%r15), %ecx
movq 0x30(%r12), %rdx
movzwl 0xc2(%r15,%rax,2), %esi
shll $0x4, %esi
movl %ecx, 0xc(%rdx,%rsi)
decq %rax
jne 0x61612
movb $0x0, 0x4a(%r15)
movq 0x18(%r15), %rax
movl 0x8(%rax), %edx
movq %r15, %rdi
movl $0x80001e, %esi         # imm = 0x80001E
callq 0x63675
movslq 0x30(%r15), %rcx
cmpq $-0x1, %rcx
jl 0x617ba
movq 0x18(%r12), %rsi
movslq 0x50(%r12), %rdx
shlq $0x2, %rdx
shlq $0x2, %rcx
movq %rbx, %rdi
callq 0x5d2f2
movq %rax, 0x18(%r12)
movslq 0x30(%r15), %rcx
movl %ecx, 0x50(%r12)
cmpq $-0x2, %rcx
jle 0x617ba
movq 0x28(%r12), %rsi
movslq 0x54(%r12), %rdx
shlq $0x2, %rdx
shlq $0x2, %rcx
movq %rbx, %rdi
callq 0x5d2f2
movq %rax, 0x28(%r12)
movl 0x30(%r15), %eax
movl %eax, 0x54(%r12)
movslq 0x40(%r15), %rcx
cmpq $-0x2, %rcx
jle 0x617ba
movq 0x10(%r12), %rsi
movslq 0x4c(%r12), %rdx
shlq $0x4, %rdx
shlq $0x4, %rcx
movq %rbx, %rdi
callq 0x5d2f2
movq %rax, 0x10(%r12)
movl 0x40(%r15), %eax
movl %eax, 0x4c(%r12)
movslq 0x44(%r15), %rcx
cmpq $-0x2, %rcx
jle 0x617ba
movq 0x20(%r12), %rsi
movslq 0x58(%r12), %rdx
shlq $0x3, %rdx
shlq $0x3, %rcx
movq %rbx, %rdi
callq 0x5d2f2
movq %rax, 0x20(%r12)
movl 0x44(%r15), %eax
movl %eax, 0x58(%r12)
movswq 0x48(%r15), %rcx
leaq 0x1(%rcx), %rax
shrq $0x3c, %rax
jne 0x617ba
movq 0x30(%r12), %rsi
movslq 0x5c(%r12), %rdx
shlq $0x4, %rdx
shlq $0x4, %rcx
movq %rbx, %rdi
callq 0x5d2f2
movq %rax, 0x30(%r12)
movswl 0x48(%r15), %eax
movl %eax, 0x5c(%r12)
movzbl 0x70(%r12), %ecx
movq 0x38(%r12), %rsi
movslq 0x48(%r12), %rdx
shlq $0x3, %rdx
shll $0x3, %ecx
movq %rbx, %rdi
callq 0x5d2f2
movq %rax, 0x38(%r12)
movzbl 0x70(%r12), %eax
movl %eax, 0x48(%r12)
movq 0x10(%r15), %rax
movq %rax, 0x30(%r14)
movl $0xfffffee3, %eax       # imm = 0xFFFFFEE3
addl 0x10(%r14), %eax
cmpl $0x2, %eax
jae 0x617a9
movq 0x18(%r14), %rsi
movq 0x10(%rsi), %rdx
addq $0x18, %rsi
movq %r14, %rdi
callq 0x62525
addq $-0x20, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x8c60d(%rip), %rsi     # 0xeddce
movq %rbx, %rdi
xorl %eax, %eax
callq 0x57b1c