// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movl $0x1, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x22960
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
addl $0x2, %esi
callq 0x70c0
cmpl $0x0, %eax
je 0x226cd
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
addl $0x2, %esi
callq 0x73c0
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x6ab0
jmp 0x226e5
movq -0x10(%rbp), %rdx
movq -0x28(%rbp), %rsi
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovel %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6a80
cmpl -0x1c(%rbp), %eax
jne 0x22709
movq -0x10(%rbp), %rdi
leaq 0xac18(%rip), %rsi      # 0x2d316
xorl %eax, %eax
movl %eax, %edx
callq 0x78d0
jmp 0x22740
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
addl $0x1, %esi
callq 0x7120
cmpl $0x0, %eax
jne 0x22729
movl $0x1, -0x4(%rbp)
jmp 0x22954
movq -0x10(%rbp), %rdi
leaq 0x9910(%rip), %rsi      # 0x2c044
movl $0x1, %edx
callq 0x78d0
jmp 0x22740
movq -0x10(%rbp), %rdi
leaq 0xa0c5(%rip), %rsi      # 0x2c810
movl $0x10, %edx
callq 0x78d0
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
leaq -0xa0(%rbp), %rdx
callq 0x9180
cmpl $0x0, %eax
je 0x22928
cmpl $0xc, -0x14(%rbp)
jle 0x227f4
cmpl $0x0, -0x18(%rbp)
je 0x227f4
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
addl $0xa, %esi
leaq -0xa0(%rbp), %rdx
callq 0x9180
cmpl $0x0, %eax
jne 0x227ab
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x227e8
movq -0x10(%rbp), %rdi
leaq 0xa06b(%rip), %rsi      # 0x2c821
movl $0x5, %edx
callq 0x78d0
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
addl $0xa, %esi
leaq -0xa0(%rbp), %rdx
callq 0x9180
cmpl $0x0, %eax
je 0x227e6
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x227c0
jmp 0x227e8
movl $0x0, -0x18(%rbp)
jmp 0x22755
movq -0x10(%rbp), %rdi
leaq 0xa028(%rip), %rsi      # 0x2c827
movl $0x2, %edx
callq 0x78d0
movq -0x28(%rbp), %rdi
leaq 0xa016(%rip), %rsi      # 0x2c82a
leaq -0xa0(%rbp), %rdx
callq 0x9480
movq -0x10(%rbp), %rdi
leaq -0xa0(%rbp), %rdx
addq $0x38, %rdx
leaq 0x9ff8(%rip), %rsi      # 0x2c82e
movb $0x0, %al
callq 0x7a10
cmpl $0x0, -0x78(%rbp)
jle 0x22858
movq -0x10(%rbp), %rdi
movl -0x78(%rbp), %edx
leaq 0x9fe1(%rip), %rsi      # 0x2c832
movb $0x0, %al
callq 0x7a10
movq -0x90(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x22882
movq -0x10(%rbp), %rdi
movq -0x98(%rbp), %rdx
leaq 0x9fbd(%rip), %rsi      # 0x2c836
movb $0x0, %al
callq 0x7a10
jmp 0x228fe
movq -0x88(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x6d, %eax
jne 0x228a5
movq -0x10(%rbp), %rdi
leaq 0x9fac(%rip), %rsi      # 0x2c848
movb $0x0, %al
callq 0x7a10
jmp 0x228fc
movq -0x88(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x43, %eax
je 0x228c3
movq -0x88(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x74, %eax
jne 0x228da
movq -0x10(%rbp), %rdi
leaq 0x9f89(%rip), %rsi      # 0x2c857
movl $0x2, %edx
callq 0x78d0
jmp 0x228fa
movq -0x10(%rbp), %rdi
leaq -0xa0(%rbp), %rdx
addq $0x38, %rdx
movl -0x70(%rbp), %ecx
leaq 0x9f67(%rip), %rsi      # 0x2c85a
movb $0x0, %al
callq 0x7a10
jmp 0x228fc
jmp 0x228fe
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6a80
movq -0xa8(%rbp), %rdi
movl %eax, %esi
subl -0x1c(%rbp), %esi
callq 0x8c40
jmp 0x22755
movq -0x10(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6a80
movq -0xb0(%rbp), %rdi
movl %eax, %esi
subl -0x1c(%rbp), %esi
callq 0x8c40
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq