// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/clustered_set_uf.c
// Function: gt_clustered_set_union_find_unit_test
int gt_clustered_set_union_find_unit_test(GtError *err)
{
  int had_err = 0, i = 0, j = 0;
  GtClusteredSet *cs = NULL;
  cs = gt_clustered_set_union_find_new(1, err);
  gt_ensure(
            gt_clustered_set_union_find_num_of_elements(cs, err) ==
            gt_clustered_set_union_find_cluster_num(cs, 0, err));
  gt_ensure(
            gt_clustered_set_union_find_num_of_clusters(cs, err) == 0);
  gt_clustered_set_union_find_delete(cs, err);

  if (!had_err) {
    cs = gt_clustered_set_union_find_new(2, err);
    gt_clustered_set_union_find_merge_clusters(cs, 0, 1, err);

    gt_ensure(
              gt_clustered_set_union_find_num_of_clusters(cs, err) == 1);
    gt_ensure(
              gt_clustered_set_union_find_cluster_num(cs, 0, err) ==
              gt_clustered_set_union_find_cluster_num(cs, 1, err));
    gt_ensure(
              gt_clustered_set_union_find_num_of_clusters(cs, err) == 1);

    gt_clustered_set_union_find_delete(cs, err);
  }

  if (!had_err) {
    cs = gt_clustered_set_union_find_new(3, err);
    gt_clustered_set_union_find_merge_clusters(cs, 0, 1, err);
    gt_clustered_set_union_find_merge_clusters(cs, 1, 2, err);

    gt_ensure(
               gt_clustered_set_union_find_num_of_clusters(cs, err) == 1);
    gt_ensure(
               gt_clustered_set_union_find_cluster_num(cs, 0, err) ==
               gt_clustered_set_union_find_cluster_num(cs, 1, err));

    gt_ensure(
               gt_clustered_set_union_find_cluster_num(cs, 0, err) ==
               gt_clustered_set_union_find_cluster_num(cs, 2, err));

    gt_ensure(
              gt_clustered_set_union_find_cluster_num(cs, 1, err) ==
              gt_clustered_set_union_find_cluster_num(cs, 2, err));

    gt_clustered_set_union_find_delete(cs, err);
  }

  if (!had_err) {
    cs = gt_clustered_set_union_find_new(4, err);
    gt_clustered_set_union_find_merge_clusters(cs, 0, 1, err);
    gt_clustered_set_union_find_merge_clusters(cs, 2, 3, err);

    gt_ensure(
              gt_clustered_set_union_find_num_of_clusters(cs, err) == 2);

    gt_clustered_set_union_find_merge_clusters(cs, 0, 2, err);

    for (i = 0; i < 4 - 1; i++) {
      for (j = i + 1; j < 4; j++) {
        gt_ensure(
                  gt_clustered_set_union_find_cluster_num(cs, i, err) ==
                  gt_clustered_set_union_find_cluster_num(cs, j, err));
      }
    }
    gt_clustered_set_union_find_delete(cs, err);
  }

  if (!had_err) {
    cs = gt_clustered_set_union_find_new(CLUSTERED_SET_UNION_FIND_TEST_SIZE,
                                         err);

    for (i = 0; !had_err && i < CLUSTERED_SET_UNION_FIND_TEST_SIZE; i++) {
      gt_ensure(
                gt_clustered_set_union_find_num_of_elements(cs, err) ==
                gt_clustered_set_union_find_cluster_num(cs, i, err));
    }
    for (i = 1;!had_err && i < CLUSTERED_SET_UNION_FIND_TEST_SIZE; i++) {
      gt_clustered_set_union_find_merge_clusters(cs, 0, i, err);
    }

    for (i = 0; !had_err && i < CLUSTERED_SET_UNION_FIND_TEST_SIZE; i++) {
      gt_ensure(
                gt_clustered_set_union_find_cluster_num(cs, i, err) == 0);
    }
    gt_clustered_set_union_find_delete(cs, err);
  }

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rdi
callq 0x298b43
movq %rax, %r14
movq %rax, %rdi
callq 0x2986d3
movq %rax, %r15
movq %r14, %rdi
xorl %esi, %esi
callq 0x298716
cmpq %rax, %r15
jne 0x298c0b
movq %r14, %rdi
callq 0x298690
testq %rax, %rax
je 0x298c53
leaq 0x65807(%rip), %rsi     # 0x2fe3f2
leaq 0xe4731(%rip), %rdx     # 0x37d323
leaq 0xe4704(%rip), %rcx     # 0x37d2fd
leaq 0xe4538(%rip), %r8      # 0x37d138
movq %rbx, %rdi
movl $0x14a, %r9d            # imm = 0x14A
jmp 0x298c30
leaq 0x657e0(%rip), %rsi     # 0x2fe3f2
leaq 0xe4678(%rip), %rdx     # 0x37d291
leaq 0xe46dd(%rip), %rcx     # 0x37d2fd
leaq 0xe4511(%rip), %r8      # 0x37d138
movq %rbx, %rdi
movl $0x148, %r9d            # imm = 0x148
xorl %eax, %eax
callq 0x89dbb
pushq $-0x1
popq %rbp
movq %r14, %rdi
callq 0x29865e
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x29865e
pushq $0x2
popq %rdi
callq 0x298b43
movq %rax, %r14
pushq $0x1
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x298786
movq %r14, %rdi
callq 0x298690
cmpq $0x1, %rax
jne 0x298e81
movq %r14, %rdi
xorl %esi, %esi
callq 0x298716
movq %rax, %r15
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x298716
cmpq %rax, %r15
jne 0x298eab
movq %r14, %rdi
callq 0x298690
cmpq $0x1, %rax
jne 0x298ed5
movq %r14, %rdi
callq 0x29865e
pushq $0x3
popq %rdi
callq 0x298b43
movq %rax, %r14
pushq $0x1
popq %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x298786
pushq $0x2
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rcx
callq 0x298786
movq %r14, %rdi
callq 0x298690
cmpq $0x1, %rax
jne 0x298eff
movq %r14, %rdi
xorl %esi, %esi
callq 0x298716
movq %rax, %r15
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x298716
cmpq %rax, %r15
jne 0x298f29
movq %r14, %rdi
xorl %esi, %esi
callq 0x298716
movq %rax, %r15
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x298716
cmpq %rax, %r15
jne 0x298f53
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x298716
movq %rax, %r15
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x298716
cmpq %rax, %r15
jne 0x298f7d
movq %r14, %rdi
callq 0x29865e
pushq $0x4
popq %rdi
callq 0x298b43
movq %rax, %r14
xorl %r15d, %r15d
pushq $0x1
popq %r13
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x298786
pushq $0x2
popq %rsi
pushq $0x3
popq %rdx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x298786
movq %r14, %rdi
callq 0x298690
cmpq $0x2, %rax
je 0x298de2
leaq 0x65639(%rip), %rsi     # 0x2fe3f2
leaq 0xe4718(%rip), %rdx     # 0x37d4d8
leaq 0xe4536(%rip), %rcx     # 0x37d2fd
leaq 0xe436a(%rip), %r8      # 0x37d138
movq %rbx, %rdi
movl $0x178, %r9d            # imm = 0x178
xorl %eax, %eax
callq 0x89dbb
pushq $-0x1
popq %r15
pushq $0x2
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, 0x8(%rsp)
movq %rbx, %rcx
callq 0x298786
pushq $-0x1
popq %rbx
xorl %r12d, %r12d
cmpq $0x3, %r12
je 0x298fa7
movq %r13, 0x10(%rsp)
cmpq $0x4, %r13
je 0x298e71
testl %r15d, %r15d
movl %ebx, %r15d
jne 0x298e6c
movq %r14, %rdi
movq %r12, %rsi
callq 0x298716
movq %rax, %rbp
movq %r14, %rdi
movq %r13, %rsi
callq 0x298716
xorl %r15d, %r15d
cmpq %rax, %rbp
je 0x298e6c
movq 0x8(%rsp), %rdi
leaq 0x655ab(%rip), %rsi     # 0x2fe3f2
leaq 0xe46c4(%rip), %rdx     # 0x37d512
leaq 0xe44a8(%rip), %rcx     # 0x37d2fd
leaq 0xe42dc(%rip), %r8      # 0x37d138
movl $0x180, %r9d            # imm = 0x180
xorl %eax, %eax
callq 0x89dbb
movl %ebx, %r15d
incq %r13
jmp 0x298e0c
incq %r12
movq 0x10(%rsp), %r13
incq %r13
jmp 0x298dfd
leaq 0x6556a(%rip), %rsi     # 0x2fe3f2
leaq 0xe44ce(%rip), %rdx     # 0x37d35d
leaq 0xe4467(%rip), %rcx     # 0x37d2fd
leaq 0xe429b(%rip), %r8      # 0x37d138
movq %rbx, %rdi
movl $0x152, %r9d            # imm = 0x152
jmp 0x298c30
leaq 0x65540(%rip), %rsi     # 0x2fe3f2
leaq 0xe44de(%rip), %rdx     # 0x37d397
leaq 0xe443d(%rip), %rcx     # 0x37d2fd
leaq 0xe4271(%rip), %r8      # 0x37d138
movq %rbx, %rdi
movl $0x155, %r9d            # imm = 0x155
jmp 0x298c30
leaq 0x65516(%rip), %rsi     # 0x2fe3f2
leaq 0xe447a(%rip), %rdx     # 0x37d35d
leaq 0xe4413(%rip), %rcx     # 0x37d2fd
leaq 0xe4247(%rip), %r8      # 0x37d138
movq %rbx, %rdi
movl $0x157, %r9d            # imm = 0x157
jmp 0x298c30
leaq 0x654ec(%rip), %rsi     # 0x2fe3f2
leaq 0xe4450(%rip), %rdx     # 0x37d35d
leaq 0xe43e9(%rip), %rcx     # 0x37d2fd
leaq 0xe421d(%rip), %r8      # 0x37d138
movq %rbx, %rdi
movl $0x162, %r9d            # imm = 0x162
jmp 0x298c30
leaq 0x654c2(%rip), %rsi     # 0x2fe3f2
leaq 0xe4460(%rip), %rdx     # 0x37d397
leaq 0xe43bf(%rip), %rcx     # 0x37d2fd
leaq 0xe41f3(%rip), %r8      # 0x37d138
movq %rbx, %rdi
movl $0x165, %r9d            # imm = 0x165
jmp 0x298c30
leaq 0x65498(%rip), %rsi     # 0x2fe3f2
leaq 0xe44a1(%rip), %rdx     # 0x37d402
leaq 0xe4395(%rip), %rcx     # 0x37d2fd
leaq 0xe41c9(%rip), %r8      # 0x37d138
movq %rbx, %rdi
movl $0x169, %r9d            # imm = 0x169
jmp 0x298c30
leaq 0x6546e(%rip), %rsi     # 0x2fe3f2
leaq 0xe44e2(%rip), %rdx     # 0x37d46d
leaq 0xe436b(%rip), %rcx     # 0x37d2fd
leaq 0xe419f(%rip), %r8      # 0x37d138
movq %rbx, %rdi
movl $0x16d, %r9d            # imm = 0x16D
jmp 0x298c30
movq %r14, %rdi
callq 0x29865e
testl %r15d, %r15d
je 0x298fbc
pushq $-0x1
popq %rbp
jmp 0x298c42
movl $0x400, %edi            # imm = 0x400
callq 0x298b43
movq %rax, %r14
leaq 0xe4168(%rip), %r15     # 0x37d138
pushq $-0x1
popq %rbx
xorl %r12d, %r12d
xorl %ebp, %ebp
testl %ebp, %ebp
jne 0x299033
cmpq $0x400, %r12            # imm = 0x400
jae 0x299033
movq %r14, %rdi
callq 0x2986d3
movq %rax, %r13
movq %r14, %rdi
movq %r12, %rsi
callq 0x298716
xorl %ebp, %ebp
cmpq %rax, %r13
je 0x29902e
movq 0x8(%rsp), %rdi
leaq 0x653e4(%rip), %rsi     # 0x2fe3f2
leaq 0xe4568(%rip), %rdx     # 0x37d57d
leaq 0xe42e1(%rip), %rcx     # 0x37d2fd
movq %r15, %r8
movl $0x18d, %r9d            # imm = 0x18D
xorl %eax, %eax
callq 0x89dbb
movl %ebx, %ebp
incq %r12
jmp 0x298fd8
testl %ebp, %ebp
movq 0x8(%rsp), %rbx
je 0x2990a6
leaq 0xe42ba(%rip), %r13     # 0x37d2fd
leaq 0xe40ee(%rip), %r15     # 0x37d138
pushq $-0x1
popq %rbx
xorl %r12d, %r12d
testl %ebp, %ebp
jne 0x298c3a
cmpq $0x3ff, %r12            # imm = 0x3FF
ja 0x298c3a
movq %r14, %rdi
movq %r12, %rsi
callq 0x298716
testq %rax, %rax
je 0x29909f
movq 0x8(%rsp), %rdi
leaq 0x65371(%rip), %rsi     # 0x2fe3f2
leaq 0xe4561(%rip), %rdx     # 0x37d5e9
movq %r13, %rcx
movq %r15, %r8
movl $0x195, %r9d            # imm = 0x195
xorl %eax, %eax
callq 0x89dbb
movl %ebx, %ebp
jmp 0x2990a1
xorl %ebp, %ebp
incq %r12
jmp 0x299050
pushq $0x1
popq %r15
cmpq $0x400, %r15            # imm = 0x400
je 0x29903c
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x298786
incq %r15
jmp 0x2990aa