// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/luac.c
// Function: pmain
static int pmain(lua_State* L)
{
 int argc=(int)lua_tointeger(L,1);
 char** argv=(char**)lua_touserdata(L,2);
 const Proto* f;
 int i;
 if (!lua_checkstack(L,argc)) fatal("too many input files");
 for (i=0; i<argc; i++)
 {
  const char* filename=IS("-") ? NULL : argv[i];
  if (luaL_loadfile(L,filename)!=LUA_OK) fatal(lua_tostring(L,-1));
 }
 f=combine(L,argc);
 if (listing) luaU_print(f,listing>1);
 if (dumping)
 {
  FILE* D= (output==NULL) ? stdout : fopen(output,"wb");
  if (D==NULL) cannot("open");
  lua_lock(L);
  luaU_dump(L,f,writer,D,stripping);
  lua_unlock(L);
  if (ferror(D)) cannot("write");
  if (fclose(D)) cannot("close");
 }
 return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x58f3
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x5a85
movq %rax, %r15
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5218
testl %eax, %eax
je 0x4907
testl %r14d, %r14d
jle 0x47de
movl %r14d, %r12d
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
movq (%r15,%r13,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x47ad
cmpb $0x0, 0x1(%rsi)
jne 0x47ad
xorl %esi, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x78ce
testl %eax, %eax
jne 0x48ff
incq %r13
cmpq %r13, %r12
jne 0x479c
cmpl $0x1, %r14d
jne 0x47de
movq 0x10(%rbx), %rax
movq -0x10(%rax), %rax
movq 0x18(%rax), %r15
jmp 0x486a
leaq 0xc(%rsp), %rdx
movl %r14d, (%rdx)
leaq 0x89c(%rip), %rsi       # 0x5089
leaq 0x11b2c(%rip), %rcx     # 0x16320
movq %rbx, %rdi
xorl %r8d, %r8d
callq 0x6537
testl %eax, %eax
jne 0x490c
movq 0x10(%rbx), %rax
movq -0x10(%rax), %rax
movq 0x18(%rax), %r15
testl %r14d, %r14d
jle 0x4862
movl %r14d, %eax
notl %eax
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movq 0x20(%r15), %rcx
cltq
shlq $0x4, %rax
xorl %edx, %edx
movq 0x10(%rbx), %rsi
movq (%rsi,%rax), %rsi
movq 0x18(%rsi), %rsi
movq %rsi, (%rcx,%rdx,8)
movq 0x20(%r15), %rcx
movq (%rcx,%rdx,8), %rsi
cmpl $0x0, 0x50(%rsi)
jle 0x4856
movq 0x38(%rsi), %rsi
movb $0x0, 0x8(%rsi)
incq %rdx
addq $0x10, %rax
cmpq %rdx, %r14
jne 0x4830
movl $0x0, 0x5c(%r15)
movl 0x1a908(%rip), %eax     # 0x1f178
testl %eax, %eax
je 0x4885
xorl %esi, %esi
cmpl $0x2, %eax
setge %sil
movq %r15, %rdi
callq 0x4938
cmpb $0x0, 0x1a8f0(%rip)     # 0x1f17c
jne 0x48ef
movq 0x1a8cb(%rip), %rdi     # 0x1f160
testq %rdi, %rdi
je 0x48ab
leaq 0x11a70(%rip), %rsi     # 0x16311
callq 0x4200
movq %rax, %r14
jmp 0x48b5
movq 0x1a716(%rip), %rax     # 0x1efc8
movq (%rax), %r14
testq %r14, %r14
je 0x4914
movzbl 0x1a8be(%rip), %r8d     # 0x1f180
leaq 0x798(%rip), %rdx       # 0x5061
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x9e38
movq %r14, %rdi
callq 0x4090
testl %eax, %eax
jne 0x4920
movq %r14, %rdi
callq 0x40e0
testl %eax, %eax
jne 0x492c
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x4304
callq 0x436e
movq %rbx, %rdi
callq 0x4339
leaq 0x11dd6(%rip), %rdi     # 0x166f1
callq 0x500b
leaq 0x119ed(%rip), %rdi     # 0x16314
callq 0x500b
leaq 0x119e7(%rip), %rdi     # 0x1631a
callq 0x500b