// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/annotationsketch/style.c
// Function: gt_style_load_file
int gt_style_load_file(GtStyle *sty, const char *filename, GtError *err)
{
#ifndef NDEBUG
  int stack_size;
#endif
  int had_err = 0;
  gt_error_check(err);
  gt_rwlock_wrlock(sty->lock);
  gt_assert(sty && sty->L && filename);
#ifndef NDEBUG
  stack_size = lua_gettop(sty->L);
#endif
  gt_rwlock_unlock(sty->lock);
  gt_rwlock_wrlock(sty->lock);
  sty->filename = gt_cstr_dup(filename);
  gt_log_log("Trying to load style file: %s...", filename);
  if (luaL_loadfile(sty->L, filename) || lua_pcall(sty->L, 0, 0, 0)) {
    gt_error_set(err, "cannot run style file: %s", lua_tostring(sty->L, -1));
    had_err = -1;
    lua_pop(sty->L, 1);
  }
  if (!had_err) {
    lua_getglobal(sty->L, "style");
    if (lua_isnil(sty->L, -1) || !lua_istable(sty->L, -1)) {
      gt_error_set(err, "'style' is not defined or is not a table in \"%s\"",
                   filename);
      had_err = -1;
    }
    lua_pop(sty->L, 1);
  }
  gt_assert(lua_gettop(sty->L) == stack_size);
  gt_rwlock_unlock(sty->lock);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
testq %rdx, %rdx
je 0x32e92
movq %r14, %rdi
callq 0xc103
testb %al, %al
jne 0x33014
movq 0x10(%rbx), %rdi
callq 0x15e99
testq %r15, %r15
je 0x32fb8
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x32fb8
callq 0x377ed
movl %eax, %ebp
movq 0x10(%rbx), %rdi
callq 0x15f0a
movq 0x10(%rbx), %rdi
callq 0x15e99
movq %r15, %rdi
callq 0x4f8ae
movq %rax, 0x28(%rbx)
leaq 0xa20dd(%rip), %rdi     # 0xd4fb9
movq %r15, %rsi
xorl %eax, %eax
callq 0xc5d2
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x3b730
testl %eax, %eax
jne 0x32f07
movq (%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x39305
testl %eax, %eax
je 0x32f62
movq (%rbx), %rdi
pushq $-0x1
popq %r12
movl %r12d, %esi
xorl %edx, %edx
callq 0x37f9b
leaq 0xa20bb(%rip), %rsi     # 0xd4fda
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xc007
movq (%rbx), %rdi
pushq $-0x2
popq %rsi
callq 0x377fa
movq (%rbx), %rdi
callq 0x377ed
cmpl %ebp, %eax
jne 0x32fe6
movq 0x10(%rbx), %rdi
callq 0x15f0a
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rdi
leaq 0xb499c(%rip), %rdx     # 0xe7908
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x38a63
movq (%rbx), %rdi
pushq $-0x1
popq %r13
movl %r13d, %esi
callq 0x37b59
testl %eax, %eax
je 0x32f9c
movq (%rbx), %rdi
pushq $-0x1
popq %rsi
callq 0x37b59
xorl %r12d, %r12d
cmpl $0x5, %eax
je 0x32f2c
leaq 0xa2051(%rip), %rsi     # 0xd4ff4
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xc007
movl %r13d, %r12d
jmp 0x32f2c
movq 0xfaff9(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x9709d(%rip), %rsi     # 0xca066
leaq 0xa1fcf(%rip), %rdx     # 0xd4f9f
leaq 0xa1fb5(%rip), %rcx     # 0xd4f8c
leaq 0xa1eb7(%rip), %r8      # 0xd4e95
movl $0xe9, %r9d
jmp 0x33040
movq 0xfafcb(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x9706f(%rip), %rsi     # 0xca066
leaq 0xa1f6d(%rip), %rdx     # 0xd4f6b
leaq 0xa1f87(%rip), %rcx     # 0xd4f8c
leaq 0xa1e89(%rip), %r8      # 0xd4e95
movl $0xff, %r9d
jmp 0x33040
movq 0xfaf9d(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x97041(%rip), %rsi     # 0xca066
leaq 0x9762d(%rip), %rdx     # 0xca659
leaq 0xa1f59(%rip), %rcx     # 0xd4f8c
leaq 0xa1e5b(%rip), %r8      # 0xd4e95
movl $0xe7, %r9d
xorl %eax, %eax
callq 0xb8c0
callq 0xb300