// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/loadlib.c
// Function: ll_module
static int ll_module (lua_State *L) {
  const char *modname = luaL_checkstring(L, 1);
  int loaded = lua_gettop(L) + 1;  /* index of _LOADED table */
  lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED");
  lua_getfield(L, loaded, modname);  /* get _LOADED[modname] */
  if (!lua_istable(L, -1)) {  /* not found? */
    lua_pop(L, 1);  /* remove previous result */
    /* try global variable (and create one if it does not exist) */
    if (luaL_findtable(L, LUA_GLOBALSINDEX, modname, 1) != NULL)
      return luaL_error(L, "name conflict for module " LUA_QS, modname);
    lua_pushvalue(L, -1);
    lua_setfield(L, loaded, modname);  /* _LOADED[modname] = new table */
  }
  /* check whether table already has a _NAME field */
  lua_getfield(L, -1, "_NAME");
  if (!lua_isnil(L, -1))  /* is table an initialized module? */
    lua_pop(L, 1);
  else {  /* no; initialize it */
    lua_pop(L, 1);
    modinit(L, modname);
  }
  lua_pushvalue(L, -1);
  setfenv(L);
  dooptions(L, loaded - 1);
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0xf6c0
movq %rax, %r15
movq %rbx, %rdi
callq 0x51ef
movl %eax, %r14d
leal 0x1(%r14), %ebp
leaq 0x1518(%rip), %rdx      # 0x19f93
movq %rbx, %rdi
movl $0xffffd8f0, %esi       # imm = 0xFFFFD8F0
callq 0x5aa6
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x5aa6
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x543c
cmpl $0x5, %eax
je 0x18b03
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x51fc
pushq $0x1
popq %rcx
movq %rbx, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
movq %r15, %rdx
callq 0xfb76
testq %rax, %rax
je 0x18aeb
leaq 0x14cc(%rip), %rsi      # 0x19f9b
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xf48b
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x541c
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x5c7e
leaq 0x2678(%rip), %rdx      # 0x1b182
pushq $-0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5aa6
movq %rbx, %rdi
movl %ebp, %esi
callq 0x543c
movl %eax, %ebp
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x51fc
testl %ebp, %ebp
jne 0x18ba2
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x541c
leaq 0x2644(%rip), %rdx      # 0x1b188
pushq $-0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5c7e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5870
leaq 0x261f(%rip), %rdx      # 0x1b182
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5c7e
pushq $0x2e
popq %rsi
movq %r15, %rdi
callq 0x4190
leaq 0x1(%rax), %rdx
testq %rax, %rax
cmoveq %r15, %rdx
subq %r15, %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5819
leaq 0x25f3(%rip), %rdx      # 0x1b18b
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5c7e
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x541c
pushq $0x1
popq %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x63ff
testl %eax, %eax
je 0x18be8
leaq 0x1e63(%rip), %rsi      # 0x1aa2b
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x656c
testl %eax, %eax
je 0x18be8
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x5474
testl %eax, %eax
je 0x18bf9
leaq 0x25a5(%rip), %rsi      # 0x1b194
movq %rbx, %rdi
xorl %eax, %eax
callq 0xf48b
pushq $-0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x541c
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5e3b
movq %rbx, %rdi
movl %ebp, %esi
callq 0x51fc
pushq $0x2
popq %r15
pushq $0x1
popq %r12
cmpl %r14d, %r15d
jg 0x18c4e
movq %rbx, %rdi
movl %r15d, %esi
callq 0x541c
movq %rbx, %rdi
movl %ebp, %esi
callq 0x541c
movq %rbx, %rdi
movl %r12d, %esi
xorl %edx, %edx
callq 0x5eb4
incl %r15d
jmp 0x18c22
xorl %eax, %eax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq