// File: /workspace/github_c_makefile_star2_O0/jsh58[P]Genrich/Genrich.c
// Function: checkHash
HashAln* checkHash(Chrom* chrom, Chrom* chrom1,
    uint32_t pos, uint32_t pos1, bool strand, bool strand1,
    int alignType, HashAln** table, uint32_t idx) {
  for (HashAln* h = table[idx]; h != NULL; h = h->next) {
    // check for match, based on alignment type
    switch (alignType) {
      case PAIRED:
        if (chrom == h->chrom && pos == h->pos
            && pos1 == h->pos1)
          return h;
        break;
      case SINGLE:
        if (chrom == h->chrom && pos == h->pos
            && strand == h->strand)
          return h;
        break;
      case DISCORD:
        if (chrom == h->chrom && chrom1 == h->chrom1
            && pos == h->pos && pos1 == h->pos1
            && strand == h->strand && strand1 == h->strand1)
          return h;
        break;
      default:
        exit(error("", ERRALNTYPE));
    }
  }
  return NULL;
}

// Assembly:
subq $0x48, %rsp
movl %r8d, 0x4(%rsp)
movl %ecx, %eax
movl 0x4(%rsp), %ecx
movl %eax, 0x8(%rsp)
movl %edx, %eax
movl 0x8(%rsp), %edx
movl %eax, 0xc(%rsp)
movq %rsi, %rax
movl 0xc(%rsp), %esi
movq %rax, 0x10(%rsp)
movq %rdi, %r8
movq 0x10(%rsp), %rdi
movb %r9b, %al
movl 0x60(%rsp), %r9d
movq 0x58(%rsp), %r9
movl 0x50(%rsp), %r9d
movq %r8, 0x38(%rsp)
movq %rdi, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movl %edx, 0x28(%rsp)
andb $0x1, %cl
movb %cl, 0x27(%rsp)
andb $0x1, %al
movb %al, 0x26(%rsp)
movq 0x58(%rsp), %rax
movl 0x60(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0xfa32
movl 0x50(%rsp), %eax
movl %eax, (%rsp)
testl %eax, %eax
je 0xf8f8
jmp 0xf8dd
movl (%rsp), %eax
subl $0x1, %eax
je 0xf938
jmp 0xf8e7
movl (%rsp), %eax
subl $0x2, %eax
je 0xf985
jmp 0xfa05
movq 0x38(%rsp), %rax
movq 0x18(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jne 0xf933
movl 0x2c(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl 0x18(%rcx), %eax
jne 0xf933
movl 0x28(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl 0x1c(%rcx), %eax
jne 0xf933
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0xfa3b
jmp 0xfa1d
movq 0x38(%rsp), %rax
movq 0x18(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jne 0xf980
movl 0x2c(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl 0x18(%rcx), %eax
jne 0xf980
movb 0x27(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movq 0x18(%rsp), %rcx
movb 0x20(%rcx), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0xf980
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0xfa3b
jmp 0xfa1d
movq 0x38(%rsp), %rax
movq 0x18(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jne 0xfa03
movq 0x30(%rsp), %rax
movq 0x18(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jne 0xfa03
movl 0x2c(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl 0x18(%rcx), %eax
jne 0xfa03
movl 0x28(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl 0x1c(%rcx), %eax
jne 0xfa03
movb 0x27(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movq 0x18(%rsp), %rcx
movb 0x20(%rcx), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0xfa03
movb 0x26(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movq 0x18(%rsp), %rcx
movb 0x21(%rcx), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0xfa03
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0xfa3b
jmp 0xfa1d
leaq 0x10366(%rip), %rdi     # 0x1fd72
movl $0x28, %esi
callq 0x2840
movl %eax, %edi
callq 0x22b0
jmp 0xfa1f
movq 0x18(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x18(%rsp)
jmp 0xf8c4
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)