// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/tool_iterator.c
// Function: gt_tool_iterator_next
bool gt_tool_iterator_next(GtToolIterator *tool_iterator, const char **name,
                           GtTool **tool)
{
  ToolIterationInfo tii;
  gt_assert(tool_iterator && name && tool);
  if (gt_array_size(tool_iterator->tool_stack)) {
    ToolEntry *entry = gt_array_pop(tool_iterator->tool_stack);
    *name = entry->name;
    *tool = entry->tool;
    if (tool_iterator->prefixptr) {
      gt_str_reset(tool_iterator->prefixptr);
      if (entry->prefix) {
        gt_str_append_str(tool_iterator->prefixptr, entry->prefix);
        gt_str_append_char(tool_iterator->prefixptr, tool_iterator->prefixsep);
      }
    }
    if (gt_tool_is_toolbox(entry->tool)) {
      GtToolbox *toolbox;
      GtArray *toollist;
      GtStr *myprefix;
      myprefix =
                gt_str_new_cstr(entry->prefix ? gt_str_get(entry->prefix) : "");
      gt_str_append_cstr(myprefix, entry->name);
      toolbox = gt_tool_get_toolbox(entry->tool);
      toollist = gt_array_new(sizeof (ToolEntry));
      tii.arr = toollist;
      tii.str = myprefix;
      gt_toolbox_iterate(toolbox, add_tool_to_stack, &tii);
      if (gt_array_size(toollist)) {
        gt_array_reverse(toollist); /* alphabetical order */
        gt_array_add_array(tool_iterator->tool_stack, toollist);
      }
      gt_array_delete(toollist);
      gt_str_delete(myprefix);
    } else
      gt_str_delete(entry->prefix);
    return true;
  }
  else
    return false;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x12331b
cmpq $0x0, 0x40(%rsp)
je 0x12331b
cmpq $0x0, 0x38(%rsp)
jne 0x123353
movq 0x518c7e(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3f2ce7(%rip), %rsi    # 0x516013
leaq 0x4216e3(%rip), %rdx    # 0x544a16
leaq 0x4216fa(%rip), %rcx    # 0x544a34
leaq 0x421699(%rip), %r8     # 0x5449da
movl $0x51, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x123355
movq 0x48(%rsp), %rax
movq (%rax), %rdi
callq 0x81370
cmpq $0x0, %rax
je 0x1234fc
movq 0x48(%rsp), %rax
movq (%rax), %rdi
callq 0x80c70
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x38(%rsp), %rax
movq %rcx, (%rax)
movq 0x48(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1233f5
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x11e110
movq 0x20(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1233f3
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0x11d750
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x48(%rsp), %rax
movsbl 0x10(%rax), %esi
callq 0x11da70
jmp 0x1233f5
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x122e80
testb $0x1, %al
jne 0x12340c
jmp 0x1234e7
movq 0x20(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x12342c
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x11dee0
movq %rax, (%rsp)
jmp 0x123439
leaq 0x47a1f5(%rip), %rax    # 0x59d628
movq %rax, (%rsp)
jmp 0x123439
movq (%rsp), %rdi
callq 0x11d510
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rax
movq (%rax), %rsi
callq 0x11d550
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x122ef0
movq %rax, 0x18(%rsp)
movl $0x18, %edi
callq 0x80990
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x18(%rsp), %rdi
leaq -0x2fb(%rip), %rsi      # 0x1231a0
leaq 0x28(%rsp), %rdx
callq 0x123bd0
movq 0x10(%rsp), %rdi
callq 0x81370
cmpq $0x0, %rax
je 0x1234d1
movq 0x10(%rsp), %rdi
callq 0x80f40
movq 0x48(%rsp), %rax
movq (%rax), %rdi
movq 0x10(%rsp), %rsi
callq 0x81290
movq 0x10(%rsp), %rdi
callq 0x81f80
movq 0x8(%rsp), %rdi
callq 0x11f560
jmp 0x1234f5
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x11f560
movb $0x1, 0x57(%rsp)
jmp 0x123501
movb $0x0, 0x57(%rsp)
movb 0x57(%rsp), %al
andb $0x1, %al
addq $0x58, %rsp
retq
nopl (%rax)