// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/core/range.c
// Function: gt_range_unit_test
int gt_range_unit_test(GtError *err)
{
  static GtRange ranges_in[] = {  { 620432, 620536 }, { 620432, 620536 },
                                { 620957, 621056 }, { 620957, 621056 },
                                { 625234, 625253 }, { 625500, 625655 },
                                { 625533, 625655 }, { 625533, 625655 },
                                { 627618, 627729 }, { 627618, 627729 },
                                { 627618, 627729 }, { 662083, 662194 },
                                { 662083, 662194 }, { 662083, 662194 },
                                { 663032, 663166 }, { 663032, 663166 },
                                { 663032, 663166 }, { 664782, 664906 },
                                { 664782, 664906 }, { 664782, 664906 },
                                { 665748, 665823 }, { 665748, 665823 },
                                { 665748, 665823 }, { 666825, 666881 },
                                { 666825, 666881 }, { 667797, 667954 },
                                { 667845, 667954 }, { 667845, 667954 },
                                { 679175, 679280 }, { 679175, 679280 },
                                { 679175, 679280 }, { 680427, 680540 },
                                { 680427, 680540 }, { 680427, 680540 },
                                { 684144, 684293 }, { 684144, 684293 },
                                { 684144, 684293 }, { 724903, 724985 },
                                { 724903, 724985 }, { 727099, 727325 },
                                { 727099, 727325 }, { 732544, 732821 },
                                { 732544, 732821 }, { 750016, 750280 },
                                { 750016, 750280 }, { 769508, 769734 },
                                { 769508, 769734 } },
               ranges_out[] = { { 620432, 620536 }, { 620957, 621056 },
                                { 625234, 625253 }, { 625500, 625655 },
                                { 625533, 625655 }, { 627618, 627729 },
                                { 662083, 662194 }, { 663032, 663166 },
                                { 664782, 664906 }, { 665748, 665823 },
                                { 666825, 666881 }, { 667797, 667954 },
                                { 667845, 667954 }, { 679175, 679280 },
                                { 680427, 680540 }, { 684144, 684293 },
                                { 724903, 724985 }, { 727099, 727325 },
                                { 732544, 732821 }, { 750016, 750280 },
                                { 769508, 769734 }};
  GtUword counts[] = { 2, 2, 1, 1, 2, 3, 3, 3, 3, 3, 2, 1, 2, 3, 3, 3, 2,
                             2, 2, 2, 2 };
  GtArray *ranges, *tmp_ranges, *ctr;
  GtUword i;
  int had_err = 0;
  gt_error_check(err);

  gt_ensure(sizeof (ranges_out) / sizeof (ranges_out[0]) ==
                  sizeof (counts)     / sizeof (counts[0]));

  /* test gt_ranges_uniq() */
  ranges = gt_array_new(sizeof (GtRange));
  tmp_ranges = gt_array_new(sizeof (GtRange));
  for (i = 0;
       i < sizeof (ranges_in) / sizeof (ranges_in[0]) && !had_err;
       i++)
    gt_array_add(ranges, ranges_in[i]);
  gt_ranges_uniq(tmp_ranges, ranges);
  gt_ensure(gt_array_size(ranges) ==
                  sizeof (ranges_in) / sizeof (ranges_in[0]));
  gt_ensure(gt_array_size(tmp_ranges) ==
                  sizeof (ranges_out) / sizeof (ranges_out[0]));
  for (i = 0; i < gt_array_size(tmp_ranges) && !had_err; i++) {
    gt_ensure(ranges_out[i].start ==
                    (*(GtRange*) gt_array_get(tmp_ranges, i)).start);
    gt_ensure(ranges_out[i].end ==
                    (*(GtRange*) gt_array_get(tmp_ranges, i)).end);
  }

  /* test gt_ranges_uniq_in_place() */
  gt_array_reset(tmp_ranges);
  gt_array_add_array(tmp_ranges, ranges);
  gt_ranges_uniq_in_place(tmp_ranges);
  for (i = 0; i < gt_array_size(tmp_ranges) && !had_err; i++) {
    gt_ensure(ranges_out[i].start ==
                    (*(GtRange*) gt_array_get(tmp_ranges, i)).start);
    gt_ensure(ranges_out[i].end ==
                    (*(GtRange*) gt_array_get(tmp_ranges, i)).end);
  }

  /* test gt_ranges_uniq_count() */
  gt_array_reset(tmp_ranges);
  ctr = gt_ranges_uniq_count(tmp_ranges, ranges);
  gt_ensure(gt_array_size(tmp_ranges) == gt_array_size(ctr));
  gt_ensure(
            gt_array_size(ctr) == sizeof (counts) / sizeof (counts[0]));
  for (i = 0; i < gt_array_size(ctr) && !had_err; i++) {
    gt_ensure(counts[i] == *(GtUword*) gt_array_get(ctr, i));
    gt_ensure(ranges_out[i].start ==
                    (*(GtRange*) gt_array_get(tmp_ranges, i)).start);
    gt_ensure(ranges_out[i].end ==
                    (*(GtRange*) gt_array_get(tmp_ranges, i)).end);
  }
  gt_array_delete(ctr);

  /* test gt_ranges_uniq_in_place_count() */
  ctr = gt_ranges_uniq_in_place_count(ranges);
  gt_ensure(gt_array_size(ranges) == gt_array_size(ctr));
  gt_ensure(
            gt_array_size(ctr) == sizeof (counts) / sizeof (counts[0]));
  for (i = 0; i < gt_array_size(ctr) && !had_err; i++) {
    gt_ensure(counts[i] == *(GtUword*) gt_array_get(ctr, i));
    gt_ensure(
           ranges_out[i].start == (*(GtRange*)
                                             gt_array_get(ranges, i)).start);
    gt_ensure(
           ranges_out[i].end == (*(GtRange*) gt_array_get(ranges, i)).end);
  }
  gt_array_delete(ctr);

  /* test gt_range_reorder() */
  if (!had_err) {
    GtRange range = { 1, 100 };
    range = gt_range_reorder(range);
    gt_ensure(range.start == 1 && range.end == 100);
    range.start = 100;
    range.end = 1;
    range = gt_range_reorder(range);
    gt_ensure(range.start == 1 && range.end == 100);
  }

  /* free */
  gt_array_delete(ranges);
  gt_array_delete(tmp_ranges);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbp
testq %rdi, %rdi
je 0x7e35f
movq %rbp, %rdi
callq 0x34fea
testb %al, %al
jne 0x7e9be
movl $0x10, %edi
callq 0x6ef7c
movq %rax, %r12
movl $0x10, %edi
callq 0x6ef7c
movq %rax, %r14
xorl %ebx, %ebx
leaq 0xd33de(%rip), %r15     # 0x151760
leaq (%r15,%rbx), %rsi
movl $0x10, %edx
movq %r12, %rdi
callq 0x6f240
addq $0x10, %rbx
cmpq $0x2f0, %rbx            # imm = 0x2F0
jne 0x7e382
movq %r14, %rdi
movq %r12, %rsi
callq 0x7e9c3
movq %r12, %rdi
callq 0x6f310
cmpq $0x2f, %rax
movq %r12, 0x8(%rsp)
movq %rbp, (%rsp)
jne 0x7e495
movq %r14, %rdi
callq 0x6f310
cmpq $0x15, %rax
jne 0x7e4bc
movq %r14, %rdi
callq 0x6f310
testq %rax, %rax
je 0x7e9ab
leaq 0x746c8(%rip), %r15     # 0xf2ab8
xorl %r12d, %r12d
leaq 0x74027(%rip), %r13     # 0xf2421
movq -0x8(%r15), %rbx
movq %r14, %rdi
movq %r12, %rsi
callq 0x6f037
cmpq (%rax), %rbx
jne 0x7e44d
movq (%r15), %rbp
movq %r14, %rdi
movq %r12, %rsi
callq 0x6f037
movb $0x1, %bl
cmpq 0x8(%rax), %rbp
movq (%rsp), %rbp
je 0x7e477
xorl %ebx, %ebx
movq %rbp, %rdi
leaq 0x64d25(%rip), %rsi     # 0xe3159
leaq 0x741d6(%rip), %rdx     # 0xf2611
leaq 0x740e7(%rip), %rcx     # 0xf2529
movq %r13, %r8
movl $0xfb, %r9d
jmp 0x7e470
xorl %ebx, %ebx
movq %rbp, %rdi
leaq 0x64d00(%rip), %rsi     # 0xe3159
leaq 0x7416a(%rip), %rdx     # 0xf25ca
leaq 0x740c2(%rip), %rcx     # 0xf2529
movq %r13, %r8
movl $0xf9, %r9d
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
callq 0x6f310
testb %bl, %bl
je 0x7e4f2
incq %r12
addq $0x10, %r15
cmpq %rax, %r12
jb 0x7e3fa
jmp 0x7e4f2
leaq 0x64cbd(%rip), %rsi     # 0xe3159
leaq 0x74099(%rip), %rdx     # 0xf253c
leaq 0x7407f(%rip), %rcx     # 0xf2529
leaq 0x73f70(%rip), %r8      # 0xf2421
movq %rbp, %rdi
movl $0xf4, %r9d
jmp 0x7e4e1
leaq 0x64c96(%rip), %rsi     # 0xe3159
leaq 0x740b6(%rip), %rdx     # 0xf2580
leaq 0x74058(%rip), %rcx     # 0xf2529
leaq 0x73f49(%rip), %r8      # 0xf2421
movq %rbp, %rdi
movl $0xf6, %r9d
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
callq 0x6f310
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x6f349
movq %r14, %rdi
movq 0x8(%rsp), %rsi
callq 0x6f2b9
movq %r14, %rdi
callq 0x7e9da
movq %r14, %rdi
callq 0x6f310
testb %bl, %bl
je 0x7e5d3
testq %rax, %rax
je 0x7e5d3
leaq 0x74589(%rip), %r13     # 0xf2ab8
xorl %r12d, %r12d
leaq 0x73ee8(%rip), %r15     # 0xf2421
movq -0x8(%r13), %rbx
movq %r14, %rdi
movq %r12, %rsi
callq 0x6f037
cmpq (%rax), %rbx
jne 0x7e58d
movq (%r13), %rbp
movq %r14, %rdi
movq %r12, %rsi
callq 0x6f037
movb $0x1, %bl
cmpq 0x8(%rax), %rbp
movq (%rsp), %rbp
je 0x7e5b7
xorl %ebx, %ebx
movq %rbp, %rdi
leaq 0x64be5(%rip), %rsi     # 0xe3159
leaq 0x74096(%rip), %rdx     # 0xf2611
leaq 0x73fa7(%rip), %rcx     # 0xf2529
movq %r15, %r8
movl $0x106, %r9d            # imm = 0x106
jmp 0x7e5b0
xorl %ebx, %ebx
movq %rbp, %rdi
leaq 0x64bc0(%rip), %rsi     # 0xe3159
leaq 0x7402a(%rip), %rdx     # 0xf25ca
leaq 0x73f82(%rip), %rcx     # 0xf2529
movq %r15, %r8
movl $0x104, %r9d            # imm = 0x104
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
callq 0x6f310
testb %bl, %bl
je 0x7e5d3
incq %r12
addq $0x10, %r13
cmpq %rax, %r12
jb 0x7e539
movq %r14, %rdi
callq 0x6f349
movq %r14, %rdi
movq 0x8(%rsp), %rsi
callq 0x7e9ec
movq %rax, %r12
testb %bl, %bl
je 0x7e781
movq %r14, %rdi
callq 0x6f310
movq %rax, %r15
movq %r12, %rdi
callq 0x6f310
cmpq %rax, %r15
jne 0x7e72e
movq %r12, %rdi
callq 0x6f310
cmpq $0x15, %rax
jne 0x7e755
movq %r12, %rdi
callq 0x6f310
testq %rax, %rax
je 0x7e9b2
xorl %ebx, %ebx
xorl %ebp, %ebp
leaq 0x745c3(%rip), %rax     # 0xf2c00
movq (%rbx,%rax), %r13
movq %r12, %rdi
movq %rbp, %rsi
callq 0x6f037
cmpq (%rax), %r13
jne 0x7e6b4
leaq 0x74458(%rip), %r15     # 0xf2ab0
movq (%r15,%rbx,2), %r13
movq %r14, %rdi
movq %rbp, %rsi
callq 0x6f037
cmpq (%rax), %r13
jne 0x7e6df
movq 0x8(%r15,%rbx,2), %r15
movq %r14, %rdi
movq %rbp, %rsi
callq 0x6f037
movb $0x1, %r13b
cmpq 0x8(%rax), %r15
je 0x7e70f
xorl %r13d, %r13d
movq (%rsp), %rdi
leaq 0x64ac2(%rip), %rsi     # 0xe3159
leaq 0x73f73(%rip), %rdx     # 0xf2611
leaq 0x73e84(%rip), %rcx     # 0xf2529
leaq 0x73d75(%rip), %r8      # 0xf2421
movl $0x114, %r9d            # imm = 0x114
jmp 0x7e708
xorl %r13d, %r13d
movq (%rsp), %rdi
leaq 0x64a97(%rip), %rsi     # 0xe3159
leaq 0x73ff6(%rip), %rdx     # 0xf26bf
leaq 0x73e59(%rip), %rcx     # 0xf2529
leaq 0x73d4a(%rip), %r8      # 0xf2421
movl $0x110, %r9d            # imm = 0x110
jmp 0x7e708
xorl %r13d, %r13d
movq (%rsp), %rdi
leaq 0x64a6c(%rip), %rsi     # 0xe3159
leaq 0x73ed6(%rip), %rdx     # 0xf25ca
leaq 0x73e2e(%rip), %rcx     # 0xf2529
leaq 0x73d1f(%rip), %r8      # 0xf2421
movl $0x112, %r9d            # imm = 0x112
xorl %eax, %eax
callq 0x34f1f
movq %r12, %rdi
callq 0x6f310
testb %r13b, %r13b
je 0x7e78c
incq %rbp
addq $0x8, %rbx
cmpq %rax, %rbp
jb 0x7e636
jmp 0x7e78c
leaq 0x64a24(%rip), %rsi     # 0xe3159
leaq 0x73f18(%rip), %rdx     # 0xf2654
leaq 0x73de6(%rip), %rcx     # 0xf2529
leaq 0x73cd7(%rip), %r8      # 0xf2421
movq %rbp, %rdi
movl $0x10c, %r9d            # imm = 0x10C
jmp 0x7e77a
leaq 0x649fd(%rip), %rsi     # 0xe3159
leaq 0x73f21(%rip), %rdx     # 0xf2684
leaq 0x73dbf(%rip), %rcx     # 0xf2529
leaq 0x73cb0(%rip), %r8      # 0xf2421
movq %rbp, %rdi
movl $0x10e, %r9d            # imm = 0x10E
xorl %eax, %eax
callq 0x34f1f
movq %r12, %rdi
callq 0x6f310
xorl %r13d, %r13d
movq %r12, %rdi
callq 0x6f768
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x7ea06
movq %rax, %r12
testb %r13b, %r13b
je 0x7e975
movq %rbx, %rdi
callq 0x6f310
movq %rax, %r15
movq %r12, %rdi
callq 0x6f310
cmpq %rax, %r15
jne 0x7e924
movq %r12, %rdi
callq 0x6f310
cmpq $0x15, %rax
movq (%rsp), %rdi
jne 0x7e94c
movq %r12, %rdi
callq 0x6f310
testq %rax, %rax
je 0x7e9ba
xorl %ebx, %ebx
leaq 0x74407(%rip), %r15     # 0xf2c00
xorl %ebp, %ebp
movq %r12, 0x10(%rsp)
movq (%rbx,%r15), %r13
movq %r12, %rdi
movq %rbp, %rsi
callq 0x6f037
cmpq (%rax), %r13
jne 0x7e88c
leaq 0x74295(%rip), %r15     # 0xf2ab0
movq (%r15,%rbx,2), %r13
movq 0x8(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
callq 0x6f037
cmpq (%rax), %r13
jne 0x7e8be
movq 0x8(%r15,%rbx,2), %r15
movq %r12, %rdi
movq %rbp, %rsi
callq 0x6f037
movb $0x1, %r13b
cmpq 0x8(%rax), %r15
movq 0x10(%rsp), %r12
leaq 0x743a5(%rip), %r15     # 0xf2c00
je 0x7e8fa
xorl %r13d, %r13d
movq (%rsp), %rdi
leaq 0x648ea(%rip), %rsi     # 0xe3159
leaq 0x73ee6(%rip), %rdx     # 0xf275c
leaq 0x73cac(%rip), %rcx     # 0xf2529
leaq 0x73b9d(%rip), %r8      # 0xf2421
movl $0x123, %r9d            # imm = 0x123
jmp 0x7e8b5
xorl %r13d, %r13d
movq (%rsp), %rdi
leaq 0x648bf(%rip), %rsi     # 0xe3159
leaq 0x73e1e(%rip), %rdx     # 0xf26bf
leaq 0x73c81(%rip), %rcx     # 0xf2529
leaq 0x73b72(%rip), %r8      # 0xf2421
movl $0x11e, %r9d            # imm = 0x11E
xorl %eax, %eax
callq 0x34f1f
jmp 0x7e8fa
xorl %r13d, %r13d
movq (%rsp), %rdi
leaq 0x6488d(%rip), %rsi     # 0xe3159
leaq 0x73e46(%rip), %rdx     # 0xf2719
leaq 0x73c4f(%rip), %rcx     # 0xf2529
leaq 0x73b40(%rip), %r8      # 0xf2421
movl $0x121, %r9d            # imm = 0x121
xorl %eax, %eax
callq 0x34f1f
movq 0x10(%rsp), %r12
leaq 0x74306(%rip), %r15     # 0xf2c00
movq %r12, %rdi
callq 0x6f310
testb %r13b, %r13b
je 0x7e917
incq %rbp
addq $0x8, %rbx
cmpq %rax, %rbp
jb 0x7e800
movzbl %r13b, %ebp
decl %ebp
movq 0x8(%rsp), %rbx
jmp 0x7e982
leaq 0x6482e(%rip), %rsi     # 0xe3159
leaq 0x73dbb(%rip), %rdx     # 0xf26ed
leaq 0x73bf0(%rip), %rcx     # 0xf2529
leaq 0x73ae1(%rip), %r8      # 0xf2421
movq (%rsp), %rdi
movl $0x11a, %r9d            # imm = 0x11A
jmp 0x7e96e
leaq 0x64806(%rip), %rsi     # 0xe3159
leaq 0x73d2a(%rip), %rdx     # 0xf2684
leaq 0x73bc8(%rip), %rcx     # 0xf2529
leaq 0x73ab9(%rip), %r8      # 0xf2421
movl $0x11c, %r9d            # imm = 0x11C
xorl %eax, %eax
callq 0x34f1f
movq %r12, %rdi
callq 0x6f310
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %r12, %rdi
callq 0x6f768
movq %rbx, %rdi
callq 0x6f768
movq %r14, %rdi
callq 0x6f768
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %bl
jmp 0x7e4f2
movb $0x1, %r13b
jmp 0x7e78c
xorl %ebp, %ebp
jmp 0x7e982
callq 0x1d516