// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/lua/../opensource/lua-5.2.3/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;
  luaK_ret(fs, 0, 0);  /* final return */
  leaveblock(fs);
  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, fs->nups, Upvaldesc);
  f->sizeupvalues = fs->nups;
  lua_assert(fs->bl == NULL);
  ls->fs = fs->prev;
  /* last token read was anchored in defunct function; must re-anchor it */
  anchor_token(ls);
  L->top--;  /* pop table of constants */
  luaC_checkGC(L);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x2e3c0
movq 0x10(%rsp), %rdi
callq 0x1cc20
movq 0x10(%rsp), %rax
movl 0x28(%rax), %eax
addl $0x1, %eax
cltq
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rcx, %rax
jbe 0x1b8a0
movq 0x18(%rsp), %rdi
callq 0x18150
jmp 0x1b8a2
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rsi
movq 0x8(%rsp), %rax
movslq 0x58(%rax), %rdx
shlq $0x2, %rdx
movq 0x10(%rsp), %rax
movslq 0x28(%rax), %rcx
shlq $0x2, %rcx
callq 0x18170
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x10(%rsp), %rax
movl 0x28(%rax), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x58(%rax)
movq 0x10(%rsp), %rax
movl 0x28(%rax), %eax
addl $0x1, %eax
cltq
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rcx, %rax
jbe 0x1b911
movq 0x18(%rsp), %rdi
callq 0x18150
jmp 0x1b913
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rsi
movq 0x8(%rsp), %rax
movslq 0x5c(%rax), %rdx
shlq $0x2, %rdx
movq 0x10(%rsp), %rax
movslq 0x28(%rax), %rcx
shlq $0x2, %rcx
callq 0x18170
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x10(%rsp), %rax
movl 0x28(%rax), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x5c(%rax)
movq 0x10(%rsp), %rax
movl 0x34(%rax), %eax
addl $0x1, %eax
cltq
movabsq $0xfffffffffffffff, %rcx # imm = 0xFFFFFFFFFFFFFFF
cmpq %rcx, %rax
jbe 0x1b982
movq 0x18(%rsp), %rdi
callq 0x18150
jmp 0x1b984
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x8(%rsp), %rax
movslq 0x54(%rax), %rdx
shlq $0x4, %rdx
movq 0x10(%rsp), %rax
movslq 0x34(%rax), %rcx
shlq $0x4, %rcx
callq 0x18170
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x10(%rsp), %rax
movl 0x34(%rax), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x54(%rax)
movq 0x10(%rsp), %rax
movl 0x38(%rax), %eax
addl $0x1, %eax
cltq
movabsq $0x1fffffffffffffff, %rcx # imm = 0x1FFFFFFFFFFFFFFF
cmpq %rcx, %rax
jbe 0x1b9f3
movq 0x18(%rsp), %rdi
callq 0x18150
jmp 0x1b9f5
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x8(%rsp), %rax
movslq 0x60(%rax), %rdx
shlq $0x3, %rdx
movq 0x10(%rsp), %rax
movslq 0x38(%rax), %rcx
shlq $0x3, %rcx
callq 0x18170
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x10(%rsp), %rax
movl 0x38(%rax), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x60(%rax)
movq 0x10(%rsp), %rax
movswl 0x40(%rax), %eax
addl $0x1, %eax
cltq
movabsq $0xfffffffffffffff, %rcx # imm = 0xFFFFFFFFFFFFFFF
cmpq %rcx, %rax
jbe 0x1ba65
movq 0x18(%rsp), %rdi
callq 0x18150
jmp 0x1ba67
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rsi
movq 0x8(%rsp), %rax
movslq 0x64(%rax), %rdx
shlq $0x4, %rdx
movq 0x10(%rsp), %rax
movswq 0x40(%rax), %rcx
shlq $0x4, %rcx
callq 0x18170
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x10(%rsp), %rax
movswl 0x40(%rax), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x64(%rax)
movq 0x10(%rsp), %rax
movzbl 0x43(%rax), %eax
addl $0x1, %eax
cltq
movabsq $0xfffffffffffffff, %rcx # imm = 0xFFFFFFFFFFFFFFF
cmpq %rcx, %rax
jbe 0x1bad9
movq 0x18(%rsp), %rdi
callq 0x18150
jmp 0x1badb
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rsi
movq 0x8(%rsp), %rax
movslq 0x50(%rax), %rdx
shlq $0x4, %rdx
movq 0x10(%rsp), %rax
movzbl 0x43(%rax), %eax
movl %eax, %ecx
shlq $0x4, %rcx
callq 0x18170
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x10(%rsp), %rax
movzbl 0x43(%rax), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x50(%rax)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x20(%rsp), %rdi
callq 0x1f820
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rcx
addq $-0x10, %rcx
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
cmpq $0x0, 0x18(%rax)
jle 0x1bb6e
movq 0x18(%rsp), %rdi
callq 0x13f90
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)