// File: /workspace/github_c_makefile_star2_O0/jsh58[P]Genrich/Genrich.c
// Function: saveAlns
void saveAlns(char* qname, Aln* aln, int alnLen, bool pair,
    bool singleOpt, bool singleR1, bool singleR2,
    float scorePr, float scoreR1, float scoreR2,
    float asDiff, Read*** readPr, int* readIdxPr,
    int* readLenPr, int* readMemPr, Read*** readDc,
    int* readIdxDc, int* readLenDc, int* readMemDc,
    Read*** readSn, int* readIdxSn, int* readLenSn,
    int* readMemSn, uint16_t qualR1, uint16_t qualR2) {
  if (pair) {
    // properly paired alignment(s)
    Read* r = createRead(readPr, readIdxPr, readLenPr,
      readMemPr);
    saveAlnsPair(qname, aln, alnLen, scorePr, asDiff, r,
      qualR1, qualR2);
  } else if (singleOpt) {
    if (singleR1 && singleR2) {
      // both reads aligned (discordant)
      Read* r = createRead(readDc, readIdxDc, readLenDc,
        readMemDc);
      saveAlnsDiscord(qname, aln, alnLen, scoreR1,
        scoreR2, asDiff, r, qualR1, qualR2);
    } else if (singleR1) {
      // only R1 read aligned
      Read* r = createRead(readSn, readIdxSn, readLenSn,
        readMemSn);
      saveAlnsSingle(qname, aln, alnLen, scoreR1, asDiff,
        true, r, qualR1);
    } else if (singleR2) {
      // only R2 read aligned
      Read* r = createRead(readSn, readIdxSn, readLenSn,
        readMemSn);
      saveAlnsSingle(qname, aln, alnLen, scoreR2, asDiff,
        false, r, qualR2);
    }
  }
}

// Assembly:
subq $0x58, %rsp
movl %r9d, 0x4(%rsp)
movl %r8d, 0x8(%rsp)
movl %ecx, %eax
movl 0x4(%rsp), %ecx
movl %edx, %r8d
movl 0x8(%rsp), %edx
movl %r8d, 0xc(%rsp)
movq %rsi, %r8
movq %rdi, %r9
movl 0xc(%rsp), %edi
movb %al, %sil
movw 0xd0(%rsp), %ax
movw 0xc8(%rsp), %ax
movq 0xc0(%rsp), %rax
movq 0xb8(%rsp), %rax
movq 0xb0(%rsp), %rax
movq 0xa8(%rsp), %rax
movq 0xa0(%rsp), %rax
movq 0x98(%rsp), %rax
movq 0x90(%rsp), %rax
movq 0x88(%rsp), %rax
movq 0x80(%rsp), %rax
movq 0x78(%rsp), %rax
movq 0x70(%rsp), %rax
movq 0x68(%rsp), %rax
movb 0x60(%rsp), %al
movq %r9, 0x50(%rsp)
movq %r8, 0x48(%rsp)
movl %edi, 0x44(%rsp)
andb $0x1, %sil
movb %sil, 0x43(%rsp)
andb $0x1, %dl
movb %dl, 0x42(%rsp)
andb $0x1, %cl
movb %cl, 0x41(%rsp)
andb $0x1, %al
movb %al, 0x40(%rsp)
movss %xmm0, 0x3c(%rsp)
movss %xmm1, 0x38(%rsp)
movss %xmm2, 0x34(%rsp)
movss %xmm3, 0x30(%rsp)
testb $0x1, 0x43(%rsp)
je 0xd481
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x80(%rsp), %rcx
callq 0xcac0
movq %rax, 0x28(%rsp)
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x44(%rsp), %edx
movss 0x3c(%rsp), %xmm0
movss 0x30(%rsp), %xmm1
movq 0x28(%rsp), %rcx
movw 0xc8(%rsp), %ax
movzwl %ax, %r8d
movzwl 0xd0(%rsp), %r9d
callq 0xd060
jmp 0xd5d5
testb $0x1, 0x42(%rsp)
je 0xd5d3
testb $0x1, 0x41(%rsp)
je 0xd508
testb $0x1, 0x40(%rsp)
je 0xd508
movq 0x88(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
movq 0xa0(%rsp), %rcx
callq 0xcac0
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x44(%rsp), %edx
movss 0x38(%rsp), %xmm0
movss 0x34(%rsp), %xmm1
movss 0x30(%rsp), %xmm2
movq 0x20(%rsp), %rcx
movw 0xc8(%rsp), %ax
movzwl %ax, %r8d
movzwl 0xd0(%rsp), %r9d
callq 0xcf40
jmp 0xd5d1
testb $0x1, 0x41(%rsp)
je 0xd56d
movq 0xa8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movq 0xb8(%rsp), %rdx
movq 0xc0(%rsp), %rcx
callq 0xcac0
movq %rax, 0x18(%rsp)
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x44(%rsp), %edx
movss 0x38(%rsp), %xmm0
movss 0x30(%rsp), %xmm1
movq 0x18(%rsp), %r8
movl $0x1, %ecx
movzwl 0xc8(%rsp), %r9d
callq 0xce70
jmp 0xd5cf
testb $0x1, 0x40(%rsp)
je 0xd5cd
movq 0xa8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movq 0xb8(%rsp), %rdx
movq 0xc0(%rsp), %rcx
callq 0xcac0
movq %rax, 0x10(%rsp)
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x44(%rsp), %edx
movss 0x34(%rsp), %xmm0
movss 0x30(%rsp), %xmm1
movq 0x10(%rsp), %r8
xorl %ecx, %ecx
movzwl 0xd0(%rsp), %r9d
callq 0xce70
jmp 0xd5cf
jmp 0xd5d1
jmp 0xd5d3
jmp 0xd5d5
addq $0x58, %rsp
retq
nopw (%rax,%rax)