// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x106c0
movq -0x18(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x1c320
movq -0x18(%rbp), %rax
movl 0x30(%rax), %eax
addl $0x1, %eax
cltq
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rcx, %rax
ja 0x103c1
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x20(%rbp), %rax
movslq 0x50(%rax), %rdx
shlq $0x2, %rdx
movq -0x18(%rbp), %rax
movslq 0x30(%rax), %rcx
shlq $0x2, %rcx
callq 0xf470
movq %rax, -0x28(%rbp)
jmp 0x103ce
movq -0x10(%rbp), %rdi
callq 0xf500
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x18(%rbp), %rax
movl 0x30(%rax), %eax
addl $0x1, %eax
cltq
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rcx, %rax
ja 0x10432
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x20(%rbp), %rax
movslq 0x54(%rax), %rdx
shlq $0x2, %rdx
movq -0x18(%rbp), %rax
movslq 0x30(%rax), %rcx
shlq $0x2, %rcx
callq 0xf470
movq %rax, -0x30(%rbp)
jmp 0x1043f
movq -0x10(%rbp), %rdi
callq 0xf500
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x54(%rax)
movq -0x18(%rbp), %rax
movl 0x40(%rax), %eax
addl $0x1, %eax
cltq
movabsq $0xfffffffffffffff, %rcx # imm = 0xFFFFFFFFFFFFFFF
cmpq %rcx, %rax
ja 0x104a3
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x20(%rbp), %rax
movslq 0x4c(%rax), %rdx
shlq $0x4, %rdx
movq -0x18(%rbp), %rax
movslq 0x40(%rax), %rcx
shlq $0x4, %rcx
callq 0xf470
movq %rax, -0x38(%rbp)
jmp 0x104b0
movq -0x10(%rbp), %rdi
callq 0xf500
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movl 0x40(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4c(%rax)
movq -0x18(%rbp), %rax
movl 0x44(%rax), %eax
addl $0x1, %eax
cltq
movabsq $0x1fffffffffffffff, %rcx # imm = 0x1FFFFFFFFFFFFFFF
cmpq %rcx, %rax
ja 0x10514
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x20(%rbp), %rax
movslq 0x58(%rax), %rdx
shlq $0x3, %rdx
movq -0x18(%rbp), %rax
movslq 0x44(%rax), %rcx
shlq $0x3, %rcx
callq 0xf470
movq %rax, -0x40(%rbp)
jmp 0x10521
movq -0x10(%rbp), %rdi
callq 0xf500
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
movl 0x44(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x58(%rax)
movq -0x18(%rbp), %rax
movswl 0x48(%rax), %eax
addl $0x1, %eax
cltq
movabsq $0xfffffffffffffff, %rcx # imm = 0xFFFFFFFFFFFFFFF
cmpq %rcx, %rax
ja 0x10587
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rsi
movq -0x20(%rbp), %rax
movslq 0x5c(%rax), %rdx
shlq $0x4, %rdx
movq -0x18(%rbp), %rax
movswq 0x48(%rax), %rcx
shlq $0x4, %rcx
callq 0xf470
movq %rax, -0x48(%rbp)
jmp 0x10594
movq -0x10(%rbp), %rdi
callq 0xf500
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x18(%rbp), %rax
movswl 0x48(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x5c(%rax)
movq -0x20(%rbp), %rax
movzbl 0x70(%rax), %eax
addl $0x1, %eax
cltq
movabsq $0x1fffffffffffffff, %rcx # imm = 0x1FFFFFFFFFFFFFFF
cmpq %rcx, %rax
ja 0x105fc
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x20(%rbp), %rax
movslq 0x48(%rax), %rdx
shlq $0x3, %rdx
movq -0x20(%rbp), %rax
movzbl 0x70(%rax), %eax
movl %eax, %ecx
shlq $0x3, %rcx
callq 0xf470
movq %rax, -0x50(%rbp)
jmp 0x10609
movq -0x10(%rbp), %rdi
callq 0xf500
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x20(%rbp), %rax
movzbl 0x70(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x48(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x10644
movq -0x8(%rbp), %rdi
callq 0x10730
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
addq $-0x20, %rcx
movq %rcx, 0x10(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)