// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/lauxlib.c
// Function: luaL_loadfile
LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) {
  LoadF lf;
  int status, readstatus;
  int c;
  int fnameindex = lua_gettop(L) + 1;  /* index of filename on the stack */
  lf.extraline = 0;
  if (filename == NULL) {
    lua_pushliteral(L, "=stdin");
    lf.f = stdin;
  }
  else {
    lua_pushfstring(L, "@%s", filename);
    lf.f = fopen(filename, "r");
    if (lf.f == NULL) return errfile(L, "open", fnameindex);
  }
  c = getc(lf.f);
  if (c == '#') {  /* Unix exec. file? */
    lf.extraline = 1;
    while ((c = getc(lf.f)) != EOF && c != '\n') ;  /* skip first line */
    if (c == '\n') c = getc(lf.f);
  }
  if (c == LUA_SIGNATURE[0] && filename) {  /* binary file? */
    lf.f = freopen(filename, "rb", lf.f);  /* reopen in binary mode */
    if (lf.f == NULL) return errfile(L, "reopen", fnameindex);
    /* skip eventual `#!...' */
   while ((c = getc(lf.f)) != EOF && c != LUA_SIGNATURE[0]) ;
    lf.extraline = 0;
  }
  ungetc(c, lf.f);
  status = lua_load(L, getF, &lf, lua_tostring(L, -1));
  readstatus = ferror(lf.f);
  if (filename) fclose(lf.f);  /* close file (even in case of errors) */
  if (readstatus) {
    lua_settop(L, fnameindex);  /* ignore results from `lua_load' */
    return errfile(L, "read", fnameindex);
  }
  lua_remove(L, fnameindex);
  return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2018, %rsp           # imm = 0x2018
movq %rsi, %r12
movq %rdi, %r14
callq 0x51ef
movl %eax, %ebx
incl %ebx
andl $0x0, 0x8(%rsp)
testq %r12, %r12
je 0x100af
leaq 0x9f3f(%rip), %rsi      # 0x19fb9
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x58eb
leaq 0xae26(%rip), %rsi      # 0x1aeb4
movq %r12, %rdi
callq 0x4420
movq %rax, %r15
movq %rax, 0x10(%rsp)
testq %rax, %rax
jne 0x100d0
leaq 0x9f18(%rip), %rsi      # 0x19fc2
jmp 0x101dc
leaq 0x9166(%rip), %rsi      # 0x1921c
pushq $0x6
popq %rdx
movq %r14, %rdi
callq 0x5819
movq 0x16f10(%rip), %rax     # 0x26fd8
movq (%rax), %r15
movq %r15, 0x10(%rsp)
movq %r15, %rdi
callq 0x4520
movl %eax, %ebp
cmpl $0x23, %eax
jne 0x1010f
pushq $-0x1
popq %rbp
movl $0x1, 0x8(%rsp)
movq %r15, %rdi
callq 0x4520
cmpl $0xa, %eax
je 0x10105
cmpl $-0x1, %eax
jne 0x100ea
testq %r12, %r12
setne %r13b
jmp 0x10162
movq %r15, %rdi
callq 0x4520
movl %eax, %ebp
cmpl $0x1b, %ebp
setne %al
testq %r12, %r12
setne %r13b
sete %cl
orb %al, %cl
jne 0x10162
leaq 0x9e93(%rip), %rsi      # 0x19fbd
movq %r12, %rdi
movq %r15, %rdx
callq 0x41b0
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x101d5
movq %rax, %r15
movq %r15, %rdi
callq 0x4520
movl %eax, %ebp
cmpl $0x1b, %eax
je 0x1015a
cmpl $-0x1, %ebp
jne 0x10146
andl $0x0, 0x8(%rsp)
movb $0x1, %r13b
movl %ebp, %edi
movq %r15, %rsi
callq 0x4360
pushq $-0x1
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x5665
leaq 0xd8(%rip), %rsi        # 0x10258
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
movq %rax, %rcx
callq 0x6026
movl %eax, %ebp
movq 0x8(%r15), %r15
movq %r15, %rdi
callq 0x40c0
movl %eax, %r12d
testb %r13b, %r13b
je 0x101b1
movq %r15, %rdi
callq 0x4130
testl %r12d, %r12d
je 0x101c9
movq %r14, %rdi
movl %ebx, %esi
callq 0x51fc
leaq 0x9a88(%rip), %rsi      # 0x19c4f
jmp 0x101dc
movq %r14, %rdi
movl %ebx, %esi
callq 0x523b
jmp 0x101e9
leaq 0x9de4(%rip), %rsi      # 0x19fc0
movq %r14, %rdi
movl %ebx, %edx
callq 0x101fd
pushq $0x6
popq %rbp
movl %ebp, %eax
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq