// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/deps/lua/src/lauxlib.c
// Function: luaL_openlib
LUALIB_API void luaI_openlib (lua_State *L, const char *libname,
                              const luaL_Reg *l, int nup) {
  if (libname) {
    int size = libsize(l);
    /* check whether lib already exists */
    luaL_findtable(L, LUA_REGISTRYINDEX, "_LOADED", 1);
    lua_getfield(L, -1, libname);  /* get _LOADED[libname] */
    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, libname, size) != NULL)
        luaL_error(L, "name conflict for module " LUA_QS, libname);
      lua_pushvalue(L, -1);
      lua_setfield(L, -3, libname);  /* _LOADED[libname] = new table */
    }
    lua_remove(L, -2);  /* remove _LOADED table */
    lua_insert(L, -(nup+1));  /* move library table to below upvalues */
  }
  for (; l->name; l++) {
    int i;
    for (i=0; i<nup; i++)  /* copy upvalues to the top */
      lua_pushvalue(L, -nup);
    lua_pushcclosure(L, l->func, nup);
    lua_setfield(L, -(nup+2), l->name);
  }
  lua_pop(L, nup);  /* remove upvalues */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1b21d
movq -0x18(%rbp), %rdi
callq 0x1b2b0
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0xffffd8f0, %esi       # imm = 0xFFFFD8F0
leaq 0x10e61(%rip), %rdx     # 0x2bfcf
movl $0x1, %ecx
callq 0x1b2f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x7d90
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x6fe0
cmpl $0x5, %eax
je 0x1b1fc
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x6ab0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl -0x20(%rbp), %ecx
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x1b2f0
cmpq $0x0, %rax
je 0x1b1dc
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x10e02(%rip), %rsi     # 0x2bfd7
movb $0x0, %al
callq 0x1a8b0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x6f80
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x81e0
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x6b40
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %eax
addl $0x1, %eax
xorl %esi, %esi
subl %eax, %esi
callq 0x6d40
jmp 0x1b21f
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1b28d
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x1b251
movq -0x8(%rbp), %rdi
xorl %esi, %esi
subl -0x1c(%rbp), %esi
callq 0x6f80
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x1b230
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movl -0x1c(%rbp), %edx
callq 0x7ae0
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %eax
addl $0x2, %eax
xorl %esi, %esi
subl %eax, %esi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
callq 0x81e0
movq -0x18(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x18(%rbp)
jmp 0x1b21f
movq -0x8(%rbp), %rdi
xorl %esi, %esi
subl -0x1c(%rbp), %esi
subl $0x1, %esi
callq 0x6ab0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)