// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/range.c
// Function: generic_ranges_uniq
static GtArray* generic_ranges_uniq(GtArray *out_ranges,
                                    const GtArray *in_ranges, bool count)
{
  GtUword i, *ctr_ptr, ctr = 1;
  GtArray *count_array = NULL;
  GtRange cur  = { GT_UNDEF_UWORD, GT_UNDEF_UWORD },
        prev = { GT_UNDEF_UWORD, GT_UNDEF_UWORD };
  gt_assert(out_ranges && in_ranges);
  gt_assert(gt_ranges_are_sorted(in_ranges));
  if (count)
    count_array = gt_array_new(sizeof (GtUword));
  for (i = 0; i < gt_array_size(in_ranges); i++) {
    cur = *(GtRange*) gt_array_get(in_ranges, i);
    if (!i) {
      gt_array_add(out_ranges, cur);
      if (count)
        gt_array_add(count_array, ctr);
    }
    else {
      if (prev.start == cur.start && prev.end == cur.end) {
        if (count) {
          ctr_ptr = gt_array_get_last(count_array);
          (*ctr_ptr)++;
        }
      }
      else {
        gt_array_add(out_ranges, cur);
        if (count)
          gt_array_add(count_array, ctr);
      }
    }
    prev = cur;
  }
  return count_array;
}

// Assembly:
subq $0x68, %rsp
movb %dl, %al
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
andb $0x1, %al
movb %al, 0x57(%rsp)
movq $0x1, 0x38(%rsp)
movq $0x0, 0x30(%rsp)
movq 0xdae29(%rip), %rax     # 0x170798
movq %rax, 0x20(%rsp)
movq 0xdae25(%rip), %rax     # 0x1707a0
movq %rax, 0x28(%rsp)
movq 0xdae11(%rip), %rax     # 0x170798
movq %rax, 0x10(%rsp)
movq 0xdae0d(%rip), %rax     # 0x1707a0
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0x959a8
cmpq $0x0, 0x58(%rsp)
jne 0x959e0
movq 0x11e629(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0xc86ad(%rip), %rsi     # 0x15e066
leaq 0xdaabc(%rip), %rdx     # 0x17047c
leaq 0xdacb9(%rip), %rcx     # 0x170680
leaq 0xda63d(%rip), %r8      # 0x17000b
movl $0x17f, %r9d            # imm = 0x17F
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x959e2
jmp 0x959e4
movq 0x58(%rsp), %rdi
callq 0x95610
testb $0x1, %al
jne 0x95a2a
movq 0x11e5df(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0xc8663(%rip), %rsi     # 0x15e066
leaq 0xdac8a(%rip), %rdx     # 0x170694
leaq 0xdac6f(%rip), %rcx     # 0x170680
leaq 0xda5f3(%rip), %r8      # 0x17000b
movl $0x180, %r9d            # imm = 0x180
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x95a2c
testb $0x1, 0x57(%rsp)
je 0x95a42
movl $0x8, %edi
callq 0x75ab0
movq %rax, 0x30(%rsp)
movq $0x0, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rdi
callq 0x76490
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x95b62
movq 0x58(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x75c80
movq (%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x95ac9
movq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movl $0x10, %edx
callq 0x76220
testb $0x1, 0x57(%rsp)
je 0x95ac7
movq 0x30(%rsp), %rdi
leaq 0x38(%rsp), %rsi
movl $0x8, %edx
callq 0x76220
jmp 0x95b3b
movq 0x10(%rsp), %rax
cmpq 0x20(%rsp), %rax
jne 0x95b08
movq 0x18(%rsp), %rax
cmpq 0x28(%rsp), %rax
jne 0x95b08
testb $0x1, 0x57(%rsp)
je 0x95b06
movq 0x30(%rsp), %rdi
callq 0x75d20
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x95b39
movq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movl $0x10, %edx
callq 0x76220
testb $0x1, 0x57(%rsp)
je 0x95b37
movq 0x30(%rsp), %rdi
leaq 0x38(%rsp), %rsi
movl $0x8, %edx
callq 0x76220
jmp 0x95b39
jmp 0x95b3b
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x48(%rsp)
jmp 0x95a4b
movq 0x30(%rsp), %rax
addq $0x68, %rsp
retq
nopl (%rax)