// File: /workspace/github_c_makefile_star2_O3/jsh58[P]Genrich/Genrich.c
// Function: addHashDc
void addHashDc(Read* r, HashAln** table,
    uint32_t hashSize, bool dupsVerb,
    HashAln** tableSn, uint32_t hashSizeSn) {
  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);
      addToHash(a->chrom, b->chrom, pos, pos1, a->strand,
        b->strand, table, idx, dupsVerb ? r->name : NULL);

      // also add both alignments as singletons to hashtable
      if (tableSn != NULL && hashSizeSn) {
        if (! j)
          checkAndAdd(tableSn, hashSizeSn, a->chrom, pos,
            a->strand, dupsVerb ? r->name : NULL);
        if (! k)
          checkAndAdd(tableSn, hashSizeSn, b->chrom, pos1,
            b->strand, dupsVerb ? r->name : NULL);
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, 0xc(%rsp)
movq %r8, 0x20(%rsp)
movl %ecx, 0x10(%rsp)
movq %rdx, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movb 0x10(%rdi), %al
testb %al, %al
je 0xb198
movq %rdi, %r15
cmpq $0x0, 0x20(%rsp)
setne %cl
cmpl $0x0, 0xc(%rsp)
setne %dl
andb %cl, %dl
movb %dl, 0xb(%rsp)
movb 0x20(%rdi), %cl
movq $0x0, 0x18(%rsp)
movq %rdi, 0x38(%rsp)
testb %cl, %cl
je 0xb17d
movq 0x8(%r15), %rax
movq 0x18(%rsp), %rcx
leaq (%rcx,%rcx,4), %rcx
leaq (%rax,%rcx,8), %rcx
movzbl 0x10(%rcx), %eax
xorl $0x1, %eax
movq %rcx, 0x30(%rsp)
movl (%rcx,%rax,4), %eax
movl %eax, 0x14(%rsp)
xorl %ebx, %ebx
xorl %r14d, %r14d
movq 0x18(%r15), %rdx
leaq (%rdx,%rbx), %rax
movzbl 0x10(%rdx,%rbx), %r15d
movl %r15d, %ecx
xorl $0x1, %ecx
movl (%rax,%rcx,4), %ecx
movq 0x30(%rsp), %rax
movq 0x20(%rax), %r12
movq %rdx, 0x50(%rsp)
movq 0x20(%rdx,%rbx), %rbp
movb 0x10(%rax), %al
movzbl %al, %r13d
movq %r12, %rdi
movq %rbp, %rsi
movl 0x14(%rsp), %edx
movl %ecx, 0x2c(%rsp)
movl %r13d, %r8d
movl %r15d, %r9d
pushq 0x48(%rsp)
pushq $0x2
callq 0xa64f
addq $0x10, %rsp
cmpb $0x0, 0x10(%rsp)
je 0xb0bd
movq 0x38(%rsp), %rcx
movq (%rcx), %r10
jmp 0xb0c0
xorl %r10d, %r10d
subq $0x8, %rsp
movzbl %r15b, %r9d
movq %r12, %rdi
movq %rbp, %rsi
movl 0x1c(%rsp), %edx
movl 0x34(%rsp), %ebp
movl %ebp, %ecx
movl %r13d, %r8d
pushq %r10
pushq %rax
pushq 0x58(%rsp)
callq 0xa74a
addq $0x20, %rsp
cmpb $0x0, 0xb(%rsp)
movq 0x38(%rsp), %r15
je 0xb162
testq %rbx, %rbx
jne 0xb12b
cmpb $0x0, 0x10(%rsp)
je 0xb108
movq (%r15), %r9
jmp 0xb10b
xorl %r9d, %r9d
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rdx
movzbl 0x10(%rax), %r8d
movq 0x20(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x14(%rsp), %ecx
callq 0xa868
cmpq $0x0, 0x18(%rsp)
jne 0xb162
cmpb $0x0, 0x10(%rsp)
je 0xb13f
movq (%r15), %r9
jmp 0xb142
xorl %r9d, %r9d
movq 0x50(%rsp), %rax
movq 0x20(%rax,%rbx), %rdx
movzbl 0x10(%rax,%rbx), %r8d
movq 0x20(%rsp), %rdi
movl 0xc(%rsp), %esi
movl %ebp, %ecx
callq 0xa868
incq %r14
movzbl 0x20(%r15), %ecx
addq $0x28, %rbx
cmpq %rcx, %r14
jb 0xb058
movb 0x10(%r15), %al
jmp 0xb17f
xorl %ecx, %ecx
movq 0x18(%rsp), %rdi
incq %rdi
movzbl %al, %edx
movq %rdi, 0x18(%rsp)
cmpq %rdx, %rdi
jb 0xb027
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq