// File: /workspace/github_c_makefile_star2_O3/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 $0x68, %rsp
movq %rsi, %r15
movb 0x10(%rdi), %sil
testb %sil, %sil
je 0xb378
movl %edx, %ebp
movl %r8d, 0x14(%rsp)
movl %r9d, 0x10(%rsp)
movq %rcx, 0x30(%rsp)
movb 0x20(%rdi), %al
xorl %ecx, %ecx
movq %rdi, 0x20(%rsp)
movq %rbp, 0x58(%rsp)
movq %r15, 0x48(%rsp)
testb %al, %al
je 0xb366
movq 0x8(%rdi), %rax
movq %rcx, 0x50(%rsp)
leaq (%rcx,%rcx,4), %rcx
leaq (%rax,%rcx,8), %r12
movzbl 0x10(%r12), %eax
xorl $0x1, %eax
movl (%r12,%rax,4), %r14d
xorl %r13d, %r13d
xorl %ecx, %ecx
movq %r12, 0x38(%rsp)
movq %rcx, 0x60(%rsp)
movq 0x18(%rdi), %rdx
leaq (%rdx,%r13), %rax
movzbl 0x10(%rdx,%r13), %r15d
movl %r15d, %ecx
xorb $0x1, %cl
movzbl %cl, %ecx
movl (%rax,%rcx,4), %ebx
movq 0x20(%r12), %rdi
movq %rdi, 0x28(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x20(%rdx,%r13), %rsi
movq %rsi, 0x18(%rsp)
movzbl 0x10(%r12), %r8d
movl %r8d, 0xc(%rsp)
movl %r14d, %edx
movl %ebx, %ecx
movl %r15d, %r9d
pushq %rbp
movl $0x2, %eax
pushq %rax
callq 0xa64f
addq $0x10, %rsp
subq $0x8, %rsp
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl %r14d, %edx
movl %ebx, %ecx
movl 0x14(%rsp), %r8d
movl %r15d, %r9d
pushq %rax
pushq 0x58(%rsp)
movl $0x2, %eax
pushq %rax
callq 0xa7e5
addq $0x20, %rsp
testq %rax, %rax
jne 0xb380
movq %rbx, 0x18(%rsp)
movq 0x40(%rsp), %rbx
movq 0x20(%rbx,%r13), %rdi
movq %rdi, 0x28(%rsp)
movq 0x20(%r12), %r15
movzbl 0x10(%rbx,%r13), %r8d
movl %r8d, 0xc(%rsp)
movzbl 0x10(%r12), %r12d
movq %r15, %rsi
movq 0x18(%rsp), %rdx
movl %r14d, %ecx
movl %r12d, %r9d
pushq %rbp
movl $0x2, %eax
pushq %rax
callq 0xa64f
addq $0x10, %rsp
subq $0x8, %rsp
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rbp
movq 0x50(%rsp), %r10
movq %r15, %rsi
movl %ebp, %edx
movl %r14d, %ecx
movl 0x14(%rsp), %r8d
movl %r12d, %r9d
pushq %rax
pushq %r10
movl $0x2, %eax
pushq %rax
callq 0xa7e5
addq $0x20, %rsp
testq %rax, %rax
movq 0x60(%rsp), %rcx
jne 0xb3ce
incq %rcx
movq 0x20(%rsp), %rdi
movzbl 0x20(%rdi), %eax
addq $0x28, %r13
cmpq %rax, %rcx
movq 0x58(%rsp), %rbp
movq 0x38(%rsp), %r12
jb 0xb21a
movb 0x10(%rdi), %sil
movq 0x50(%rsp), %rcx
jmp 0xb368
xorl %eax, %eax
incq %rcx
movzbl %sil, %edx
cmpq %rdx, %rcx
jb 0xb1ea
xorl %r12d, %r12d
jmp 0xb420
movq 0x40(%rsp), %rdi
movq %r12, %rsi
movb $0x1, %r12b
cmpb $0x0, 0x14(%rsp)
je 0xb420
movq 0x20(%rsp), %rcx
movq (%rcx), %rdx
movq 0x20(%rsi), %rcx
movq 0x20(%rdi,%r13), %r8
movzbl 0x10(%rsi), %r10d
movzbl 0x10(%rdi,%r13), %r11d
subq $0x8, %rsp
movzbl 0x18(%rsp), %esi
movq 0x38(%rsp), %rdi
movl %r14d, %r9d
pushq $0x2
pushq (%rax)
pushq %r11
pushq %r10
pushq %rbx
jmp 0xb417
movb $0x1, %r12b
cmpb $0x0, 0x14(%rsp)
je 0xb420
movq %rbx, %rsi
movq 0x20(%rsp), %rcx
movq (%rcx), %rdx
movq 0x20(%rsi,%r13), %rcx
movq 0x38(%rsp), %rsi
movq 0x20(%rsi), %r8
movzbl 0x10(%rbx,%r13), %r10d
movzbl 0x10(%rsi), %r11d
subq $0x8, %rsp
movzbl 0x18(%rsp), %esi
movq 0x38(%rsp), %rdi
movl %ebp, %r9d
pushq $0x2
pushq (%rax)
pushq %r11
pushq %r10
pushq %r14
callq 0xa8e4
addq $0x30, %rsp
movl %r12d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq