// File: zeeev[P]DASVC/bamtools/src/toolkit/bamtools_convert.cpp
// Function: BamTools::ConvertPileupFormatVisitor::ConvertPileupFormatVisitor(std::vector<BamTools::RefData, std::allocator<BamTools::RefData>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, std::ostream*)
ConvertPileupFormatVisitor::ConvertPileupFormatVisitor(const RefVector& references, 
                                                       const string& fastaFilename,
                                                       const bool isPrintingMapQualities,
                                                       ostream* out)
    : PileupVisitor()
    , m_hasFasta(false)
    , m_isPrintingMapQualities(isPrintingMapQualities)
    , m_out(out)
    , m_references(references)
{ 
    // set up Fasta reader if file is provided
    if ( !fastaFilename.empty() ) {
      
        // check for FASTA index
        string indexFilename = "";
        if ( Utilities::FileExists(fastaFilename + ".fai") ) 
            indexFilename = fastaFilename + ".fai";
      
        // open FASTA file
        if ( m_fasta.Open(fastaFilename, indexFilename) ) 
            m_hasFasta = true;
    }
}

// Assembly:
subq $0xd8, %rsp
movb %cl, %al
movq %rdi, 0xd0(%rsp)
movq %rsi, 0xc8(%rsp)
movq %rdx, 0xc0(%rsp)
andb $0x1, %al
movb %al, 0xbf(%rsp)
movq %r8, 0xb0(%rsp)
movq 0xd0(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x926a0
movq 0x28(%rsp), %rdi
leaq 0xd45d8(%rip), %rax     # 0x164588
movq %rax, (%rdi)
addq $0x8, %rdi
movq %rdi, 0x30(%rsp)
callq 0x10c010
jmp 0x8ffc3
movq 0x28(%rsp), %rdi
movb $0x0, 0x10(%rdi)
movb 0xbf(%rsp), %al
andb $0x1, %al
movb %al, 0x11(%rdi)
movq 0xb0(%rsp), %rax
movq %rax, 0x18(%rdi)
addq $0x20, %rdi
movq %rdi, 0x20(%rsp)
movq 0xc8(%rsp), %rsi
callq 0x926c0
jmp 0x8fffc
movq 0xc0(%rsp), %rdi
callq 0x86c90
movb %al, 0x1f(%rsp)
jmp 0x9000f
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x901f9
jmp 0x9001d
leaq 0x7f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x86da0
movq 0x10(%rsp), %rdx
leaq 0xa4c3b(%rip), %rsi     # 0x134c73
leaq 0x80(%rsp), %rdi
callq 0x86a00
jmp 0x90047
leaq 0x7f(%rsp), %rdi
callq 0x867b0
movq 0xc0(%rsp), %rsi
leaq 0x9e779(%rip), %rdx     # 0x12e7d9
leaq 0x58(%rsp), %rdi
callq 0x927c0
jmp 0x9006c
leaq 0x58(%rsp), %rdi
callq 0x114d40
movb %al, 0xf(%rsp)
jmp 0x9007c
leaq 0x58(%rsp), %rdi
callq 0x86f68
jmp 0x90088
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x90095
jmp 0x901a0
movq 0xc0(%rsp), %rsi
leaq 0x9e735(%rip), %rdx     # 0x12e7d9
leaq 0x38(%rsp), %rdi
callq 0x927c0
jmp 0x900b0
leaq 0x80(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x86070
jmp 0x900c4
leaq 0x38(%rsp), %rdi
callq 0x86f68
jmp 0x900d0
jmp 0x901a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x9021d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x9020f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x90201
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x7f(%rsp), %rdi
callq 0x867b0
jmp 0x90201
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x901e8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x86f68
jmp 0x9017c
jmp 0x901e8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x86f68
jmp 0x9019e
jmp 0x901e8
movq 0x28(%rsp), %rdi
addq $0x8, %rdi
movq 0xc0(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0x10c1d0
movb %al, 0xe(%rsp)
jmp 0x901c4
movb 0xe(%rsp), %al
testb $0x1, %al
jne 0x901ce
jmp 0x901d7
movq 0x28(%rsp), %rax
movb $0x1, 0x10(%rax)
leaq 0x80(%rsp), %rdi
callq 0x86f68
jmp 0x901e6
jmp 0x901f9
leaq 0x80(%rsp), %rdi
callq 0x86f68
jmp 0x901f7
jmp 0x90201
addq $0xd8, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x91560
jmp 0x9020d
jmp 0x9020f
movq 0x30(%rsp), %rdi
callq 0x10c080
jmp 0x9021b
jmp 0x9021d
movq 0x28(%rsp), %rdi
callq 0x92e50
jmp 0x90229
jmp 0x9022b
movq 0xa8(%rsp), %rdi
callq 0x86d80
movq %rax, %rdi
callq 0x91290