// File: /workspace/github_c_makefile_star2_O0/jsh58[P]Genrich/Genrich.c
// Function: findDupsDc
void findDupsDc(Read** readDc, int readIdxDc,
    int readLenDc, uint64_t* countDc, uint64_t* dupsDc,
    uint64_t* singlePr, bool extendOpt, int extend,
    float asDiff, bool atacOpt, int atacLen5, int atacLen3,
    bool atacAdj, File bed, bool bedOpt, bool gzOut,
    bool ctrl, int sample, HashAln*** table,
    uint32_t* tableMem, HashAln** tableSn,
    uint32_t hashSizeSn, File dups, bool dupsVerb,
    uint32_t* order, uint32_t* order0, uint32_t* order1,
    uint32_t* order2, uint16_t* qual, uint16_t* qual0,
    uint16_t* qual1, uint16_t* qual2, uint64_t* errCount,
    bool verbose) {

  // initialize hashtable
  uint32_t count = readIdxDc * MAX_SIZE + readLenDc;
  uint32_t hashSize = calcHashSize(count);
  if (hashSize > *tableMem) {
    *table = (HashAln**) memrealloc(*table,
      hashSize * sizeof(HashAln*));
    *tableMem = hashSize;
  } else
    hashSize = *tableMem;
  for (uint32_t i = 0; i < hashSize; i++)
    (*table)[i] = NULL;

  // sort reads by qual score sum
  sortReads(readDc, count, order, qual, order0, order1,
    order2, qual0, qual1, qual2);

  // loop through discordant reads
  for (uint32_t i = 0; i < count; i++) {
    Read* r = readDc[order[i] / MAX_SIZE]
      + order[i] % MAX_SIZE;

    // check hashtable for matches
    if (checkHashDc(r, *table, hashSize, dups,
        dupsVerb, gzOut))
      (*dupsDc)++;
    else {
      // add alignments to hashtable(s)
      addHashDc(r, *table, hashSize, dupsVerb,
        tableSn, hashSizeSn);
      // process alignments too (as singletons)
      *singlePr += processSingle(r->name, r->aln,
        r->alnLen, extendOpt, extend, false,
        NULL, NULL, NULL, NULL,
        r->score, asDiff, true,
        atacOpt, atacLen5, atacLen3, atacAdj,
        bed, bedOpt, gzOut, ctrl, sample, errCount,
        verbose);
      *singlePr += processSingle(r->name, r->alnR2,
        r->alnLenR2, extendOpt, extend, false,
        NULL, NULL, NULL, NULL,
        r->scoreR2, asDiff, false,
        atacOpt, atacLen5, atacLen3, atacAdj,
        bed, bedOpt, gzOut, ctrl, sample, errCount,
        verbose);
    }

    // free Read
    free(r->name);
    free(r->aln);
    free(r->alnR2);

    (*countDc)++;
  }

  // free nodes of hashtable
  for (uint32_t i = 0; i < hashSize; i++) {
    HashAln* tmp;
    HashAln* h = (*table)[i];
    while (h != NULL) {
      free(h->name);
      tmp = h->next;
      free(h);
      h = tmp;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %r9, %r11
movq %r8, %rbx
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r12
movb 0x230(%rsp), %al
movb %al, 0xaf(%rsp)
movq 0x228(%rsp), %rax
movq 0x220(%rsp), %rax
movq 0x218(%rsp), %rax
movq 0x210(%rsp), %rax
movq 0x208(%rsp), %rax
movq 0x200(%rsp), %rax
movq 0x1f8(%rsp), %rax
movq 0x1f0(%rsp), %rax
movq 0x1e8(%rsp), %rax
movb 0x1e0(%rsp), %cl
movq 0x1d8(%rsp), %r13
movl 0x1d0(%rsp), %eax
movq 0x1c8(%rsp), %rax
movq 0x1c0(%rsp), %rax
movq 0x1b8(%rsp), %rax
movl 0x1b0(%rsp), %eax
movb 0x1a8(%rsp), %dl
movb 0x1a0(%rsp), %sil
movb 0x198(%rsp), %dil
movq 0x190(%rsp), %rax
movb 0x188(%rsp), %r8b
movl 0x180(%rsp), %r9d
movl 0x178(%rsp), %r9d
movb 0x170(%rsp), %r9b
movl 0x168(%rsp), %r10d
movb 0x160(%rsp), %r10b
movq %rax, 0x120(%rsp)
movb 0xaf(%rsp), %al
movq %r13, 0x118(%rsp)
movq %r12, 0x110(%rsp)
movl %r15d, 0x10c(%rsp)
movl %ebp, 0x108(%rsp)
movq %r14, 0x100(%rsp)
movq %rbx, 0xf8(%rsp)
movq %r11, 0xf0(%rsp)
andb $0x1, %r10b
movb %r10b, 0xef(%rsp)
movss %xmm0, 0xe8(%rsp)
andb $0x1, %r9b
movb %r9b, 0xe7(%rsp)
andb $0x1, %r8b
movb %r8b, 0xe6(%rsp)
andb $0x1, %dil
movb %dil, 0xe5(%rsp)
andb $0x1, %sil
movb %sil, 0xe4(%rsp)
andb $0x1, %dl
movb %dl, 0xe3(%rsp)
andb $0x1, %cl
movb %cl, 0xe2(%rsp)
andb $0x1, %al
movb %al, 0xe1(%rsp)
imull $0xfff0, 0x10c(%rsp), %eax # imm = 0xFFF0
addl 0x108(%rsp), %eax
movl %eax, 0xdc(%rsp)
movl 0xdc(%rsp), %edi
callq 0xf3b0
movl %eax, 0xd8(%rsp)
movl 0xd8(%rsp), %eax
movq 0x1c0(%rsp), %rcx
cmpl (%rcx), %eax
jbe 0x112b1
movq 0x1b8(%rsp), %rax
movq (%rax), %rdi
movl 0xd8(%rsp), %eax
movl %eax, %esi
shlq $0x3, %rsi
callq 0x28e0
movq %rax, %rcx
movq 0x1b8(%rsp), %rax
movq %rcx, (%rax)
movl 0xd8(%rsp), %ecx
movq 0x1c0(%rsp), %rax
movl %ecx, (%rax)
jmp 0x112c2
movq 0x1c0(%rsp), %rax
movl (%rax), %eax
movl %eax, 0xd8(%rsp)
movl $0x0, 0xd4(%rsp)
movl 0xd4(%rsp), %eax
cmpl 0xd8(%rsp), %eax
jae 0x1130a
movq 0x1b8(%rsp), %rax
movq (%rax), %rax
movl 0xd4(%rsp), %ecx
movq $0x0, (%rax,%rcx,8)
movl 0xd4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xd4(%rsp)
jmp 0x112cd
movq 0x110(%rsp), %rdi
movl 0xdc(%rsp), %esi
movq 0x1e8(%rsp), %rdx
movq 0x208(%rsp), %rcx
movq 0x1f0(%rsp), %r8
movq 0x1f8(%rsp), %r9
movq 0x200(%rsp), %rbx
movq 0x210(%rsp), %r11
movq 0x218(%rsp), %r10
movq 0x220(%rsp), %rax
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0xf290
movl $0x0, 0xd0(%rsp)
movl 0xd0(%rsp), %eax
cmpl 0xdc(%rsp), %eax
jae 0x1180d
movq 0x110(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x1e8(%rsp), %rax
movl 0xd0(%rsp), %ecx
movl (%rax,%rcx,4), %eax
movl $0xfff0, %ecx           # imm = 0xFFF0
xorl %edx, %edx
divl %ecx
movl %eax, %ecx
movq 0x98(%rsp), %rax
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0xa0(%rsp)
movq 0x1e8(%rsp), %rax
movl 0xd0(%rsp), %ecx
movl (%rax,%rcx,4), %eax
movl $0xfff0, %ecx           # imm = 0xFFF0
xorl %edx, %edx
divl %ecx
movq 0xa0(%rsp), %rax
movl %edx, %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0xc8(%rsp)
movq 0xc8(%rsp), %rdi
movq 0x1b8(%rsp), %rax
movq (%rax), %rsi
movl 0xd8(%rsp), %edx
movb 0xe2(%rsp), %r8b
movb 0xe4(%rsp), %al
movq 0x118(%rsp), %rcx
andb $0x1, %r8b
andb $0x1, %al
movzbl %r8b, %r8d
movzbl %al, %r9d
callq 0x10ca0
testb $0x1, %al
jne 0x11451
jmp 0x11468
movq 0xf8(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x117b3
movq 0xc8(%rsp), %rdi
movq 0x1b8(%rsp), %rax
movq (%rax), %rsi
movl 0xd8(%rsp), %edx
movb 0xe2(%rsp), %al
movq 0x1c8(%rsp), %r8
movl 0x1d0(%rsp), %r9d
andb $0x1, %al
movzbl %al, %ecx
callq 0x10840
movq 0xc8(%rsp), %rax
movq (%rax), %rdi
movq 0xc8(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0xc8(%rsp), %rax
movzbl 0x10(%rax), %edx
movb 0xef(%rsp), %cl
movl 0x168(%rsp), %r8d
movq 0xc8(%rsp), %rax
movss 0x28(%rax), %xmm0
movss 0xe8(%rsp), %xmm1
movb 0xe7(%rsp), %al
movb %al, 0x85(%rsp)
movl 0x178(%rsp), %eax
movl %eax, 0x88(%rsp)
movl 0x180(%rsp), %r13d
movb 0xe6(%rsp), %r12b
movb 0xe5(%rsp), %r14b
movb 0xe4(%rsp), %bpl
movb 0xe3(%rsp), %bl
movl 0x1b0(%rsp), %r11d
movq 0x228(%rsp), %r10
movb 0xe1(%rsp), %al
movb %al, 0x86(%rsp)
movq 0x120(%rsp), %r15
xorl %r9d, %r9d
xorl %eax, %eax
movb 0x85(%rsp), %al
andb $0x1, %cl
andb $0x1, %al
movb %al, 0x87(%rsp)
movb 0x86(%rsp), %al
andb $0x1, %r12b
andb $0x1, %r14b
andb $0x1, %bpl
andb $0x1, %bl
andb $0x1, %al
movb %al, 0x8c(%rsp)
movb 0x87(%rsp), %al
movzbl %cl, %ecx
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movl $0x1, 0x20(%rsp)
movzbl %al, %eax
movl %eax, 0x28(%rsp)
movl 0x88(%rsp), %eax
movl %eax, 0x30(%rsp)
movb 0x8c(%rsp), %al
movl %r13d, 0x38(%rsp)
movzbl %r12b, %r12d
movl %r12d, 0x40(%rsp)
movq %r15, 0x48(%rsp)
movzbl %r14b, %r14d
movl %r14d, 0x50(%rsp)
movzbl %bpl, %ebp
movl %ebp, 0x58(%rsp)
movzbl %bl, %ebx
movl %ebx, 0x60(%rsp)
movl %r11d, 0x68(%rsp)
movq %r10, 0x70(%rsp)
movzbl %al, %eax
movl %eax, 0x78(%rsp)
callq 0xd7b0
movslq %eax, %rcx
movq 0xf0(%rsp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq 0xc8(%rsp), %rax
movq (%rax), %rdi
movq 0xc8(%rsp), %rax
movq 0x18(%rax), %rsi
movq 0xc8(%rsp), %rax
movzbl 0x20(%rax), %edx
movb 0xef(%rsp), %cl
movl 0x168(%rsp), %r8d
movq 0xc8(%rsp), %rax
movss 0x2c(%rax), %xmm0
movss 0xe8(%rsp), %xmm1
movb 0xe7(%rsp), %al
movb %al, 0x8d(%rsp)
movl 0x178(%rsp), %eax
movl %eax, 0x90(%rsp)
movl 0x180(%rsp), %r13d
movb 0xe6(%rsp), %r12b
movb 0xe5(%rsp), %r14b
movb 0xe4(%rsp), %bpl
movb 0xe3(%rsp), %bl
movl 0x1b0(%rsp), %r11d
movq 0x228(%rsp), %r10
movb 0xe1(%rsp), %al
movb %al, 0x8e(%rsp)
movq 0x120(%rsp), %r15
xorl %r9d, %r9d
xorl %eax, %eax
movb 0x8d(%rsp), %al
andb $0x1, %cl
andb $0x1, %al
movb %al, 0x8f(%rsp)
movb 0x8e(%rsp), %al
andb $0x1, %r12b
andb $0x1, %r14b
andb $0x1, %bpl
andb $0x1, %bl
andb $0x1, %al
movb %al, 0x97(%rsp)
movb 0x8f(%rsp), %al
movzbl %cl, %ecx
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movl $0x0, 0x20(%rsp)
movzbl %al, %eax
movl %eax, 0x28(%rsp)
movl 0x90(%rsp), %eax
movl %eax, 0x30(%rsp)
movb 0x97(%rsp), %al
movl %r13d, 0x38(%rsp)
movzbl %r12b, %r12d
movl %r12d, 0x40(%rsp)
movq %r15, 0x48(%rsp)
movzbl %r14b, %r14d
movl %r14d, 0x50(%rsp)
movzbl %bpl, %ebp
movl %ebp, 0x58(%rsp)
movzbl %bl, %ebx
movl %ebx, 0x60(%rsp)
movl %r11d, 0x68(%rsp)
movq %r10, 0x70(%rsp)
movzbl %al, %eax
movl %eax, 0x78(%rsp)
callq 0xd7b0
movslq %eax, %rcx
movq 0xf0(%rsp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq 0xc8(%rsp), %rax
movq (%rax), %rdi
callq 0x2040
movq 0xc8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x2040
movq 0xc8(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x2040
movq 0x100(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movl 0xd0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xd0(%rsp)
jmp 0x1137c
movl $0x0, 0xc4(%rsp)
movl 0xc4(%rsp), %eax
cmpl 0xd8(%rsp), %eax
jae 0x118b0
movq 0x1b8(%rsp), %rax
movq (%rax), %rax
movl 0xc4(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0xb0(%rsp)
cmpq $0x0, 0xb0(%rsp)
je 0x11898
movq 0xb0(%rsp), %rax
movq (%rax), %rdi
callq 0x2040
movq 0xb0(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0xb0(%rsp), %rdi
callq 0x2040
movq 0xb8(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0x1184a
jmp 0x1189a
movl 0xc4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc4(%rsp)
jmp 0x11818
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)