// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/ldblib.c
// Function: db_getinfo
static int db_getinfo (lua_State *L) {
  lua_Debug ar;
  int arg;
  lua_State *L1 = getthread(L, &arg);
  const char *options = luaL_optstring(L, arg+2, "flnStu");
  if (lua_isnumber(L, arg+1)) {
    if (!lua_getstack(L1, (int)lua_tointeger(L, arg+1), &ar)) {
      lua_pushnil(L);  /* level out of range */
      return 1;
    }
  }
  else if (lua_isfunction(L, arg+1)) {
    lua_pushfstring(L, ">%s", options);
    options = lua_tostring(L, -1);
    lua_pushvalue(L, arg+1);
    lua_xmove(L, L1, 1);
  }
  else
    return luaL_argerror(L, arg+1, "function or level expected");
  if (!lua_getinfo(L1, options, &ar))
    return luaL_argerror(L, arg+2, "invalid option");
  lua_createtable(L, 0, 2);
  if (strchr(options, 'S')) {
    settabss(L, "source", ar.source);
    settabss(L, "short_src", ar.short_src);
    settabsi(L, "linedefined", ar.linedefined);
    settabsi(L, "lastlinedefined", ar.lastlinedefined);
    settabss(L, "what", ar.what);
  }
  if (strchr(options, 'l'))
    settabsi(L, "currentline", ar.currentline);
  if (strchr(options, 'u')) {
    settabsi(L, "nups", ar.nups);
    settabsi(L, "nparams", ar.nparams);
    settabsb(L, "isvararg", ar.isvararg);
  }
  if (strchr(options, 'n')) {
    settabss(L, "name", ar.name);
    settabss(L, "namewhat", ar.namewhat);
  }
  if (strchr(options, 't'))
    settabsb(L, "istailcall", ar.istailcall);
  if (strchr(options, 'L'))
    treatstackoption(L, L1, "activelines");
  if (strchr(options, 'f'))
    treatstackoption(L, L1, "func");
  return 1;  /* return table */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r15
movq %r15, %rsi
callq 0x1e25a
movq %rax, %r14
movl (%r15), %r12d
leal 0x2(%r12), %ebp
leaq 0x4cae(%rip), %rdx      # 0x225ef
movq %rbx, %rdi
movl %ebp, %esi
xorl %ecx, %ecx
callq 0x9637
movq %rax, %r15
incl %r12d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x79df
movq %rbx, %rdi
testl %eax, %eax
je 0x1d994
movl %r12d, %esi
xorl %edx, %edx
callq 0x7c2b
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
movl %eax, %esi
callq 0xa684
testl %eax, %eax
jne 0x1d9e6
movq %rbx, %rdi
callq 0x7e6c
movl $0x1, %ebp
jmp 0x1dc5c
movl %r12d, %esi
callq 0x7992
cmpl $0x6, %eax
jne 0x1dc6e
leaq 0x4c4a(%rip), %rsi      # 0x225f6
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x7fb4
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x7cea
movq %rax, %r15
movq %rbx, %rdi
movl %r12d, %esi
callq 0x7972
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x75df
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0xa879
testl %eax, %eax
je 0x1dc49
movq %rbx, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x82c4
movq %r15, %rdi
movl $0x53, %esi
callq 0x6190
testq %rax, %rax
je 0x1dacb
leaq 0x48(%rsp), %r12
movq -0x18(%r12), %rsi
movq %rbx, %rdi
callq 0x7f1a
leaq 0x4bd9(%rip), %rdx      # 0x22615
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x844e
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7f1a
leaq 0x4bc1(%rip), %rdx      # 0x2261c
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x844e
movslq -0xc(%r12), %rsi
movq %rbx, %rdi
callq 0x7e95
leaq 0x4bae(%rip), %rdx      # 0x2262a
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x844e
movslq -0x8(%r12), %rsi
movq %rbx, %rdi
callq 0x7e95
leaq 0x4b89(%rip), %rdx      # 0x22626
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x844e
movq -0x20(%r12), %rsi
movq %rbx, %rdi
callq 0x7f1a
leaq 0x4b9e(%rip), %rdx      # 0x2265c
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x844e
movq %r15, %rdi
movl $0x6c, %esi
callq 0x6190
testq %rax, %rax
je 0x1dafe
movslq 0x38(%rsp), %rsi
movq %rbx, %rdi
callq 0x7e95
leaq 0x4b45(%rip), %rdx      # 0x22636
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x844e
movq %r15, %rdi
movl $0x75, %esi
callq 0x6190
testq %rax, %rax
je 0x1db73
movzbl 0x44(%rsp), %esi
movq %rbx, %rdi
callq 0x7e95
leaq 0x4b1e(%rip), %rdx      # 0x22642
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x844e
movzbl 0x45(%rsp), %esi
movq %rbx, %rdi
callq 0x7e95
leaq 0x4b02(%rip), %rdx      # 0x22647
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x844e
movsbl 0x46(%rsp), %esi
movq %rbx, %rdi
callq 0x80e5
leaq 0x4ae9(%rip), %rdx      # 0x2264f
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x844e
movq %r15, %rdi
movl $0x6e, %esi
callq 0x6190
testq %rax, %rax
je 0x1dbc7
movq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x7f1a
leaq 0x37f2(%rip), %rdx      # 0x2138b
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x844e
movq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x7f1a
leaq 0x4a9e(%rip), %rdx      # 0x22658
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x844e
movq %r15, %rdi
movl $0x74, %esi
callq 0x6190
testq %rax, %rax
je 0x1dbfa
movsbl 0x47(%rsp), %esi
movq %rbx, %rdi
callq 0x80e5
leaq 0x4a74(%rip), %rdx      # 0x22661
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x844e
movq %r15, %rdi
movl $0x4c, %esi
callq 0x6190
testq %rax, %rax
je 0x1dc1e
leaq 0x4a59(%rip), %rdx      # 0x2266c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1e336
movq %r15, %rdi
movl $0x66, %esi
callq 0x6190
movl $0x1, %ebp
testq %rax, %rax
je 0x1dc5c
leaq 0x4a3c(%rip), %rdx      # 0x22678
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1e336
jmp 0x1dc5c
leaq 0x2f0d(%rip), %rdx      # 0x20b5d
movq %rbx, %rdi
movl %ebp, %esi
callq 0x905e
movl %eax, %ebp
movl %ebp, %eax
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4985(%rip), %rdx      # 0x225fa
movq %rbx, %rdi
movl %r12d, %esi
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x905e