// File: /workspace/github_c_makefile_star2_O1/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 0x1f9bcb
movq %r14, %rdi
callq 0x310f0
testb %al, %al
jne 0x1f9e39
movl $0x1, %edi
callq 0x1f9908
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0x1f9b1e
testq %rax, %rax
je 0x1f9c15
leaq 0x14b17b(%rip), %rsi    # 0x344d69
leaq 0x18f9d5(%rip), %rdx    # 0x3895ca
leaq 0x18f9b6(%rip), %rcx    # 0x3895b2
leaq 0x18f8ff(%rip), %r8     # 0x389502
movq %r14, %rdi
movl $0x6b, %r9d
xorl %eax, %eax
callq 0x2f9e0
jmp 0x1f9c84
movq %rbx, %rdi
callq 0x1f9ae3
movl $0x2, %edi
callq 0x1f9908
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0x1f9b1e
movq %rax, %r15
movl $0x1, %esi
movq %rbx, %rdi
callq 0x1f9b1e
cmpq %rax, %r15
jne 0x1f9ca2
leaq 0x14b119(%rip), %rsi    # 0x344d69
leaq 0x18f992(%rip), %rdx    # 0x3895e9
leaq 0x18f954(%rip), %rcx    # 0x3895b2
leaq 0x18f89d(%rip), %r8     # 0x389502
movq %r14, %rdi
movl $0x71, %r9d
xorl %eax, %eax
callq 0x2f9e0
movl $0x1, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1f9b62
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %rbx, %rdi
callq 0x1f9ae3
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %r15d
movl $0x1, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1f9b62
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1f9b1e
movq %rax, %r12
movl $0x1, %esi
movq %rbx, %rdi
callq 0x1f9b1e
cmpq %rax, %r12
jne 0x1f9e0f
movq %rbx, %rdi
callq 0x1f9ae3
movl $0x400, %edi            # imm = 0x400
callq 0x1f9908
movq %rax, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1f9b1e
movq %rax, %r12
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1f9b1e
movq %rax, %r13
movl $0x0, %ebp
cmpq %rax, %r12
jne 0x1f9d45
movq %r14, %rdi
leaq 0x14b04b(%rip), %rsi    # 0x344d69
leaq 0x18f932(%rip), %rdx    # 0x389657
leaq 0x18f886(%rip), %rcx    # 0x3895b2
leaq 0x18f7cf(%rip), %r8     # 0x389502
movl $0x7c, %r9d
xorl %eax, %eax
callq 0x2f9e0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq %r13, %r12
je 0x1f9d5a
leaq 0x1(%r15), %rax
cmpq $0x3ff, %r15            # imm = 0x3FF
movq %rax, %r15
jb 0x1f9cef
cmpq %r13, %r12
je 0x1f9c89
movl $0x1, %r15d
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x1f9b62
cmpq %r13, %r12
je 0x1f9d8b
leaq 0x1(%r15), %rax
cmpq $0x3ff, %r15            # imm = 0x3FF
movq %rax, %r15
jb 0x1f9d69
cmpq %r13, %r12
je 0x1f9c89
movl $0x1, %r12d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1f9b1e
movq %rax, %r15
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1f9b1e
movq %rax, %r13
movl $0x0, %ebp
cmpq %rax, %r15
je 0x1f9df0
movq %r14, %rdi
leaq 0x14afa0(%rip), %rsi    # 0x344d69
leaq 0x18f8be(%rip), %rdx    # 0x38968e
leaq 0x18f7db(%rip), %rcx    # 0x3895b2
leaq 0x18f724(%rip), %r8     # 0x389502
movl $0x81, %r9d
xorl %eax, %eax
callq 0x2f9e0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq %r13, %r15
jne 0x1f9c89
leaq 0x1(%r12), %rax
cmpq $0x3ff, %r12            # imm = 0x3FF
movq %rax, %r12
jb 0x1f9d9a
jmp 0x1f9c89
leaq 0x14af53(%rip), %rsi    # 0x344d69
leaq 0x18f803(%rip), %rdx    # 0x389620
leaq 0x18f78e(%rip), %rcx    # 0x3895b2
leaq 0x18f6d7(%rip), %r8     # 0x389502
movq %r14, %rdi
movl $0x73, %r9d
jmp 0x1f9c0c
callq 0x7216b
nop