// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/annotationsketch/style.c
// Function: gt_style_get_num_with_track
GtStyleQueryStatus gt_style_get_num_with_track(const GtStyle *sty,
                                               const char *section,
                                               const char *key, double *val,
                                               GtFeatureNode *gn,
                                               const GtStr *track_id,
                                               GtError *err)
{
#ifndef NDEBUG
  int stack_size;
#endif
  int i = 0;
  gt_assert(sty && key && section && val);
  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_isnumber(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_tonumber(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 0x496df
cmpq $0x0, 0x48(%rsp)
je 0x496df
cmpq $0x0, 0x50(%rsp)
je 0x496df
cmpq $0x0, 0x40(%rsp)
jne 0x49717
movq 0x16a8f2(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x114976(%rip), %rsi    # 0x15e066
leaq 0x11fc28(%rip), %rdx    # 0x16931f
leaq 0x11fc3e(%rip), %rcx    # 0x16933c
leaq 0x11f9a8(%rip), %r8     # 0x1690ad
movl $0x224, %r9d            # imm = 0x224
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x49719
jmp 0x4971b
cmpq $0x0, 0x70(%rsp)
je 0x4976b
movq 0x70(%rsp), %rdi
callq 0xc270
testb $0x1, %al
jne 0x49733
jmp 0x4976b
movq 0x16a89e(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x114922(%rip), %rsi    # 0x15e066
leaq 0x114efd(%rip), %rdx    # 0x15e648
leaq 0x11fbea(%rip), %rcx    # 0x16933c
leaq 0x11f954(%rip), %r8     # 0x1690ad
movl $0x225, %r9d            # imm = 0x225
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x4976d
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 0x49810
jmp 0x497a8
movq 0x58(%rsp), %rax
movq (%rax), %rdi
callq 0x4f0e0
cmpl 0x2c(%rsp), %eax
je 0x497f3
movq 0x16a816(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x11489a(%rip), %rsi    # 0x15e066
leaq 0x11f9b0(%rip), %rdx    # 0x169183
leaq 0x11fb62(%rip), %rcx    # 0x16933c
leaq 0x11f8cc(%rip), %r8     # 0x1690ad
movl $0x22e, %r9d            # imm = 0x22E
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x497f5
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1c1a0
movl $0x1, 0x64(%rsp)
jmp 0x49ade
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 0x4998a
movl $0x0, 0x24(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x498b7
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 0x498b5
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 0x498b7
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl 0x24(%rsp), %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x527f0
cmpl $0x0, %eax
je 0x49988
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 0x1225a6(%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 0x4996b
movq 0x16a69e(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x114722(%rip), %rsi    # 0x15e066
leaq 0x11f838(%rip), %rdx    # 0x169183
leaq 0x11f9ea(%rip), %rcx    # 0x16933c
leaq 0x11f754(%rip), %r8     # 0x1690ad
movl $0x245, %r9d            # imm = 0x245
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x4996d
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1c1a0
movl $0x2, 0x64(%rsp)
jmp 0x49ade
jmp 0x4998a
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4f800
cmpl $0x0, %eax
je 0x499bc
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4f8f0
cmpl $0x0, %eax
jne 0x49a3f
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 0x49a22
movq 0x16a5e7(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x11466b(%rip), %rsi    # 0x15e066
leaq 0x11f781(%rip), %rdx    # 0x169183
leaq 0x11f933(%rip), %rcx    # 0x16933c
leaq 0x11f69d(%rip), %r8     # 0x1690ad
movl $0x24d, %r9d            # imm = 0x24D
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x49a24
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1c1a0
movl $0x1, 0x64(%rsp)
jmp 0x49ade
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x50020
movq 0x40(%rsp), %rax
movsd %xmm0, (%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 0x49ac6
movq 0x16a543(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x1145c7(%rip), %rsi    # 0x15e066
leaq 0x11f6dd(%rip), %rdx    # 0x169183
leaq 0x11f88f(%rip), %rcx    # 0x16933c
leaq 0x11f5f9(%rip), %r8     # 0x1690ad
movl $0x255, %r9d            # imm = 0x255
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x49ac8
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1c1a0
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopw (%rax,%rax)