// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/loadlib.c
// Function: ll_require
static int ll_require (lua_State *L) {
  const char *name = luaL_checkstring(L, 1);
  int i;
  lua_settop(L, 1);  /* _LOADED table will be at index 2 */
  lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED");
  lua_getfield(L, 2, name);
  if (lua_toboolean(L, -1)) {  /* is it there? */
    if (lua_touserdata(L, -1) == sentinel)  /* check loops */
      luaL_error(L, "loop or previous error loading module " LUA_QS, name);
    return 1;  /* package is already loaded */
  }
  /* else must load it; iterate over available loaders */
  lua_getfield(L, LUA_ENVIRONINDEX, "loaders");
  if (!lua_istable(L, -1))
    luaL_error(L, LUA_QL("package.loaders") " must be a table");
  lua_pushliteral(L, "");  /* error message accumulator */
  for (i=1; ; i++) {
    lua_rawgeti(L, -2, i);  /* get a loader */
    if (lua_isnil(L, -1))
      luaL_error(L, "module " LUA_QS " not found:%s",
                    name, lua_tostring(L, -2));
    lua_pushstring(L, name);
    lua_call(L, 1, 1);  /* call it */
    if (lua_isfunction(L, -1))  /* did it find module? */
      break;  /* module loaded successfully */
    else if (lua_isstring(L, -1))  /* loader returned error message? */
      lua_concat(L, 2);  /* accumulate it */
    else
      lua_pop(L, 1);
  }
  lua_pushlightuserdata(L, sentinel);
  lua_setfield(L, 2, name);  /* _LOADED[name] = sentinel */
  lua_pushstring(L, name);  /* pass name as argument to module */
  lua_call(L, 1, 1);  /* run loaded module */
  if (!lua_isnil(L, -1))  /* non-nil return? */
    lua_setfield(L, 2, name);  /* _LOADED[name] = returned value */
  lua_getfield(L, 2, name);
  if (lua_touserdata(L, -1) == sentinel) {   /* module did not set a value? */
    lua_pushboolean(L, 1);  /* use true as result */
    lua_pushvalue(L, -1);  /* extra copy to be returned */
    lua_setfield(L, 2, name);  /* _LOADED[name] = true */
  }
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %r13
movl %r13d, %esi
xorl %edx, %edx
callq 0xf6c0
movq %rax, %r14
movq %rbx, %rdi
movl %r13d, %esi
callq 0x51fc
leaq 0x1302(%rip), %rdx      # 0x19f93
movq %rbx, %rdi
movl $0xffffd8f0, %esi       # imm = 0xFFFFD8F0
callq 0x5aa6
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x5aa6
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x5641
testl %eax, %eax
je 0x18cef
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x5755
leaq 0x2557(%rip), %rcx      # 0x1b224
cmpq %rcx, %rax
jne 0x18e6b
leaq 0x24df(%rip), %rsi      # 0x1b1bc
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xf48b
jmp 0x18e6b
leaq 0x223c(%rip), %rdx      # 0x1af32
movq %rbx, %rdi
movl $0xffffd8ef, %esi       # imm = 0xFFFFD8EF
callq 0x5aa6
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x543c
cmpl $0x5, %eax
je 0x18d24
leaq 0x24cd(%rip), %rsi      # 0x1b1e7
movq %rbx, %rdi
xorl %eax, %eax
callq 0xf48b
leaq 0x244f(%rip), %rsi      # 0x1b17a
movq %rbx, %rdi
xorl %edx, %edx
callq 0x5819
pushq $-0x2
popq %r15
pushq $-0x1
popq %r12
movl %r13d, %ebp
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x5b2a
movq %rbx, %rdi
movl %r12d, %esi
callq 0x543c
testl %eax, %eax
jne 0x18d80
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x5665
movq %rbx, %rdi
leaq 0x2496(%rip), %rsi      # 0x1b209
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xf48b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5870
movq %rbx, %rdi
movl %r13d, %esi
movl %r13d, %edx
callq 0x5eb4
movq %rbx, %rdi
movl %r12d, %esi
callq 0x543c
cmpl $0x6, %eax
je 0x18dd4
movq %rbx, %rdi
movl %r12d, %esi
callq 0x54c4
movq %rbx, %rdi
testl %eax, %eax
je 0x18dc5
pushq $0x2
popq %rsi
callq 0x61ac
jmp 0x18dcd
movl %r15d, %esi
callq 0x51fc
incl %ebp
jmp 0x18d40
leaq 0x2449(%rip), %r15      # 0x1b224
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5a4e
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x5c7e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5870
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %edx, %esi
callq 0x5eb4
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x543c
testl %eax, %eax
je 0x18e29
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x5c7e
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x5aa6
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x5755
cmpq %r15, %rax
jne 0x18e6b
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x5a34
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x541c
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x5c7e
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq