// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/giextract.c
// Function: remdupsfastakeyqueries
static GtUword remdupsfastakeyqueries(Fastakeyquery *fastakeyqueries,
                                            GtUword numofqueries,
                                            bool verbose)
{
  if (numofqueries == 0)
  {
    return 0;
  } else
  {
    Fastakeyquery *storeptr, *readptr;
    GtUword newnumofqueries;

    for (storeptr = fastakeyqueries, readptr = fastakeyqueries+1;
         readptr < fastakeyqueries + numofqueries;
         readptr++)
    {
      if (strcmp(storeptr->fastakey,readptr->fastakey) != 0 ||
          storeptr->frompos != readptr->frompos ||
          storeptr->topos != readptr->topos)
      {
        storeptr++;
        if (storeptr != readptr)
        {
          size_t len;

          storeptr->frompos = readptr->frompos;
          storeptr->topos = readptr->topos;
          len = strlen(readptr->fastakey);
          storeptr->fastakey = gt_realloc(storeptr->fastakey,
                                          sizeof (char) * (len+1));
          strcpy(storeptr->fastakey,readptr->fastakey);
        }
      }
    }
    newnumofqueries = (GtUword) (storeptr - fastakeyqueries + 1);
    if (newnumofqueries < numofqueries)
    {
      if (verbose)
      {
        printf("# removed "GT_WU" duplicate queries\n",
                numofqueries - newnumofqueries);
      }
      for (storeptr = fastakeyqueries + newnumofqueries;
           storeptr < fastakeyqueries + numofqueries;
           storeptr++)
      {
        gt_free(storeptr->fastakey);
        storeptr->fastakey = NULL;
      }
    }
    return newnumofqueries;
  }
}

// Assembly:
subq $0x48, %rsp
movb %dl, %al
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
andb $0x1, %al
movb %al, 0x2f(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x25361c
movq $0x0, 0x40(%rsp)
jmp 0x253801
movq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x253746
movq 0x20(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rax
movq (%rax), %rsi
callq 0x19980
cmpl $0x0, %eax
jne 0x253699
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x253699
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rsp), %rcx
cmpq 0x10(%rcx), %rax
je 0x253731
movq 0x20(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0x25372f
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rax
movq (%rax), %rdi
callq 0x192b0
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rsp), %rsi
addq $0x1, %rsi
shlq $0x0, %rsi
leaq 0x32626e(%rip), %rdx    # 0x579973
movl $0x7d, %ecx
callq 0xe8540
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movq 0x20(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rax
movq (%rax), %rsi
callq 0x19700
jmp 0x253731
jmp 0x253733
movq 0x18(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x18(%rsp)
jmp 0x253634
movq 0x20(%rsp), %rax
movq 0x38(%rsp), %rcx
subq %rcx, %rax
sarq $0x5, %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0x2537f7
testb $0x1, 0x2f(%rsp)
je 0x25378f
movq 0x30(%rsp), %rsi
subq 0x10(%rsp), %rsi
leaq 0x32669f(%rip), %rdi    # 0x579e27
movb $0x0, %al
callq 0x19070
movq 0x38(%rsp), %rax
movq 0x10(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x2537f5
movq 0x20(%rsp), %rax
movq (%rax), %rdi
leaq 0x3261a4(%rip), %rsi    # 0x579973
movl $0x8e, %edx
callq 0xe88c0
movq 0x20(%rsp), %rax
movq $0x0, (%rax)
movq 0x20(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x20(%rsp)
jmp 0x2537a5
jmp 0x2537f7
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax,%rax)