// File: /workspace/github_c_makefile_star2_O2/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, 0x10(%rsp)
movq %rsi, %r12
movq %rdi, %rbx
callq 0x7423
movl %eax, 0xc(%rsp)
pushq $0x1
popq %rcx
leaq 0x18(%rsp), %r13
movl %ecx, %r14d
movl %r14d, %ebp
movl %ecx, %r14d
movq %r12, %rdi
movl %ecx, %esi
movq %r13, %rdx
callq 0xa176
leal (%r14,%r14), %ecx
testl %eax, %eax
jne 0x8a5b
movq %r12, %r13
cmpl %r14d, %ebp
jge 0x8aaf
leal (%r14,%rbp), %eax
cltd
pushq $0x2
popq %rcx
idivl %ecx
movl %eax, %r12d
movq %r13, %rdi
movl %eax, %esi
leaq 0x18(%rsp), %rdx
callq 0xa176
leal 0x1(%r12), %ecx
testl %eax, %eax
cmovnel %r14d, %r12d
cmovel %ebp, %ecx
movl %r12d, %r14d
movl %ecx, %ebp
jmp 0x8a79
xorl %eax, %eax
cmpl $0x18, %r14d
pushq $0xc
popq %r12
cmovll %eax, %r12d
movq 0x10(%rsp), %rdx
testq %rdx, %rdx
je 0x8ad8
leaq 0x1556e(%rip), %rsi     # 0x1e03c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x7c0d
leaq 0x15919(%rip), %rsi     # 0x1e3f8
pushq $0x10
popq %rdx
movq %rbx, %rdi
callq 0x7b27
addl $-0xb, %r14d
leaq 0x18(%rsp), %rbp
movq %r13, %rdi
movl %r15d, %esi
movq %rbp, %rdx
callq 0xa176
testl %eax, %eax
je 0x8c5c
incl %r15d
cmpl %r12d, %r15d
jne 0x8b28
movq %rbx, %rdi
leaq 0x158ee(%rip), %rsi     # 0x1e409
pushq $0x5
popq %rdx
callq 0x7b27
movl %r14d, %r15d
jmp 0x8af3
movq %r13, %rdi
leaq 0x158dd(%rip), %rsi     # 0x1e40f
movq %rbp, %rdx
callq 0xa351
movq %rbx, %rdi
leaq 0x158d0(%rip), %rsi     # 0x1e414
leaq 0x50(%rsp), %rdx
xorl %eax, %eax
callq 0x7c0d
movl 0x40(%rsp), %edx
testl %edx, %edx
jle 0x8b69
movq %rbx, %rdi
leaq 0x158b8(%rip), %rsi     # 0x1e41a
xorl %eax, %eax
callq 0x7c0d
movq %rbx, %rdi
leaq 0x158ab(%rip), %rsi     # 0x1e41e
pushq $0x4
popq %rdx
callq 0x7b27
movq 0x28(%rsp), %rax
cmpb $0x0, (%rax)
je 0x8ba0
movq 0x20(%rsp), %rdx
movq %rbx, %rdi
leaq 0x15a41(%rip), %rsi     # 0x1e5d5
xorl %eax, %eax
callq 0x7c0d
jmp 0x8c28
movq 0x30(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x43, %eax
je 0x8bc0
cmpl $0x6d, %eax
jne 0x8bfd
movq %rbx, %rdi
leaq 0x15a27(%rip), %rsi     # 0x1e5e3
pushq $0xa
jmp 0x8c22
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x8e20
movq %rbx, %rdi
testl %eax, %eax
je 0x8c19
pushq $-0x1
popq %rsi
xorl %edx, %edx
callq 0x7967
movq %rbx, %rdi
leaq 0x159ef(%rip), %rsi     # 0x1e5d5
movq %rax, %rdx
xorl %eax, %eax
callq 0x7c0d
movq %rbx, %rdi
pushq $-0x2
popq %rsi
callq 0x7485
jmp 0x8c28
movl 0x44(%rsp), %ecx
movq %rbx, %rdi
leaq 0x159e3(%rip), %rsi     # 0x1e5ee
leaq 0x50(%rsp), %rdx
xorl %eax, %eax
callq 0x7c0d
jmp 0x8c28
leaq 0x15bf8(%rip), %rsi     # 0x1e818
pushq $0x1
popq %rdx
callq 0x7b27
cmpb $0x0, 0x4f(%rsp)
je 0x8c41
movq %rbx, %rdi
leaq 0x157ea(%rip), %rsi     # 0x1e423
pushq $0x14
popq %rdx
callq 0x7b27
movq %rbx, %rdi
callq 0x7423
subl 0xc(%rsp), %eax
movq %rbx, %rdi
movl %eax, %esi
callq 0x8700
jmp 0x8af3
movq %rbx, %rdi
callq 0x7423
subl 0xc(%rsp), %eax
movq %rbx, %rdi
movl %eax, %esi
callq 0x8700
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq