// File: /workspace/github_c_makefile_star2_O0/tylerneylon[P]APIsWithLua/lua/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");
  checkstack(L, L1, 3);
  if (lua_isfunction(L, arg + 1)) {  /* info about a function? */
    options = lua_pushfstring(L, ">%s", options);  /* add '>' to 'options' */
    lua_pushvalue(L, arg + 1);  /* move function to 'L1' stack */
    lua_xmove(L, L1, 1);
  }
  else {  /* stack level */
    if (!lua_getstack(L1, (int)luaL_checkinteger(L, arg + 1), &ar)) {
      lua_pushnil(L);  /* level out of range */
      return 1;
    }
  }
  if (!lua_getinfo(L1, options, &ar))
    return luaL_argerror(L, arg+2, "invalid option");
  lua_newtable(L);  /* table to collect results */
  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
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x94(%rbp), %rsi
callq 0x28a70
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rdi
movl -0x94(%rbp), %esi
addl $0x2, %esi
leaq 0xe542(%rip), %rdx      # 0x364cc
xorl %eax, %eax
movl %eax, %ecx
callq 0x20310
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rdi
movq -0xa0(%rbp), %rsi
movl $0x3, %edx
callq 0x28b70
movq -0x10(%rbp), %rdi
movl -0x94(%rbp), %esi
addl $0x1, %esi
callq 0x61f0
cmpl $0x6, %eax
jne 0x2800f
movq -0x10(%rbp), %rdi
movq -0xa8(%rbp), %rdx
leaq 0xe4fb(%rip), %rsi      # 0x364d3
movb $0x0, %al
callq 0x6de0
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rdi
movl -0x94(%rbp), %esi
addl $0x1, %esi
callq 0x6190
movq -0x10(%rbp), %rdi
movq -0xa0(%rbp), %rsi
movl $0x1, %edx
callq 0x5c20
jmp 0x28060
movq -0xa0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x10(%rbp), %rdi
movl -0x94(%rbp), %esi
addl $0x1, %esi
callq 0x20550
movq -0xb0(%rbp), %rdi
movl %eax, %esi
leaq -0x90(%rbp), %rdx
callq 0x9070
cmpl $0x0, %eax
jne 0x2805e
movq -0x10(%rbp), %rdi
callq 0x6b60
movl $0x1, -0x4(%rbp)
jmp 0x2827a
jmp 0x28060
movq -0xa0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0x9420
cmpl $0x0, %eax
jne 0x280a0
movq -0x10(%rbp), %rdi
movl -0x94(%rbp), %esi
addl $0x2, %esi
leaq 0xe444(%rip), %rdx      # 0x364d7
callq 0x1fab0
movl %eax, -0x4(%rbp)
jmp 0x2827a
movq -0x10(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x75e0
movq -0xa8(%rbp), %rdi
movl $0x53, %esi
callq 0x5170
cmpq $0x0, %rax
je 0x2812d
movq -0x10(%rbp), %rdi
movq -0x70(%rbp), %rdx
leaq 0xe413(%rip), %rsi      # 0x364e6
callq 0x28c50
movq -0x10(%rbp), %rdi
leaq -0x90(%rbp), %rdx
addq $0x38, %rdx
leaq 0xe3ff(%rip), %rsi      # 0x364ed
callq 0x28c50
movq -0x10(%rbp), %rdi
movl -0x64(%rbp), %edx
leaq 0xe3fa(%rip), %rsi      # 0x364fb
callq 0x28c90
movq -0x10(%rbp), %rdi
movl -0x60(%rbp), %edx
leaq 0xe3e3(%rip), %rsi      # 0x364f7
callq 0x28c90
movq -0x10(%rbp), %rdi
movq -0x78(%rbp), %rdx
leaq 0xe405(%rip), %rsi      # 0x3652d
callq 0x28c50
movq -0xa8(%rbp), %rdi
movl $0x6c, %esi
callq 0x5170
cmpq $0x0, %rax
je 0x28157
movq -0x10(%rbp), %rdi
movl -0x68(%rbp), %edx
leaq 0xe3b5(%rip), %rsi      # 0x36507
callq 0x28c90
movq -0xa8(%rbp), %rdi
movl $0x75, %esi
callq 0x5170
cmpq $0x0, %rax
je 0x281aa
movq -0x10(%rbp), %rdi
movzbl -0x5c(%rbp), %edx
leaq 0xe396(%rip), %rsi      # 0x36513
callq 0x28c90
movq -0x10(%rbp), %rdi
movzbl -0x5b(%rbp), %edx
leaq 0xe387(%rip), %rsi      # 0x36518
callq 0x28c90
movq -0x10(%rbp), %rdi
movsbl -0x5a(%rbp), %edx
leaq 0xe37b(%rip), %rsi      # 0x36520
callq 0x28cd0
movq -0xa8(%rbp), %rdi
movl $0x6e, %esi
callq 0x5170
cmpq $0x0, %rax
je 0x281ec
movq -0x10(%rbp), %rdi
movq -0x88(%rbp), %rdx
leaq 0xd014(%rip), %rsi      # 0x351e7
callq 0x28c50
movq -0x10(%rbp), %rdi
movq -0x80(%rbp), %rdx
leaq 0xe342(%rip), %rsi      # 0x36529
callq 0x28c50
movq -0xa8(%rbp), %rdi
movl $0x74, %esi
callq 0x5170
cmpq $0x0, %rax
je 0x28217
movq -0x10(%rbp), %rdi
movsbl -0x59(%rbp), %edx
leaq 0xe320(%rip), %rsi      # 0x36532
callq 0x28cd0
movq -0xa8(%rbp), %rdi
movl $0x4c, %esi
callq 0x5170
cmpq $0x0, %rax
je 0x28245
movq -0x10(%rbp), %rdi
movq -0xa0(%rbp), %rsi
leaq 0xe2fd(%rip), %rdx      # 0x3653d
callq 0x28d10
movq -0xa8(%rbp), %rdi
movl $0x66, %esi
callq 0x5170
cmpq $0x0, %rax
je 0x28273
movq -0x10(%rbp), %rdi
movq -0xa0(%rbp), %rsi
leaq 0xe2db(%rip), %rdx      # 0x36549
callq 0x28d10
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)