// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/lua.c
// Function: pmain
static int pmain (lua_State *L) {
  struct Smain *s = (struct Smain *)lua_touserdata(L, 1);
  char **argv = s->argv;
  int script;
  int has_i = 0, has_v = 0, has_e = 0;
  globalL = L;
  if (argv[0] && argv[0][0]) progname = argv[0];
  lua_gc(L, LUA_GCSTOP, 0);  /* stop collector during initialization */
  luaL_openlibs(L);  /* open libraries */
  lua_gc(L, LUA_GCRESTART, 0);
  s->status = handle_luainit(L);
  if (s->status != 0) return 0;
  script = collectargs(argv, &has_i, &has_v, &has_e);
  if (script < 0) {  /* invalid args? */
    print_usage();
    s->status = 1;
    return 0;
  }
  if (has_v) print_version();
  s->status = runargs(L, argv, (script > 0) ? script : s->argc);
  if (s->status != 0) return 0;
  if (script)
    s->status = handle_script(L, argv, script);
  if (s->status != 0) return 0;
  if (has_i)
    dotty(L);
  else if (script == 0 && !has_e && !has_v) {
    if (lua_stdin_is_tty()) {
      print_version();
      dotty(L);
    }
    else dofile(L, NULL);  /* executes stdin as a file */
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x59e1
movq %rax, %r14
movq 0x8(%rax), %r12
movq %rbx, 0x2291d(%rip)     # 0x272e8
movq (%r12), %rax
testq %rax, %rax
je 0x49e0
cmpb $0x0, (%rax)
je 0x49e0
movq %rax, 0x228f8(%rip)     # 0x272d8
movq %r14, %r13
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6345
movq %rbx, %rdi
callq 0x11138
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x6345
leaq 0x16626(%rip), %rdi     # 0x1b035
callq 0x4040
testq %rax, %rax
je 0x4a6c
cmpb $0x40, (%rax)
jne 0x4a58
incq %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x10e10
movl $0x1, %ebp
testl %eax, %eax
jne 0x4a4c
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x50a1
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4e1c
jmp 0x4a6c
leaq 0x165d5(%rip), %rdx     # 0x1b034
movq %rbx, %rdi
movq %rax, %rsi
callq 0x504d
movl %eax, %ebp
movl %ebp, 0x10(%r13)
testl %ebp, %ebp
jne 0x4dfc
movq 0x8(%r12), %rax
testq %rax, %rax
je 0x4b09
movl $0x1, %edx
movl $0x0, (%rsp)
xorl %ebp, %ebp
xorl %r15d, %r15d
cmpb $0x2d, (%rax)
jne 0x4b4b
movzbl 0x1(%rax), %ecx
cmpl $0x68, %ecx
jg 0x4ab6
cmpl $0x65, %ecx
jne 0x4b19
movl $0x1, %r15d
jmp 0x4aca
cmpl $0x69, %ecx
je 0x4adf
cmpl $0x6c, %ecx
je 0x4aca
cmpl $0x76, %ecx
jne 0x4b28
movl (%rsp), %ecx
jmp 0x4aea
cmpb $0x0, 0x2(%rax)
jne 0x4af8
movslq %edx, %rax
cmpq $0x0, 0x8(%r12,%rax,8)
je 0x4b28
incl %edx
jmp 0x4af8
movl $0x1, %ecx
cmpb $0x0, 0x2(%rax)
jne 0x4b28
cmpb $0x0, 0x2(%rax)
jne 0x4b2f
movl %ecx, (%rsp)
movl $0x1, %ebp
movslq %edx, %rax
incl %edx
movq 0x8(%r12,%rax,8), %rax
testq %rax, %rax
jne 0x4a97
jmp 0x4b15
movl $0x0, (%rsp)
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %edx, %edx
jmp 0x4b4b
testl %ecx, %ecx
je 0x4b4b
cmpl $0x2d, %ecx
jne 0x4b28
cmpb $0x0, 0x2(%rax)
je 0x4b39
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
jmp 0x4b4b
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %ecx, (%rsp)
jmp 0x4b4b
movslq %edx, %rax
incl %edx
xorl %ecx, %ecx
cmpq $0x0, 0x8(%r12,%rax,8)
cmovnel %edx, %ecx
movl %ecx, %edx
addq $0x10, %r14
testl %edx, %edx
js 0x4df4
movq %r14, 0x18(%rsp)
testl %ebp, %ebp
movq %rdx, 0x8(%rsp)
jne 0x4e0d
movl %r15d, 0x24(%rsp)
movl %ebp, 0x4(%rsp)
movl %edx, %r14d
testl %edx, %edx
jne 0x4b7d
movl (%r13), %r14d
cmpl $0x2, %r14d
jl 0x4c48
movl $0x1, %r15d
movslq %r15d, %rax
movq (%r12,%rax,8), %r13
testq %r13, %r13
je 0x4c3c
movzbl 0x1(%r13), %ecx
cmpl $0x6c, %ecx
je 0x4bbd
cmpl $0x65, %ecx
jne 0x4c3c
cmpb $0x0, 0x2(%r13)
je 0x4bca
addq $0x2, %r13
jmp 0x4bd3
cmpb $0x0, 0x2(%r13)
je 0x4be9
addq $0x2, %r13
jmp 0x4bf2
leal 0x1(%rax), %r15d
movq 0x8(%r12,%rax,8), %r13
movq %rbx, %rdi
movq %r13, %rsi
leaq 0x165e2(%rip), %rdx     # 0x1b1c2
callq 0x504d
testl %eax, %eax
jmp 0x4c31
leal 0x1(%rax), %r15d
movq 0x8(%r12,%rax,8), %r13
movq %rbx, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
leaq 0x165d1(%rip), %rdx     # 0x1b1d2
callq 0x5d4e
movq %rbx, %rdi
movq %r13, %rsi
callq 0x5b17
movq %rbx, %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0x50a1
movl %eax, %ebp
movq %rbx, %rdi
movl %eax, %esi
callq 0x4e1c
testl %ebp, %ebp
movq 0x8(%rsp), %rdx
jne 0x4dd7
incl %r15d
cmpl %r14d, %r15d
jl 0x4b8d
movq 0x18(%rsp), %r14
movl $0x0, (%r14)
testl %edx, %edx
movl 0x4(%rsp), %r15d
je 0x4dc1
xorl %r14d, %r14d
cmpq $0x0, (%r12,%r14,8)
leaq 0x1(%r14), %r14
jne 0x4c64
leaq -0x1(%r14), %r15
leal 0x1(%rdx), %ebp
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
subl %edx, %eax
addq %r14, %rax
movq %rax, 0x28(%rsp)
movl %r14d, %esi
subl %edx, %esi
incl %esi
leaq 0x1654e(%rip), %rdx     # 0x1b1e1
movq %rbx, %rdi
callq 0x10518
movl %ebp, %eax
movq %rax, 0x30(%rsp)
movl %ebp, 0x14(%rsp)
cmpl %r15d, %ebp
jge 0x4ccf
movq 0x30(%rsp), %rax
leaq (%r12,%rax,8), %r13
movl 0x14(%rsp), %ebp
movq (%r13), %rsi
movq %rbx, %rdi
callq 0x5b17
incl %ebp
addq $0x8, %r13
cmpl %r15d, %ebp
jl 0x4cb8
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
movl 0x14(%rsp), %edx
callq 0x5e07
cmpq $0x1, %r14
je 0x4d1a
leal -0x1(%r14), %r15d
movq 0x8(%rsp), %r13
negl %r13d
xorl %ebp, %ebp
movq (%r12,%rbp,8), %rsi
movq %rbx, %rdi
callq 0x5b17
leal (%r13,%rbp), %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x5fe7
incq %rbp
cmpq %rbp, %r15
jne 0x4cf4
leaq 0x164b9(%rip), %rdx     # 0x1b1da
movq %rbx, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x5f2a
movl 0x8(%rsp), %r15d
movq (%r12,%r15,8), %r13
leaq 0x182b4(%rip), %rsi     # 0x1cff2
movq %r13, %rdi
callq 0x4290
testl %eax, %eax
jne 0x4d63
movq -0x8(%r12,%r15,8), %rdi
leaq 0x16488(%rip), %rsi     # 0x1b1de
callq 0x4290
xorl %ecx, %ecx
testl %eax, %eax
cmovneq %rcx, %r13
movl 0x4(%rsp), %r15d
movq %rbx, %rdi
movq %r13, %rsi
callq 0x10e10
movl %eax, %ebp
movq 0x30(%rsp), %rax
subq %r14, %rax
movq %rax, %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5597
movq %rbx, %rdi
testl %ebp, %ebp
je 0x4d9c
movl %r14d, %esi
callq 0x5462
jmp 0x4daa
movq 0x28(%rsp), %rsi
xorl %edx, %edx
callq 0x50a1
movl %eax, %ebp
movq 0x18(%rsp), %r14
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4e1c
movl %ebp, (%r14)
movq 0x8(%rsp), %rdx
cmpl $0x0, (%r14)
jne 0x4dfc
cmpl $0x0, (%rsp)
je 0x4de4
movq %rbx, %rdi
callq 0x4e4b
jmp 0x4dfc
movq 0x18(%rsp), %rax
movl $0x1, (%rax)
jmp 0x4dfc
orl 0x24(%rsp), %edx
orl %r15d, %edx
jne 0x4dfc
callq 0x45f1
jmp 0x4dcd
movq %r14, %rdi
callq 0x4643
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x461a
movq 0x8(%rsp), %rdx
jmp 0x4b69