// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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, %r14
pushq $0x1
popq %rsi
callq 0x5755
movq %rax, %r12
movq 0x8(%rax), %r13
movq %r14, 0x22b78(%rip)     # 0x272e0
movq (%r13), %rax
testq %rax, %rax
je 0x477d
cmpb $0x0, (%rax)
je 0x477d
movq %rax, 0x22b53(%rip)     # 0x272d0
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x609d
movq %r14, %rdi
callq 0x10390
pushq $0x1
popq %rbp
movq %r14, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x609d
leaq 0x1488e(%rip), %rdi     # 0x19035
callq 0x4040
testq %rax, %rax
je 0x47e9
cmpb $0x40, (%rax)
jne 0x47f8
incq %rax
movq %r14, %rdi
movq %rax, %rsi
callq 0x10049
testl %eax, %eax
jne 0x47dd
pushq $0x1
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x4e54
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movq %r14, %rdi
movl %ebp, %esi
callq 0x4b8d
jmp 0x480c
movq %r12, %rbx
addq $0x10, %rbx
andl $0x0, 0x10(%r12)
jmp 0x4820
leaq 0x14835(%rip), %rdx     # 0x19034
movq %r14, %rdi
movq %rax, %rsi
callq 0x4e02
movl %eax, %ebp
movl %ebp, 0x10(%r12)
testl %ebp, %ebp
jne 0x4b7c
movq %r12, %rbx
addq $0x10, %rbx
pushq $0x1
popq %rcx
xorl %ebp, %ebp
xorl %r10d, %r10d
xorl %r9d, %r9d
xorl %r8d, %r8d
movl %ecx, %eax
movslq %eax, %rdx
movq (%r13,%rdx,8), %rsi
testq %rsi, %rsi
je 0x48b7
cmpb $0x2d, (%rsi)
jne 0x48ad
movzbl 0x1(%rsi), %edi
cmpl $0x65, %edi
je 0x4871
cmpl $0x69, %edi
je 0x4860
cmpl $0x6c, %edi
je 0x4874
cmpl $0x76, %edi
jne 0x488c
cmpb $0x0, 0x2(%rsi)
jmp 0x4867
cmpb $0x0, 0x2(%rsi)
movl %ecx, %r10d
movl %ecx, %r9d
je 0x4888
jmp 0x4ad7
movl %ecx, %r8d
cmpb $0x0, 0x2(%rsi)
jne 0x4888
cmpq $0x0, 0x8(%r13,%rdx,8)
je 0x4ad7
incl %eax
incl %eax
jmp 0x4830
testl %edi, %edi
je 0x48ad
cmpl $0x2d, %edi
jne 0x4ad7
cmpb $0x0, 0x2(%rsi)
jne 0x4ad7
cmpq $0x0, 0x8(%r13,%rdx,8)
je 0x48b7
incl %eax
movl %eax, %ebp
testl %eax, %eax
js 0x4ad7
movl %r10d, 0x24(%rsp)
movl %r8d, 0x20(%rsp)
movl %r9d, 0x1c(%rsp)
testl %r9d, %r9d
je 0x48d0
callq 0x4be2
movq %rbx, 0x10(%rsp)
movl %ebp, %r15d
movq %rbp, (%rsp)
testl %ebp, %ebp
jne 0x48e4
movl (%r12), %r15d
pushq $0x1
popq %rbp
movl %ebp, %ebx
cmpl %r15d, %ebp
jge 0x49a4
movslq %ebp, %rax
movq (%r13,%rax,8), %r12
testq %r12, %r12
je 0x499d
movzbl 0x1(%r12), %ecx
cmpl $0x6c, %ecx
je 0x4925
cmpl $0x65, %ecx
jne 0x499d
cmpb $0x0, 0x2(%r12)
je 0x4933
addq $0x2, %r12
jmp 0x493a
cmpb $0x0, 0x2(%r12)
je 0x4955
addq $0x2, %r12
jmp 0x495c
incl %ebp
movq 0x8(%r13,%rax,8), %r12
movq %r14, %rdi
movq %r12, %rsi
leaq 0x1487b(%rip), %rdx     # 0x191c2
callq 0x4e02
testl %eax, %eax
je 0x499d
jmp 0x4abc
incl %ebp
movq 0x8(%r13,%rax,8), %r12
movq %r14, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
leaq 0x14867(%rip), %rdx     # 0x191d2
callq 0x5aa6
movq %r14, %rdi
movq %r12, %rsi
callq 0x5870
movq %r14, %rdi
movl %ebx, %edx
movl %ebx, %esi
callq 0x4e54
movl %eax, %r12d
movq %r14, %rdi
movl %eax, %esi
callq 0x4b8d
testl %r12d, %r12d
jne 0x4abc
incl %ebp
jmp 0x48e9
movq 0x10(%rsp), %rax
andl $0x0, (%rax)
movq (%rsp), %rbp
testl %ebp, %ebp
je 0x4b5e
xorl %r12d, %r12d
movq %r13, %rax
decl %r12d
cmpq $0x0, (%rax)
leaq 0x8(%rax), %rax
jne 0x49be
movl %r12d, %ebp
notl %ebp
movq (%rsp), %rbx
leal 0x1(%rbx), %eax
movl %eax, 0xc(%rsp)
leal (%rbx,%r12), %eax
pushq $-0x2
popq %rcx
subl %eax, %ecx
movl %ecx, 0x8(%rsp)
pushq $0x1
popq %rsi
subl %eax, %esi
leaq 0x147ea(%rip), %rdx     # 0x191de
movq %r14, %rdi
callq 0xf7ca
movl %ebx, %ebx
movq %rbx, 0x30(%rsp)
leal 0x1(%rbx), %eax
cmpl %ebp, %eax
jge 0x4a1c
movq 0x8(%r13,%rbx,8), %rsi
movq %r14, %rdi
callq 0x5870
incq %rbx
jmp 0x4a03
movq %r13, 0x28(%rsp)
movq %r14, %r13
movq %r14, %rdi
movl 0x8(%rsp), %esi
movl 0xc(%rsp), %edx
callq 0x5b5f
movq (%rsp), %r14
negl %r14d
xorl %ebx, %ebx
cmpq %rbx, %rbp
je 0x4a67
movq 0x28(%rsp), %rax
movq (%rax,%rbx,8), %rsi
movq %r13, %rdi
callq 0x5870
leal (%r14,%rbx), %edx
movq %r13, %rdi
pushq $-0x2
popq %rsi
callq 0x5d42
incq %rbx
jmp 0x4a3d
leaq 0x1476c(%rip), %rdx     # 0x191da
movq %r13, %r14
movq %r13, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x5c7e
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x4acc
cmpb $0x0, 0x1(%rsi)
movq 0x10(%rsp), %rbx
movq (%rsp), %rbp
jne 0x4b0c
movq -0x8(%rax,%rcx,8), %rax
cmpb $0x2d, (%rax)
jne 0x4b0a
cmpb $0x2d, 0x1(%rax)
jne 0x4b0a
xorl %ecx, %ecx
cmpb $0x0, 0x2(%rax)
cmovneq %rcx, %rsi
jmp 0x4b0c
movq 0x10(%rsp), %rax
movl $0x1, (%rax)
jmp 0x4b7c
movq 0x10(%rsp), %rbx
movq (%rsp), %rbp
jmp 0x4b0c
movq %rbx, %r14
movq 0x22517(%rip), %rbx     # 0x26ff8
movq (%rbx), %rdi
movq 0x227e5(%rip), %rdx     # 0x272d0
leaq 0x14569(%rip), %rsi     # 0x1905b
xorl %eax, %eax
callq 0x42b0
movq (%rbx), %rdi
callq 0x4340
movl $0x1, (%r14)
jmp 0x4b7c
xorl %esi, %esi
movq %r14, %rdi
callq 0x10049
movl %eax, %r15d
movl 0xc(%rsp), %eax
addl %r12d, %eax
movl %eax, %r12d
movq %r14, %rdi
movl %eax, %esi
callq 0x5329
movq %r14, %rdi
testl %r15d, %r15d
je 0x4b3d
movl %r12d, %esi
callq 0x51fc
jmp 0x4b4b
movl 0x8(%rsp), %esi
xorl %edx, %edx
callq 0x4e54
movl %eax, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x4b8d
movl %r15d, (%rbx)
testl %r15d, %r15d
jne 0x4b7c
cmpl $0x0, 0x24(%rsp)
jne 0x4b74
orl 0x20(%rsp), %ebp
orl 0x1c(%rsp), %ebp
jne 0x4b7c
callq 0x4be2
movq %r14, %rdi
callq 0x4bf0
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq