// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/annotationsketch/style.c
// Function: gt_style_get_bool_with_track
GtStyleQueryStatus gt_style_get_bool_with_track(const GtStyle *sty,
                                                const char *section,
                                                const char *key, bool *val,
                                                GtFeatureNode *gn,
                                                const GtStr *track_id,
                                                GtError *err)
{
#ifndef NDEBUG
  int stack_size;
#endif
  int i = 0;
  gt_assert(sty && key && section);
  gt_error_check(err);
  gt_rwlock_wrlock(sty->lock);
#ifndef NDEBUG
  stack_size = lua_gettop(sty->L);
#endif
  /* get section */
  i = style_find_section_for_getting(sty, section);
  /* could not get section, return default */
  if (i < 0) {
    gt_assert(lua_gettop(sty->L) == stack_size);
    gt_rwlock_unlock(sty->lock);
    return GT_STYLE_QUERY_NOT_SET;
  }
  /* lookup entry for given key */
  lua_getfield(sty->L, -1, key);

  /* execute callback if function is given */
  if (lua_isfunction(sty->L, -1))
  {
    int num_of_args = 0;
    if (gn) {
      GtGenomeNode *gn_lua = gt_genome_node_ref((GtGenomeNode*) gn);
      gt_lua_genome_node_push(sty->L, gn_lua);
      num_of_args++;
      if (track_id) {
        lua_pushstring(sty->L, gt_str_get(track_id));
        num_of_args++;
      }
    }
    if (lua_pcall(sty->L, num_of_args, 1, 0) != 0) {
      gt_error_set(err, "%s", lua_tostring(sty->L, -1));
      lua_pop(sty->L, 3);
      gt_assert(lua_gettop(sty->L) == stack_size);
      gt_rwlock_unlock(sty->lock);
      return GT_STYLE_QUERY_ERROR;
    }
  }

  if (lua_isnil(sty->L, -1) || !lua_isboolean(sty->L, -1)) {
    lua_pop(sty->L, i+1);
    gt_assert(lua_gettop(sty->L) == stack_size);
    gt_rwlock_unlock(sty->lock);
    return GT_STYLE_QUERY_NOT_SET;
  } else i++;

  /* retrieve value */
  *val = lua_toboolean(sty->L, -1);
  /* reset stack to original state for subsequent calls */
  lua_pop(sty->L, i);
  gt_assert(lua_gettop(sty->L) == stack_size);
  gt_rwlock_unlock(sty->lock);
  return GT_STYLE_QUERY_OK;
}

