// File: /workspace/github_c_makefile_star2_O1/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 0x7683
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 0xa530
leal (%rbx,%rbx), %ecx
testl %eax, %eax
jne 0x8ced
cmpl %ebx, %r12d
jge 0x8d3c
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 0xa530
testl %eax, %eax
je 0x8d35
incl %ebp
movl %ebp, %r12d
jmp 0x8d37
movl %ebp, %ebx
cmpl %ebx, %r12d
jl 0x8d10
xorl %eax, %eax
cmpl $0x18, %ebx
movl $0xc, %ebp
cmovll %eax, %ebp
movq 0x8(%rsp), %rdx
testq %rdx, %rdx
movq 0x10(%rsp), %r12
je 0x8d69
leaq 0x172dd(%rip), %rsi     # 0x2003c
movq %r12, %rdi
xorl %eax, %eax
callq 0x7eb0
leaq 0x17688(%rip), %rsi     # 0x203f8
movl $0x10, %edx
movq %r12, %rdi
callq 0x7dc7
leaq 0x18(%rsp), %rdx
movq %r14, %rdi
movl %r15d, %esi
callq 0xa530
testl %eax, %eax
je 0x8f16
addl $-0xb, %ebx
leaq 0x18(%rsp), %r13
incl %r15d
cmpl %ebp, %r15d
jne 0x8dc1
movl $0x5, %edx
movq %r12, %rdi
leaq 0x17655(%rip), %rsi     # 0x20409
callq 0x7dc7
movl %ebx, %r15d
jmp 0x8f00
movq %r14, %rdi
leaq 0x17644(%rip), %rsi     # 0x2040f
movq %r13, %rdx
callq 0xa730
movq %r12, %rdi
leaq 0x17637(%rip), %rsi     # 0x20414
leaq 0x50(%rsp), %rdx
xorl %eax, %eax
callq 0x7eb0
movl 0x40(%rsp), %edx
testl %edx, %edx
jle 0x8e02
movq %r12, %rdi
leaq 0x1761f(%rip), %rsi     # 0x2041a
xorl %eax, %eax
callq 0x7eb0
movl $0x4, %edx
movq %r12, %rdi
leaq 0x1760d(%rip), %rsi     # 0x2041e
callq 0x7dc7
movq 0x28(%rsp), %rax
cmpb $0x0, (%rax)
je 0x8e3b
movq 0x20(%rsp), %rdx
movq %r12, %rdi
leaq 0x177a6(%rip), %rsi     # 0x205d5
xorl %eax, %eax
callq 0x7eb0
jmp 0x8ecf
movq 0x30(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x43, %eax
je 0x8e5e
cmpl $0x6d, %eax
jne 0x8e9f
movl $0xa, %edx
movq %r12, %rdi
leaq 0x17787(%rip), %rsi     # 0x205e3
jmp 0x8eca
movq %r12, %rdi
movq %r13, %rsi
callq 0x90e0
testl %eax, %eax
je 0x8ebb
movq %r12, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x7bdc
movq %r12, %rdi
leaq 0x1774f(%rip), %rsi     # 0x205d5
movq %rax, %rdx
xorl %eax, %eax
callq 0x7eb0
movq %r12, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x76e8
jmp 0x8ecf
movl 0x44(%rsp), %ecx
movq %r12, %rdi
leaq 0x17741(%rip), %rsi     # 0x205ee
leaq 0x50(%rsp), %rdx
xorl %eax, %eax
callq 0x7eb0
jmp 0x8ecf
movl $0x1, %edx
movq %r12, %rdi
leaq 0x1794e(%rip), %rsi     # 0x20818
callq 0x7dc7
cmpb $0x0, 0x4f(%rsp)
je 0x8eea
movl $0x14, %edx
movq %r12, %rdi
leaq 0x1753e(%rip), %rsi     # 0x20423
callq 0x7dc7
movq %r12, %rdi
callq 0x7683
subl 0x4(%rsp), %eax
movq %r12, %rdi
movl %eax, %esi
callq 0x899d
movq %r14, %rdi
movl %r15d, %esi
movq %r13, %rdx
callq 0xa530
testl %eax, %eax
jne 0x8d9d
movq %r12, %rdi
callq 0x7683
subl 0x4(%rsp), %eax
movq %r12, %rdi
movl %eax, %esi
callq 0x899d
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq