// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/src/varcall.cpp
// Function: largeDeletionPrint(std::__cxx11::list<BamTools::BamAlignment, std::allocator<BamTools::BamAlignment>>&, FastaReference&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool largeDeletionPrint(std::list<BamAlignment> & twoReads,
                        FastaReference & targetFasta,
                        std::string & refName ){

    if(twoReads.front().GetEndPosition() == twoReads.back().Position){
        return false;
    }

    if(twoReads.front().RefID != twoReads.back().RefID){
        return false;
    }

    /* start and end of the SV relative to query */

    int qStart ;
    int qEnd   ;

    int alA ;
    int alB ;

    float pctA;
    float pctB;

    int mbA;
    int mbB;


    twoReads.front().GetTag<int>("QE", qStart);
    twoReads.back().GetTag<int>("QS", qEnd);

    twoReads.front().GetTag<int>("AI", alA);
    twoReads.back().GetTag<int>("AI", alB);

    twoReads.front().GetTag<float>("PI", pctA);
    twoReads.back().GetTag<float>("PI", pctB);

    twoReads.front().GetTag<int>("MB", mbA);
    twoReads.back().GetTag<int>("MB", mbB);


    if(abs(alA - alB) > 1){
        return false;
    }

    int deletionL = abs( twoReads.back().Position -
                         twoReads.front().GetEndPosition());

    if(deletionL < 20){
        return false;
    }

    std::cout << refName
              << "\t" << twoReads.front().GetEndPosition()
              << "\t" << twoReads.back().Position
              << "\t" << "DEL:BETWEEN"
              << "\t" << deletionL
              << "\t" << pctA << "," << pctB
              << "\t" << mbA << "," << mbB
              << "\t" << twoReads.front().Name
              << "\t" << qStart
              << "\t" << qEnd
              << "\t" << targetFasta.getSubSequence(refName,
                                                   twoReads.front().GetEndPosition(),
                                                    deletionL) << std::endl;


    return true;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r14
movq (%rdi), %rdi
addq $0x10, %rdi
xorl %r12d, %r12d
xorl %esi, %esi
xorl %edx, %edx
callq 0x16c2c
movq 0x8(%r14), %rcx
cmpl 0xbc(%rcx), %eax
je 0x11130
movq (%r14), %r12
movl 0xb8(%r12), %eax
cmpl 0xb8(%rcx), %eax
jne 0x1112d
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x285a5(%rip), %rsi     # 0x39029
leaq 0x285a0(%rip), %rdx     # 0x3902b
leaq 0x10(%rsp), %rdi
callq 0xbdac
cmpb $0x0, 0x140(%r12)
jne 0x10b2b
movq 0xa0(%r12), %rax
testq %rax, %rax
je 0x10b2b
movq 0x98(%r12), %rcx
addq $0x10, %r12
movq %rsp, %rdx
movq %rcx, (%rdx)
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x8(%rsp), %r8
movl $0x0, (%r8)
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x16804
testb %al, %al
je 0x10b2b
movq (%rsp), %rsi
movzbl -0x1(%rsi), %eax
cmpl $0x68, %eax
jg 0x10b05
movl $0x1, %edx
cmpl $0x41, %eax
je 0x10b1b
cmpl $0x63, %eax
je 0x10b1b
jmp 0x10b2b
cmpl $0x69, %eax
je 0x10b16
cmpl $0x73, %eax
jne 0x10b2b
movl $0x2, %edx
jmp 0x10b1b
movl $0x4, %edx
leaq 0x4c(%rsp), %rdi
movl $0x0, (%rdi)
callq 0x5380
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x10b42
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x8(%r14), %r12
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x284cb(%rip), %rsi     # 0x39020
leaq 0x284c6(%rip), %rdx     # 0x39022
callq 0xbdac
cmpb $0x0, 0x140(%r12)
jne 0x10bf7
movq 0xa0(%r12), %rax
testq %rax, %rax
je 0x10bf7
movq 0x98(%r12), %rcx
addq $0x10, %r12
movq %rsp, %rdx
movq %rcx, (%rdx)
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x8(%rsp), %r8
movl $0x0, (%r8)
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x16804
testb %al, %al
je 0x10bf7
movq (%rsp), %rsi
movzbl -0x1(%rsi), %eax
cmpl $0x68, %eax
jg 0x10bd1
movl $0x1, %edx
cmpl $0x41, %eax
je 0x10be7
cmpl $0x63, %eax
je 0x10be7
jmp 0x10bf7
cmpl $0x69, %eax
je 0x10be2
cmpl $0x73, %eax
jne 0x10bf7
movl $0x2, %edx
jmp 0x10be7
movl $0x4, %edx
leaq 0x48(%rsp), %rdi
movl $0x0, (%rdi)
callq 0x5380
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x10c0e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5470
movq (%r14), %r12
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x28443(%rip), %rsi     # 0x39063
leaq 0x2843e(%rip), %rdx     # 0x39065
callq 0xbdac
cmpb $0x0, 0x140(%r12)
jne 0x10cc2
movq 0xa0(%r12), %rax
testq %rax, %rax
je 0x10cc2
movq 0x98(%r12), %rcx
addq $0x10, %r12
movq %rsp, %rdx
movq %rcx, (%rdx)
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x8(%rsp), %r8
movl $0x0, (%r8)
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x16804
testb %al, %al
je 0x10cc2
movq (%rsp), %rsi
movzbl -0x1(%rsi), %eax
cmpl $0x68, %eax
jg 0x10c9c
movl $0x1, %edx
cmpl $0x41, %eax
je 0x10cb2
cmpl $0x63, %eax
je 0x10cb2
jmp 0x10cc2
cmpl $0x69, %eax
je 0x10cad
cmpl $0x73, %eax
jne 0x10cc2
movl $0x2, %edx
jmp 0x10cb2
movl $0x4, %edx
leaq 0x44(%rsp), %rdi
movl $0x0, (%rdi)
callq 0x5380
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x10cd9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x8(%r14), %r12
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x28377(%rip), %rsi     # 0x39063
leaq 0x28372(%rip), %rdx     # 0x39065
callq 0xbdac
cmpb $0x0, 0x140(%r12)
jne 0x10d8e
movq 0xa0(%r12), %rax
testq %rax, %rax
je 0x10d8e
movq 0x98(%r12), %rcx
addq $0x10, %r12
movq %rsp, %rdx
movq %rcx, (%rdx)
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x8(%rsp), %r8
movl $0x0, (%r8)
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x16804
testb %al, %al
je 0x10d8e
movq (%rsp), %rsi
movzbl -0x1(%rsi), %eax
cmpl $0x68, %eax
jg 0x10d68
movl $0x1, %edx
cmpl $0x41, %eax
je 0x10d7e
cmpl $0x63, %eax
je 0x10d7e
jmp 0x10d8e
cmpl $0x69, %eax
je 0x10d79
cmpl $0x73, %eax
jne 0x10d8e
movl $0x2, %edx
jmp 0x10d7e
movl $0x4, %edx
leaq 0x40(%rsp), %rdi
movl $0x0, (%rdi)
callq 0x5380
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x10da5
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5470
movq (%r14), %r12
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x282ff(%rip), %rsi     # 0x390b6
leaq 0x282fa(%rip), %rdx     # 0x390b8
callq 0xbdac
cmpb $0x0, 0x140(%r12)
jne 0x10e7c
movq 0xa0(%r12), %rax
testq %rax, %rax
je 0x10e7c
movq 0x98(%r12), %rcx
addq $0x10, %r12
movq %rsp, %rdx
movq %rcx, (%rdx)
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x8(%rsp), %r8
movl $0x0, (%r8)
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x16804
testb %al, %al
je 0x10e7c
movq (%rsp), %rsi
movzbl -0x1(%rsi), %eax
addl $-0x41, %eax
cmpl $0x32, %eax
ja 0x10e7c
movabsq $0x400000005, %rcx      # imm = 0x400000005
btq %rax, %rcx
jb 0x10e50
movabsq $0x12000000100, %rcx    # imm = 0x12000000100
btq %rax, %rcx
jae 0x10e57
movl $0x4, %edx
jmp 0x10e6c
movl $0x1, %edx
jmp 0x10e6c
movabsq $0x4000000040000, %rcx  # imm = 0x4000000040000
btq %rax, %rcx
jae 0x10e7c
movl $0x2, %edx
leaq 0x3c(%rsp), %rdi
movl $0x0, (%rdi)
callq 0x5380
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x10e93
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x8(%r14), %r12
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x28210(%rip), %rsi     # 0x390b6
leaq 0x2820b(%rip), %rdx     # 0x390b8
callq 0xbdac
cmpb $0x0, 0x140(%r12)
jne 0x10f6b
movq 0xa0(%r12), %rax
testq %rax, %rax
je 0x10f6b
movq 0x98(%r12), %rcx
addq $0x10, %r12
movq %rsp, %rdx
movq %rcx, (%rdx)
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x8(%rsp), %r8
movl $0x0, (%r8)
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x16804
testb %al, %al
je 0x10f6b
movq (%rsp), %rsi
movzbl -0x1(%rsi), %eax
addl $-0x41, %eax
cmpl $0x32, %eax
ja 0x10f6b
movabsq $0x400000005, %rcx      # imm = 0x400000005
btq %rax, %rcx
jb 0x10f3f
movabsq $0x12000000100, %rcx    # imm = 0x12000000100
btq %rax, %rcx
jae 0x10f46
movl $0x4, %edx
jmp 0x10f5b
movl $0x1, %edx
jmp 0x10f5b
movabsq $0x4000000040000, %rcx  # imm = 0x4000000040000
btq %rax, %rcx
jae 0x10f6b
movl $0x2, %edx
leaq 0x38(%rsp), %rdi
movl $0x0, (%rdi)
callq 0x5380
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x10f82
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5470
movq (%r14), %r12
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x28092(%rip), %rsi     # 0x39026
leaq 0x2808d(%rip), %rdx     # 0x39028
callq 0xbdac
cmpb $0x0, 0x140(%r12)
jne 0x11036
movq 0xa0(%r12), %rax
testq %rax, %rax
je 0x11036
movq 0x98(%r12), %rcx
addq $0x10, %r12
movq %rsp, %rdx
movq %rcx, (%rdx)
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x8(%rsp), %r8
movl $0x0, (%r8)
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x16804
testb %al, %al
je 0x11036
movq (%rsp), %rsi
movzbl -0x1(%rsi), %eax
cmpl $0x68, %eax
jg 0x11010
movl $0x1, %edx
cmpl $0x41, %eax
je 0x11026
cmpl $0x63, %eax
je 0x11026
jmp 0x11036
cmpl $0x69, %eax
je 0x11021
cmpl $0x73, %eax
jne 0x11036
movl $0x2, %edx
jmp 0x11026
movl $0x4, %edx
leaq 0x34(%rsp), %rdi
movl $0x0, (%rdi)
callq 0x5380
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x1104d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x8(%r14), %r12
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x27fc6(%rip), %rsi     # 0x39026
leaq 0x27fc1(%rip), %rdx     # 0x39028
callq 0xbdac
cmpb $0x0, 0x140(%r12)
jne 0x11102
movq 0xa0(%r12), %rax
testq %rax, %rax
je 0x11102
movq 0x98(%r12), %rcx
addq $0x10, %r12
movq %rsp, %rdx
movq %rcx, (%rdx)
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x8(%rsp), %r8
movl $0x0, (%r8)
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x16804
testb %al, %al
je 0x11102
movq (%rsp), %rsi
movzbl -0x1(%rsi), %eax
cmpl $0x68, %eax
jg 0x110dc
movl $0x1, %edx
cmpl $0x41, %eax
je 0x110f2
cmpl $0x63, %eax
je 0x110f2
jmp 0x11102
cmpl $0x69, %eax
je 0x110ed
cmpl $0x73, %eax
jne 0x11102
movl $0x2, %edx
jmp 0x110f2
movl $0x4, %edx
leaq 0x30(%rsp), %rdi
movl $0x0, (%rdi)
callq 0x5380
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x11119
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5470
movl 0x44(%rsp), %eax
subl 0x40(%rsp), %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cmpl $0x1, %ecx
jbe 0x11142
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %r15
movq %rbx, %r13
movq (%r14), %rdi
movq 0x8(%r14), %rax
movl 0xbc(%rax), %ebx
addq $0x10, %rdi
xorl %r12d, %r12d
xorl %esi, %esi
xorl %edx, %edx
callq 0x16c2c
subl %eax, %ebx
movl %ebx, %ebp
negl %ebp
cmovsl %ebx, %ebp
cmpl $0x14, %ebp
jb 0x11130
movq %r15, 0x50(%rsp)
movq %r13, %r15
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq 0x3ee46(%rip), %rdi     # 0x4ffd0
callq 0x54f0
movq %rax, %r13
leaq 0x286d0(%rip), %r12     # 0x39869
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x54f0
movq (%r14), %rdi
addq $0x10, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x16c2c
movq %r13, %rdi
movl %eax, %esi
callq 0x5780
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x54f0
movq 0x8(%r14), %rax
movl 0xbc(%rax), %esi
movq %r13, %rdi
callq 0x5780
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x54f0
leaq 0x280ae(%rip), %rsi     # 0x392b0
movl $0xb, %edx
movq %r13, %rdi
callq 0x54f0
movl $0x1, %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x54f0
movq %r13, %rdi
movl %ebp, %esi
callq 0x5780
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x54f0
cvtss2sd 0x3c(%rsp), %xmm0
movq %r13, %rdi
callq 0x56e0
movq %rax, %rbx
leaq 0x28068(%rip), %r13     # 0x392bc
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x54f0
xorps %xmm0, %xmm0
cvtss2sd 0x38(%rsp), %xmm0
movq %rbx, %rdi
callq 0x56e0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x54f0
movl 0x34(%rsp), %esi
movq %rbx, %rdi
callq 0x5780
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x54f0
movl 0x30(%rsp), %esi
movq %rbx, %rdi
callq 0x5780
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x54f0
movq (%r14), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movq %rbx, %rdi
callq 0x54f0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x54f0
movl 0x4c(%rsp), %esi
movq %rbx, %rdi
callq 0x5780
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x54f0
movl 0x48(%rsp), %esi
movq %rbx, %rdi
callq 0x5780
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x54f0
leaq 0x68(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %rdi
callq 0xbd16
movq (%r14), %rdi
addq $0x10, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x16c2c
leaq 0x10(%rsp), %rdi
leaq 0x58(%rsp), %rdx
movq 0x50(%rsp), %rsi
movl %eax, %ecx
movl %ebp, %r8d
callq 0x13efa
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r13, %rdi
leaq 0x20(%rsp), %r14
callq 0x54f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5430
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52e0
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x113c9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x113e0
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5470
movb $0x1, %r12b
jmp 0x11130
jmp 0x113f6
jmp 0x113f6
jmp 0x113f6
jmp 0x113f6
jmp 0x113f6
jmp 0x113f6
jmp 0x113f6
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x11453
movq 0x20(%rsp), %rsi
jmp 0x11438
movq %rax, %rbx
jmp 0x11429
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x11429
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x11453
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5470
jmp 0x11453
jmp 0x11450
jmp 0x11450
jmp 0x11450
jmp 0x11450
jmp 0x11450
jmp 0x11450
jmp 0x11450
movq %rax, %rbx
movq %rbx, %rdi
callq 0x57b0