// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/annotationsketch/style.c
// Function: gt_style_get_color_with_track
GtStyleQueryStatus gt_style_get_color_with_track(const GtStyle *sty,
                                                 const char *section,
                                                 const char *key,
                                                 GtColor *color,
                                                 GtFeatureNode *gn,
                                                 const GtStr *track_id,
                                                 GtError *err)
{
#ifndef NDEBUG
  int stack_size;
#endif
  int i = 0;
  gt_assert(sty && section && key && color);
  gt_error_check(err);
  gt_rwlock_wrlock(sty->lock);
#ifndef NDEBUG
  stack_size = lua_gettop(sty->L);
#endif
  /* set default colors */
  color->red = 0.5; color->green = 0.5; color->blue = 0.5; color->alpha = 0.5;
  /* 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 color entry for given feature */
  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_istable(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_NOT_SET;
  } else i++;
  /* update color struct */
  lua_getfield(sty->L, -1, "red");
  if (!lua_isnil(sty->L, -1) && lua_isnumber(sty->L, -1))
    color->red = lua_tonumber(sty->L,-1);
  lua_pop(sty->L, 1);
  lua_getfield(sty->L, -1, "green");
  if (!lua_isnil(sty->L, -1) && lua_isnumber(sty->L, -1))
    color->green = lua_tonumber(sty->L,-1);
  lua_pop(sty->L, 1);
  lua_getfield(sty->L, -1, "blue");
  if (!lua_isnil(sty->L, -1) && lua_isnumber(sty->L, -1))
    color->blue = lua_tonumber(sty->L,-1);
  lua_pop(sty->L, 1);
  lua_getfield(sty->L, -1, "alpha");
  if (!lua_isnil(sty->L, -1) && lua_isnumber(sty->L, -1))
    color->alpha = lua_tonumber(sty->L,-1);
  lua_pop(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 0x4846f
cmpq $0x0, 0x50(%rsp)
je 0x4846f
cmpq $0x0, 0x48(%rsp)
je 0x4846f
cmpq $0x0, 0x40(%rsp)
jne 0x484a7
movq 0x16bb62(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x115be6(%rip), %rsi    # 0x15e066
leaq 0x120ddb(%rip), %rdx    # 0x169262
leaq 0x120df3(%rip), %rcx    # 0x169281
leaq 0x120c18(%rip), %r8     # 0x1690ad
movl $0x146, %r9d            # imm = 0x146
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x484a9
jmp 0x484ab
cmpq $0x0, 0x70(%rsp)
je 0x484fb
movq 0x70(%rsp), %rdi
callq 0xc270
testb $0x1, %al
jne 0x484c3
jmp 0x484fb
movq 0x16bb0e(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x115b92(%rip), %rsi    # 0x15e066
leaq 0x11616d(%rip), %rdx    # 0x15e648
leaq 0x120d9f(%rip), %rcx    # 0x169281
leaq 0x120bc4(%rip), %r8     # 0x1690ad
movl $0x147, %r9d            # imm = 0x147
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x484fd
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1c100
movq 0x58(%rsp), %rax
movq (%rax), %rdi
callq 0x4f0e0
movl %eax, 0x2c(%rsp)
movq 0x40(%rsp), %rax
movsd 0x11f2ef(%rip), %xmm0   # 0x167818
movsd %xmm0, (%rax)
movq 0x40(%rsp), %rax
movsd 0x11f2de(%rip), %xmm0   # 0x167818
movsd %xmm0, 0x8(%rax)
movq 0x40(%rsp), %rax
movsd 0x11f2cc(%rip), %xmm0   # 0x167818
movsd %xmm0, 0x10(%rax)
movq 0x40(%rsp), %rax
movsd 0x11f2ba(%rip), %xmm0   # 0x167818
movsd %xmm0, 0x18(%rax)
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x48a70
movl %eax, 0x28(%rsp)
cmpl $0x0, 0x28(%rsp)
jge 0x485e7
jmp 0x4857f
movq 0x58(%rsp), %rax
movq (%rax), %rdi
callq 0x4f0e0
cmpl 0x2c(%rsp), %eax
je 0x485ca
movq 0x16ba3f(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x115ac3(%rip), %rsi    # 0x15e066
leaq 0x120bd9(%rip), %rdx    # 0x169183
leaq 0x120cd0(%rip), %rcx    # 0x169281
leaq 0x120af5(%rip), %r8     # 0x1690ad
movl $0x152, %r9d            # imm = 0x152
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x485cc
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1c1a0
movl $0x1, 0x64(%rsp)
jmp 0x48a60
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 0x48761
movl $0x0, 0x24(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x4868e
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 0x4868c
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 0x4868e
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl 0x24(%rsp), %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x527f0
cmpl $0x0, %eax
je 0x4875f
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 0x1237cf(%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 0x48742
movq 0x16b8c7(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x11594b(%rip), %rsi    # 0x15e066
leaq 0x120a61(%rip), %rdx    # 0x169183
leaq 0x120b58(%rip), %rcx    # 0x169281
leaq 0x12097d(%rip), %r8     # 0x1690ad
movl $0x16a, %r9d            # imm = 0x16A
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x48744
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1c1a0
movl $0x2, 0x64(%rsp)
jmp 0x48a60
jmp 0x48761
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4f800
cmpl $0x0, %eax
je 0x4878f
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4f800
cmpl $0x5, %eax
je 0x48809
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 0x487ec
movq 0x16b81d(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x1158a1(%rip), %rsi    # 0x15e066
leaq 0x1209b7(%rip), %rdx    # 0x169183
leaq 0x120aae(%rip), %rcx    # 0x169281
leaq 0x1208d3(%rip), %r8     # 0x1690ad
movl $0x172, %r9d            # imm = 0x172
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x487ee
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1c1a0
movl $0x1, 0x64(%rsp)
jmp 0x48a60
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x1254bb(%rip), %rdx    # 0x16dce3
callq 0x51640
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4f800
cmpl $0x0, %eax
je 0x48876
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4f8f0
cmpl $0x0, %eax
je 0x48876
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
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4f100
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x120a03(%rip), %rdx    # 0x16929f
callq 0x51640
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4f800
cmpl $0x0, %eax
je 0x488eb
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4f8f0
cmpl $0x0, %eax
je 0x488eb
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x50020
movq 0x40(%rsp), %rax
movsd %xmm0, 0x8(%rax)
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4f100
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x120994(%rip), %rdx    # 0x1692a5
callq 0x51640
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4f800
cmpl $0x0, %eax
je 0x48960
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4f8f0
cmpl $0x0, %eax
je 0x48960
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x50020
movq 0x40(%rsp), %rax
movsd %xmm0, 0x10(%rax)
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4f100
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x132d3e(%rip), %rdx    # 0x17b6c4
callq 0x51640
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4f800
cmpl $0x0, %eax
je 0x489d5
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4f8f0
cmpl $0x0, %eax
je 0x489d5
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x50020
movq 0x40(%rsp), %rax
movsd %xmm0, 0x18(%rax)
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4f100
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 0x48a48
movq 0x16b5c1(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x115645(%rip), %rsi    # 0x15e066
leaq 0x12075b(%rip), %rdx    # 0x169183
leaq 0x120852(%rip), %rcx    # 0x169281
leaq 0x120677(%rip), %r8     # 0x1690ad
movl $0x189, %r9d            # imm = 0x189
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x48a4a
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1c1a0
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopl (%rax)