// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lauxlib.c
// Function: luaL_traceback
LUALIB_API void luaL_traceback (lua_State *L, lua_State *L1,
                                const char *msg, int level) {
  lua_Debug ar;
  int top = lua_gettop(L);
  int numlevels = countlevels(L1);
  int mark = (numlevels > LEVELS1 + LEVELS2) ? LEVELS1 : 0;
  if (msg) lua_pushfstring(L, "%s\n", msg);
  lua_pushliteral(L, "stack traceback:");
  while (lua_getstack(L1, level++, &ar)) {
    if (level == mark) {  /* too many levels? */
      lua_pushliteral(L, "\n\t...");  /* add a '...' */
      level = numlevels - LEVELS2;  /* and skip to last ones */
    }
    else {
      lua_getinfo(L1, "Slnt", &ar);
      lua_pushfstring(L, "\n\t%s:", ar.short_src);
      if (ar.currentline > 0)
        lua_pushfstring(L, "%d:", ar.currentline);
      lua_pushliteral(L, " in ");
      pushfuncname(L, &ar);
      if (ar.istailcall)
        lua_pushliteral(L, "\n\t(...tail calls...)");
      lua_concat(L, lua_gettop(L) - top);
    }
  }
  lua_concat(L, lua_gettop(L) - top);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %ecx, %r15d
movq %rdx, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, 0x10(%rsp)
callq 0x7674
movl %eax, 0x4(%rsp)
movl $0x1, %ecx
leaq 0x18(%rsp), %r13
movl $0x1, %ebx
movl %ebx, %r12d
movl %ecx, %ebx
movq %r14, %rdi
movl %ecx, %esi
movq %r13, %rdx
callq 0xa684
leal (%rbx,%rbx), %ecx
testl %eax, %eax
jne 0x8e0d
cmpl %ebx, %r12d
jge 0x8e5c
leaq 0x18(%rsp), %r13
leal (%rbx,%r12), %eax
movl %eax, %ebp
shrl $0x1f, %ebp
addl %eax, %ebp
sarl %ebp
movq %r14, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0xa684
testl %eax, %eax
je 0x8e55
incl %ebp
movl %ebp, %r12d
jmp 0x8e57
movl %ebp, %ebx
cmpl %ebx, %r12d
jl 0x8e30
xorl %eax, %eax
cmpl $0x18, %ebx
movl $0xc, %ebp
cmovll %eax, %ebp
movq 0x8(%rsp), %rdx
testq %rdx, %rdx
movq 0x10(%rsp), %r12
je 0x8e89
leaq 0x171bd(%rip), %rsi     # 0x2003c
movq %r12, %rdi
xorl %eax, %eax
callq 0x7fb4
leaq 0x17598(%rip), %rsi     # 0x20428
movl $0x10, %edx
movq %r12, %rdi
callq 0x7ecb
leaq 0x18(%rsp), %rdx
movq %r14, %rdi
movl %r15d, %esi
callq 0xa684
testl %eax, %eax
je 0x9036
addl $-0xb, %ebx
leaq 0x18(%rsp), %r13
incl %r15d
cmpl %ebp, %r15d
jne 0x8ee1
movl $0x5, %edx
movq %r12, %rdi
leaq 0x17565(%rip), %rsi     # 0x20439
callq 0x7ecb
movl %ebx, %r15d
jmp 0x9020
movq %r14, %rdi
leaq 0x17554(%rip), %rsi     # 0x2043f
movq %r13, %rdx
callq 0xa879
movq %r12, %rdi
leaq 0x17547(%rip), %rsi     # 0x20444
leaq 0x50(%rsp), %rdx
xorl %eax, %eax
callq 0x7fb4
movl 0x40(%rsp), %edx
testl %edx, %edx
jle 0x8f22
movq %r12, %rdi
leaq 0x1752f(%rip), %rsi     # 0x2044a
xorl %eax, %eax
callq 0x7fb4
movl $0x4, %edx
movq %r12, %rdi
leaq 0x1751d(%rip), %rsi     # 0x2044e
callq 0x7ecb
movq 0x28(%rsp), %rax
cmpb $0x0, (%rax)
je 0x8f5b
movq 0x20(%rsp), %rdx
movq %r12, %rdi
leaq 0x176b6(%rip), %rsi     # 0x20605
xorl %eax, %eax
callq 0x7fb4
jmp 0x8fef
movq 0x30(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x43, %eax
je 0x8f7e
cmpl $0x6d, %eax
jne 0x8fbf
movl $0xa, %edx
movq %r12, %rdi
leaq 0x17697(%rip), %rsi     # 0x20613
jmp 0x8fea
movq %r12, %rdi
movq %r13, %rsi
callq 0x9200
testl %eax, %eax
je 0x8fdb
movq %r12, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x7cea
movq %r12, %rdi
leaq 0x1765f(%rip), %rsi     # 0x20605
movq %rax, %rdx
xorl %eax, %eax
callq 0x7fb4
movq %r12, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x77ed
jmp 0x8fef
movl 0x44(%rsp), %ecx
movq %r12, %rdi
leaq 0x17651(%rip), %rsi     # 0x2061e
leaq 0x50(%rsp), %rdx
xorl %eax, %eax
callq 0x7fb4
jmp 0x8fef
movl $0x1, %edx
movq %r12, %rdi
leaq 0x1785a(%rip), %rsi     # 0x20844
callq 0x7ecb
cmpb $0x0, 0x4f(%rsp)
je 0x900a
movl $0x14, %edx
movq %r12, %rdi
leaq 0x1744e(%rip), %rsi     # 0x20453
callq 0x7ecb
movq %r12, %rdi
callq 0x7674
subl 0x4(%rsp), %eax
movq %r12, %rdi
movl %eax, %esi
callq 0x8ac0
movq %r14, %rdi
movl %r15d, %esi
movq %r13, %rdx
callq 0xa684
testl %eax, %eax
jne 0x8ebd
movq %r12, %rdi
callq 0x7674
subl 0x4(%rsp), %eax
movq %r12, %rdi
movl %eax, %esi
callq 0x8ac0
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq