// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/lua-5.1.5/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 %rbx
subq $0x78, %rsp
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x5b1b3
movq %rax, %r14
movq 0x10(%rbx), %r15
subq 0x18(%rbx), %r15
shrq $0x4, %r15
leal 0x1(%r15), %ebp
leaq 0x82977(%rip), %rdx     # 0xedc0d
movq %rbx, %rdi
movl $0xffffd8f0, %esi       # imm = 0xFFFFD8F0
callq 0x58b98
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x58b98
movq 0x10(%rbx), %rcx
leaq -0x10(%rcx), %rax
cmpq 0xe5d11(%rip), %rax     # 0x150fd0
je 0x6b2c7
cmpl $0x5, -0x8(%rcx)
je 0x6b30c
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
movq %r14, %rdx
movl $0x1, %ecx
callq 0x5b750
testq %rax, %rax
jne 0x6b4d7
movq 0x10(%rbx), %rax
movq -0x10(%rax), %rcx
movq %rcx, (%rax)
movl -0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
addq $0x10, 0x10(%rbx)
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x59137
leaq 0x8387c(%rip), %rdx     # 0xeeb8f
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x58b98
movq 0x10(%rbx), %rax
leaq -0x10(%rax), %rcx
cmpq 0xe5ca1(%rip), %rcx     # 0x150fd0
je 0x6b337
cmpl $0x0, -0x8(%rax)
je 0x6b340
movq %rcx, 0x10(%rbx)
jmp 0x6b3c4
movq %rcx, 0x10(%rbx)
movq -0x20(%rax), %rcx
movq %rcx, -0x10(%rax)
movl -0x18(%rax), %ecx
movl %ecx, -0x8(%rax)
addq $0x10, 0x10(%rbx)
leaq 0x83837(%rip), %rdx     # 0xeeb95
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x59137
movq %rbx, %rdi
movq %r14, %rsi
callq 0x58568
leaq 0x83812(%rip), %rdx     # 0xeeb8f
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x59137
movq %r14, %rdi
movl $0x2e, %esi
callq 0xb6f0
leaq 0x1(%rax), %rdx
testq %rax, %rax
cmoveq %r14, %rdx
subq %r14, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x58391
leaq 0x837e1(%rip), %rdx     # 0xeeb98
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x59137
movq 0x10(%rbx), %rax
movq -0x10(%rax), %rcx
movq %rcx, (%rax)
movl -0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
addq $0x10, 0x10(%rbx)
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x5a0bf
testl %eax, %eax
je 0x6b4c6
leaq 0x76a4c(%rip), %rsi     # 0xe1e45
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x5a270
testl %eax, %eax
je 0x6b4c6
movq 0x10(%rbx), %rax
cmpl $0x6, -0x8(%rax)
jne 0x6b424
movq -0x10(%rax), %rcx
cmpb $0x0, 0xa(%rcx)
jne 0x6b4c6
movq -0x20(%rax), %rcx
movq %rcx, (%rax)
movl -0x18(%rax), %ecx
movl %ecx, 0x8(%rax)
addq $0x10, 0x10(%rbx)
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x593ec
addq $-0x10, 0x10(%rbx)
cmpl $0x2, %r15d
jl 0x6b4b9
negl %r15d
movl $0x2, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x57945
movq 0x10(%rbx), %rcx
movq (%rax), %rdx
movq %rdx, (%rcx)
movl 0x8(%rax), %eax
movl %eax, 0x8(%rcx)
movq 0x10(%rbx), %rax
leaq 0x10(%rax), %rcx
movq %rcx, 0x10(%rbx)
movq -0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movl -0x8(%rax), %ecx
movl %ecx, 0x18(%rax)
movq 0x10(%rbx), %rsi
leaq 0x10(%rsi), %rax
movq %rax, 0x10(%rbx)
addq $-0x10, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x594c2
leal (%r15,%r14), %eax
incl %eax
movl %r14d, %ecx
incl %ecx
movl %ecx, %r14d
cmpl $0x1, %eax
jne 0x6b457
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x836d4(%rip), %rsi     # 0xeeba1
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5af61
leaq 0x82737(%rip), %rsi     # 0xedc15
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x5af61