// File: /workspace/github_c_makefile_star2_O1/tylerneylon[P]APIsWithLua/lua/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 last = lastlevel(L1);
  int n1 = (last - level > LEVELS1 + LEVELS2) ? LEVELS1 : -1;
  if (msg)
    lua_pushfstring(L, "%s\n", msg);
  luaL_checkstack(L, 10, NULL);
  lua_pushliteral(L, "stack traceback:");
  while (lua_getstack(L1, level++, &ar)) {
    if (n1-- == 0) {  /* too many levels? */
      lua_pushliteral(L, "\n\t...");  /* add a '...' */
      level = last - LEVELS2 + 1;  /* 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, %r14d
movq %rdx, 0x10(%rsp)
movq %rsi, %rbp
movq %rdi, %rbx
callq 0x5d3d
movl %eax, 0xc(%rsp)
movl $0x1, %ecx
leaq 0x18(%rsp), %r13
movl $0x1, %r15d
movl %r15d, %r12d
movl %ecx, %r15d
movq %rbp, %rdi
movl %ecx, %esi
movq %r13, %rdx
callq 0x75ba
leal (%r15,%r15), %ecx
testl %eax, %eax
jne 0x13be0
movq %rbp, %r13
cmpl %r15d, %r12d
jge 0x13c2f
leal (%r15,%r12), %eax
movl %eax, %ebp
shrl $0x1f, %ebp
addl %eax, %ebp
sarl %ebp
movq %r13, %rdi
movl %ebp, %esi
leaq 0x18(%rsp), %rdx
callq 0x75ba
testl %eax, %eax
je 0x13c2a
incl %ebp
movl %ebp, %r12d
jmp 0x13bfe
movl %ebp, %r15d
jmp 0x13bfe
movl %r14d, %eax
subl %r15d, %eax
xorl %ebp, %ebp
cmpl $-0x16, %eax
setge %r12b
movq 0x10(%rsp), %rdx
testq %rdx, %rdx
je 0x13c59
leaq 0xe575(%rip), %rsi      # 0x221c4
movq %rbx, %rdi
xorl %eax, %eax
callq 0x64e8
movq %rbx, %rdi
movl $0xa, %esi
callq 0x5c28
testl %eax, %eax
jne 0x13c7b
leaq 0xd7a8(%rip), %rsi      # 0x21419
movq %rbx, %rdi
xorl %eax, %eax
callq 0x13f8e
leaq 0xe546(%rip), %rsi      # 0x221c8
movq %rbx, %rdi
callq 0x645b
leaq 0x18(%rsp), %rdx
movq %r13, %rdi
movl %r14d, %esi
callq 0x75ba
testl %eax, %eax
je 0x13e2d
movb %r12b, %bpl
negl %ebp
orl $0xa, %ebp
addl $-0xb, %r15d
leaq 0x18(%rsp), %r12
subl $0x1, %ebp
jae 0x13ccf
movq %rbx, %rdi
leaq 0xe517(%rip), %rsi      # 0x221d9
callq 0x645b
movl %r15d, %r12d
jmp 0x13e0f
movq %r13, %rdi
leaq 0xe506(%rip), %rsi      # 0x221df
movq %r12, %rdx
callq 0x782a
movq %rbx, %rdi
leaq 0xe4f9(%rip), %rsi      # 0x221e4
leaq 0x50(%rsp), %rdx
xorl %eax, %eax
callq 0x64e8
movl 0x40(%rsp), %edx
testl %edx, %edx
jle 0x13d10
movq %rbx, %rdi
leaq 0xe4e1(%rip), %rsi      # 0x221ea
xorl %eax, %eax
callq 0x64e8
movq %rbx, %rdi
leaq 0xe4d4(%rip), %rsi      # 0x221ee
callq 0x645b
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1404a
testl %eax, %eax
movl %r14d, %r12d
je 0x13d75
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x6249
movq %rbx, %rdi
leaq 0xe658(%rip), %rsi      # 0x223a2
movq %rax, %rdx
xorl %eax, %eax
callq 0x64e8
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5da2
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x5d51
jmp 0x13de0
movq 0x28(%rsp), %rdx
cmpb $0x0, (%rdx)
je 0x13d97
movq 0x20(%rsp), %rcx
movq %rbx, %rdi
leaq 0xe622(%rip), %rsi      # 0x223b0
xorl %eax, %eax
callq 0x64e8
jmp 0x13de0
movq 0x30(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x43, %eax
je 0x13db5
cmpl $0x6d, %eax
jne 0x13dc6
movq %rbx, %rdi
leaq 0xe605(%rip), %rsi      # 0x223b8
jmp 0x13dbf
movq %rbx, %rdi
leaq 0xd5a7(%rip), %rsi      # 0x21366
callq 0x645b
jmp 0x13de0
movl 0x44(%rsp), %ecx
movq %rbx, %rdi
leaq 0xe5ef(%rip), %rsi      # 0x223c3
leaq 0x50(%rsp), %rdx
xorl %eax, %eax
callq 0x64e8
cmpb $0x0, 0x4f(%rsp)
je 0x13df6
movq %rbx, %rdi
leaq 0xe402(%rip), %rsi      # 0x221f3
callq 0x645b
incl %r12d
movq %rbx, %rdi
callq 0x5d3d
subl 0xc(%rsp), %eax
movq %rbx, %rdi
movl %eax, %esi
callq 0x71d3
movq %r13, %rdi
movl %r12d, %r14d
movl %r12d, %esi
leaq 0x18(%rsp), %r12
movq %r12, %rdx
callq 0x75ba
testl %eax, %eax
jne 0x13cb3
movq %rbx, %rdi
callq 0x5d3d
subl 0xc(%rsp), %eax
movq %rbx, %rdi
movl %eax, %esi
callq 0x71d3
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq