// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/luac.c
// Function: pmain
static int pmain(lua_State* L)
{
 struct Smain* s = (struct Smain*)lua_touserdata(L, 1);
 int argc=s->argc;
 char** argv=s->argv;
 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)!=0) 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
movq %rdi, %rbx
movl $0x1, %esi
callq 0x3903
movl (%rax), %r15d
movq 0x8(%rax), %r14
movq %rbx, %rdi
movl %r15d, %esi
callq 0x3156
testl %eax, %eax
je 0x2940
testl %r15d, %r15d
jle 0x276c
xorl %r12d, %r12d
movq (%r14,%r12,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x273d
cmpb $0x0, 0x1(%rsi)
jne 0x273d
xorl %esi, %esi
movq %rbx, %rdi
callq 0xf2e8
testl %eax, %eax
jne 0x2938
incq %r12
cmpq %r12, %r15
jne 0x272c
cmpl $0x1, %r15d
jne 0x276c
movq 0x10(%rbx), %rax
movq -0x10(%rax), %rax
movq 0x20(%rax), %r14
jmp 0x28a7
movslq %r15d, %r12
movq %rbx, %rdi
callq 0x6cad
movq %rax, %r14
movq 0x10(%rbx), %rax
movq %r14, (%rax)
movl $0x9, 0x8(%rax)
movq 0x10(%rbx), %rax
movq 0x38(%rbx), %rcx
subq %rax, %rcx
cmpq $0x10, %rcx
jg 0x27aa
movq %rbx, %rdi
movl $0x1, %esi
callq 0x5999
movq 0x10(%rbx), %rax
addq $0x10, %rax
movq %rax, 0x10(%rbx)
leaq 0xfa51(%rip), %rsi      # 0x1220a
movl $0x7, %edx
movq %rbx, %rdi
callq 0xb00a
movq %rax, 0x40(%r14)
movb $0x1, 0x73(%r14)
leaq 0x1(,%r12,2), %r13
cmpl $-0x2, %r15d
jle 0x286a
movq %r13, %rcx
shlq $0x2, %rcx
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7f7e
movq %rax, 0x18(%r14)
movl %r13d, 0x50(%r14)
shlq $0x3, %r12
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r12, %rcx
callq 0x7f7e
movq %rax, 0x20(%r14)
movl %r15d, 0x58(%r14)
testl %r15d, %r15d
jle 0x2893
movl %r15d, %eax
notl %eax
movslq %eax, %rcx
leaq (%r15,%r15), %rdx
shlq $0x4, %rcx
movl $0x24, %esi
xorl %eax, %eax
movq 0x10(%rbx), %rdi
addq %rcx, %rdi
movq (%rdi,%rax,8), %rdi
movq 0x20(%rdi), %rdi
movq 0x20(%r14), %r8
movq %rdi, (%r8,%rax,4)
movq 0x18(%r14), %rdi
movl %esi, (%rdi,%rax,4)
movl $0x80401c, 0x4(%rdi,%rax,4) # imm = 0x80401C
addq $0x2, %rax
addl $0x4000, %esi           # imm = 0x4000
cmpq %rax, %rdx
jne 0x2833
jmp 0x28a0
movq %rbx, %rdi
callq 0x7fca
movq %r14, %r12
addq $0x18, %r12
movq %rax, 0x18(%r14)
movl %r13d, 0x50(%r14)
movq %rbx, %rdi
callq 0x7fca
movq %rax, 0x20(%r14)
movl %r15d, 0x58(%r14)
jmp 0x289a
movq %r14, %r12
addq $0x18, %r12
movq (%r12), %rdi
xorl %eax, %eax
movl $0x80001e, (%rdi,%rax,4) # imm = 0x80001E
movl 0x178cb(%rip), %eax     # 0x1a178
testl %eax, %eax
je 0x28c2
xorl %esi, %esi
cmpl $0x2, %eax
setge %sil
movq %r14, %rdi
callq 0x29e8
cmpb $0x0, 0x178b3(%rip)     # 0x1a17c
jne 0x292c
movq 0x1788e(%rip), %rdi     # 0x1a160
testq %rdi, %rdi
je 0x28e8
leaq 0xf91d(%rip), %rsi      # 0x121fb
callq 0x21e0
movq %rax, %r15
jmp 0x28f2
movq 0x176e1(%rip), %rax     # 0x19fd0
movq (%rax), %r15
testq %r15, %r15
je 0x2945
movzbl 0x17881(%rip), %r8d     # 0x1a180
leaq 0xb9(%rip), %rdx        # 0x29bf
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq 0x65d4
movq %r15, %rdi
callq 0x2070
testl %eax, %eax
jne 0x2951
movq %r15, %rdi
callq 0x20c0
testl %eax, %eax
jne 0x295d
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x2304
callq 0x2339
leaq 0x108d7(%rip), %rdi     # 0x13223
callq 0x2969
leaq 0xf8a6(%rip), %rdi      # 0x121fe
callq 0x2969
leaq 0xf8a0(%rip), %rdi      # 0x12204
callq 0x2969