// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lua.c
// Function: pmain
static int pmain (lua_State *L) {
  int argc = (int)lua_tointeger(L, 1);
  char **argv = (char **)lua_touserdata(L, 2);
  int script;
  int args[num_has];
  args[has_i] = args[has_v] = args[has_e] = args[has_E] = 0;
  if (argv[0] && argv[0][0]) progname = argv[0];
  script = collectargs(argv, args);
  if (script < 0) {  /* invalid arg? */
    print_usage(argv[-script]);
    return 0;
  }
  if (args[has_v]) print_version();
  if (args[has_E]) {  /* option '-E'? */
    lua_pushboolean(L, 1);  /* signal for libraries to ignore env. vars. */
    lua_setfield(L, LUA_REGISTRYINDEX, "LUA_NOENV");
  }
  /* open standard libraries */
  luaL_checkversion(L);
  lua_gc(L, LUA_GCSTOP, 0);  /* stop collector during initialization */
  luaL_openlibs(L);  /* open libraries */
  lua_gc(L, LUA_GCRESTART, 0);
  if (!args[has_E] && handle_luainit(L) != LUA_OK)
    return 0;  /* error running LUA_INIT */
  /* execute arguments -e and -l */
  if (!runargs(L, argv, (script > 0) ? script : argc)) return 0;
  /* execute main script (if there is one) */
  if (script && handle_script(L, argv, script) != LUA_OK) return 0;
  if (args[has_i])  /* -i option? */
    dotty(L);
  else if (script == 0 && !args[has_e] && !args[has_v]) {  /* no arguments? */
    if (lua_stdin_is_tty()) {
      print_version();
      dotty(L);
    }
    else dofile(L, NULL);  /* executes stdin as a file */
  }
  lua_pushboolean(L, 1);  /* signal no errors */
  return 1;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq 0x48(%rsp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x98a0
movl %eax, 0x44(%rsp)
movq 0x48(%rsp), %rdi
movl $0x2, %esi
callq 0x9c60
movq %rax, 0x38(%rsp)
movl $0x0, 0x2c(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movl $0x0, 0x20(%rsp)
movq 0x38(%rsp), %rax
cmpq $0x0, (%rax)
je 0x78ce
movq 0x38(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x78ce
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x39a2a(%rip)     # 0x412f8
movq 0x38(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x7b30
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
jge 0x790c
movq 0x38(%rsp), %rax
xorl %ecx, %ecx
subl 0x34(%rsp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x7d70
movl $0x0, 0x54(%rsp)
jmp 0x7a8b
cmpl $0x0, 0x24(%rsp)
je 0x7918
callq 0x7e50
cmpl $0x0, 0x2c(%rsp)
je 0x7944
movq 0x48(%rsp), %rdi
movl $0x1, %esi
callq 0xa330
movq 0x48(%rsp), %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
leaq 0x2d701(%rip), %rdx     # 0x35040
callq 0xaad0
movq 0x48(%rsp), %rdi
movsd 0x2d6b7(%rip), %xmm0    # 0x35008
callq 0xde60
movq 0x48(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0xb5e0
movq 0x48(%rsp), %rdi
callq 0x15cc0
movq 0x48(%rsp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0xb5e0
cmpl $0x0, 0x2c(%rsp)
jne 0x79a2
movq 0x48(%rsp), %rdi
callq 0x7ea0
cmpl $0x0, %eax
je 0x79a2
movl $0x0, 0x54(%rsp)
jmp 0x7a8b
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x34(%rsp)
jle 0x79c7
movl 0x34(%rsp), %eax
movl %eax, 0xc(%rsp)
jmp 0x79cf
movl 0x44(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %edx
callq 0x7f50
cmpl $0x0, %eax
jne 0x79f4
movl $0x0, 0x54(%rsp)
jmp 0x7a8b
cmpl $0x0, 0x34(%rsp)
je 0x7a1d
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl 0x34(%rsp), %edx
callq 0x8090
cmpl $0x0, %eax
je 0x7a1d
movl $0x0, 0x54(%rsp)
jmp 0x7a8b
cmpl $0x0, 0x20(%rsp)
je 0x7a30
movq 0x48(%rsp), %rdi
callq 0x81a0
jmp 0x7a74
cmpl $0x0, 0x34(%rsp)
jne 0x7a72
cmpl $0x0, 0x28(%rsp)
jne 0x7a72
cmpl $0x0, 0x24(%rsp)
jne 0x7a72
xorl %edi, %edi
callq 0x70f0
cmpl $0x0, %eax
je 0x7a62
callq 0x7e50
movq 0x48(%rsp), %rdi
callq 0x81a0
jmp 0x7a70
movq 0x48(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x8330
jmp 0x7a72
jmp 0x7a74
movq 0x48(%rsp), %rdi
movl $0x1, %esi
callq 0xa330
movl $0x1, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)