// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/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 0xb3f7
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 0xb3dd
movb $0x0, 0x4a(%r15)
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x11a3e
movslq 0x30(%r15), %rcx
cmpq $-0x1, %rcx
jl 0xb429
movq 0x18(%r12), %rsi
movslq 0x50(%r12), %rdx
shlq $0x2, %rdx
shlq $0x2, %rcx
movq %rbx, %rdi
callq 0xa1f6
jmp 0xb431
movq %rbx, %rdi
callq 0xa242
movq %rax, 0x18(%r12)
movslq 0x30(%r15), %rcx
movl %ecx, 0x50(%r12)
cmpq $-0x1, %rcx
jl 0xb461
movq 0x28(%r12), %rsi
movslq 0x54(%r12), %rdx
shlq $0x2, %rdx
shlq $0x2, %rcx
movq %rbx, %rdi
callq 0xa1f6
jmp 0xb469
movq %rbx, %rdi
callq 0xa242
movq %rax, 0x28(%r12)
movl 0x30(%r15), %eax
movl %eax, 0x54(%r12)
movslq 0x40(%r15), %rcx
cmpq $-0x1, %rcx
jl 0xb49d
movq 0x10(%r12), %rsi
movslq 0x4c(%r12), %rdx
shlq $0x4, %rdx
shlq $0x4, %rcx
movq %rbx, %rdi
callq 0xa1f6
jmp 0xb4a5
movq %rbx, %rdi
callq 0xa242
movq %rax, 0x10(%r12)
movl 0x40(%r15), %eax
movl %eax, 0x4c(%r12)
movslq 0x44(%r15), %rcx
cmpq $-0x1, %rcx
jl 0xb4d9
movq 0x20(%r12), %rsi
movslq 0x58(%r12), %rdx
shlq $0x3, %rdx
shlq $0x3, %rcx
movq %rbx, %rdi
callq 0xa1f6
jmp 0xb4e1
movq %rbx, %rdi
callq 0xa242
movq %rax, 0x20(%r12)
movl 0x44(%r15), %eax
movl %eax, 0x58(%r12)
movswq 0x48(%r15), %rcx
leaq 0x1(%rcx), %rax
shrq $0x3c, %rax
jne 0xb51a
movq 0x30(%r12), %rsi
movslq 0x5c(%r12), %rdx
shlq $0x4, %rdx
shlq $0x4, %rcx
movq %rbx, %rdi
callq 0xa1f6
jmp 0xb522
movq %rbx, %rdi
callq 0xa242
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 0xa1f6
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 $0x1, %eax
ja 0xb58a
movq 0x18(%r14), %rsi
movq 0x10(%rsi), %rdx
addq $0x18, %rsi
movq %r14, %rdi
callq 0x1308d
addq $-0x20, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq