// File: /workspace/github_c_makefile_star2_O3/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 0x15ce7
movq %rax, %r14
movl (%r15), %r12d
leal 0x2(%r12), %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x58a3
testl %eax, %eax
je 0x15ace
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5a33
movq %rax, %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x54e9
jmp 0x15ad8
xorl %r15d, %r15d
cmpq %rbx, %r14
sete %r15b
movq %rbx, %rdi
callq 0x54dc
cmpl %r12d, %eax
jne 0x15af3
leaq 0x76b6(%rip), %rsi      # 0x1d1a2
movq %rbx, %rdi
xorl %edx, %edx
jmp 0x15b17
leal 0x1(%r12), %esi
movq %rbx, %rdi
callq 0x58d4
testl %eax, %eax
je 0x15cd0
leaq 0x6539(%rip), %rsi      # 0x1c048
movl $0x1, %edx
movq %rbx, %rdi
callq 0x5c5a
leaq 0x6d0d(%rip), %rsi      # 0x1c830
movl $0x10, %edx
movq %rbx, %rdi
callq 0x5c5a
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
movl %r15d, %esi
callq 0x6851
testl %eax, %eax
je 0x15cbb
movb $0x1, %bpl
leaq 0x10(%rsp), %r13
notb %bpl
cmpl $0xc, %r15d
setl %al
orb %bpl, %al
testb $0x1, %al
je 0x15c66
movl $0x2, %edx
movq %rbx, %rdi
leaq 0x6cd3(%rip), %rsi      # 0x1c847
callq 0x5c5a
movq %r14, %rdi
leaq 0x6cc7(%rip), %rsi      # 0x1c84a
movq %r13, %rdx
callq 0x69ca
movq %rbx, %rdi
leaq 0x6cb9(%rip), %rsi      # 0x1c84e
leaq 0x48(%rsp), %rdx
xorl %eax, %eax
callq 0x5d2f
movl 0x38(%rsp), %edx
testl %edx, %edx
jle 0x15bba
movq %rbx, %rdi
leaq 0x6c9f(%rip), %rsi      # 0x1c852
xorl %eax, %eax
callq 0x5d2f
movq 0x20(%rsp), %rax
cmpb $0x0, (%rax)
je 0x15bdc
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
leaq 0x6c83(%rip), %rsi      # 0x1c856
xorl %eax, %eax
callq 0x5d2f
jmp 0x15c36
movq 0x28(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x43, %eax
je 0x15c06
cmpl $0x74, %eax
je 0x15c06
cmpl $0x6d, %eax
jne 0x15c1c
movq %rbx, %rdi
leaq 0x6c6b(%rip), %rsi      # 0x1c868
xorl %eax, %eax
callq 0x5d2f
jmp 0x15c36
movl $0x2, %edx
movq %rbx, %rdi
leaq 0x6c62(%rip), %rsi      # 0x1c877
callq 0x5c5a
jmp 0x15c36
movl 0x40(%rsp), %ecx
movq %rbx, %rdi
leaq 0x6c50(%rip), %rsi      # 0x1c87a
leaq 0x48(%rsp), %rdx
xorl %eax, %eax
callq 0x5d2f
incl %r15d
movq %rbx, %rdi
callq 0x54dc
subl %r12d, %eax
movq %rbx, %rdi
movl %eax, %esi
callq 0x65fa
movq %r14, %rdi
movl %r15d, %esi
movq %r13, %rdx
callq 0x6851
testl %eax, %eax
jne 0x15b53
jmp 0x15cbb
leal 0xb(%r15), %esi
movq %r14, %rdi
movq %r13, %rdx
callq 0x6851
testl %eax, %eax
je 0x15ca3
movl $0x5, %edx
movq %rbx, %rdi
leaq 0x6bb9(%rip), %rsi      # 0x1c841
callq 0x5c5a
leal 0xb(%r15), %esi
movq %r14, %rdi
movq %r13, %rdx
callq 0x6851
incl %r15d
testl %eax, %eax
jne 0x15c8d
movq %r14, %rdi
movl %r15d, %esi
movq %r13, %rdx
callq 0x6851
xorl %ebp, %ebp
testl %eax, %eax
jne 0x15b50
movq %rbx, %rdi
callq 0x54dc
subl %r12d, %eax
movq %rbx, %rdi
movl %eax, %esi
callq 0x65fa
movl $0x1, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq