// File: /workspace/github_c_makefile_star2_O1/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 $0x28, %rsp
movq %rdi, %rbx
testq %rdi, %rdi
je 0x7e256
movq %rbx, %rdi
callq 0x3566a
testb %al, %al
jne 0x7e8d1
movl $0x10, %edi
callq 0x6e93c
movq %rax, %r13
movl $0x10, %edi
callq 0x6e93c
movq %rax, 0x8(%rsp)
xorl %r14d, %r14d
leaq 0xd34e4(%rip), %r12     # 0x151760
leaq (%r12,%r14), %rsi
movl $0x10, %edx
movq %r13, %rdi
callq 0x6ec0e
addq $0x10, %r14
cmpq $0x2f0, %r14            # imm = 0x2F0
jne 0x7e27c
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x7e8d6
movq %r13, %rdi
callq 0x6ecda
cmpq $0x2f, %rax
movq %r13, 0x10(%rsp)
jne 0x7e2d1
movq 0x8(%rsp), %rdi
callq 0x6ecda
cmpq $0x15, %rax
jne 0x7e2fb
xorl %ebp, %ebp
movb $0x1, %r14b
jmp 0x7e32f
leaq 0x64ea1(%rip), %rsi     # 0xe3179
leaq 0x742ad(%rip), %rdx     # 0xf258c
leaq 0x74293(%rip), %rcx     # 0xf2579
leaq 0x74184(%rip), %r8      # 0xf2471
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0xf4, %r9d
jmp 0x7e323
leaq 0x64e77(%rip), %rsi     # 0xe3179
leaq 0x742c7(%rip), %rdx     # 0xf25d0
leaq 0x74269(%rip), %rcx     # 0xf2579
leaq 0x7415a(%rip), %r8      # 0xf2471
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0xf6, %r9d
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq 0x8(%rsp), %rdi
callq 0x6ecda
testb %r14b, %r14b
je 0x7e404
testq %rax, %rax
je 0x7e404
leaq 0x747b6(%rip), %r14     # 0xf2b08
xorl %r12d, %r12d
leaq 0x64e1d(%rip), %r15     # 0xe3179
movq -0x8(%r14), %r13
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x6e9fa
cmpq (%rax), %r13
jne 0x7e38f
movq (%r14), %r13
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x6e9fa
cmpq 0x8(%rax), %r13
jne 0x7e3b5
xorl %ebp, %ebp
movb $0x1, %r13b
jmp 0x7e3e5
xorl %r13d, %r13d
movq %rbx, %rdi
movq %r15, %rsi
leaq 0x7427b(%rip), %rdx     # 0xf261a
leaq 0x741d3(%rip), %rcx     # 0xf2579
leaq 0x740c4(%rip), %r8      # 0xf2471
movl $0xf9, %r9d
jmp 0x7e3d9
xorl %r13d, %r13d
movq %rbx, %rdi
movq %r15, %rsi
leaq 0x7429c(%rip), %rdx     # 0xf2661
leaq 0x741ad(%rip), %rcx     # 0xf2579
leaq 0x7409e(%rip), %r8      # 0xf2471
movl $0xfb, %r9d
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq 0x8(%rsp), %rdi
callq 0x6ecda
testb %r13b, %r13b
je 0x7e404
incq %r12
addq $0x10, %r14
cmpq %rax, %r12
jb 0x7e35c
movq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x6ed13
movq %r14, %rdi
movq 0x10(%rsp), %rsi
callq 0x6ec83
movq %r14, %rdi
callq 0x7e8ed
movq %r14, %rdi
callq 0x6ecda
testl %ebp, %ebp
sete %bpl
jne 0x7e4f1
testq %rax, %rax
je 0x7e4f1
leaq 0x746be(%rip), %r14     # 0xf2b08
xorl %r12d, %r12d
leaq 0x64d25(%rip), %r15     # 0xe3179
movq -0x8(%r14), %rbp
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x6e9fa
cmpq (%rax), %rbp
jne 0x7e4a8
movq (%r14), %r13
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x6e9fa
movb $0x1, %bpl
cmpq 0x8(%rax), %r13
je 0x7e4d2
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r15, %rsi
leaq 0x741cf(%rip), %rdx     # 0xf2661
leaq 0x740e0(%rip), %rcx     # 0xf2579
leaq 0x73fd1(%rip), %r8      # 0xf2471
movl $0x106, %r9d            # imm = 0x106
jmp 0x7e4cb
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r15, %rsi
leaq 0x74163(%rip), %rdx     # 0xf261a
leaq 0x740bb(%rip), %rcx     # 0xf2579
leaq 0x73fac(%rip), %r8      # 0xf2471
movl $0x104, %r9d            # imm = 0x104
xorl %eax, %eax
callq 0x3559f
movq 0x8(%rsp), %rdi
callq 0x6ecda
testb %bpl, %bpl
je 0x7e4f1
incq %r12
addq $0x10, %r14
cmpq %rax, %r12
jb 0x7e454
movq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x6ed13
movq %r14, %rdi
movq 0x10(%rsp), %rsi
callq 0x7e8ff
movq %rax, %r12
testb %bpl, %bpl
je 0x7e568
movq 0x8(%rsp), %rdi
callq 0x6ecda
movq %rax, %r13
movq %r12, %rdi
callq 0x6ecda
cmpq %rax, %r13
jne 0x7e56d
movq %r12, %rdi
callq 0x6ecda
movb $0x1, %r13b
cmpq $0x15, %rax
je 0x7e59c
leaq 0x64c34(%rip), %rsi     # 0xe3179
leaq 0x74188(%rip), %rdx     # 0xf26d4
leaq 0x74026(%rip), %rcx     # 0xf2579
leaq 0x73f17(%rip), %r8      # 0xf2471
xorl %r13d, %r13d
movq %rbx, %rdi
movl $0x10e, %r9d            # imm = 0x10E
jmp 0x7e595
xorl %r13d, %r13d
jmp 0x7e59c
leaq 0x64c05(%rip), %rsi     # 0xe3179
leaq 0x74129(%rip), %rdx     # 0xf26a4
leaq 0x73ff7(%rip), %rcx     # 0xf2579
leaq 0x73ee8(%rip), %r8      # 0xf2471
xorl %r13d, %r13d
movq %rbx, %rdi
movl $0x10c, %r9d            # imm = 0x10C
xorl %eax, %eax
callq 0x3559f
movq %r12, %rdi
callq 0x6ecda
testb %r13b, %r13b
movq %rbx, 0x18(%rsp)
je 0x7e6dd
testq %rax, %rax
je 0x7e6dd
xorl %r14d, %r14d
xorl %ebp, %ebp
movq %r12, 0x20(%rsp)
movq 0x8(%rsp), %r15
leaq 0x7467f(%rip), %rax     # 0xf2c50
movq (%r14,%rax), %r13
movq %r12, %rdi
movq %rbp, %rsi
callq 0x6e9fa
cmpq (%rax), %r13
jne 0x7e658
movq %rbx, %r12
leaq 0x74511(%rip), %rbx     # 0xf2b00
movq (%rbx,%r14,2), %r13
movq %r15, %rdi
movq %rbp, %rsi
callq 0x6e9fa
cmpq (%rax), %r13
jne 0x7e689
movq 0x8(%rbx,%r14,2), %rbx
movq %r15, %rdi
movq %rbp, %rsi
callq 0x6e9fa
movb $0x1, %r13b
cmpq 0x8(%rax), %rbx
movq 0x18(%rsp), %rbx
movq 0x20(%rsp), %r12
je 0x7e6c0
xorl %r13d, %r13d
movq %rbx, %rdi
leaq 0x64b3e(%rip), %rsi     # 0xe3179
leaq 0x7401f(%rip), %rdx     # 0xf2661
leaq 0x73f30(%rip), %rcx     # 0xf2579
leaq 0x73e21(%rip), %r8      # 0xf2471
movl $0x114, %r9d            # imm = 0x114
jmp 0x7e680
xorl %r13d, %r13d
movq %rbx, %rdi
leaq 0x64b14(%rip), %rsi     # 0xe3179
leaq 0x740a3(%rip), %rdx     # 0xf270f
leaq 0x73f06(%rip), %rcx     # 0xf2579
leaq 0x73df7(%rip), %r8      # 0xf2471
movl $0x110, %r9d            # imm = 0x110
xorl %eax, %eax
callq 0x3559f
jmp 0x7e6c0
xorl %r13d, %r13d
movq %r12, %rbx
movq %r12, %rdi
leaq 0x64ae0(%rip), %rsi     # 0xe3179
leaq 0x73f7a(%rip), %rdx     # 0xf261a
leaq 0x73ed2(%rip), %rcx     # 0xf2579
leaq 0x73dc3(%rip), %r8      # 0xf2471
movl $0x112, %r9d            # imm = 0x112
xorl %eax, %eax
callq 0x3559f
movq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x6ecda
testb %r13b, %r13b
je 0x7e6dd
incq %rbp
addq $0x8, %r14
cmpq %rax, %rbp
jb 0x7e5ca
movq %r12, %rdi
callq 0x6f134
movq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x7e919
movq %rax, %r12
testb %r13b, %r13b
je 0x7e74d
movq %r14, %rdi
callq 0x6ecda
movq %rax, %r13
movq %r12, %rdi
callq 0x6ecda
cmpq %rax, %r13
jne 0x7e752
movq %r12, %rdi
callq 0x6ecda
movb $0x1, %r13b
cmpq $0x15, %rax
je 0x7e781
leaq 0x64a4f(%rip), %rsi     # 0xe3179
leaq 0x73fa3(%rip), %rdx     # 0xf26d4
leaq 0x73e41(%rip), %rcx     # 0xf2579
leaq 0x73d32(%rip), %r8      # 0xf2471
xorl %r13d, %r13d
movq %rbx, %rdi
movl $0x11c, %r9d            # imm = 0x11C
jmp 0x7e77a
xorl %r13d, %r13d
jmp 0x7e781
leaq 0x64a20(%rip), %rsi     # 0xe3179
leaq 0x73fdd(%rip), %rdx     # 0xf273d
leaq 0x73e12(%rip), %rcx     # 0xf2579
leaq 0x73d03(%rip), %r8      # 0xf2471
xorl %r13d, %r13d
movq %rbx, %rdi
movl $0x11a, %r9d            # imm = 0x11A
xorl %eax, %eax
callq 0x3559f
movq %r12, %rdi
callq 0x6ecda
testb %r13b, %r13b
je 0x7e89e
testq %rax, %rax
je 0x7e89e
xorl %r14d, %r14d
xorl %ebp, %ebp
leaq 0x744a9(%rip), %rax     # 0xf2c50
movq (%r14,%rax), %rbx
movq %r12, %rdi
movq %rbp, %rsi
callq 0x6e9fa
cmpq (%rax), %rbx
jne 0x7e824
leaq 0x7433e(%rip), %r15     # 0xf2b00
movq (%r15,%r14,2), %rbx
movq 0x10(%rsp), %r13
movq %r13, %rdi
movq %rbp, %rsi
callq 0x6e9fa
cmpq (%rax), %rbx
jne 0x7e850
movq 0x8(%r15,%r14,2), %rbx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x6e9fa
movb $0x1, %r13b
cmpq 0x8(%rax), %rbx
movq 0x18(%rsp), %rdi
je 0x7e881
xorl %r13d, %r13d
leaq 0x64972(%rip), %rsi     # 0xe3179
leaq 0x73f9e(%rip), %rdx     # 0xf27ac
leaq 0x73d64(%rip), %rcx     # 0xf2579
leaq 0x73c55(%rip), %r8      # 0xf2471
movl $0x123, %r9d            # imm = 0x123
jmp 0x7e87a
xorl %r13d, %r13d
movq 0x18(%rsp), %rdi
leaq 0x64946(%rip), %rsi     # 0xe3179
leaq 0x73ed5(%rip), %rdx     # 0xf270f
leaq 0x73d38(%rip), %rcx     # 0xf2579
leaq 0x73c29(%rip), %r8      # 0xf2471
movl $0x11e, %r9d            # imm = 0x11E
jmp 0x7e87a
xorl %r13d, %r13d
movq 0x18(%rsp), %rdi
leaq 0x6491a(%rip), %rsi     # 0xe3179
leaq 0x73f03(%rip), %rdx     # 0xf2769
leaq 0x73d0c(%rip), %rcx     # 0xf2579
leaq 0x73bfd(%rip), %r8      # 0xf2471
movl $0x121, %r9d            # imm = 0x121
xorl %eax, %eax
callq 0x3559f
movq %r12, %rdi
callq 0x6ecda
testb %r13b, %r13b
je 0x7e89e
incq %rbp
addq $0x8, %r14
cmpq %rax, %rbp
jb 0x7e7a0
movq %r12, %rdi
callq 0x6f134
movzbl %r13b, %ebx
decl %ebx
movq 0x10(%rsp), %rdi
callq 0x6f134
movq 0x8(%rsp), %rdi
callq 0x6f134
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1d545