// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/ldo.c
// Function: luaD_precall
int luaD_precall (lua_State *L, StkId func, int nresults) {
  LClosure *cl;
  ptrdiff_t funcr;
  if (!ttisfunction(func)) /* `func' is not a function? */
    func = tryfuncTM(L, func);  /* check the `function' tag method */
  funcr = savestack(L, func);
  cl = &clvalue(func)->l;
  L->ci->savedpc = L->savedpc;
  if (!cl->isC) {  /* Lua function? prepare its call */
    CallInfo *ci;
    StkId st, base;
    Proto *p = cl->p;
    luaD_checkstack(L, p->maxstacksize);
    func = restorestack(L, funcr);
    if (!p->is_vararg) {  /* no varargs? */
      base = func + 1;
      if (L->top > base + p->numparams)
        L->top = base + p->numparams;
    }
    else {  /* vararg function */
      int nargs = cast_int(L->top - func) - 1;
      base = adjust_varargs(L, p, nargs);
      func = restorestack(L, funcr);  /* previous call may change the stack */
    }
    ci = inc_ci(L);  /* now `enter' new function */
    ci->func = func;
    L->base = ci->base = base;
    ci->top = L->base + p->maxstacksize;
    lua_assert(ci->top <= L->stack_last);
    L->savedpc = p->code;  /* starting point */
    ci->tailcalls = 0;
    ci->nresults = nresults;
    for (st = L->top; st < ci->top; st++)
      setnilvalue(st);
    L->top = ci->top;
    if (L->hookmask & LUA_MASKCALL) {
      L->savedpc++;  /* hooks assume 'pc' is already incremented */
      luaD_callhook(L, LUA_HOOKCALL, -1);
      L->savedpc--;  /* correct 'pc' */
    }
    return PCRLUA;
  }
  else {  /* if is a C function, call it */
    CallInfo *ci;
    int n;
    luaD_checkstack(L, LUA_MINSTACK);  /* ensure minimum stack size */
    ci = inc_ci(L);  /* now `enter' new function */
    ci->func = restorestack(L, funcr);
    L->base = ci->base = ci->func + 1;
    ci->top = L->top + LUA_MINSTACK;
    lua_assert(ci->top <= L->stack_last);
    ci->nresults = nresults;
    if (L->hookmask & LUA_MASKCALL)
      luaD_callhook(L, LUA_HOOKCALL, -1);
    lua_unlock(L);
    n = (*curr_func(L)->c.f)(L);  /* do the actual call */
    lua_lock(L);
    if (n < 0)  /* yielding? */
      return PCRYIELD;
    else {
      luaD_poscall(L, L->top - n);
      return PCRC;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x6, 0x8(%rsi)
jne 0x7d17
movq (%r14), %rcx
jmp 0x7db5
movq %rbx, %rdi
movq %r14, %rsi
movl $0x10, %edx
callq 0xe22f
movq %rax, %r15
movq 0x40(%rbx), %r12
cmpl $0x6, 0x8(%rax)
je 0x7d46
leaq 0x13fae(%rip), %rdx     # 0x1bce9
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7450
movq 0x10(%rbx), %rax
cmpq %r14, %rax
jbe 0x7d6c
movq -0x10(%rax), %rcx
movq %rcx, (%rax)
movl -0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
leaq -0x10(%rax), %rcx
movq %rcx, %rax
cmpq %r14, %rcx
ja 0x7d4f
movq 0x10(%rbx), %rax
movq 0x38(%rbx), %rcx
subq %rax, %rcx
cmpq $0x10, %rcx
jg 0x7d93
movl 0x58(%rbx), %eax
leal 0x1(%rax), %ecx
leal (%rax,%rax), %esi
testl %eax, %eax
cmovlel %ecx, %esi
movq %rbx, %rdi
callq 0x7aba
movq 0x10(%rbx), %rax
subq %r12, %r14
addq $0x10, %rax
movq %rax, 0x10(%rbx)
movq 0x40(%rbx), %rax
movq (%r15), %rcx
movq %rcx, (%rax,%r14)
movl 0x8(%r15), %edx
movl %edx, 0x8(%rax,%r14)
addq %rax, %r14
movq 0x40(%rbx), %r15
subq %r15, %r14
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %rdx
movq %rdx, 0x18(%rax)
cmpb $0x0, 0xa(%rcx)
je 0x7e0a
movq 0x38(%rbx), %rcx
subq 0x10(%rbx), %rcx
cmpq $0x140, %rcx            # imm = 0x140
jg 0x7dfa
movl 0x58(%rbx), %eax
leal 0x14(%rax), %ecx
leal (%rax,%rax), %esi
cmpl $0x14, %eax
cmovll %ecx, %esi
movq %rbx, %rdi
callq 0x7aba
movq 0x28(%rbx), %rax
cmpq 0x48(%rbx), %rax
je 0x7e74
addq $0x28, %rax
movq %rax, 0x28(%rbx)
jmp 0x7e7c
movq 0x20(%rcx), %r12
movq 0x38(%rbx), %rcx
subq 0x10(%rbx), %rcx
movzbl 0x73(%r12), %eax
movl %eax, %edx
shll $0x4, %edx
cmpq %rdx, %rcx
jg 0x7e40
movl 0x58(%rbx), %ecx
leal (%rcx,%rax), %edx
leal (%rcx,%rcx), %esi
cmpl %eax, %ecx
cmovll %edx, %esi
movq %rbx, %rdi
callq 0x7aba
movq 0x40(%rbx), %r15
addq %r14, %r15
movb 0x72(%r12), %al
testb %al, %al
je 0x7ef9
movq 0x10(%rbx), %r13
movq %r13, %rdx
subq %r15, %rdx
shrq $0x4, %rdx
movzbl 0x71(%r12), %r15d
cmpl %r15d, %edx
jle 0x7f20
decl %edx
jmp 0x7f3e
movq %rbx, %rdi
callq 0x8275
movq 0x40(%rbx), %rcx
leaq (%rcx,%r14), %rdx
movq %rdx, 0x8(%rax)
addq %r14, %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq %rcx, 0x18(%rbx)
movl $0x140, %ecx            # imm = 0x140
addq 0x10(%rbx), %rcx
movq %rcx, 0x10(%rax)
movl %ebp, 0x20(%rax)
testb $0x1, 0x64(%rbx)
je 0x7ebb
movq %rbx, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7c26
movq 0x28(%rbx), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rbx, %rdi
callq *0x20(%rax)
testl %eax, %eax
js 0x7eef
movq 0x10(%rbx), %rsi
movl %eax, %eax
shlq $0x4, %rax
subq %rax, %rsi
movq %rbx, %rdi
callq 0x82c3
movl $0x1, %ebp
jmp 0x8264
movl $0x2, %ebp
jmp 0x8264
leaq 0x10(%r15), %r13
movzbl 0x71(%r12), %eax
shll $0x4, %eax
addq %r15, %rax
addq $0x10, %rax
cmpq %rax, 0x10(%rbx)
jbe 0x80c3
movq %rax, 0x10(%rbx)
jmp 0x80c3
movl %r15d, %ecx
subl %edx, %ecx
incl %ecx
movl $0x0, 0x8(%r13)
addq $0x10, %r13
decl %ecx
jne 0x7f27
movq %r13, 0x10(%rbx)
movl %r15d, %edx
testb $0x4, %al
jne 0x7f49
xorl %edi, %edi
jmp 0x805c
movq 0x20(%rbx), %rax
movq 0x78(%rax), %rcx
cmpq 0x70(%rax), %rcx
jb 0x7f69
movq %rbx, %rdi
movq %rdx, %r13
callq 0x93fe
movq %r13, %rdx
movq 0x10(%rbx), %r13
movl %ebp, 0x4(%rsp)
movq %rdx, 0x10(%rsp)
movl %edx, %ebp
movq %r15, 0x18(%rsp)
subl %r15d, %ebp
movq 0x38(%rbx), %rcx
subq %r13, %rcx
movq %r12, 0x20(%rsp)
movzbl 0x73(%r12), %eax
movl %eax, %edx
shll $0x4, %edx
cmpq %rdx, %rcx
jg 0x7fae
movl 0x58(%rbx), %ecx
leal (%rcx,%rax), %edx
leal (%rcx,%rcx), %esi
cmpl %eax, %ecx
cmovll %edx, %esi
movq %rbx, %rdi
callq 0x7aba
movq %rbx, %rdi
movl %ebp, %esi
movl $0x1, %edx
callq 0xd77c
movq %rax, 0x8(%rsp)
movl %ebp, (%rsp)
testl %ebp, %ebp
jle 0x8009
movl (%rsp), %r15d
movq %r15, %rbp
shlq $0x4, %rbp
negq %rbp
xorl %r13d, %r13d
movq 0x10(%rbx), %r12
incq %r13
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movl %r13d, %edx
callq 0xdf96
movq (%r12,%rbp), %rcx
movq %rcx, (%rax)
movl 0x8(%r12,%rbp), %ecx
movl %ecx, 0x8(%rax)
addq $0x10, %rbp
cmpq %r13, %r15
jne 0x7fda
leaq 0x13c52(%rip), %rsi     # 0x1bc62
movl $0x1, %edx
movq %rbx, %rdi
callq 0xd282
movq %rbx, %rdi
movq 0x8(%rsp), %rbp
movq %rbp, %rsi
movq %rax, %rdx
callq 0xdfe2
cvtsi2sdl (%rsp), %xmm0
movsd %xmm0, (%rax)
movl $0x3, 0x8(%rax)
movq 0x10(%rbx), %r13
movl 0x4(%rsp), %eax
movq 0x20(%rsp), %r12
movq 0x18(%rsp), %r15
movq 0x10(%rsp), %rdx
movq %rbp, %rdi
movl %eax, %ebp
testl %r15d, %r15d
je 0x80a1
movl %edx, %ecx
shll $0x4, %r15d
shlq $0x4, %rcx
movq %r13, %rax
subq %rcx, %rax
addq $0x8, %rax
xorl %ecx, %ecx
movq 0x10(%rbx), %rdx
leaq 0x10(%rdx), %rsi
movq %rsi, 0x10(%rbx)
movq -0x8(%rax,%rcx), %rsi
movq %rsi, (%rdx)
movl (%rax,%rcx), %esi
movl %esi, 0x8(%rdx)
movl $0x0, (%rax,%rcx)
addq $0x10, %rcx
cmpq %rcx, %r15
jne 0x8077
testq %rdi, %rdi
je 0x80bc
movq 0x10(%rbx), %rax
leaq 0x10(%rax), %rcx
movq %rcx, 0x10(%rbx)
movq %rdi, (%rax)
movl $0x5, 0x8(%rax)
addq 0x40(%rbx), %r14
movq %r14, %r15
movq 0x28(%rbx), %rax
cmpq 0x48(%rbx), %rax
je 0x80d7
addq $0x28, %rax
movq %rax, 0x28(%rbx)
jmp 0x80df
movq %rbx, %rdi
callq 0x8275
movq %r15, 0x8(%rax)
movq %r13, (%rax)
movq %r13, 0x18(%rbx)
movzbl 0x73(%r12), %edi
movl %edi, %edx
shll $0x4, %edx
addq %r13, %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%r12), %rcx
movq %rcx, 0x30(%rbx)
movl $0x0, 0x24(%rax)
movl %ebp, 0x20(%rax)
movq 0x10(%rbx), %rax
cmpq %rdx, %rax
jae 0x823a
shll $0x4, %edi
addq %r13, %rdi
leaq 0x10(%rax), %rsi
cmpq %rsi, %rdi
cmovbeq %rsi, %rdi
movq %rax, %rsi
notq %rsi
addq %rdi, %rsi
movq %rsi, %xmm0
shrq $0x4, %rsi
addq $0x4, %rsi
andq $-0x4, %rsi
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
psrlq $0x4, %xmm0
addq $0x38, %rax
xorl %edi, %edi
movdqa 0x13111(%rip), %xmm1    # 0x1b270
movdqa 0x13119(%rip), %xmm2    # 0x1b280
movdqa 0x13121(%rip), %xmm3    # 0x1b290
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movq %rdi, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %r8d
notl %r8d
testb $0x1, %r8b
je 0x81c3
movl $0x0, -0x30(%rax)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %r8d
testb $0x1, %r8b
je 0x81da
movl $0x0, -0x20(%rax)
por %xmm1, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm4, %xmm5
pextrw $0x0, %xmm5, %r8d
testb $0x1, %r8b
je 0x8217
movl $0x0, -0x10(%rax)
pextrw $0x4, %xmm5, %r8d
testb $0x1, %r8b
je 0x8229
movl $0x0, (%rax)
addq $0x4, %rdi
addq $0x40, %rax
cmpq %rdi, %rsi
jne 0x8177
movq %rdx, 0x10(%rbx)
xorl %ebp, %ebp
testb $0x1, 0x64(%rbx)
je 0x8264
addq $0x4, %rcx
movq %rcx, 0x30(%rbx)
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7c26
addq $-0x4, 0x30(%rbx)
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq