// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/clustered_set_uf.c
// Function: gt_clustered_set_union_find_iterator_new
GtClusteredSetIterator*
gt_clustered_set_union_find_iterator_new(GtClusteredSet *cs,
                                         GtUword c,
                                         GT_UNUSED GtError *err)
{
  gt_assert(cs);
  GtClusteredSetUF *cs_uf = (GtClusteredSetUF*) cs;
  GtClusteredSetIterator *cs_i = gt_calloc(1, sizeof (GtClusteredSetIterator));
  GtUword i = 0, j = 0;
  if (SINGLETON(c)) {
    cs_i->length = (GtUword) 1;
    cs_i->curpos = (GtUword) 0;
    cs_i->elems = gt_calloc(1, sizeof (GtUword));
    cs_i->elems[j] = c;
  }
  else {
    if (CINFO(c)->cluster_size > 0) {
      GtClusteredSetUFClusterInfo *cluster_info;
      cluster_info = CINFO(c);
      cs_i->length = cluster_info->cluster_size;
      cs_i->curpos = (GtUword) 0;
      cs_i->elems = gt_calloc(cluster_info->cluster_size,
                              sizeof (GtUword));
      i = cluster_info->first_elem;

      do {
        cs_i->elems[j] = i;
        j++;
      } while ((i = cs_uf->cluster_elems[i].next_elem) < cs_uf->num_of_elems);

    } else {
      gt_free(cs_i);
      return NULL;
    }
  }
  return cs_i;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x48bed3
movq 0x1b00fe(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x8a167(%rip), %rsi     # 0x516013
leaq 0xea845(%rip), %rdx     # 0x5766f8
leaq 0x1262a0(%rip), %rcx    # 0x5b215a
leaq 0x1262c2(%rip), %r8     # 0x5b2183
movl $0x95, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x48bed5
movq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
movl $0x1, %edi
movl $0x18, %esi
leaq 0x126293(%rip), %rdx    # 0x5b2183
movl $0x97, %ecx
callq 0xe83c0
movq %rax, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x30(%rsp), %rsi
callq 0x8a780
testb $0x1, %al
jne 0x48bf84
movq 0x18(%rsp), %rax
movq $0x1, 0x8(%rax)
movq 0x18(%rsp), %rax
movq $0x0, (%rax)
movl $0x1, %edi
movl $0x8, %esi
leaq 0x126231(%rip), %rdx    # 0x5b2183
movl $0x9c, %ecx
callq 0xe83c0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x30(%rsp), %rdx
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x48c07f
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x30(%rsp), %rsi
callq 0x80b60
cmpq $0x0, 0x10(%rax)
jbe 0x48c05c
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x30(%rsp), %rsi
callq 0x80b60
movq %rax, (%rsp)
movq (%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x18(%rsp), %rax
movq $0x0, (%rax)
movq (%rsp), %rax
movq 0x10(%rax), %rdi
movl $0x8, %esi
leaq 0x126199(%rip), %rdx    # 0x5b2183
movl $0xa6, %ecx
callq 0xe83c0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
movq (%rsp), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rcx
cmpq 0x28(%rcx), %rax
jb 0x48c00c
jmp 0x48c07d
movq 0x18(%rsp), %rdi
leaq 0x12611b(%rip), %rsi    # 0x5b2183
movl $0xaf, %edx
callq 0xe88c0
movq $0x0, 0x40(%rsp)
jmp 0x48c089
jmp 0x48c07f
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)