// File: /workspace/github_cpp_makefile_star2_O1/giovannarosone[P]BCR_LCP_GSA/BCR_BWTCollection.cpp
// Function: main
int main(int argc, char *argv[])
{

    string inputPrevBCR="";
    #if BUILD_BCR_FROM_BCRpartials==0
        if( argc != 3 )  {
            std::cerr << "usage: " << argv[0] << " input output" << std::endl;
            exit(1);
        }
    #elif BUILD_BCR_FROM_BCRpartials==1
        if( argc != 4 )  {
            std::cerr << "usage: " << argv[0] << " input output inputPrevBCR" << std::endl;
            std::cerr << "where: " << std::endl;
            std::cerr << "\tinputPrevBCR --> prefix filename BCR partial files" << std::endl;
            exit(1);
        }
        inputPrevBCR = argv[3];
        std::cerr << "WARNING!: BUILD_BCR_FROM_BCRpartials==1 - The types must be equal to previous BCR partial files (see BUILD_BCR_FROM_BCRpartials in Parameters.h)" << endl;
    #endif
    
	
	std::cout << "BWTCollection: The input is " << argv[1] << std::endl;
	ifstream f(argv[1]);
    	if (f.good() == 0) {
		std::cerr  << argv[1] << " does not exist." << std::endl;
        	exit(1);
	} 
	std::cout << "BWTCollection: The output is " << argv[2] << std::endl;
	#if BUILD_BCR_FROM_BCRpartials==1
		std::cout << "BWTCollection: inputPrevBCR is set to " << inputPrevBCR << std::endl;
		ifstream f2(argv[2]);
		if (f2.good() == 0) {
			std::cerr  << argv[2] << " does not exist." << std::endl;
			exit(1);
		} 
	#endif

	#if ( FASTQ==1) 
        if (USE_QS==0) {
            std::cerr << "Error: if FASTQ==1 then USE_QS==1 (see USE_QS in Tools.h)" << endl;
            exit (EXIT_FAILURE);
        }
    #endif

    #if ( (USE_QS==1) &&  (FASTQ==0) )
        std::cout << "The title of the quality score file must start with '{'. Please use the script.\n";
    #endif

    #if BCR_SET == 0        //Build BCR for 1 sequence
        std::cout << "BCR of 1 sequence" << endl;

        if ( (BUILD_DA_bit == 1) || (BUILD_DA == 1)  )  {
            std::cout << "Error! Since BCR_SET == 0, then BUILD_DA or BUILD_DA_bit must be set to 0 (see Parameters.h).\n";
            exit (EXIT_FAILURE);
        }
        
        #if BCR_FROMCYC==1
            std::cerr << "Error: BCR_FROMCYC==1 (cyc files in input) is not implemented! (see BCR_FROMCYC in Parameters.h)" << endl;
            exit (EXIT_FAILURE);
        #endif
        
        #if USE_QS==1
            std::cerr << "Error: USE_QS==1 (quality score is not implemented! (see USE_QS in Tools.h)" << endl;
            exit (EXIT_FAILURE);
        #endif
            

        #if BUILD_BCR_FROM_BCRpartials==1
            std::cerr << "Error: BUILD_BCR_FROM_BCRpartials==1 is not implemented! (see BUILD_BCR_FROM_BCRpartials in Parameters.h)" << endl;
            exit (EXIT_FAILURE);
        #endif

        #if BCR_FROMCYC==1
            std::cerr << "Error: BCR_FROMCYC==1 is not implemented! (see BCR_FROMCYC in Parameters.h)" << endl;
            exit (EXIT_FAILURE);
        #endif

        #if BCR_INPUT_IN_MEMORY==1      // BCR reads from string
            std::cout << "loads the input file in a string and compute the BWT of the string." << std::endl;
        #else                           // BCR reads from file
            std::cout << "reads from file and computes the BWT of the reverse string." << std::endl;
        #endif
    #else
        std::cout << "BCR of multi-sequences" << endl;
        #if BCR_INPUT_IN_MEMORY==1      // BCR reads from string
            std::cerr << "Error BCR_SET == 0, so that BCR_INPUT_IN_MEMORY must be 0." << std::endl;
            exit (EXIT_FAILURE);
        #endif
        #if BCR_FROMCYC==1 && KSEQ_PARSER==1
            std::cerr << "Error: BCR_FROMCYC==1 (cyc files in input) is not implemented! (Please, set KSEQ_PARSER == 0)" << endl;
            exit (EXIT_FAILURE);
        #endif 
    #endif
    
    
    #if OUTPUT_linear_SuffixArray ==  1
        std::cout << "dataTypeNChar: sizeof(type of #characters): " << sizeof(dataTypeNChar) << "\n";
    #endif


        if ( (BCR_SET!=1) && (BCR_SET_ALN_RH) && (BUILD_BCR_FROM_BCRpartials!=0) && (BUILD_BCR_ALTERNATE!=0) && (BUILD_LCP!=1) )
        {
            std::cerr << "Error! The input is a set. BCR_SET must be set to 1, BUILD_BCR_FROM_BCRpartials must be set to 0, BUILD_BCR_ALTERNATE must be set to 1  (see Parameters.h).\n";
            exit (EXIT_FAILURE);
        }
        
        if(BCR_SET_ALN_RH==1 && STORE_ENDMARKER_POS==1)
        {
            std::cerr << "Error! EOFpos file is computed only if BCR_SET_ALN_RH is set to 0 (see Parameters.h).\n";
            exit (EXIT_FAILURE);
        }
	
	if(BCR_SET_ALN_RH!=1 && (BUILD_SAP || BUILD_RED_SAP))
        {
            std::cerr << "Error! SAP array is computed only if BCR_SET_ALN_RH is set to 1 (see Parameters.h).\n";
            exit (EXIT_FAILURE);
        }
		
		if(BUILD_SAP && BUILD_RED_SAP)
        {
            std::cerr << "Warning! To compute the reduced SAP array BUILD_SAP must be set to 0 (see Parameters.h).\n";
        }
         
        if (OUTPUT_FORMAT==0) {
            std::cout << "The output format of BCR is at most 5 files (ebwt, lcp, da, posSA, ebwt.qs) - built one after the other.\n";
        }
        
        if (OUTPUT_FORMAT==1) {
            if ((BUILD_LCP==1) && (BUILD_DA==1) && (BUILD_SA==1) )
                std::cout << "The output format of BCR is as the output of eGSA.\n";
            else {
                std::cerr << "Error! The output format of BCR is as the output of EGSA. BUILD_LCP and BUILD_SA and BUILD_DA must be set to 1 (see Parameters.h).\n";
                exit (EXIT_FAILURE);
            }
        }

        if (OUTPUT_FORMAT==2) {
            if ((BUILD_LCP==1) )
                std::cout << "The output format of BCR is a unique file .egsa. Order: bwt, lcp, da, sa.\n";
            else {
                std::cerr << "Error! The output format of BCR is a unique file .egsa (we do not use a struct). BUILD_LCP must be set to 1  (see Parameters.h), BUILD_DA and BUILD_SA could be set to a either 0 or 1.  Order: bwt, lcp, da, sa.\n";
                exit (EXIT_FAILURE);
            }
        }

        if (OUTPUT_FORMAT==3) {
            if ( ((BUILD_LCP == 1) || (BUILD_DA==1) || (BUILD_SA==1) || (BUILD_SAP==1) || (BUILD_RED_SAP==1) || KEEP_eBWT_IN_EXT_MEMORY==1) )
                std::cout << "The output format of BCR is at most 5 files (ebwt, lcp, da, posSA, SAP-array) at the same time.\n";
            else {
                std::cerr << "Error! The output format of BCR is at most 4 files (ebwt, lcp, da, posSA) at the same time\n";
                std::cerr << " BUILD_LCP or BUILD_DA==1 or BUILD_SA==1 or KEEP_eBWT_IN_EXT_MEMORY must be 1 (see Parameters.h).\n";
                exit (EXIT_FAILURE);
            }
        }
        
        if (OUTPUT_FORMAT==4) {
            if (BUILD_DA==1) 
                std::cout << "The output format of BCR is at most 3 files (ebwt, da), lcp, sa.\n";
            else {
                std::cerr << "Error! The output format of BCR is at most 3 files (ebwt, da), lcp, sa. BUILD_DA must be set to 1 (see Parameters.h).\n";
                exit (EXIT_FAILURE);
            }
        }
        
        if (OUTPUT_FORMAT==5) {
            if ( (BUILD_DA==1) && (BUILD_LCP==1) )
                std::cout << "The output format of BCR is at most 3 files ebwt, (lcp, da), sa.\n";
            else {
                std::cerr << "Error! The output format of BCR is at most 3 files ebwt, (lcp, da), sa. BUILD_DA and BUILD_LCP must be set to 1 (see Parameters.h).\n";
                exit (EXIT_FAILURE);
            }
        }
        
        if (OUTPUT_FORMAT==6) {
            if ( (BUILD_DA==1) && (BUILD_SA==1) )
                std::cout << "The output format of BCR is at most 3 files ebwt), lcp, (sa, da).\n";
            else {
                std::cerr << "Error! The output format of BCR is at most 3 files ebwt, lcp, (sa, da). BUILD_DA and BUILD_SA must be set to 1 (see Parameters.h).\n";
                exit (EXIT_FAILURE);
            }
        }

    std::cout << "********************" << endl;
    std::cout << "Setting:\n";
    std::cout << "\tSpecial symbols: " << std::endl;
    std::cout << "\t\tTERMINATE_CHAR: " << TERMINATE_CHAR << " Ascii: " << (int)TERMINATE_CHAR << std::endl;
    std::cout << "\t\tTERMINATE_CHAR_LEN: " << TERMINATE_CHAR_LEN << " Ascii: " << (int)TERMINATE_CHAR_LEN <<  std::endl;

    std::cout << "\tTypes:\n";
    std::cout << "\t\tdataTypedimAlpha: sizeof(type size of alpha): " << sizeof(dataTypedimAlpha) << " bytes \n";
    std::cout << "\t\tdataTypelenSeq: sizeof(type of seq length): " << sizeof(dataTypelenSeq) << " bytes \n";
    std::cout << "\t\tdataTypeNSeq: sizeof(type of #sequences): " << sizeof(dataTypeNSeq) << " bytes\n";
    std::cout << "\t\tdataTypeNChar: sizeof(type of #sequences): " << sizeof(dataTypeNChar) << " bytes\n";
    #if OUTPUT_FORMAT == 1
        std::cerr << "EGSA: sizeof(type of t_GSA): " << sizeof(t_GSA) << "\n";
        std::cerr << "file EGSA: " << lengthTot_plus_eof * sizeof(t_GSA) << "\n";
    #endif


    std::cout << "\tAlphabet order:\n";
    #if BUILD_BCR_ALTERNATE == 0
        std::cout << "\t\tLexicographic order" << endl;
    #else
        std::cout << "\t\tAlternate lexicographic order" << endl;
    #endif

    std::cout << "\tStrings order:\n";
    #if RLO == 0
        std::cout << "\t\tInput order" << endl;
    #else
        std::cout << "\t\tReverse lexicographic order" << endl;
    #endif
	
    std::cout << "\tEBWT computation (.ebwt file)" << endl;

    #if (BUILD_LCP==1)
        std::cout << "\t\ttogether LCP array (.lcp file)" << endl;
    #endif

    #if (BUILD_SA==1)
        std::cout << "\t\ttogether SA array, i.e. positions in the sequence, so they go from 0 to sequence length (.posSA file)" << endl;
    #endif

    #if (BUILD_DA==1)
        std::cout << "\t\ttogether DA array, i.e. ID/Colour of the sequence (.DA file)" << endl;
    #endif

    #if (BUILD_DA_bit==1) 
        std::cout << "\t\ttogether DA (bit vector) of the sets, i.e. ID/Colour of two sets (.bitDA file)" << endl;
    #endif

    #if USE_QS == 1
        std::cout << "\t\ttogether QS permutation" << endl;
    #endif

    #if BUILD_SAP == 1
        std::cout << "\t\ttogether SAP array" << endl;	
    #elif BUILD_RED_SAP == 1
		std::cout << "\t\ttogether reduced SAP array" << endl;
	#endif
	
    std::cout << "\tBWT partial:\n";
    #if  KEEP_eBWT_IN_EXT_MEMORY == 1    //BCR uses the internal memory for the BWT partial
        std::cout << "\t\tin external memory" << endl;
    #else
        std::cout << "\t\tin internal memory" << endl;
    #endif

    std::cout << "\tInput file:\n";
    #if  BCR_INPUT_IN_MEMORY == 0    //BCR reads cyc files
        std::cout << "\t\tin external memory, uses .cyc files by using ";
        if(BCR_SET_ALN_RH==0 )
            std::cout << "LEFT alignment" ;
        else
            std::cout << "RIGHT alignment" ;
        if(BCR_FROMCYC==0 )
            std::cout << " and builds the cyc files" << endl;
        else
            std::cout << " and using pre-computed cyc files" << endl;
    #else
        std::cout << "\t\tin internal memory (no cyc files)" << endl;
    #endif

    std::cout << "Store the indeces of the dollars in EBWT in a separate file: ";
    if(STORE_ENDMARKER_POS==1)
	std::cout << "YES.\n";            
    else
	std::cout << "NO.\n"; 
	
    std::cout << "End Setting" << endl;
    std::cout << "********************" << endl;

	BWTCollection *BCRexternalBWT = BWTCollection::InitBWTCollection(argv[1], argv[2], inputPrevBCR );
	
	//cout << "finished iteration, usage: " << timer << endl;
	delete BCRexternalBWT;

	std::cerr << "\nThe BWT et al. is ready! " << std::endl;


	std::cerr << "The End!\n";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x250, %rsp            # imm = 0x250
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x976a(%rip), %rdx      # 0xce9b
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x405e
cmpl $0x3, %ebp
jne 0x3f0b
movq 0xd882(%rip), %r14      # 0x10fd0
leaq 0x88c5(%rip), %rsi      # 0xc01a
movl $0x1c, %edx
movq %r14, %rdi
callq 0x32d0
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x3787
movq %r15, %rdi
callq 0x3120
movq 0xd856(%rip), %rdi      # 0x10fd0
movq %r15, %rsi
movq %rax, %rdx
callq 0x32d0
jmp 0x379f
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x3430
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0xd813(%rip), %rdi      # 0x10fd0
callq 0x3050
movq %rax, %rdi
callq 0x31e0
movq 0x8(%rbx), %rsi
leaq 0x48(%rsp), %rdi
movl $0x8, %edx
callq 0x3490
movq 0x48(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x68(%rsp,%rax)
jne 0x3f53
movq 0xd7d8(%rip), %r14      # 0x10fd0
leaq 0x8849(%rip), %rsi      # 0xc048
movl $0x1d, %edx
movq %r14, %rdi
callq 0x32d0
movq 0x10(%rbx), %r15
testq %r15, %r15
je 0x3831
movq %r15, %rdi
callq 0x3120
movq 0xd7ac(%rip), %rdi      # 0x10fd0
movq %r15, %rsi
movq %rax, %rdx
callq 0x32d0
jmp 0x3849
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x3430
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0xd769(%rip), %rdi      # 0x10fd0
callq 0x3050
movq %rax, %rdi
callq 0x31e0
movq 0xd755(%rip), %r14      # 0x10fd0
leaq 0x87e4(%rip), %rsi      # 0xc066
movl $0x16, %edx
movq %r14, %rdi
callq 0x32d0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0xd723(%rip), %rdi      # 0x10fd0
callq 0x3050
movq %rax, %rdi
callq 0x31e0
movq 0xd70f(%rip), %rdi      # 0x10fd0
leaq 0x87b5(%rip), %rsi      # 0xc07d
movl $0x60, %edx
callq 0x32d0
movq 0xd6f7(%rip), %r14      # 0x10fd0
leaq 0x87fe(%rip), %rsi      # 0xc0de
movl $0x14, %edx
movq %r14, %rdi
callq 0x32d0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0xd6c5(%rip), %rdi      # 0x10fd0
callq 0x3050
movq %rax, %rdi
callq 0x31e0
movq 0xd6b1(%rip), %rdi      # 0x10fd0
leaq 0x87cd(%rip), %rsi      # 0xc0f3
movl $0x9, %edx
callq 0x32d0
movq 0xd699(%rip), %r14      # 0x10fd0
leaq 0x87bf(%rip), %rsi      # 0xc0fd
movl $0x12, %edx
movq %r14, %rdi
callq 0x32d0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0xd667(%rip), %rdi      # 0x10fd0
callq 0x3050
movq %rax, %rdi
callq 0x31e0
movq 0xd653(%rip), %rdi      # 0x10fd0
leaq 0x878c(%rip), %rsi      # 0xc110
movl $0x12, %edx
callq 0x32d0
leaq 0x7(%rsp), %rsi
movb $0x24, (%rsi)
movq 0xd633(%rip), %rdi      # 0x10fd0
movl $0x1, %edx
callq 0x32d0
movq %rax, %r14
leaq 0x8772(%rip), %rsi      # 0xc123
movl $0x8, %edx
movq %rax, %rdi
callq 0x32d0
movq %r14, %rdi
movl $0x24, %esi
callq 0x3440
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r14, %rdi
callq 0x3050
movq %rax, %rdi
callq 0x31e0
movq 0xd5d4(%rip), %rdi      # 0x10fd0
leaq 0x8729(%rip), %rsi      # 0xc12c
movl $0x16, %edx
callq 0x32d0
leaq 0x7(%rsp), %rsi
movb $-0x1, (%rsi)
movq 0xd5b4(%rip), %rdi      # 0x10fd0
movl $0x1, %edx
callq 0x32d0
movq %rax, %r14
leaq 0x86f3(%rip), %rsi      # 0xc123
movl $0x8, %edx
movq %rax, %rdi
callq 0x32d0
movq %r14, %rdi
movl $0xff, %esi
callq 0x3440
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r14, %rdi
callq 0x3050
movq %rax, %rdi
callq 0x31e0
movq 0xd555(%rip), %rdi      # 0x10fd0
leaq 0x86c1(%rip), %rsi      # 0xc143
movl $0x8, %edx
callq 0x32d0
movq 0xd53d(%rip), %rdi      # 0x10fd0
leaq 0x86b2(%rip), %rsi      # 0xc14c
movl $0x30, %edx
callq 0x32d0
movq 0xd525(%rip), %rdi      # 0x10fd0
movl $0x1, %esi
callq 0x31d0
leaq 0x86c1(%rip), %rsi      # 0xc17d
movl $0x8, %edx
movq %rax, %rdi
callq 0x32d0
movq 0xd500(%rip), %rdi      # 0x10fd0
leaq 0x86af(%rip), %rsi      # 0xc186
movl $0x2e, %edx
callq 0x32d0
movq 0xd4e8(%rip), %rdi      # 0x10fd0
movl $0x1, %esi
callq 0x31d0
leaq 0x8684(%rip), %rsi      # 0xc17d
movl $0x8, %edx
movq %rax, %rdi
callq 0x32d0
movq 0xd4c3(%rip), %rdi      # 0x10fd0
leaq 0x86a1(%rip), %rsi      # 0xc1b5
movl $0x2c, %edx
callq 0x32d0
movq 0xd4ab(%rip), %rdi      # 0x10fd0
movl $0x4, %esi
callq 0x31d0
leaq 0x86ac(%rip), %rsi      # 0xc1e2
movl $0x7, %edx
movq %rax, %rdi
callq 0x32d0
movq 0xd486(%rip), %rdi      # 0x10fd0
leaq 0x8699(%rip), %rsi      # 0xc1ea
movl $0x2d, %edx
callq 0x32d0
movq 0xd46e(%rip), %rdi      # 0x10fd0
movl $0x8, %esi
callq 0x31d0
leaq 0x866f(%rip), %rsi      # 0xc1e2
movl $0x7, %edx
movq %rax, %rdi
callq 0x32d0
movq 0xd449(%rip), %rdi      # 0x10fd0
leaq 0x868a(%rip), %rsi      # 0xc218
movl $0x11, %edx
callq 0x32d0
movq 0xd431(%rip), %r14      # 0x10fd0
leaq 0x8684(%rip), %rsi      # 0xc22a
movl $0x15, %edx
movq %r14, %rdi
callq 0x32d0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0xd3ff(%rip), %rdi      # 0x10fd0
callq 0x3050
movq %rax, %rdi
callq 0x31e0
movq 0xd3eb(%rip), %rdi      # 0x10fd0
leaq 0x8654(%rip), %rsi      # 0xc240
movl $0x10, %edx
callq 0x32d0
movq 0xd3d3(%rip), %r14      # 0x10fd0
leaq 0x864d(%rip), %rsi      # 0xc251
movl $0xd, %edx
movq %r14, %rdi
callq 0x32d0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0xd3a1(%rip), %rdi      # 0x10fd0
callq 0x3050
movq %rax, %rdi
callq 0x31e0
movq 0xd38d(%rip), %r14      # 0x10fd0
leaq 0x8615(%rip), %rsi      # 0xc25f
movl $0x1e, %edx
movq %r14, %rdi
callq 0x32d0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0xd35b(%rip), %rdi      # 0x10fd0
callq 0x3050
movq %rax, %rdi
callq 0x31e0
movq 0xd347(%rip), %rdi      # 0x10fd0
leaq 0x85ee(%rip), %rsi      # 0xc27e
movl $0xe, %edx
callq 0x32d0
movq 0xd32f(%rip), %r14      # 0x10fd0
leaq 0x85e5(%rip), %rsi      # 0xc28d
movl $0x14, %edx
movq %r14, %rdi
callq 0x32d0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0xd2fd(%rip), %rdi      # 0x10fd0
callq 0x3050
movq %rax, %rdi
callq 0x31e0
movq 0xd2e9(%rip), %rdi      # 0x10fd0
leaq 0x85b4(%rip), %rsi      # 0xc2a2
movl $0xd, %edx
callq 0x32d0
movq 0xd2d1(%rip), %rdi      # 0x10fd0
leaq 0x85aa(%rip), %rsi      # 0xc2b0
movl $0x2f, %edx
callq 0x32d0
movq 0xd2b9(%rip), %rdi      # 0x10fd0
leaq 0x85c2(%rip), %rsi      # 0xc2e0
movl $0xe, %edx
callq 0x32d0
movq 0xd2a1(%rip), %r14      # 0x10fd0
leaq 0x85b9(%rip), %rsi      # 0xc2ef
movl $0x19, %edx
movq %r14, %rdi
callq 0x32d0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0xd26f(%rip), %rdi      # 0x10fd0
callq 0x3050
movq %rax, %rdi
callq 0x31e0
movq 0xd25b(%rip), %rdi      # 0x10fd0
leaq 0x858d(%rip), %rsi      # 0xc309
movl $0x3d, %edx
callq 0x32d0
movq 0xd243(%rip), %rdi      # 0x10fd0
leaq 0x85b3(%rip), %rsi      # 0xc347
movl $0x4, %edx
callq 0x32d0
movq 0xd22b(%rip), %r14      # 0x10fd0
leaq 0x85a0(%rip), %rsi      # 0xc34c
movl $0xb, %edx
movq %r14, %rdi
callq 0x32d0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0xd1f9(%rip), %rdi      # 0x10fd0
callq 0x3050
movq %rax, %rdi
callq 0x31e0
movq 0xd1e5(%rip), %r14      # 0x10fd0
leaq 0x82ec(%rip), %rsi      # 0xc0de
movl $0x14, %edx
movq %r14, %rdi
callq 0x32d0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0xd1b3(%rip), %rdi      # 0x10fd0
callq 0x3050
movq %rax, %rdi
callq 0x31e0
movq 0x8(%rbx), %r14
movq 0x10(%rbx), %rbx
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x3fce
leaq 0x28(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x40f0
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x3e74
callq 0x3260
testq %rbx, %rbx
je 0x3e82
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq 0xd167(%rip), %rbx      # 0x10ff0
leaq 0x84c8(%rip), %rsi      # 0xc358
movl $0x1a, %edx
movq %rbx, %rdi
callq 0x32d0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0xd135(%rip), %rdi      # 0x10ff0
callq 0x3050
movq %rax, %rdi
callq 0x31e0
movq 0xd121(%rip), %rdi      # 0x10ff0
leaq 0x849d(%rip), %rsi      # 0xc373
movl $0x9, %edx
callq 0x32d0
leaq 0x48(%rsp), %rdi
callq 0x30a0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3ef9
callq 0x3260
xorl %eax, %eax
addq $0x250, %rsp            # imm = 0x250
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0xd0de(%rip), %rdi      # 0x10ff0
leaq 0x80eb(%rip), %rsi      # 0xc004
movl $0x7, %edx
callq 0x32d0
movq (%rbx), %rsi
movq 0xd0c3(%rip), %rdi      # 0x10ff0
callq 0x3290
movq %rax, %rbx
leaq 0x80d0(%rip), %rsi      # 0xc00c
movl $0xd, %edx
movq %rax, %rdi
callq 0x32d0
movq %rbx, %rdi
callq 0x3140
jmp 0x3f82
movq 0x8(%rbx), %rsi
movq 0xd092(%rip), %rdi      # 0x10ff0
callq 0x3290
movq %rax, %rbx
leaq 0x80ca(%rip), %rsi      # 0xc037
movl $0x10, %edx
movq %rax, %rdi
callq 0x32d0
movq %rbx, %rdi
callq 0x3140
movl $0x1, %edi
callq 0x3300
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x3fac
callq 0x3260
jmp 0x3fac
jmp 0x3fa2
movq %rax, %rbx
jmp 0x3fb6
jmp 0x3fa9
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x30a0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3fc5
callq 0x3260
movq %rbx, %rdi
callq 0x3460
nop