// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x10(%rsp)
movq %rdx, %xmm0
movq %rdi, %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
movq %rcx, %xmm0
movq %rsi, %xmm2
punpcklqdq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0]
pxor %xmm0, %xmm0
pcmpeqd %xmm0, %xmm2
pcmpeqd %xmm0, %xmm1
movdqa %xmm1, %xmm0
shufps $0xdd, %xmm2, %xmm0     # xmm0 = xmm0[1,3],xmm2[1,3]
shufps $0x88, %xmm2, %xmm1     # xmm1 = xmm1[0,2],xmm2[0,2]
andps %xmm0, %xmm1
movmskps %xmm1, %eax
testl %eax, %eax
jne 0x33f33
movq %r9, %rbp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rcx, 0x8(%rsp)
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x33d56
callq 0xc103
testb %al, %al
jne 0x33f64
movq 0x10(%rbx), %rdi
callq 0x15e99
movq (%rbx), %rdi
callq 0x377ed
movl %eax, %r13d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x33525
movq (%rbx), %rdi
testl %eax, %eax
js 0x33ddc
movl %eax, %r12d
pushq $-0x1
popq %r14
movl %r14d, %esi
movq %r15, %rdx
callq 0x38a63
movq (%rbx), %rdi
movl %r14d, %esi
callq 0x37b59
cmpl $0x6, %eax
jne 0x33e7b
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x33e1b
callq 0x1bec8
movq (%rbx), %rdi
movq %rax, %rsi
callq 0x67934
testq %rbp, %rbp
je 0x33e1f
movq %rbp, %rdi
pushq $0x2
popq %rbp
movq (%rbx), %r15
callq 0x143d2
movq %r15, %rdi
movq %rax, %rsi
callq 0x38431
jmp 0x33e22
callq 0x377ed
cmpl %r13d, %eax
je 0x33f16
movq 0xfa1c7(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x9626b(%rip), %rsi     # 0xca066
leaq 0xa1169(%rip), %rdx     # 0xd4f6b
leaq 0xa131b(%rip), %rcx     # 0xd5124
leaq 0xa1085(%rip), %r8      # 0xd4e95
movl $0x22e, %r9d            # imm = 0x22E
jmp 0x33fec
xorl %ebp, %ebp
jmp 0x33e22
pushq $0x1
popq %rbp
movq (%rbx), %rdi
pushq $0x1
popq %rdx
movl %ebp, %esi
xorl %ecx, %ecx
callq 0x39305
testl %eax, %eax
je 0x33e7b
movq (%rbx), %rdi
pushq $-0x1
popq %rsi
xorl %edx, %edx
callq 0x37f9b
leaq 0xa3c60(%rip), %rsi     # 0xd7aa9
movq 0x50(%rsp), %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xc007
movq (%rbx), %rdi
pushq $-0x4
popq %rsi
callq 0x377fa
movq (%rbx), %rdi
callq 0x377ed
cmpl %r13d, %eax
jne 0x33fc0
pushq $0x2
jmp 0x33f18
movq (%rbx), %rdi
pushq $-0x1
popq %rsi
callq 0x37b59
testl %eax, %eax
je 0x33efb
movq (%rbx), %rdi
pushq $-0x1
popq %rsi
callq 0x37bad
testl %eax, %eax
je 0x33efb
movq (%rbx), %rdi
pushq $-0x1
popq %rsi
callq 0x37f19
movq 0x8(%rsp), %rax
movsd %xmm0, (%rax)
movq (%rbx), %rdi
pushq $-0x2
popq %rsi
subl %r12d, %esi
callq 0x377fa
movq (%rbx), %rdi
callq 0x377ed
xorl %ebp, %ebp
cmpl %r13d, %eax
je 0x33f19
movq 0xfa0e7(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x9618b(%rip), %rsi     # 0xca066
leaq 0xa1089(%rip), %rdx     # 0xd4f6b
leaq 0xa123b(%rip), %rcx     # 0xd5124
leaq 0xa0fa5(%rip), %r8      # 0xd4e95
movl $0x255, %r9d            # imm = 0x255
jmp 0x33fec
movq (%rbx), %rdi
pushq $-0x2
popq %rsi
subl %r12d, %esi
callq 0x377fa
movq (%rbx), %rdi
callq 0x377ed
cmpl %r13d, %eax
jne 0x33f92
pushq $0x1
popq %rbp
movq 0x10(%rbx), %rdi
callq 0x15f0a
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xfa07e(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x96122(%rip), %rsi     # 0xca066
leaq 0xa11bc(%rip), %rdx     # 0xd5107
leaq 0xa11d2(%rip), %rcx     # 0xd5124
leaq 0xa0f3c(%rip), %r8      # 0xd4e95
movl $0x224, %r9d            # imm = 0x224
jmp 0x33fec
movq 0xfa04d(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x960f1(%rip), %rsi     # 0xca066
leaq 0x966dd(%rip), %rdx     # 0xca659
leaq 0xa11a1(%rip), %rcx     # 0xd5124
leaq 0xa0f0b(%rip), %r8      # 0xd4e95
movl $0x225, %r9d            # imm = 0x225
jmp 0x33fec
movq 0xfa01f(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x960c3(%rip), %rsi     # 0xca066
leaq 0xa0fc1(%rip), %rdx     # 0xd4f6b
leaq 0xa1173(%rip), %rcx     # 0xd5124
leaq 0xa0edd(%rip), %r8      # 0xd4e95
movl $0x24d, %r9d            # imm = 0x24D
jmp 0x33fec
movq 0xf9ff1(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x96095(%rip), %rsi     # 0xca066
leaq 0xa0f93(%rip), %rdx     # 0xd4f6b
leaq 0xa1145(%rip), %rcx     # 0xd5124
leaq 0xa0eaf(%rip), %r8      # 0xd4e95
movl $0x245, %r9d            # imm = 0x245
xorl %eax, %eax
callq 0xb8c0
callq 0xb300