// File: /workspace/github_cpp_makefile_star2_O2/giovannarosone[P]BCR_LCP_GSA/TransposeFasta.cpp
// Function: TransposeFasta::convertQS(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
bool TransposeFasta::convertQS( const string& input, const string& output, dataTypeNChar ram )
{
	FILE* ifile;
	cerr << "\nTrasposeFasta convertQS: file " << input << " !" << endl;
	
	ifile = fopen(input.c_str(), "rb");

    if( ifile == NULL ) { 
		cerr << "TrasposeFasta convertQS: could not open file " << input << " !" << endl; 
	}


	vector <FILE*> outputFiles_;
	outputFiles_.resize(lengthRead);    //One for each symbol of the read.
    // create output files   (cyc qs files)
    for(dataTypelenSeq i=0;i<lengthRead;i++ )
    {
        std::stringstream fn;
        fn << output << "qs." << (int)i << ".txt";
        outputFiles_[i] = fopen( fn.str().c_str(),"w" );
        if (outputFiles_[i] == NULL) {
                std::cerr << "TrasposeFasta: could not open file "  <<  fn.str().c_str() << std::endl;
				exit (EXIT_FAILURE);
		}
        fclose(outputFiles_[i]);
    }

	//TO DO: CHECK THE CASE OF charsBuffered >= SIZEBUFFERcycFiles
	//if (nSeq > SIZEBUFFERcycFiles) {
	//	cerr << "Warning: Number of sequences is: " << (unsigned long)nSeq << " and SIZEBUFFERcycFiles (in TransposeFasta.h) is " << SIZEBUFFERcycFiles << endl;
	//}
	
	ram = ram * nSeq;   //ram used in BCR for vector 
	
	SIZEBUFFERcycFiles = ram / lengthRead;
	
	if ( SIZEBUFFERcycFiles > nSeq )   //number of columns
		SIZEBUFFERcycFiles = nSeq;
	else if ( SIZEBUFFERcycFiles < 1048576 )
		SIZEBUFFERcycFiles = 1048576;
	
	
	std::cerr << "TrasposeFasta.convertQS: init buf_ of size " << (unsigned long) lengthRead << " * " << SIZEBUFFERcycFiles << std::endl;
	
	vector<vector<uchar> > buf_;
	buf_.resize(lengthRead);    //For each symbol/column of the read
	for (dataTypelenSeq x = 0 ; x < lengthRead; x++)         //For each symbol/column of the read
		buf_[x].resize(SIZEBUFFERcycFiles);
	for (dataTypelenSeq x = 0 ; x < lengthRead; x++)         //For each symbol/column of the read
		for (dataTypeNChar y = 0 ; y < SIZEBUFFERcycFiles; y++)         //For each buffered symbol of the read
			buf_[x][y]=TERMINATE_CHAR_LEN;

	//char buf[SIZEBUFFERcycFiles];
    //for(dataTypeNChar i=0;i<SIZEBUFFERcycFiles;i++ )
//		buf[i] = '\0';	
	//fgets ( buf, SIZEBUFFERcycFiles, ifile );			//it starts with '>', we can ignore it
	
	std::ifstream infile(input.c_str());
	string bufChar;
	
	dataTypeNChar charsBuffered = 0;
    // looping through the input file, add the characters to the buffer, print buffer when it's full
//    unsigned int num_read = 0;
    dataTypeNChar num_write = 0;
	dataTypelenSeq tmpLen = 0;
    nSeq = 0;
	dataTypelenSeq sumLenCum = 0;

    /*while( !feof(ifile) )
    {
        if( charsBuffered-1 == SIZEBUFFERcycFiles)   //it is linked to the number of sequences
        {
            // write buffers to the files, clear buffers
            for(dataTypelenSeq i=0;i<lengthRead;i++ )  {       //For each symbol/column of the read   (for each string)
                std::stringstream fn;
                fn << output << "qs." << (int)i << ".txt";
				outputFiles_[i] = fopen( fn.str().c_str(),"a" );
				num_write = fwrite ( &buf_[i][0],sizeof(char),charsBuffered-1,outputFiles_[i] );
				assert( num_write == charsBuffered-1 );
				for(dataTypeNChar x=0; x<charsBuffered-1; x++ ) {
					//For each buffered symbol of the read (a symbol for each string)
					if (buf_[i][x] != TERMINATE_CHAR_LEN) {
						//freq[(unsigned int)(buf_[i][x])]=1;
						buf_[i][x] = TERMINATE_CHAR_LEN;
					}
				}
				fclose(outputFiles_[i]);
            }
			
	        //for (dataTypelenSeq x = 0 ; x < lengthRead; x++)         //For each symbol/column of the read
		    //    for (dataTypeNChar y = 0 ; y < BUFFERSIZE; y++)         //For each buffered symbol of the read
			//        buf_[x][y]=TERMINATE_CHAR_LEN;
			
            charsBuffered=1;
        }

        // process the input
        if( buf[0] != '>' )
        {
			dataTypelenSeq posit = 0 + sumLenCum;
			for(dataTypelenSeq i=posit; i < posit + tmpLen;i++) {
				buf_[i][charsBuffered-1] = buf[i-posit];
			}

            sumLenCum += tmpLen;

			#if verboseEncode==1
				cerr << "Partial Buf_ " << endl;
				for(dataTypelenSeq i=0;i<lengthRead;i++ ) {
					cerr << (int)i << " " ;
					for(dataTypeNChar x=0; x<charsBuffered; x++ )
						cerr << buf_[i][x] ;
					cerr << endl;
				}
			#endif
        }
		else  {
			if (nSeq % SIZEBUFFERcycFiles == 0)
				cerr << "New QS sequence - " << "Sequence N. " << (int)nSeq << std::endl;

			sumLenCum = 0;
		    // increase the number of sequences
			nSeq++;
			// increase the counter of chars buffered
			charsBuffered++;
		}
		for(dataTypelenSeq i=0;i<lengthRead;i++ )
			buf[i] = '\0';
		fgets ( buf, SIZEBUFFERcycFiles, ifile );
        if ((buf[strlen(buf)-2] == '\r') || (buf[strlen(buf)-2] == '\n'))
            buf[strlen(buf)-2] = '\0';
        else if ((buf[strlen(buf)-1] == '\r') || (buf[strlen(buf)-1] == '\n'))
            buf[strlen(buf)-1] = '\0';

		tmpLen = strlen(buf);          //tmpLen = strlen(buf)-1;
    }
	*/
	
	while (getline(infile, bufChar))  {
		if ((bufChar[bufChar.length()-2] == '\r') || (bufChar[bufChar.length()-2] == '\n'))
            bufChar[bufChar.length()-2] = '\0';
        else if ((bufChar[bufChar.length()-1] == '\r') || (bufChar[bufChar.length()-1] == '\n'))
            bufChar[bufChar.length()-1] = '\0';		
		
		tmpLen = bufChar.length();          //tmpLen = strlen(buf)-1;
		
		if ( (charsBuffered > 0) && ( charsBuffered-1 == SIZEBUFFERcycFiles))   //it is linked to the number of sequences
        {
			// write buffers to the files, clear buffers
            for(dataTypelenSeq i=0;i<lengthRead;i++ )  {       //For each symbol/column of the read   (for each string)
                std::stringstream fn;
                fn << output << "qs." << (int)i << ".txt";
				outputFiles_[i] = fopen( fn.str().c_str(),"a" );
				num_write = fwrite ( &buf_[i][0],sizeof(char),charsBuffered-1,outputFiles_[i] );
				assert( num_write == charsBuffered-1 );
				for(dataTypeNChar x=0; x<charsBuffered-1; x++ ) {
					//For each buffered symbol of the read (a symbol for each string)
					if (buf_[i][x] != TERMINATE_CHAR_LEN) {
						//freq[(unsigned int)(buf_[i][x])]++;   //=1
						buf_[i][x] = TERMINATE_CHAR_LEN;
					}
				}
				fclose(outputFiles_[i]);
            }
            charsBuffered=1;
        }

        // process the input
        if( bufChar[0] != '{' )   //no title
        {
			
			dataTypelenSeq posit = 0 + sumLenCum;
			for(dataTypelenSeq i=posit; i < posit + tmpLen;i++) {
				buf_[i][charsBuffered-1] = bufChar[i-posit];
			}

            sumLenCum += tmpLen;
			//cerr << "it is not title"<< " tmpLen " << (int)tmpLen << " sumLenCum " << (unsigned int)sumLenCum << endl;
			
 			/*#if verboseEncode==1
				cerr << "Partial Buf_ " << endl;
				for(dataTypelenSeq i=0;i<lengthRead;i++ ) {
					cerr << (int)i << " " ;
					for(dataTypeNChar x=0; x<charsBuffered; x++ )
						cerr << buf_[i][x] ;
					cerr << endl;
				}
			#endif */
        }
		else  {        //it is a title
            sumLenCum = 0;
		    // increase the number of sequences
			nSeq++;
			//cerr << "it is a title"<< nSeq << endl;
			// increase the counter of chars buffered
			charsBuffered++;
		}
		//for(dataTypelenSeq i=0;i<lengthRead;i++ )
		//	buf[i] = '\0';
		//fgets ( buf, BUFFER_SIZELEN, ifile );
        //if ((buf[strlen(buf)-2] == '\r') || (buf[strlen(buf)-2] == '\n'))
         //   buf[strlen(buf)-2] = '\0';
        //else if ((buf[strlen(buf)-1] == '\r') || (buf[strlen(buf)-1] == '\n'))
        //    buf[strlen(buf)-1] = '\0';

//        cerr << "buf: " << buf << "." << endl;
		
    }  //end-while
	
	

	/* 	#if verboseEncode==1
		cerr << "The last Buf_ " << endl;
		cerr << "Buf_ " << endl;
		for(dataTypelenSeq i=0;i<lengthRead;i++ ) {
			for(dataTypeNChar x=0; x<charsBuffered; x++ )
				cerr << buf_[i][x] ;
			cerr << endl;
		}
	#endif */

    // write the rest
    for(dataTypelenSeq i=0;i<lengthRead;i++ )
    {
        std::stringstream fn;
        fn << output << "qs." << (int)i << ".txt";
        outputFiles_[i] = fopen( fn.str().c_str(),"a" );
		num_write = fwrite ( &buf_[i][0],sizeof(char),charsBuffered,outputFiles_[i] );
		assert( num_write == charsBuffered );
		for(dataTypeNChar x=0; x<charsBuffered; x++ ) {
			if (buf_[i][x] != TERMINATE_CHAR_LEN) {
				//freq[(unsigned int)(buf_[i][x])]=1;
				buf_[i][x] = TERMINATE_CHAR_LEN;
			}
		}
        fclose( outputFiles_[i]);
    }

	cerr << "Number of quality score sequences reading/writing: " << nSeq << "\n";
	//cerr << "Number of characters reading/writing: " << lengthTexts << "\n";

    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq %rcx, 0x68(%rsp)
movq %rdx, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
movq 0x7824(%rip), %rdi      # 0xfff0
leaq 0x2c28(%rip), %rsi      # 0xb3fb
callq 0x3270
movq %rax, %rdi
movq %r14, %rsi
callq 0x3230
leaq 0x2c31(%rip), %rsi      # 0xb41b
movq %rax, %rdi
callq 0x3270
movq %rax, %rdi
callq 0x3130
movq %r14, (%rsp)
movq (%r14), %rdi
leaq 0x2123(%rip), %rsi      # 0xa92b
callq 0x32c0
testq %rax, %rax
jne 0x8848
movq 0x77d7(%rip), %rdi      # 0xfff0
leaq 0x2bfe(%rip), %rsi      # 0xb41e
callq 0x3270
movq %rax, %rdi
movq (%rsp), %rsi
callq 0x3230
leaq 0x2be3(%rip), %rsi      # 0xb41b
movq %rax, %rdi
callq 0x3270
movq %rax, %rdi
callq 0x3130
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movzbl (%rbx), %esi
callq 0x91e0
xorl %ebp, %ebp
leaq 0x220(%rsp), %r15
leaq 0x20b5(%rip), %r12      # 0xa926
leaq 0x98(%rsp), %r13
leaq 0x269e(%rip), %r14      # 0xaf1e
movzbl (%rbx), %esi
cmpq %rsi, %rbp
jae 0x8922
movq %r15, %rdi
callq 0x31d0
leaq 0x230(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x3230
movq %rax, %rdi
leaq 0x2b9c(%rip), %rsi      # 0xb44c
callq 0x3270
movq %rax, %rdi
movl %ebp, %esi
callq 0x3430
movq %rax, %rdi
movq %r12, %rsi
callq 0x3270
movq %r13, %rdi
leaq 0x238(%rsp), %rsi
callq 0x33c0
movq 0x98(%rsp), %rdi
movq %r14, %rsi
callq 0x32c0
movq 0x10(%rsp), %rcx
movq %rax, (%rcx,%rbp,8)
movq %r13, %rdi
callq 0x3120
movq 0x10(%rsp), %rax
movq (%rax,%rbp,8), %rdi
testq %rdi, %rdi
je 0x8daf
callq 0x3280
movq %r15, %rdi
callq 0x31f0
incq %rbp
jmp 0x8880
movl 0x10(%rbx), %ecx
movq 0x68(%rsp), %rax
imulq %rcx, %rax
xorl %edx, %edx
divq %rsi
movq %rax, 0x820(%rbx)
cmpq %rcx, %rax
ja 0x894c
movl $0x100000, %ecx         # imm = 0x100000
cmpq $0xfffff, %rax          # imm = 0xFFFFF
ja 0x8953
movq %rcx, 0x820(%rbx)
movq 0x7696(%rip), %rdi      # 0xfff0
leaq 0x2aef(%rip), %rsi      # 0xb450
callq 0x3270
movzbl (%rbx), %esi
movq %rax, %rdi
callq 0x31c0
leaq 0x1ec2(%rip), %rsi      # 0xa83a
movq %rax, %rdi
callq 0x3270
movq 0x820(%rbx), %rsi
movq %rax, %rdi
callq 0x31c0
movq %rax, %rdi
callq 0x3130
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movzbl (%rbx), %esi
callq 0x9212
xorl %r14d, %r14d
xorl %r15d, %r15d
movzbl (%rbx), %ecx
cmpq %rcx, %r15
jae 0x89da
movq 0x30(%rsp), %rdi
addq %r14, %rdi
movq 0x820(%rbx), %rsi
callq 0x9248
incq %r15
addq $0x18, %r14
jmp 0x89b5
xorl %eax, %eax
movzbl %cl, %ecx
cmpq %rcx, %rax
jae 0x8a0c
imulq $0x18, %rax, %rcx
xorl %edx, %edx
cmpq 0x820(%rbx), %rdx
jae 0x8a05
movq 0x30(%rsp), %rsi
movq (%rsi,%rcx), %rsi
movb $-0x1, (%rsi,%rdx)
incq %rdx
jmp 0x89ea
incq %rax
movb (%rbx), %cl
jmp 0x89dc
movq (%rsp), %rax
movq (%rax), %rsi
leaq 0x220(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x3470
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
andl $0x0, 0x10(%rbx)
xorl %r15d, %r15d
leaq 0x98(%rsp), %r14
leaq 0x78(%rsp), %r12
xorl %ebp, %ebp
movq %rbx, 0x70(%rsp)
leaq 0x220(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x3070
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x8c2c
movq 0x48(%rsp), %rcx
movq 0x50(%rsp), %rdx
leaq (%rcx,%rdx), %rax
addq $-0x2, %rax
movzbl (%rax), %esi
cmpl $0xa, %esi
je 0x8aa9
cmpl $0xd, %esi
je 0x8aa9
addq %rdx, %rcx
movzbl -0x1(%rcx), %edx
movq %rcx, %rax
decq %rax
cmpl $0xd, %edx
je 0x8aa9
cmpl $0xa, %edx
jne 0x8aac
movb $0x0, (%rax)
movl 0x50(%rsp), %eax
movl %eax, (%rsp)
testq %r15, %r15
je 0x8bcb
leaq -0x1(%r15), %r13
cmpq 0x820(%rbx), %r13
jne 0x8bd4
xorl %r15d, %r15d
movzbl (%rbx), %eax
cmpq %rax, %r15
jae 0x8bd0
movq %r14, %rdi
callq 0x31d0
leaq 0xa8(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x3230
movq %rax, %rdi
leaq 0x294c(%rip), %rsi      # 0xb44c
callq 0x3270
movq %rax, %rdi
movl %r15d, %esi
callq 0x3430
movq %rax, %rdi
leaq 0x1e0c(%rip), %rsi      # 0xa926
callq 0x3270
movq %r12, %rdi
leaq 0xb0(%rsp), %rsi
callq 0x33c0
movq 0x78(%rsp), %rdi
leaq 0x2719(%rip), %rsi      # 0xb254
callq 0x32c0
movq 0x10(%rsp), %rcx
movq %rax, (%rcx,%r15,8)
movq %r12, %rbx
movq %r12, %rdi
callq 0x3120
movq 0x30(%rsp), %rax
imulq $0x18, %r15, %r14
movq (%rax,%r14), %rdi
movq 0x10(%rsp), %rax
movq (%rax,%r15,8), %rcx
pushq $0x1
popq %rsi
movq %r13, %rdx
callq 0x3490
cmpq %r13, %rax
jne 0x8d90
xorl %eax, %eax
cmpq %rax, %r13
je 0x8b9d
movq 0x30(%rsp), %rcx
movq (%rcx,%r14), %rcx
cmpb $-0x1, (%rcx,%rax)
je 0x8b98
movb $-0x1, (%rcx,%rax)
incq %rax
jmp 0x8b80
movq 0x10(%rsp), %rax
movq (%rax,%r15,8), %rdi
callq 0x3280
leaq 0x98(%rsp), %r14
movq %r14, %rdi
callq 0x31f0
incq %r15
movq %rbx, %r12
movq 0x70(%rsp), %rbx
jmp 0x8ad0
xorl %r15d, %r15d
jmp 0x8bd4
pushq $0x1
popq %r15
movq 0x48(%rsp), %rax
cmpb $0x7b, (%rax)
jne 0x8beb
incl 0x10(%rbx)
incq %r15
xorl %ebp, %ebp
jmp 0x8a4f
movzbl %bpl, %ecx
movzbl (%rsp), %eax
addl %ecx, %eax
movzbl %bpl, %ebp
cmpl %ebp, %eax
jbe 0x8c25
movl %ebp, %edx
subl %ecx, %edx
movslq %edx, %rdx
movq 0x48(%rsp), %rsi
movb (%rsi,%rdx), %dl
movl %ebp, %esi
movq 0x30(%rsp), %rdi
imulq $0x18, %rsi, %rsi
movq (%rdi,%rsi), %rsi
movb %dl, -0x1(%rsi,%r15)
incb %bpl
jmp 0x8bf5
movl %eax, %ebp
jmp 0x8a4f
xorl %r13d, %r13d
leaq 0x98(%rsp), %rbp
leaq 0x78(%rsp), %r14
movzbl (%rbx), %eax
cmpq %rax, %r13
jae 0x8d24
movq %rbp, %rdi
callq 0x31d0
leaq 0xa8(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x3230
movq %rax, %rdi
leaq 0x27e0(%rip), %rsi      # 0xb44c
callq 0x3270
movq %rax, %rdi
movl %r13d, %esi
callq 0x3430
movq %rax, %rdi
leaq 0x1ca0(%rip), %rsi      # 0xa926
callq 0x3270
movq %r14, %rdi
leaq 0xb0(%rsp), %rsi
callq 0x33c0
movq 0x78(%rsp), %rdi
leaq 0x25ad(%rip), %rsi      # 0xb254
callq 0x32c0
movq 0x10(%rsp), %rcx
movq %rax, (%rcx,%r13,8)
movq %r14, %rdi
callq 0x3120
movq 0x30(%rsp), %rax
imulq $0x18, %r13, %r12
movq (%rax,%r12), %rdi
movq 0x10(%rsp), %rax
movq (%rax,%r13,8), %rcx
pushq $0x1
popq %rsi
movq %r15, %rdx
callq 0x3490
cmpq %r15, %rax
jne 0x8e07
xorl %eax, %eax
cmpq %rax, %r15
je 0x8d06
movq 0x30(%rsp), %rcx
movq (%rcx,%r12), %rcx
cmpb $-0x1, (%rcx,%rax)
je 0x8d01
movb $-0x1, (%rcx,%rax)
incq %rax
jmp 0x8ce9
movq 0x10(%rsp), %rax
movq (%rax,%r13,8), %rdi
callq 0x3280
movq %rbp, %rdi
callq 0x31f0
incq %r13
jmp 0x8c3c
movq 0x72c5(%rip), %rdi      # 0xfff0
leaq 0x2790(%rip), %rsi      # 0xb4c2
callq 0x3270
movl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0x31c0
leaq 0x1cc5(%rip), %rsi      # 0xaa0e
movq %rax, %rdi
callq 0x3270
leaq 0x48(%rsp), %rdi
callq 0x3120
leaq 0x220(%rsp), %rdi
callq 0x30a0
leaq 0x30(%rsp), %rdi
callq 0x927c
leaq 0x10(%rsp), %rdi
callq 0x93ca
movb $0x1, %al
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x24bf(%rip), %rdi      # 0xb256
leaq 0x237a(%rip), %rsi      # 0xb118
leaq 0x26d7(%rip), %rcx      # 0xb47c
movl $0x3b7, %edx            # imm = 0x3B7
callq 0x3190
movq 0x723a(%rip), %rdi      # 0xfff0
leaq 0x2447(%rip), %rsi      # 0xb204
callq 0x3270
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
leaq 0x238(%rsp), %rsi
callq 0x33c0
movq 0x98(%rsp), %rsi
movq %rbx, %rdi
callq 0x3270
movq %rax, %rdi
callq 0x3130
leaq 0x98(%rsp), %rdi
callq 0x3120
pushq $0x1
popq %rdi
callq 0x32e0
leaq 0x24bf(%rip), %rdi      # 0xb2cd
leaq 0x2303(%rip), %rsi      # 0xb118
leaq 0x2660(%rip), %rcx      # 0xb47c
movl $0x401, %edx            # imm = 0x401
callq 0x3190
jmp 0x8e48
jmp 0x8e48
jmp 0x8e6a
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x3120
jmp 0x8e5b
jmp 0x8e4f
jmp 0x8e58
jmp 0x8e58
jmp 0x8e71
jmp 0x8e6a
movq %rax, %rbx
jmp 0x8e98
jmp 0x8e58
movq %rax, %rbx
jmp 0x8ea2
jmp 0x8e6a
jmp 0x8e71
movq %rax, %rbx
leaq 0x220(%rsp), %rdi
callq 0x31f0
jmp 0x8ea2
movq %rax, %rbx
jmp 0x8e81
jmp 0x8e71
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x31f0
leaq 0x48(%rsp), %rdi
callq 0x3120
leaq 0x220(%rsp), %rdi
callq 0x30a0
leaq 0x30(%rsp), %rdi
callq 0x927c
leaq 0x10(%rsp), %rdi
callq 0x93ca
movq %rbx, %rdi
callq 0x3450