// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/ldblib.c
// Function: db_errorfb
static int db_errorfb (lua_State *L) {
  int level;
  int firstpart = 1;  /* still before eventual `...' */
  int arg;
  lua_State *L1 = getthread(L, &arg);
  lua_Debug ar;
  if (lua_isnumber(L, arg+2)) {
    level = (int)lua_tointeger(L, arg+2);
    lua_pop(L, 1);
  }
  else
    level = (L == L1) ? 1 : 0;  /* level 0 may be this own function */
  if (lua_gettop(L) == arg)
    lua_pushliteral(L, "");
  else if (!lua_isstring(L, arg+1)) return 1;  /* message is not a string */
  else lua_pushliteral(L, "\n");
  lua_pushliteral(L, "stack traceback:");
  while (lua_getstack(L1, level++, &ar)) {
    if (level > LEVELS1 && firstpart) {
      /* no more than `LEVELS2' more levels? */
      if (!lua_getstack(L1, level+LEVELS2, &ar))
        level--;  /* keep going */
      else {
        lua_pushliteral(L, "\n\t...");  /* too many levels */
        while (lua_getstack(L1, level+LEVELS2, &ar))  /* find last levels */
          level++;
      }
      firstpart = 0;
      continue;
    }
    lua_pushliteral(L, "\n\t");
    lua_getinfo(L1, "Snl", &ar);
    lua_pushfstring(L, "%s:", ar.short_src);
    if (ar.currentline > 0)
      lua_pushfstring(L, "%d:", ar.currentline);
    if (*ar.namewhat != '\0')  /* is there a name? */
        lua_pushfstring(L, " in function " LUA_QS, ar.name);
    else {
      if (*ar.what == 'm')  /* main? */
        lua_pushfstring(L, " in main chunk");
      else if (*ar.what == 'C' || *ar.what == 't')
        lua_pushliteral(L, " ?");  /* C function or tail call */
      else
        lua_pushfstring(L, " in function <%s:%d>",
                           ar.short_src, ar.linedefined);
    }
    lua_concat(L, lua_gettop(L) - arg);
  }
  lua_concat(L, lua_gettop(L) - arg);
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r15
movq %r15, %rsi
callq 0x141d2
movq %rax, %r14
movl (%r15), %r12d
leal 0x2(%r12), %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5493
testl %eax, %eax
je 0x13fe5
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5612
movq %rax, %r15
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x51fc
jmp 0x13fef
xorl %r15d, %r15d
cmpq %rbx, %r14
sete %r15b
movq %rbx, %rdi
callq 0x51ef
cmpl %r12d, %eax
jne 0x1400a
leaq 0x7177(%rip), %rsi      # 0x1b17a
movq %rbx, %rdi
xorl %edx, %edx
jmp 0x1402c
leal 0x1(%r12), %esi
movq %rbx, %rdi
callq 0x54c4
testl %eax, %eax
je 0x141bd
leaq 0x5fe2(%rip), %rsi      # 0x1a008
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x5819
leaq 0x67b8(%rip), %rsi      # 0x1a7f0
pushq $0x10
popq %rdx
movq %rbx, %rdi
callq 0x5819
movb $0x1, %bpl
leaq 0x10(%rsp), %r13
notb %bpl
movq %r14, %rdi
movl %r15d, %esi
movq %r13, %rdx
callq 0x63ff
testl %eax, %eax
je 0x141a8
cmpl $0xc, %r15d
setl %al
orb %bpl, %al
testb $0x1, %al
je 0x14160
movq %rbx, %rdi
leaq 0x6787(%rip), %rsi      # 0x1a807
pushq $0x2
popq %rdx
callq 0x5819
movq %r14, %rdi
leaq 0x6778(%rip), %rsi      # 0x1a80a
movq %r13, %rdx
callq 0x656c
movq %rbx, %rdi
leaq 0x676a(%rip), %rsi      # 0x1a80e
leaq 0x48(%rsp), %rdx
xorl %eax, %eax
callq 0x58eb
movl 0x38(%rsp), %edx
testl %edx, %edx
jle 0x140c9
movq %rbx, %rdi
leaq 0x6750(%rip), %rsi      # 0x1a812
xorl %eax, %eax
callq 0x58eb
movq 0x20(%rsp), %rax
cmpb $0x0, (%rax)
je 0x140eb
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
leaq 0x6734(%rip), %rsi      # 0x1a816
xorl %eax, %eax
callq 0x58eb
jmp 0x14143
movq 0x28(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x43, %eax
je 0x14115
cmpl $0x74, %eax
je 0x14115
cmpl $0x6d, %eax
jne 0x14129
movq %rbx, %rdi
leaq 0x671c(%rip), %rsi      # 0x1a828
xorl %eax, %eax
callq 0x58eb
jmp 0x14143
movq %rbx, %rdi
leaq 0x6718(%rip), %rsi      # 0x1a837
pushq $0x2
popq %rdx
callq 0x5819
jmp 0x14143
movl 0x40(%rsp), %ecx
movq %rbx, %rdi
leaq 0x6703(%rip), %rsi      # 0x1a83a
leaq 0x48(%rsp), %rdx
xorl %eax, %eax
callq 0x58eb
movq %rbx, %rdi
callq 0x51ef
subl %r12d, %eax
movq %rbx, %rdi
movl %eax, %esi
callq 0x61ac
incl %r15d
jmp 0x1404e
leal 0xb(%r15), %esi
movq %r14, %rdi
movq %r13, %rdx
callq 0x63ff
xorl %ebp, %ebp
testl %eax, %eax
je 0x1404b
movq %rbx, %rdi
leaq 0x667e(%rip), %rsi      # 0x1a801
pushq $0x5
popq %rdx
callq 0x5819
leal 0xb(%r15), %esi
movq %r14, %rdi
movq %r13, %rdx
callq 0x63ff
incl %r15d
testl %eax, %eax
jne 0x1418b
xorl %ebp, %ebp
jmp 0x1404b
movq %rbx, %rdi
callq 0x51ef
subl %r12d, %eax
movq %rbx, %rdi
movl %eax, %esi
callq 0x61ac
pushq $0x1
popq %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq