// File: /workspace/github_c_makefile_star2_O3/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 0x54dc
movl %eax, %ebx
incl %ebx
movl $0x0, 0x8(%rsp)
testq %r12, %r12
je 0x115c9
leaq 0xaa65(%rip), %rsi      # 0x1bff9
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x5d2f
leaq 0xb934(%rip), %rsi      # 0x1cedc
movq %r12, %rdi
callq 0x4430
movq %rax, %r15
movq %rax, 0x10(%rsp)
testq %rax, %rax
jne 0x115ec
leaq 0xaa3e(%rip), %rsi      # 0x1c002
jmp 0x116f9
leaq 0x9c4c(%rip), %rsi      # 0x1b21c
movl $0x6, %edx
movq %r14, %rdi
callq 0x5c5a
movq 0x159f4(%rip), %rax     # 0x26fd8
movq (%rax), %r15
movq %r15, 0x10(%rsp)
movq %r15, %rdi
callq 0x4530
cmpl $0x23, %eax
jne 0x11629
movl $0x1, 0x8(%rsp)
movq %r15, %rdi
callq 0x4530
cmpl $0xa, %eax
je 0x11621
cmpl $-0x1, %eax
jne 0x11601
testq %r12, %r12
setne %r13b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1167d
movq %r15, %rdi
callq 0x4530
cmpl $0x1b, %eax
setne %cl
testq %r12, %r12
setne %r13b
sete %dl
orb %cl, %dl
jne 0x1167d
leaq 0xa9b9(%rip), %rsi      # 0x1bffd
movq %r12, %rdi
movq %r15, %rdx
callq 0x41c0
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x116f2
movq %rax, %r15
movq %r15, %rdi
callq 0x4530
cmpl $0x1b, %eax
je 0x11672
cmpl $-0x1, %eax
jne 0x11660
movl $0x0, 0x8(%rsp)
movb $0x1, %r13b
movl %eax, %edi
movq %r15, %rsi
callq 0x4370
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x5a88
leaq 0xda(%rip), %rsi        # 0x11777
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
movq %rax, %rcx
callq 0x6477
movl %eax, %ebp
movq 0x8(%r15), %r15
movq %r15, %rdi
callq 0x40c0
movl %eax, %r12d
testb %r13b, %r13b
je 0x116ce
movq %r15, %rdi
callq 0x4130
testl %r12d, %r12d
je 0x116e6
movq %r14, %rdi
movl %ebx, %esi
callq 0x54e9
leaq 0xa58b(%rip), %rsi      # 0x1bc6f
jmp 0x116f9
movq %r14, %rdi
movl %ebx, %esi
callq 0x5640
jmp 0x11708
leaq 0xa907(%rip), %rsi      # 0x1c000
movq %r14, %rdi
movl %ebx, %edx
callq 0x1171c
movl $0x6, %ebp
movl %ebp, %eax
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq