// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/union_find.c
// Function: gt_union_find_unit_test
int gt_union_find_unit_test(GtError *err)
{
  GtUword i;
  GtUnionFind *uf;
  int had_err = 0;
  gt_error_check(err);

  /* one element */
  uf = gt_union_find_new(1);
  gt_ensure(gt_union_find_find(uf, 0) == 0);
  gt_union_find_delete(uf);

  /* two elements */
  if (!had_err) {
    uf = gt_union_find_new(2);
    gt_ensure(gt_union_find_find(uf, 0) != gt_union_find_find(uf, 1));
    gt_union_find_union(uf, 0, 1);
    gt_ensure(gt_union_find_find(uf, 0) == gt_union_find_find(uf, 1));
    gt_union_find_delete(uf);
  }

  /* many elements */
  if (!had_err) {
    uf = gt_union_find_new(UNION_FIND_TEST_SIZE);
    for (i = 1; !had_err && i < UNION_FIND_TEST_SIZE; i++)
      gt_ensure(gt_union_find_find(uf, 0) != gt_union_find_find(uf,
                                                                         i));
    for (i = 1; !had_err && i < UNION_FIND_TEST_SIZE; i++)
      gt_union_find_union(uf, 0, i);
    for (i = 1; !had_err && i < UNION_FIND_TEST_SIZE; i++)
      gt_ensure(gt_union_find_find(uf, 0) == gt_union_find_find(uf,
                                                                         i));
    gt_union_find_delete(uf);
  }

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
testq %rdi, %rdi
je 0x1f16f4
movq %r14, %rdi
callq 0x310f0
testb %al, %al
jne 0x1f1920
movl $0x1, %edi
callq 0x1f143c
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0x1f1648
testq %rax, %rax
je 0x1f175a
leaq 0x14a6e6(%rip), %rsi    # 0x33bdfd
leaq 0x18eb4c(%rip), %rdx    # 0x38026a
leaq 0x18eb2d(%rip), %rcx    # 0x380252
leaq 0x18ea76(%rip), %r8     # 0x3801a2
movq %r14, %rdi
movl $0x6b, %r9d
xorl %eax, %eax
callq 0x2f9e0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %rbx, %rdi
callq 0x1f160d
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x1f160d
movl $0x2, %edi
callq 0x1f143c
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0x1f1648
movq %rax, %r15
movl $0x1, %esi
movq %rbx, %rdi
callq 0x1f1648
cmpq %rax, %r15
jne 0x1f17ce
leaq 0x14a668(%rip), %rsi    # 0x33bdfd
leaq 0x18eaed(%rip), %rdx    # 0x380289
leaq 0x18eaaf(%rip), %rcx    # 0x380252
leaq 0x18e9f8(%rip), %r8     # 0x3801a2
movq %r14, %rdi
movl $0x71, %r9d
xorl %eax, %eax
callq 0x2f9e0
movl $0x1, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1f168b
jmp 0x1f173c
movl $0x1, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1f168b
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1f1648
movq %rax, %r15
movl $0x1, %esi
movq %rbx, %rdi
callq 0x1f1648
cmpq %rax, %r15
jne 0x1f18a2
movq %rbx, %rdi
callq 0x1f160d
movl $0x400, %edi            # imm = 0x400
callq 0x1f143c
movq %rax, %rbx
xorl %r13d, %r13d
incq %r13
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1f1648
movq %rax, %r15
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1f1648
cmpq %rax, %r15
je 0x1f18cc
cmpq $0x3ff, %r13            # imm = 0x3FF
jb 0x1f1818
movq %rax, %r12
xorl %r13d, %r13d
incq %r13
movq %rbx, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x1f168b
cmpq $0x3ff, %r13            # imm = 0x3FF
jb 0x1f184b
xorl %ebp, %ebp
cmpq %r12, %r15
je 0x1f1741
xorl %r15d, %r15d
xorl %ebp, %ebp
incq %r15
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1f1648
movq %rax, %r12
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1f1648
cmpq %rax, %r12
jne 0x1f18f6
cmpq $0x3ff, %r15            # imm = 0x3FF
jb 0x1f1874
jmp 0x1f1741
leaq 0x14a554(%rip), %rsi    # 0x33bdfd
leaq 0x18ea10(%rip), %rdx    # 0x3802c0
leaq 0x18e99b(%rip), %rcx    # 0x380252
leaq 0x18e8e4(%rip), %r8     # 0x3801a2
movq %r14, %rdi
movl $0x73, %r9d
jmp 0x1f1735
leaq 0x14a52a(%rip), %rsi    # 0x33bdfd
leaq 0x18ea1d(%rip), %rdx    # 0x3802f7
leaq 0x18e971(%rip), %rcx    # 0x380252
leaq 0x18e8ba(%rip), %r8     # 0x3801a2
movq %r14, %rdi
movl $0x7c, %r9d
jmp 0x1f1735
leaq 0x14a500(%rip), %rsi    # 0x33bdfd
leaq 0x18ea2a(%rip), %rdx    # 0x38032e
leaq 0x18e947(%rip), %rcx    # 0x380252
leaq 0x18e890(%rip), %r8     # 0x3801a2
movq %r14, %rdi
movl $0x81, %r9d
jmp 0x1f1735
callq 0x7133e
nopl (%rax)