// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %edi
callq 0x2fc3ec
movq %rax, %r14
movq %rax, %rdi
callq 0x2fbfcd
movq %rax, %r15
movq %r14, %rdi
xorl %esi, %esi
callq 0x2fbfdd
cmpq %rax, %r15
jne 0x2fc4bd
movq %r14, %rdi
callq 0x2fbfbd
testq %rax, %rax
je 0x2fc507
leaq 0x61fa1(%rip), %rsi     # 0x35e43e
leaq 0xe0aaf(%rip), %rdx     # 0x3dcf53
leaq 0xe0a82(%rip), %rcx     # 0x3dcf2d
leaq 0xe08b6(%rip), %r8      # 0x3dcd68
movq %rbx, %rdi
movl $0x14a, %r9d            # imm = 0x14A
jmp 0x2fc4e2
leaq 0x61f7a(%rip), %rsi     # 0x35e43e
leaq 0xe09f6(%rip), %rdx     # 0x3dcec1
leaq 0xe0a5b(%rip), %rcx     # 0x3dcf2d
leaq 0xe088f(%rip), %r8      # 0x3dcd68
movq %rbx, %rdi
movl $0x148, %r9d            # imm = 0x148
xorl %eax, %eax
callq 0xfcb67
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %r14, %rdi
callq 0x2fbf8b
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x2fbf8b
movl $0x2, %edi
callq 0x2fc3ec
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x2fc01a
movq %r14, %rdi
callq 0x2fbfbd
cmpq $0x1, %rax
jne 0x2fc815
movq %r14, %rdi
xorl %esi, %esi
callq 0x2fbfdd
movq %rax, %r15
movl $0x1, %esi
movq %r14, %rdi
callq 0x2fbfdd
cmpq %rax, %r15
jne 0x2fc83f
movq %r14, %rdi
callq 0x2fbfbd
cmpq $0x1, %rax
jne 0x2fc869
movq %r14, %rdi
callq 0x2fbf8b
movl $0x3, %edi
callq 0x2fc3ec
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x2fc01a
movl $0x1, %esi
movl $0x2, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2fc01a
movq %r14, %rdi
callq 0x2fbfbd
cmpq $0x1, %rax
jne 0x2fc893
movq %r14, %rdi
xorl %esi, %esi
callq 0x2fbfdd
movq %rax, %r15
movl $0x1, %esi
movq %r14, %rdi
callq 0x2fbfdd
cmpq %rax, %r15
jne 0x2fc8bd
movq %r14, %rdi
xorl %esi, %esi
callq 0x2fbfdd
movq %rax, %r15
movl $0x2, %esi
movq %r14, %rdi
callq 0x2fbfdd
cmpq %rax, %r15
jne 0x2fc8e7
movl $0x1, %esi
movq %r14, %rdi
callq 0x2fbfdd
movq %rax, %r15
movl $0x2, %esi
movq %r14, %rdi
callq 0x2fbfdd
cmpq %rax, %r15
jne 0x2fc911
movq %r14, %rdi
callq 0x2fbf8b
movl $0x4, %edi
callq 0x2fc3ec
movq %rax, %r14
xorl %ebp, %ebp
movl $0x1, %r12d
movl $0x1, %edx
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x2fc01a
movl $0x2, %esi
movl $0x3, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2fc01a
movq %r14, %rdi
callq 0x2fbfbd
cmpq $0x2, %rax
je 0x2fc6b2
leaq 0x61db6(%rip), %rsi     # 0x35e43e
leaq 0xe0a79(%rip), %rdx     # 0x3dd108
leaq 0xe0897(%rip), %rcx     # 0x3dcf2d
leaq 0xe06cb(%rip), %r8      # 0x3dcd68
movq %rbx, %rdi
movl $0x178, %r9d            # imm = 0x178
xorl %eax, %eax
callq 0xfcb67
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r15d, %r15d
movl $0x2, %edx
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, (%rsp)
movq %rbx, %rcx
callq 0x2fc01a
leaq 0x1(%r15), %rax
movq %rax, 0x8(%rsp)
movq %r12, 0x10(%rsp)
movl %ebp, %eax
xorl %ebp, %ebp
testl %eax, %eax
je 0x2fc6e5
xorl %ebx, %ebx
jmp 0x2fc734
movq %r14, %rdi
movq %r15, %rsi
callq 0x2fbfdd
movq %rax, %r13
movq %r14, %rdi
movq %r12, %rsi
callq 0x2fbfdd
movb $0x1, %bl
cmpq %rax, %r13
je 0x2fc739
xorl %ebx, %ebx
movq (%rsp), %rdi
leaq 0x61d2c(%rip), %rsi     # 0x35e43e
leaq 0xe0a29(%rip), %rdx     # 0x3dd142
leaq 0xe080d(%rip), %rcx     # 0x3dcf2d
leaq 0xe0641(%rip), %r8      # 0x3dcd68
movl $0x180, %r9d            # imm = 0x180
xorl %eax, %eax
callq 0xfcb67
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
incq %r12
cmpq $0x4, %r12
jne 0x2fc6d9
movq 0x10(%rsp), %r12
incq %r12
movq 0x8(%rsp), %r15
cmpq $0x3, %r15
jne 0x2fc6cb
movq %r14, %rdi
callq 0x2fbf8b
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %bl, %bl
je 0x2fc4f6
movl $0x400, %edi            # imm = 0x400
callq 0x2fc3ec
movq %rax, %r14
movq $-0x1, %r13
movq (%rsp), %rbx
incq %r13
movq %r14, %rdi
callq 0x2fbfcd
movq %rax, %r15
movq %r14, %rdi
movq %r13, %rsi
callq 0x2fbfdd
cmpq %rax, %r15
jne 0x2fc93b
cmpq $0x3ff, %r13            # imm = 0x3FF
jb 0x2fc786
movq %rax, %r12
xorl %r13d, %r13d
incq %r13
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x2fc01a
cmpq $0x3ff, %r13            # imm = 0x3FF
jb 0x2fc7b7
xorl %ebp, %ebp
cmpq %r12, %r15
jne 0x2fc4ee
xorl %r15d, %r15d
xorl %ebp, %ebp
movq %r14, %rdi
movq %r15, %rsi
callq 0x2fbfdd
testq %rax, %rax
jne 0x2fc965
testq %rax, %rax
jne 0x2fc4ee
leaq 0x1(%r15), %rax
cmpq $0x3ff, %r15            # imm = 0x3FF
movq %rax, %r15
jb 0x2fc7e3
jmp 0x2fc4ee
leaq 0x61c22(%rip), %rsi     # 0x35e43e
leaq 0xe076a(%rip), %rdx     # 0x3dcf8d
leaq 0xe0703(%rip), %rcx     # 0x3dcf2d
leaq 0xe0537(%rip), %r8      # 0x3dcd68
movq %rbx, %rdi
movl $0x152, %r9d            # imm = 0x152
jmp 0x2fc4e2
leaq 0x61bf8(%rip), %rsi     # 0x35e43e
leaq 0xe077a(%rip), %rdx     # 0x3dcfc7
leaq 0xe06d9(%rip), %rcx     # 0x3dcf2d
leaq 0xe050d(%rip), %r8      # 0x3dcd68
movq %rbx, %rdi
movl $0x155, %r9d            # imm = 0x155
jmp 0x2fc4e2
leaq 0x61bce(%rip), %rsi     # 0x35e43e
leaq 0xe0716(%rip), %rdx     # 0x3dcf8d
leaq 0xe06af(%rip), %rcx     # 0x3dcf2d
leaq 0xe04e3(%rip), %r8      # 0x3dcd68
movq %rbx, %rdi
movl $0x157, %r9d            # imm = 0x157
jmp 0x2fc4e2
leaq 0x61ba4(%rip), %rsi     # 0x35e43e
leaq 0xe06ec(%rip), %rdx     # 0x3dcf8d
leaq 0xe0685(%rip), %rcx     # 0x3dcf2d
leaq 0xe04b9(%rip), %r8      # 0x3dcd68
movq %rbx, %rdi
movl $0x162, %r9d            # imm = 0x162
jmp 0x2fc4e2
leaq 0x61b7a(%rip), %rsi     # 0x35e43e
leaq 0xe06fc(%rip), %rdx     # 0x3dcfc7
leaq 0xe065b(%rip), %rcx     # 0x3dcf2d
leaq 0xe048f(%rip), %r8      # 0x3dcd68
movq %rbx, %rdi
movl $0x165, %r9d            # imm = 0x165
jmp 0x2fc4e2
leaq 0x61b50(%rip), %rsi     # 0x35e43e
leaq 0xe073d(%rip), %rdx     # 0x3dd032
leaq 0xe0631(%rip), %rcx     # 0x3dcf2d
leaq 0xe0465(%rip), %r8      # 0x3dcd68
movq %rbx, %rdi
movl $0x169, %r9d            # imm = 0x169
jmp 0x2fc4e2
leaq 0x61b26(%rip), %rsi     # 0x35e43e
leaq 0xe077e(%rip), %rdx     # 0x3dd09d
leaq 0xe0607(%rip), %rcx     # 0x3dcf2d
leaq 0xe043b(%rip), %r8      # 0x3dcd68
movq %rbx, %rdi
movl $0x16d, %r9d            # imm = 0x16D
jmp 0x2fc4e2
leaq 0x61afc(%rip), %rsi     # 0x35e43e
leaq 0xe0864(%rip), %rdx     # 0x3dd1ad
leaq 0xe05dd(%rip), %rcx     # 0x3dcf2d
leaq 0xe0411(%rip), %r8      # 0x3dcd68
movq %rbx, %rdi
movl $0x18d, %r9d            # imm = 0x18D
jmp 0x2fc4e2
leaq 0x61ad2(%rip), %rsi     # 0x35e43e
leaq 0xe08a6(%rip), %rdx     # 0x3dd219
leaq 0xe05b3(%rip), %rcx     # 0x3dcf2d
leaq 0xe03e7(%rip), %r8      # 0x3dcd68
movq %rbx, %rdi
movl $0x195, %r9d            # imm = 0x195
jmp 0x2fc4e2
nop