// File: /workspace/github_c_makefile_star2_O3/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 $0x48, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5b7b
movq %rax, %r13
movq 0x8(%rax), %r14
movq %rbx, 0x2291d(%rip)     # 0x272e8
movq (%r14), %rax
testq %rax, %rax
je 0x49df
cmpb $0x0, (%rax)
je 0x49df
movq %rax, 0x228f9(%rip)     # 0x272d8
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x64f0
movq %rbx, %rdi
callq 0x1189c
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x64f0
leaq 0x1662c(%rip), %rdi     # 0x1b035
callq 0x4040
testq %rax, %rax
je 0x4a52
cmpb $0x40, (%rax)
jne 0x4a63
incq %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x11560
movl $0x1, %ebp
testl %eax, %eax
jne 0x4a46
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x5125
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4e86
jmp 0x4a77
movq %r13, %r15
addq $0x10, %r15
movl $0x0, 0x10(%r13)
jmp 0x4a8a
leaq 0x165ca(%rip), %rdx     # 0x1b034
movq %rbx, %rdi
movq %rax, %rsi
callq 0x50d1
movl %eax, %ebp
movl %ebp, 0x10(%r13)
testl %ebp, %ebp
jne 0x4e6b
movq %r13, %r15
addq $0x10, %r15
movq %rbx, 0x20(%rsp)
movq 0x8(%r14), %rax
movl $0x0, %ebx
movl $0x0, 0x4(%rsp)
movl $0x0, 0x14(%rsp)
testq %rax, %rax
je 0x4b9a
movl $0x1, %r12d
xorl %edx, %edx
movl $0x0, 0x4(%rsp)
xorl %ebx, %ebx
cmpb $0x2d, (%rax)
jne 0x4b76
movzbl 0x1(%rax), %ecx
cmpl $0x68, %ecx
jg 0x4ae1
cmpl $0x65, %ecx
jne 0x4b51
movl $0x1, %ebx
jmp 0x4b07
cmpl $0x69, %ecx
je 0x4b21
cmpl $0x6c, %ecx
je 0x4b07
cmpl $0x76, %ecx
jne 0x4e63
movl $0x1, 0x4(%rsp)
cmpb $0x0, 0x2(%rax)
je 0x4b38
jmp 0x4e63
cmpb $0x0, 0x2(%rax)
jne 0x4b38
movslq %r12d, %rax
cmpq $0x0, 0x8(%r14,%rax,8)
je 0x4e63
incl %r12d
jmp 0x4b38
movl $0x1, %edx
cmpb $0x0, 0x2(%rax)
movl $0x1, 0x4(%rsp)
jne 0x4e63
movslq %r12d, %rax
incl %r12d
movq 0x8(%r14,%rax,8), %rax
testq %rax, %rax
jne 0x4ac3
xorl %r12d, %r12d
jmp 0x4b7f
testl %ecx, %ecx
je 0x4b76
cmpl $0x2d, %ecx
jne 0x4e63
cmpb $0x0, 0x2(%rax)
jne 0x4e63
movslq %r12d, %rax
cmpq $0x0, 0x8(%r14,%rax,8)
je 0x4b4c
incl %r12d
testl %r12d, %r12d
js 0x4e63
movl %edx, 0x14(%rsp)
cmpl $0x0, 0x4(%rsp)
jne 0x4e7c
movq %r12, %rax
movq %r12, 0x8(%rsp)
testl %eax, %eax
jne 0x4ba7
movl (%r13), %r12d
movq $0x0, 0x8(%rsp)
movl %ebx, 0x2c(%rsp)
cmpl $0x2, %r12d
movq %r14, 0x18(%rsp)
jl 0x4c83
movl $0x1, %ebx
movslq %ebx, %rax
movq (%r14,%rax,8), %r13
testq %r13, %r13
je 0x4c78
movzbl 0x1(%r13), %ecx
cmpl $0x6c, %ecx
je 0x4bef
cmpl $0x65, %ecx
jne 0x4c78
cmpb $0x0, 0x2(%r13)
je 0x4bfc
addq $0x2, %r13
jmp 0x4c04
cmpb $0x0, 0x2(%r13)
je 0x4c21
addq $0x2, %r13
jmp 0x4c29
leal 0x1(%rax), %ebx
movq 0x8(%r14,%rax,8), %r13
movq 0x20(%rsp), %rdi
movq %r13, %rsi
leaq 0x165af(%rip), %rdx     # 0x1b1c2
callq 0x50d1
testl %eax, %eax
je 0x4c78
jmp 0x4dd8
leal 0x1(%rax), %ebx
movq 0x8(%r14,%rax,8), %r13
movq 0x20(%rsp), %r14
movq %r14, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
leaq 0x16595(%rip), %rdx     # 0x1b1d2
callq 0x5eef
movq %r14, %rdi
movq %r13, %rsi
callq 0x5cb1
movq %r14, %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0x5125
movl %eax, %ebp
movq %r14, %rdi
movl %eax, %esi
callq 0x4e86
testl %ebp, %ebp
movq 0x18(%rsp), %r14
jne 0x4dd8
incl %ebx
cmpl %r12d, %ebx
jl 0x4bbf
movl $0x0, (%r15)
cmpl $0x0, 0x8(%rsp)
movq 0x20(%rsp), %r12
je 0x4e3a
xorl %r13d, %r13d
cmpq $0x0, (%r14,%r13,8)
leaq 0x1(%r13), %r13
jne 0x4c9d
movq %r15, 0x38(%rsp)
leaq -0x1(%r13), %rbx
movq 0x8(%rsp), %r14
leal 0x1(%r14), %ebp
movl $0xfffffffe, %r15d      # imm = 0xFFFFFFFE
subl %r14d, %r15d
addq %r13, %r15
movl %r13d, %esi
subl %r14d, %esi
incl %esi
leaq 0x16509(%rip), %rdx     # 0x1b1de
movq %r12, %rdi
callq 0x10c49
movl %r14d, %eax
movq %rax, 0x40(%rsp)
movl %ebp, 0x10(%rsp)
cmpl %ebx, %ebp
movq %r12, %r14
jge 0x4d1c
movq 0x18(%rsp), %rax
movq 0x40(%rsp), %rcx
leaq (%rax,%rcx,8), %r12
addq $0x8, %r12
movl 0x10(%rsp), %ebp
movq (%r12), %rsi
movq %r14, %rdi
callq 0x5cb1
incl %ebp
addq $0x8, %r12
cmpl %ebx, %ebp
jl 0x4d06
movq %r14, %rdi
movq %r15, 0x30(%rsp)
movl %r15d, %esi
movl 0x10(%rsp), %edx
callq 0x5fa8
cmpq $0x1, %r13
movq 0x18(%rsp), %r15
je 0x4d6e
leal -0x1(%r13), %ebx
movq 0x8(%rsp), %rbp
negl %ebp
xorl %r12d, %r12d
movq (%r15,%r12,8), %rsi
movq %r14, %rdi
callq 0x5cb1
leal (%r12,%rbp), %edx
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x618f
incq %r12
cmpq %r12, %rbx
jne 0x4d49
leaq 0x16465(%rip), %rdx     # 0x1b1da
movq %r14, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x60cb
movq 0x40(%rsp), %rax
movq (%r15,%rax,8), %rsi
movq %rax, %r15
cmpb $0x2d, (%rsi)
movq %r14, %r12
jne 0x4dcc
cmpb $0x0, 0x1(%rsi)
movq 0x38(%rsp), %rbx
movq 0x30(%rsp), %r14
jne 0x4de6
movslq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movq -0x8(%rcx,%rax,8), %rax
cmpb $0x2d, (%rax)
jne 0x4de4
cmpb $0x2d, 0x1(%rax)
jne 0x4de4
xorl %ecx, %ecx
cmpb $0x0, 0x2(%rax)
cmovneq %rcx, %rsi
jmp 0x4de6
movq 0x38(%rsp), %rbx
movq 0x30(%rsp), %r14
jmp 0x4de6
movl $0x1, (%r15)
jmp 0x4e6b
xorl %esi, %esi
movq %r12, %rdi
callq 0x11560
movl %eax, %ebp
subq %r13, %r15
incq %r15
movq %r12, %rdi
movl %r15d, %esi
callq 0x572e
movq %r12, %rdi
testl %ebp, %ebp
je 0x4e1e
movl %r15d, %esi
callq 0x54e9
movq %r12, %rdi
movl %ebp, %esi
callq 0x4e86
movl %ebp, (%rbx)
jmp 0x4e6b
movl %r14d, %esi
xorl %edx, %edx
callq 0x5125
movl %eax, %ebp
movq %r12, %rdi
movl %eax, %esi
callq 0x4e86
movl %ebp, (%rbx)
testl %ebp, %ebp
jne 0x4e6b
cmpl $0x0, 0x14(%rsp)
je 0x4e4b
movq %r12, %rdi
callq 0x4eb5
jmp 0x4e6b
movl 0x4(%rsp), %ecx
orl 0x2c(%rsp), %ecx
movq 0x8(%rsp), %rax
orl %ecx, %eax
jne 0x4e6b
callq 0x45f1
jmp 0x4e41
movq %r15, %rdi
callq 0x4643
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x461a
jmp 0x4b8e