// Assembly:
subq $0x68, %rsp
movq 0x70(%rsp), %rax
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq %rdx, 0x48(%rsp)
movq %rcx, 0x40(%rsp)
movq %r8, 0x38(%rsp)
movq %r9, 0x30(%rsp)
movl $0x0, 0x28(%rsp)
cmpq $0x0, 0x58(%rsp)
je 0x49d27
cmpq $0x0, 0x48(%rsp)
je 0x49d27
cmpq $0x0, 0x50(%rsp)
jne 0x49d5f
movq 0x16a2aa(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x11432e(%rip), %rsi    # 0x15e066
leaq 0x11f57e(%rip), %rdx    # 0x1692bd
leaq 0x11f639(%rip), %rcx    # 0x16937f
leaq 0x11f360(%rip), %r8     # 0x1690ad
movl $0x287, %r9d            # imm = 0x287
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x49d61
jmp 0x49d63
cmpq $0x0, 0x70(%rsp)
je 0x49db3
movq 0x70(%rsp), %rdi
callq 0xc270
testb $0x1, %al
jne 0x49d7b
jmp 0x49db3
movq 0x16a256(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x1142da(%rip), %rsi    # 0x15e066
leaq 0x1148b5(%rip), %rdx    # 0x15e648
leaq 0x11f5e5(%rip), %rcx    # 0x16937f
leaq 0x11f30c(%rip), %r8     # 0x1690ad
movl $0x288, %r9d            # imm = 0x288
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x49db5
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1c100
movq 0x58(%rsp), %rax
movq (%rax), %rdi
callq 0x4f0e0
movl %eax, 0x2c(%rsp)
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x48a70
movl %eax, 0x28(%rsp)
cmpl $0x0, 0x28(%rsp)
jge 0x49e58
jmp 0x49df0
movq 0x58(%rsp), %rax
movq (%rax), %rdi
callq 0x4f0e0
cmpl 0x2c(%rsp), %eax
je 0x49e3b
movq 0x16a1ce(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x114252(%rip), %rsi    # 0x15e066
leaq 0x11f368(%rip), %rdx    # 0x169183
leaq 0x11f55d(%rip), %rcx    # 0x16937f
leaq 0x11f284(%rip), %r8     # 0x1690ad
movl $0x291, %r9d            # imm = 0x291
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x49e3d
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1c1a0
movl $0x1, 0x64(%rsp)
jmp 0x4a12d
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movq 0x48(%rsp), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x51640
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4f800
cmpl $0x6, %eax
jne 0x49fd2
movl $0x0, 0x24(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x49eff
movq 0x38(%rsp), %rdi
callq 0x25140
movq %rax, 0x18(%rsp)
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rsi
callq 0xaade0
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x49efd
movq 0x58(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rdi
callq 0x19940
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x50970
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x49eff
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl 0x24(%rsp), %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x527f0
cmpl $0x0, %eax
je 0x49fd0
movq 0x70(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x50180
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0x121f5e(%rip), %rsi    # 0x16bead
movb $0x0, %al
callq 0xc0d0
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xfffffffc, %esi       # imm = 0xFFFFFFFC
callq 0x4f100
movq 0x58(%rsp), %rax
movq (%rax), %rdi
callq 0x4f0e0
cmpl 0x2c(%rsp), %eax
je 0x49fb3
movq 0x16a056(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x1140da(%rip), %rsi    # 0x15e066
leaq 0x11f1f0(%rip), %rdx    # 0x169183
leaq 0x11f3e5(%rip), %rcx    # 0x16937f
leaq 0x11f10c(%rip), %r8     # 0x1690ad
movl $0x2a8, %r9d            # imm = 0x2A8
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x49fb5
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1c1a0
movl $0x2, 0x64(%rsp)
jmp 0x4a12d
jmp 0x49fd2
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4f800
cmpl $0x0, %eax
je 0x4a004
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4f800
cmpl $0x1, %eax
je 0x4a087
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl 0x28(%rsp), %eax
addl $0x1, %eax
xorl %esi, %esi
subl %eax, %esi
subl $0x1, %esi
callq 0x4f100
movq 0x58(%rsp), %rax
movq (%rax), %rdi
callq 0x4f0e0
cmpl 0x2c(%rsp), %eax
je 0x4a06a
movq 0x169f9f(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x114023(%rip), %rsi    # 0x15e066
leaq 0x11f139(%rip), %rdx    # 0x169183
leaq 0x11f32e(%rip), %rcx    # 0x16937f
leaq 0x11f055(%rip), %r8     # 0x1690ad
movl $0x2b0, %r9d            # imm = 0x2B0
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x4a06c
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1c1a0
movl $0x1, 0x64(%rsp)
jmp 0x4a12d
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x50110
cmpl $0x0, %eax
setne %cl
movq 0x40(%rsp), %rax
andb $0x1, %cl
movb %cl, (%rax)
movq 0x58(%rsp), %rax
movq (%rax), %rdi
xorl %esi, %esi
subl 0x28(%rsp), %esi
subl $0x1, %esi
callq 0x4f100
movq 0x58(%rsp), %rax
movq (%rax), %rdi
callq 0x4f0e0
cmpl 0x2c(%rsp), %eax
je 0x4a115
movq 0x169ef4(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x113f78(%rip), %rsi    # 0x15e066
leaq 0x11f08e(%rip), %rdx    # 0x169183
leaq 0x11f283(%rip), %rcx    # 0x16937f
leaq 0x11efaa(%rip), %r8     # 0x1690ad
movl $0x2b9, %r9d            # imm = 0x2B9
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x4a117
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1c1a0
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)