// File: /workspace/github_c_makefile_star2_O0/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:
subq $0xb8, %rsp
movq %rdi, 0xa8(%rsp)
movq 0xa8(%rsp), %rdi
leaq 0x24(%rsp), %rsi
callq 0x31c90
movq %rax, 0x18(%rsp)
movq 0xa8(%rsp), %rdi
movl 0x24(%rsp), %esi
addl $0x2, %esi
leaq 0x6843(%rip), %rdx      # 0x378ef
xorl %eax, %eax
movl %eax, %ecx
callq 0xcc70
movq %rax, 0x10(%rsp)
movq 0xa8(%rsp), %rdi
movl 0x24(%rsp), %esi
addl $0x1, %esi
callq 0x9420
cmpl $0x0, %eax
je 0x3112d
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xa8(%rsp), %rdi
movl 0x24(%rsp), %esi
addl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x98a0
movq 0x8(%rsp), %rdi
movl %eax, %esi
leaq 0x28(%rsp), %rdx
callq 0xe5a0
cmpl $0x0, %eax
jne 0x31128
movq 0xa8(%rsp), %rdi
callq 0x9df0
movl $0x1, 0xb4(%rsp)
jmp 0x31423
jmp 0x311d2
movq 0xa8(%rsp), %rdi
movl 0x24(%rsp), %esi
addl $0x1, %esi
callq 0x9350
cmpl $0x6, %eax
jne 0x311a9
movq 0xa8(%rsp), %rdi
movq 0x10(%rsp), %rdx
leaq 0x679c(%rip), %rsi      # 0x378f6
movb $0x0, %al
callq 0xa0f0
movq 0xa8(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x9a80
movq %rax, 0x10(%rsp)
movq 0xa8(%rsp), %rdi
movl 0x24(%rsp), %esi
addl $0x1, %esi
callq 0x92e0
movq 0xa8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl $0x1, %edx
callq 0x8c80
jmp 0x311d0
movq 0xa8(%rsp), %rdi
movl 0x24(%rsp), %esi
addl $0x1, %esi
leaq 0x673b(%rip), %rdx      # 0x378fa
callq 0xc3a0
movl %eax, 0xb4(%rsp)
jmp 0x31423
jmp 0x311d2
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0xe960
cmpl $0x0, %eax
jne 0x31212
movq 0xa8(%rsp), %rdi
movl 0x24(%rsp), %esi
addl $0x2, %esi
leaq 0x4c4a(%rip), %rdx      # 0x35e4b
callq 0xc3a0
movl %eax, 0xb4(%rsp)
jmp 0x31423
movq 0xa8(%rsp), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0xa780
movq 0x10(%rsp), %rdi
movl $0x53, %esi
callq 0x7190
cmpq $0x0, %rax
je 0x312ba
movq 0xa8(%rsp), %rdi
movq 0x48(%rsp), %rdx
leaq 0x66c6(%rip), %rsi      # 0x37915
callq 0x31e50
movq 0xa8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
addq $0x38, %rdx
leaq 0x66b0(%rip), %rsi      # 0x3791c
callq 0x31e50
movq 0xa8(%rsp), %rdi
movl 0x54(%rsp), %edx
leaq 0x66a6(%rip), %rsi      # 0x3792a
callq 0x31e90
movq 0xa8(%rsp), %rdi
movl 0x58(%rsp), %edx
leaq 0x668a(%rip), %rsi      # 0x37926
callq 0x31e90
movq 0xa8(%rsp), %rdi
movq 0x40(%rsp), %rdx
leaq 0x66a7(%rip), %rsi      # 0x3795c
callq 0x31e50
movq 0x10(%rsp), %rdi
movl $0x6c, %esi
callq 0x7190
cmpq $0x0, %rax
je 0x312e7
movq 0xa8(%rsp), %rdi
movl 0x50(%rsp), %edx
leaq 0x6654(%rip), %rsi      # 0x37936
callq 0x31e90
movq 0x10(%rsp), %rdi
movl $0x75, %esi
callq 0x7190
cmpq $0x0, %rax
je 0x31347
movq 0xa8(%rsp), %rdi
movzbl 0x5c(%rsp), %edx
leaq 0x6632(%rip), %rsi      # 0x37942
callq 0x31e90
movq 0xa8(%rsp), %rdi
movzbl 0x5d(%rsp), %edx
leaq 0x661e(%rip), %rsi      # 0x37947
callq 0x31e90
movq 0xa8(%rsp), %rdi
movsbl 0x5e(%rsp), %edx
leaq 0x660d(%rip), %rsi      # 0x3794f
callq 0x31ed0
movq 0x10(%rsp), %rdi
movl $0x6e, %esi
callq 0x7190
cmpq $0x0, %rax
je 0x3138e
movq 0xa8(%rsp), %rdi
movq 0x30(%rsp), %rdx
leaq 0x52de(%rip), %rsi      # 0x3664e
callq 0x31e50
movq 0xa8(%rsp), %rdi
movq 0x38(%rsp), %rdx
leaq 0x65cf(%rip), %rsi      # 0x37958
callq 0x31e50
movq 0x10(%rsp), %rdi
movl $0x74, %esi
callq 0x7190
cmpq $0x0, %rax
je 0x313bc
movq 0xa8(%rsp), %rdi
movsbl 0x5f(%rsp), %edx
leaq 0x65aa(%rip), %rsi      # 0x37961
callq 0x31ed0
movq 0x10(%rsp), %rdi
movl $0x4c, %esi
callq 0x7190
cmpq $0x0, %rax
je 0x313ea
movq 0xa8(%rsp), %rdi
movq 0x18(%rsp), %rsi
leaq 0x6587(%rip), %rdx      # 0x3796c
callq 0x31f10
movq 0x10(%rsp), %rdi
movl $0x66, %esi
callq 0x7190
cmpq $0x0, %rax
je 0x31418
movq 0xa8(%rsp), %rdi
movq 0x18(%rsp), %rsi
leaq 0x6565(%rip), %rdx      # 0x37978
callq 0x31f10
movl $0x1, 0xb4(%rsp)
movl 0xb4(%rsp), %eax
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)