// File: /workspace/github_c_makefile_star2_O2/jsh58[P]Genrich/Genrich.c
// Function: checkHashDc
bool checkHashDc(Read* r, HashAln** table,
    uint32_t hashSize, File dups, bool dupsVerb,
    bool gzOut) {
  for (int k = 0; k < r->alnLen; k++) {
    Aln* a = r->aln + k;
    uint32_t pos = (a->strand ? a->pos[0] : a->pos[1]);
    for (int j = 0; j < r->alnLenR2; j++) {
      Aln* b = r->alnR2 + j;
      uint32_t pos1 = (b->strand ? b->pos[0] : b->pos[1]);
      uint32_t idx = jenkins_hash_aln(a->chrom, b->chrom,
        pos, pos1, a->strand, b->strand, DISCORD, hashSize);
      HashAln* h = checkHash(a->chrom, b->chrom, pos, pos1,
        a->strand, b->strand, DISCORD, table, idx);
      if (h) {
        if (dupsVerb)
          logDup(dups, gzOut, r->name, a->chrom, b->chrom,
            pos, pos1, a->strand, b->strand, h->name,
            DISCORD);
        return true;
      }
      // check the reverse also
      idx = jenkins_hash_aln(b->chrom, a->chrom,
        pos1, pos, b->strand, a->strand, DISCORD, hashSize);
      h = checkHash(b->chrom, a->chrom, pos1, pos,
        b->strand, a->strand, DISCORD, table, idx);
      if (h) {
        if (dupsVerb)
          logDup(dups, gzOut, r->name, b->chrom, a->chrom,
            pos1, pos, b->strand, a->strand, h->name,
            DISCORD);
        return true;
      }
    }
  }
  return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r9d, 0x10(%rsp)
movl %r8d, 0x14(%rsp)
movq %rcx, 0x38(%rsp)
movl %edx, %r10d
movq %rsi, 0x50(%rsp)
xorl %ecx, %ecx
pushq $-0x1
popq %rsi
pushq $0x2
popq %r8
movq %rdi, 0x48(%rsp)
movq %r10, 0x58(%rsp)
movzbl 0x10(%rdi), %ebx
cmpq %rbx, %rcx
jae 0x9def
movq %rbx, 0x40(%rsp)
movq 0x8(%rdi), %rax
movq %rcx, 0x8(%rsp)
imulq $0x28, %rcx, %rcx
leaq (%rax,%rcx), %rdx
movzbl 0x10(%rax,%rcx), %eax
xorl $0x1, %eax
movq %rdx, 0x18(%rsp)
movl (%rdx,%rax,4), %r14d
xorl %ebp, %ebp
movzbl 0x20(%rdi), %eax
incq %rsi
cmpq %rax, %rsi
jae 0x9d29
movq %rsi, 0x68(%rsp)
movq 0x18(%rdi), %rdx
leaq (%rdx,%rbp), %rax
movzbl 0x10(%rdx,%rbp), %r12d
movl %r12d, %ecx
xorb $0x1, %cl
movzbl %cl, %ecx
movl (%rax,%rcx,4), %ecx
movq %rcx, 0x70(%rsp)
movq %r8, %rbx
movq 0x18(%rsp), %r15
movq 0x20(%r15), %r13
movq %rdx, 0x30(%rsp)
movq 0x20(%rdx,%rbp), %rsi
movq %rsi, 0x20(%rsp)
movzbl 0x10(%r15), %r8d
movl %r8d, 0x28(%rsp)
movq %r13, %rdi
movl %r14d, %edx
movl %r12d, %r9d
pushq %r10
pushq %rbx
callq 0x9101
popq %rcx
popq %rdx
subq $0x8, %rsp
movq %r13, %rdi
movq 0x78(%rsp), %r13
movq 0x28(%rsp), %rsi
movl %r14d, %edx
movl %r13d, %ecx
movl 0x30(%rsp), %r8d
movl %r12d, %r9d
pushq %rax
pushq 0x60(%rsp)
pushq %rbx
callq 0x928d
addq $0x20, %rsp
testq %rax, %rax
jne 0x9d39
leaq 0x28(%rbp), %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq 0x20(%rax,%rbp), %rdi
movq %rdi, 0x60(%rsp)
movq 0x20(%r15), %r12
movzbl 0x10(%rax,%rbp), %r8d
movl %r8d, 0x20(%rsp)
movzbl 0x10(%r15), %ebp
movq %r12, %rsi
movl %r13d, %edx
movl %r14d, %ecx
movl %ebp, %r9d
movq 0x58(%rsp), %r15
pushq %r15
pushq %rbx
callq 0x9101
popq %rcx
popq %rdx
subq $0x8, %rsp
movq 0x68(%rsp), %rdi
movq %r12, %rsi
movl %r13d, %edx
movl %r14d, %ecx
movl 0x28(%rsp), %r8d
movl %ebp, %r9d
pushq %rax
pushq 0x60(%rsp)
pushq %rbx
callq 0x928d
movq 0x48(%rsp), %r11
addq $0x20, %rsp
movq %r11, %rbp
testq %rax, %rax
movq 0x48(%rsp), %rdi
movq %r15, %r10
movq %rbx, %r8
movq 0x68(%rsp), %rsi
je 0x9bf3
jmp 0x9d91
movq 0x8(%rsp), %rcx
incq %rcx
pushq $-0x1
popq %rsi
jmp 0x9bbd
movq 0x30(%rsp), %rdi
cmpb $0x0, 0x14(%rsp)
movq 0x8(%rsp), %rcx
movq 0x40(%rsp), %rbx
movq 0x48(%rsp), %rdx
je 0x9def
movq (%rdx), %rdx
movq 0x18(%rsp), %rsi
movq 0x20(%rsi), %rcx
movq 0x20(%rdi,%rbp), %r8
movzbl 0x10(%rsi), %r10d
movzbl 0x10(%rdi,%rbp), %r11d
subq $0x8, %rsp
movzbl 0x18(%rsp), %esi
movq 0x40(%rsp), %rdi
movl %r14d, %r9d
pushq $0x2
pushq (%rax)
pushq %r11
pushq %r10
pushq %r13
jmp 0x9de1
movq 0x30(%rsp), %rsi
cmpb $0x0, 0x14(%rsp)
movq 0x8(%rsp), %rcx
movq 0x40(%rsp), %rbx
je 0x9def
movq (%rdi), %rdx
movq %rsi, %rdi
movq -0x8(%rsi,%r11), %rcx
movq 0x18(%rsp), %rsi
movq 0x20(%rsi), %r8
movzbl -0x18(%rdi,%r11), %r10d
movzbl 0x10(%rsi), %r11d
subq $0x8, %rsp
movzbl 0x18(%rsp), %esi
movq 0x40(%rsp), %rdi
movl %r13d, %r9d
pushq $0x2
pushq (%rax)
pushq %r11
pushq %r10
pushq %r14
callq 0x93b3
movq 0x38(%rsp), %rcx
addq $0x30, %rsp
cmpq %rbx, %rcx
setb %al
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq