// File: /workspace/github_c_makefile_star2_O2/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 0x18e824
movq %r14, %rdi
callq 0x32150
testb %al, %al
jne 0x18ea51
pushq $0x1
popq %rdi
callq 0x18e5c4
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0x18e716
testq %rax, %rax
je 0x18e86a
leaq 0x150524(%rip), %rsi    # 0x2ded69
leaq 0x194d2e(%rip), %rdx    # 0x32357a
leaq 0x194d0f(%rip), %rcx    # 0x323562
leaq 0x194c58(%rip), %r8     # 0x3234b2
pushq $0x6b
popq %r9
movq %r14, %rdi
xorl %eax, %eax
callq 0x30a30
jmp 0x18e8d1
movq %rbx, %rdi
callq 0x18e6df
pushq $0x2
popq %rdi
callq 0x18e5c4
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0x18e716
movq %rax, %r15
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x18e716
cmpq %rax, %r15
jne 0x18e8ef
leaq 0x1504c8(%rip), %rsi    # 0x2ded69
leaq 0x194cf1(%rip), %rdx    # 0x323599
leaq 0x194cb3(%rip), %rcx    # 0x323562
leaq 0x194bfc(%rip), %r8     # 0x3234b2
pushq $0x71
popq %r9
movq %r14, %rdi
xorl %eax, %eax
callq 0x30a30
pushq $0x1
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x18e78a
pushq $-0x1
popq %r15
movq %rbx, %rdi
callq 0x18e6df
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %r12
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x18e78a
movq %rbx, %rdi
xorl %esi, %esi
callq 0x18e716
movq %rax, %r15
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18e716
cmpq %rax, %r15
jne 0x18e999
movq %rbx, %rdi
callq 0x18e6df
movl $0x400, %edi            # imm = 0x400
callq 0x18e5c4
movq %rax, %rbx
pushq $-0x1
popq %r13
xorl %r15d, %r15d
testl %r15d, %r15d
jne 0x18e9bc
cmpq $0x400, %r12            # imm = 0x400
jae 0x18e9bc
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x18e716
movq %rax, %rbp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18e716
cmpq %rax, %rbp
jne 0x18e994
movq %r14, %rdi
leaq 0x1503f8(%rip), %rsi    # 0x2ded69
leaq 0x194c8f(%rip), %rdx    # 0x323607
leaq 0x194be3(%rip), %rcx    # 0x323562
leaq 0x194b2c(%rip), %r8     # 0x3234b2
pushq $0x7c
popq %r9
xorl %eax, %eax
callq 0x30a30
movl %r13d, %r15d
incq %r12
jmp 0x18e939
leaq 0x1503c9(%rip), %rsi    # 0x2ded69
leaq 0x194c29(%rip), %rdx    # 0x3235d0
leaq 0x194bb4(%rip), %rcx    # 0x323562
leaq 0x194afd(%rip), %r8     # 0x3234b2
pushq $0x73
jmp 0x18e85c
testl %r15d, %r15d
je 0x18ea32
pushq $0x1
popq %r12
pushq $-0x1
popq %rbp
testl %r15d, %r15d
jne 0x18e8d5
cmpq $0x3ff, %r12            # imm = 0x3FF
ja 0x18e8d5
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x18e716
movq %rax, %r13
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18e716
cmpq %rax, %r13
je 0x18ea2d
movq %r14, %rdi
leaq 0x150361(%rip), %rsi    # 0x2ded69
leaq 0x194c2f(%rip), %rdx    # 0x32363e
leaq 0x194b4c(%rip), %rcx    # 0x323562
leaq 0x194a95(%rip), %r8     # 0x3234b2
movl $0x81, %r9d
xorl %eax, %eax
callq 0x30a30
movl %ebp, %r15d
incq %r12
jmp 0x18e9c8
pushq $0x1
popq %r12
cmpq $0x400, %r12            # imm = 0x400
je 0x18e9c1
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x18e78a
incq %r12
jmp 0x18ea36
movq 0x27c558(%rip), %rax    # 0x40afb0
movq (%rax), %rdi
leaq 0x14fd8e(%rip), %rsi    # 0x2de7f0
leaq 0x14ff5a(%rip), %rdx    # 0x2de9c3
leaq 0x194af2(%rip), %rcx    # 0x323562
leaq 0x194a3b(%rip), %r8     # 0x3234b2
pushq $0x67
popq %r9
xorl %eax, %eax
callq 0x32960
callq 0x2e820
nop