// File: /workspace/github_c_makefile_star2_O1/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)
cmpb $0x0, 0x10(%rdi)
je 0xaf70
movq %rdi, %rbx
cmpq $0x0, 0x20(%rsp)
setne %al
cmpl $0x0, 0xc(%rsp)
setne %cl
andb %al, %cl
movb %cl, 0xb(%rsp)
movq $0x0, 0x18(%rsp)
movq %rdi, 0x38(%rsp)
cmpb $0x0, 0x20(%rbx)
je 0xaf56
movq 0x8(%rbx), %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 %r13d, %r13d
xorl %r14d, %r14d
movq 0x18(%rbx), %rdx
leaq (%rdx,%r13), %rax
movzbl 0x10(%rdx,%r13), %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,%r13), %rbp
movb 0x10(%rax), %al
movzbl %al, %ebx
movq %r12, %rdi
movq %rbp, %rsi
movl 0x14(%rsp), %edx
movl %ecx, 0x2c(%rsp)
movl %ebx, %r8d
movl %r15d, %r9d
pushq 0x48(%rsp)
pushq $0x2
callq 0xa4cd
addq $0x10, %rsp
cmpb $0x0, 0x10(%rsp)
je 0xae9d
movq 0x38(%rsp), %rcx
movq (%rcx), %r10
jmp 0xaea0
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 %ebx, %r8d
pushq %r10
pushq %rax
pushq 0x58(%rsp)
callq 0xa5c2
addq $0x20, %rsp
cmpb $0x0, 0xb(%rsp)
movq 0x38(%rsp), %rbx
je 0xaf42
testq %r13, %r13
jne 0xaf0b
cmpb $0x0, 0x10(%rsp)
je 0xaee8
movq (%rbx), %r9
jmp 0xaeeb
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 0xa6de
cmpq $0x0, 0x18(%rsp)
jne 0xaf42
cmpb $0x0, 0x10(%rsp)
je 0xaf1f
movq (%rbx), %r9
jmp 0xaf22
xorl %r9d, %r9d
movq 0x50(%rsp), %rax
movq 0x20(%rax,%r13), %rdx
movzbl 0x10(%rax,%r13), %r8d
movq 0x20(%rsp), %rdi
movl 0xc(%rsp), %esi
movl %ebp, %ecx
callq 0xa6de
incq %r14
movzbl 0x20(%rbx), %eax
addq $0x28, %r13
cmpq %rax, %r14
jb 0xae39
movq 0x18(%rsp), %rdx
incq %rdx
movzbl 0x10(%rbx), %eax
movq %rdx, 0x18(%rsp)
cmpq %rax, %rdx
jb 0xae05
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq