// File: /workspace/github_cpp_makefile_star2_O1/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 0x16d74
movq 0x8(%r14), %rcx
cmpl 0xbc(%rcx), %eax
je 0x11228
movq (%r14), %r12
movl 0xb8(%r12), %eax
cmpl 0xb8(%rcx), %eax
jne 0x11225
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x284ad(%rip), %rsi     # 0x39029
leaq 0x284a8(%rip), %rdx     # 0x3902b
leaq 0x10(%rsp), %rdi
callq 0xbe08
cmpb $0x0, 0x140(%r12)
jne 0x10c23
movq 0xa0(%r12), %rax
testq %rax, %rax
je 0x10c23
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 0x1693a
testb %al, %al
je 0x10c23
movq (%rsp), %rsi
movzbl -0x1(%rsi), %eax
cmpl $0x68, %eax
jg 0x10bfd
movl $0x1, %edx
cmpl $0x41, %eax
je 0x10c13
cmpl $0x63, %eax
je 0x10c13
jmp 0x10c23
cmpl $0x69, %eax
je 0x10c0e
cmpl $0x73, %eax
jne 0x10c23
movl $0x2, %edx
jmp 0x10c13
movl $0x4, %edx
leaq 0x4c(%rsp), %rdi
movl $0x0, (%rdi)
callq 0x5380
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x10c3a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x8(%r14), %r12
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x283d3(%rip), %rsi     # 0x39020
leaq 0x283ce(%rip), %rdx     # 0x39022
callq 0xbe08
cmpb $0x0, 0x140(%r12)
jne 0x10cef
movq 0xa0(%r12), %rax
testq %rax, %rax
je 0x10cef
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 0x1693a
testb %al, %al
je 0x10cef
movq (%rsp), %rsi
movzbl -0x1(%rsi), %eax
cmpl $0x68, %eax
jg 0x10cc9
movl $0x1, %edx
cmpl $0x41, %eax
je 0x10cdf
cmpl $0x63, %eax
je 0x10cdf
jmp 0x10cef
cmpl $0x69, %eax
je 0x10cda
cmpl $0x73, %eax
jne 0x10cef
movl $0x2, %edx
jmp 0x10cdf
movl $0x4, %edx
leaq 0x48(%rsp), %rdi
movl $0x0, (%rdi)
callq 0x5380
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x10d06
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5470
movq (%r14), %r12
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x2834b(%rip), %rsi     # 0x39063
leaq 0x28346(%rip), %rdx     # 0x39065
callq 0xbe08
cmpb $0x0, 0x140(%r12)
jne 0x10dba
movq 0xa0(%r12), %rax
testq %rax, %rax
je 0x10dba
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 0x1693a
testb %al, %al
je 0x10dba
movq (%rsp), %rsi
movzbl -0x1(%rsi), %eax
cmpl $0x68, %eax
jg 0x10d94
movl $0x1, %edx
cmpl $0x41, %eax
je 0x10daa
cmpl $0x63, %eax
je 0x10daa
jmp 0x10dba
cmpl $0x69, %eax
je 0x10da5
cmpl $0x73, %eax
jne 0x10dba
movl $0x2, %edx
jmp 0x10daa
movl $0x4, %edx
leaq 0x44(%rsp), %rdi
movl $0x0, (%rdi)
callq 0x5380
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x10dd1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x8(%r14), %r12
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x2827f(%rip), %rsi     # 0x39063
leaq 0x2827a(%rip), %rdx     # 0x39065
callq 0xbe08
cmpb $0x0, 0x140(%r12)
jne 0x10e86
movq 0xa0(%r12), %rax
testq %rax, %rax
je 0x10e86
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 0x1693a
testb %al, %al
je 0x10e86
movq (%rsp), %rsi
movzbl -0x1(%rsi), %eax
cmpl $0x68, %eax
jg 0x10e60
movl $0x1, %edx
cmpl $0x41, %eax
je 0x10e76
cmpl $0x63, %eax
je 0x10e76
jmp 0x10e86
cmpl $0x69, %eax
je 0x10e71
cmpl $0x73, %eax
jne 0x10e86
movl $0x2, %edx
jmp 0x10e76
movl $0x4, %edx
leaq 0x40(%rsp), %rdi
movl $0x0, (%rdi)
callq 0x5380
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x10e9d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5470
movq (%r14), %r12
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x28207(%rip), %rsi     # 0x390b6
leaq 0x28202(%rip), %rdx     # 0x390b8
callq 0xbe08
cmpb $0x0, 0x140(%r12)
jne 0x10f74
movq 0xa0(%r12), %rax
testq %rax, %rax
je 0x10f74
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 0x1693a
testb %al, %al
je 0x10f74
movq (%rsp), %rsi
movzbl -0x1(%rsi), %eax
addl $-0x41, %eax
cmpl $0x32, %eax
ja 0x10f74
movabsq $0x400000005, %rcx      # imm = 0x400000005
btq %rax, %rcx
jb 0x10f48
movabsq $0x12000000100, %rcx    # imm = 0x12000000100
btq %rax, %rcx
jae 0x10f4f
movl $0x4, %edx
jmp 0x10f64
movl $0x1, %edx
jmp 0x10f64
movabsq $0x4000000040000, %rcx  # imm = 0x4000000040000
btq %rax, %rcx
jae 0x10f74
movl $0x2, %edx
leaq 0x3c(%rsp), %rdi
movl $0x0, (%rdi)
callq 0x5380
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x10f8b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x8(%r14), %r12
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x28118(%rip), %rsi     # 0x390b6
leaq 0x28113(%rip), %rdx     # 0x390b8
callq 0xbe08
cmpb $0x0, 0x140(%r12)
jne 0x11063
movq 0xa0(%r12), %rax
testq %rax, %rax
je 0x11063
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 0x1693a
testb %al, %al
je 0x11063
movq (%rsp), %rsi
movzbl -0x1(%rsi), %eax
addl $-0x41, %eax
cmpl $0x32, %eax
ja 0x11063
movabsq $0x400000005, %rcx      # imm = 0x400000005
btq %rax, %rcx
jb 0x11037
movabsq $0x12000000100, %rcx    # imm = 0x12000000100
btq %rax, %rcx
jae 0x1103e
movl $0x4, %edx
jmp 0x11053
movl $0x1, %edx
jmp 0x11053
movabsq $0x4000000040000, %rcx  # imm = 0x4000000040000
btq %rax, %rcx
jae 0x11063
movl $0x2, %edx
leaq 0x38(%rsp), %rdi
movl $0x0, (%rdi)
callq 0x5380
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x1107a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5470
movq (%r14), %r12
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x27f9a(%rip), %rsi     # 0x39026
leaq 0x27f95(%rip), %rdx     # 0x39028
callq 0xbe08
cmpb $0x0, 0x140(%r12)
jne 0x1112e
movq 0xa0(%r12), %rax
testq %rax, %rax
je 0x1112e
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 0x1693a
testb %al, %al
je 0x1112e
movq (%rsp), %rsi
movzbl -0x1(%rsi), %eax
cmpl $0x68, %eax
jg 0x11108
movl $0x1, %edx
cmpl $0x41, %eax
je 0x1111e
cmpl $0x63, %eax
je 0x1111e
jmp 0x1112e
cmpl $0x69, %eax
je 0x11119
cmpl $0x73, %eax
jne 0x1112e
movl $0x2, %edx
jmp 0x1111e
movl $0x4, %edx
leaq 0x34(%rsp), %rdi
movl $0x0, (%rdi)
callq 0x5380
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x11145
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x8(%r14), %r12
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x27ece(%rip), %rsi     # 0x39026
leaq 0x27ec9(%rip), %rdx     # 0x39028
callq 0xbe08
cmpb $0x0, 0x140(%r12)
jne 0x111fa
movq 0xa0(%r12), %rax
testq %rax, %rax
je 0x111fa
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 0x1693a
testb %al, %al
je 0x111fa
movq (%rsp), %rsi
movzbl -0x1(%rsi), %eax
cmpl $0x68, %eax
jg 0x111d4
movl $0x1, %edx
cmpl $0x41, %eax
je 0x111ea
cmpl $0x63, %eax
je 0x111ea
jmp 0x111fa
cmpl $0x69, %eax
je 0x111e5
cmpl $0x73, %eax
jne 0x111fa
movl $0x2, %edx
jmp 0x111ea
movl $0x4, %edx
leaq 0x30(%rsp), %rdi
movl $0x0, (%rdi)
callq 0x5380
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x11211
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 0x1123a
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 %esi, %esi
xorl %edx, %edx
callq 0x16d74
subl %eax, %ebx
movl %ebx, %ebp
negl %ebp
cmovsl %ebx, %ebp
cmpl $0x14, %ebp
setae %r12b
jb 0x11228
movq %r15, 0x50(%rsp)
movq %r13, %r15
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq 0x3ed4d(%rip), %rdi     # 0x4ffd0
callq 0x54f0
movq %rax, %r13
leaq 0x285d7(%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 0x16d74
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 0x27fb5(%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 0x27f6f(%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 0xbd78
movq (%r14), %rdi
addq $0x10, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x16d74
leaq 0x10(%rsp), %rdi
leaq 0x58(%rsp), %rdx
movq 0x50(%rsp), %rsi
movl %eax, %ecx
movl %ebp, %r8d
callq 0x14010
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 0x114c2
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x114d9
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5470
movb $0x1, %r12b
jmp 0x11228
jmp 0x114ef
jmp 0x114ef
jmp 0x114ef
jmp 0x114ef
jmp 0x114ef
jmp 0x114ef
jmp 0x114ef
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x1154c
movq 0x20(%rsp), %rsi
jmp 0x11531
movq %rax, %rbx
jmp 0x11522
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x11522
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5470
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x1154c
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5470
jmp 0x1154c
jmp 0x11549
jmp 0x11549
jmp 0x11549
jmp 0x11549
jmp 0x11549
jmp 0x11549
jmp 0x11549
movq %rax, %rbx
movq %rbx, %rdi
callq 0x57b0