// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/clustered_set_uf.c
// Function: gt_clustered_set_union_find_merge_clusters
int gt_clustered_set_union_find_merge_clusters(GtClusteredSet *cs,
                                               GtUword e1,
                                               GtUword e2,
                                               GtError *err)
{
  gt_assert(cs);
  int had_err = 0;
  GtClusteredSetUFClusterInfo *cluster_info_c1 = NULL;
  GtClusteredSetUFClusterInfo *cluster_info_c2 = NULL;
  GtUword target = 0, source = 0, c1 = 0, c2 = 0;
  GtClusteredSetUF *cs_uf = (GtClusteredSetUF*) cs;
  if (e1 == e2) {
    gt_error_set(err, "expected "GT_WU" to be unequal "GT_WU"", e1, e2 );
    had_err = -1;
  }

  if (e1 >= cs_uf->num_of_elems || e2 >= cs_uf->num_of_elems) {
    gt_error_set(err, ""GT_WU" and "GT_WU" must not be larger than "GT_WU"",
                 e1, e2, cs_uf->num_of_elems);
    had_err = -1;
  }

  if (!had_err) {
    if (SINGLETON(e1)) {
       /* printf(""GT_WU" is singleton\n", e1); */
      if (SINGLETON(e2)) {
        /* printf(""GT_WU" is singleton\n", e2);*/
        gt_clustered_set_union_find_make_new_cluster(cs_uf, e1, e2, err);
        gt_bittab_set_bit(cs_uf->in_cluster, e2);
      }
      else {
        c2 = cs_uf->cluster_elems[e2].cluster_num;
        CHECKCLUSTER(c2);
        gt_clustered_set_union_find_append_elem(cs_uf, c2, e1, err);
      }
      gt_bittab_set_bit(cs_uf->in_cluster, e1);
    }
    else {
      c1 = cs_uf->cluster_elems[e1].cluster_num;
      CHECKCLUSTER(c1);
      if (SINGLETON(e2)) {
        gt_clustered_set_union_find_append_elem(cs_uf, c1, e2, err);
        gt_bittab_set_bit(cs_uf->in_cluster, e2);
      }
      else {
        c2 = cs_uf->cluster_elems[e2].cluster_num;
        CHECKCLUSTER(c2);
        cluster_info_c1 = CINFO(c1);
        cluster_info_c2 = CINFO(c2);
        if (cluster_info_c1->cluster_size > cluster_info_c2->cluster_size) {
          target = c1;
          source = c2;
        }
        else {
          target = c1;
          source = c2;
        }
        if (target != source)
          gt_clustered_set_union_find_join_clusters(cs_uf, target, source, err);
      }
    }
  }
  return had_err;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
cmpq $0x0, 0x60(%rsp)
jne 0x48c2e8
movq 0x1afce9(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x89d52(%rip), %rsi     # 0x516013
leaq 0xea430(%rip), %rdx     # 0x5766f8
leaq 0x125f54(%rip), %rcx    # 0x5b2223
leaq 0x125ead(%rip), %r8     # 0x5b2183
movl $0xe2, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x48c2ea
movl $0x0, 0x44(%rsp)
movq $0x0, 0x38(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rax
cmpq 0x50(%rsp), %rax
jne 0x48c363
movq 0x48(%rsp), %rdi
movq 0x58(%rsp), %rdx
movq 0x50(%rsp), %rcx
leaq 0x125efa(%rip), %rsi    # 0x5b224e
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
movq 0x58(%rsp), %rax
movq 0x8(%rsp), %rcx
cmpq 0x28(%rcx), %rax
jae 0x48c383
movq 0x50(%rsp), %rax
movq 0x8(%rsp), %rcx
cmpq 0x28(%rcx), %rax
jb 0x48c3b1
movq 0x48(%rsp), %rdi
movq 0x58(%rsp), %rdx
movq 0x50(%rsp), %rcx
movq 0x8(%rsp), %rax
movq 0x28(%rax), %r8
leaq 0x125ecb(%rip), %rsi    # 0x5b226d
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x44(%rsp)
jne 0x48c6e1
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x58(%rsp), %rsi
callq 0x8a780
testb $0x1, %al
jne 0x48c4e0
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x50(%rsp), %rsi
callq 0x8a780
testb $0x1, %al
jne 0x48c41f
movq 0x8(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x48(%rsp), %rcx
callq 0x48c6f0
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x50(%rsp), %rsi
callq 0x89b00
jmp 0x48c4c8
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x50(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
cmpq 0x30(%rcx), %rax
jb 0x48c475
movq 0x48(%rsp), %rdi
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rcx
leaq 0x125e2f(%rip), %rsi    # 0x5b2295
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x10(%rsp), %rsi
callq 0x80b60
cmpq $0x0, 0x10(%rax)
jne 0x48c4af
movq 0x48(%rsp), %rdi
movq 0x10(%rsp), %rdx
leaq 0x125e27(%rip), %rsi    # 0x5b22c7
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x48(%rsp), %rcx
callq 0x48c7e0
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x58(%rsp), %rsi
callq 0x89b00
jmp 0x48c6df
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x58(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
cmpq 0x30(%rcx), %rax
jb 0x48c536
movq 0x48(%rsp), %rdi
movq 0x18(%rsp), %rdx
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rcx
leaq 0x125d6e(%rip), %rsi    # 0x5b2295
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x18(%rsp), %rsi
callq 0x80b60
cmpq $0x0, 0x10(%rax)
jne 0x48c570
movq 0x48(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x125d66(%rip), %rsi    # 0x5b22c7
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x50(%rsp), %rsi
callq 0x8a780
testb $0x1, %al
jne 0x48c5b8
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x48(%rsp), %rcx
callq 0x48c7e0
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x50(%rsp), %rsi
callq 0x89b00
jmp 0x48c6dd
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x50(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
cmpq 0x30(%rcx), %rax
jb 0x48c60e
movq 0x48(%rsp), %rdi
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rcx
leaq 0x125c96(%rip), %rsi    # 0x5b2295
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x10(%rsp), %rsi
callq 0x80b60
cmpq $0x0, 0x10(%rax)
jne 0x48c648
movq 0x48(%rsp), %rdi
movq 0x10(%rsp), %rdx
leaq 0x125c8e(%rip), %rsi    # 0x5b22c7
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x18(%rsp), %rsi
callq 0x80b60
movq %rax, 0x38(%rsp)
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x10(%rsp), %rsi
callq 0x80b60
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x30(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x48c6a2
movq 0x18(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x48c6b6
movq 0x18(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x20(%rsp), %rax
je 0x48c6db
movq 0x8(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x48(%rsp), %rcx
callq 0x48c8a0
jmp 0x48c6dd
jmp 0x48c6df
jmp 0x48c6e1
movl 0x44(%rsp), %eax
addq $0x68, %rsp
retq
nopw (%rax,%rax)