// File: /workspace/github_cpp_makefile_star2_O3/BenLangmead[P]bowtie/ebwt_build.cpp
// Function: void driver<SString<char>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, EList<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 128>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
static void driver(const string& infile,
                   EList<string>& infiles,
                   const string& outfile,
                   bool reverse = false)
{
	EList<FileBuf*> is;
	bool bisulfite = false;
	RefReadInParams refparams(reverse ? reverseType : REF_READ_FORWARD, nsToAs, bisulfite);
	assert_gt(infiles.size(), 0);
	if(format == CMDLINE) {
		// Adapt sequence strings to stringstreams open for input
		stringstream *ss = new stringstream();
		for(size_t i = 0; i < infiles.size(); i++) {
			(*ss) << ">" << i << endl << infiles[i] << endl;
		}
		FileBuf *fb = new FileBuf(ss);
		assert(fb != NULL);
		assert(!fb->eof());
		assert(fb->get() == '>');
		ASSERT_ONLY(fb->reset());
		assert(!fb->eof());
		is.push_back(fb);
	} else {
		// Adapt sequence files to ifstreams
		for(size_t i = 0; i < infiles.size(); i++) {
			FileBuf *fb = NULL;
			if (FileBuf::isGzippedFile(infiles[i].c_str())) {
				gzFile zFp = gzopen(infiles[i].c_str(), "rb");
				if (zFp == NULL) {
					std::cerr << "Error: could not open " << infiles[i].c_str() << std::endl;
					throw 1;
				}
				fb = new FileBuf(zFp);
			} else {
				FILE *f = fopen(infiles[i].c_str(), "rb");
				if (f == NULL) {
					cerr << "Error: could not open "<< infiles[i] << endl;
					throw 1;
				}
				fb = new FileBuf(f);
			}
			assert(fb != NULL);
			assert(!fb->eof());
			assert(fb->get() == '>');
			ASSERT_ONLY(fb->reset());
			assert(!fb->eof());
			is.push_back(fb);
		}
	}
	// Vector for the ordered list of "records" comprising the input
	// sequences.  A record represents a stretch of unambiguous
	// characters in one of the input sequences.
	EList<RefRecord> szs;
	EList<uint32_t> plens;
	std::pair<size_t, size_t> sztot;
	{
		if(verbose) cout << "Reading reference sizes" << endl;
		Timer _t(cout, "  Time reading reference sizes: ", verbose);
		if(!reverse && (writeRef || justRef)) {
			// For forward reference, dump it to .3.ebwt and .4.ebwt
			// files
			string file3 = outfile + ".3." + gEbwt_ext;
			string file4 = outfile + ".4." + gEbwt_ext;
			// Open output stream for the '.3.ebwt' file which will
			// hold the size records.
			ofstream fout3(file3.c_str(), ios::binary);
			if(!fout3.good()) {
				cerr << "Could not open index file for writing: \"" << file3 << "\"" << endl
					 << "Please make sure the directory exists and that permissions allow writing by" << endl
					 << "Bowtie." << endl;
				throw 1;
			}
			BitpairOutFileBuf bpout(file4.c_str());
			// Read in the sizes of all the unambiguous stretches of
			// the genome into a vector of RefRecords.  The input
			// streams are reset once it's done.
			writeU<int32_t>(fout3, 1, bigEndian); // endianness sentinel
			TIndexOff numSeqs = 0;
			sztot = fastaRefReadSizes(is, szs, plens, refparams, &bpout, numSeqs);
			writeU<TIndexOffU>(fout3, (TIndexOffU)szs.size(), bigEndian); // write # records
			for(size_t i = 0; i < szs.size(); i++) szs[i].write(fout3, bigEndian);
			if(sztot.first == 0) {
				cerr << "Error: No unambiguous stretches of characters in the input.  Aborting..." << endl;
				throw 1;
			}
			assert_gt(sztot.first, 0);
			assert_gt(sztot.second, 0);
			bpout.close();
			fout3.close();
#ifndef NDEBUG
			if(sanityCheck) {
				BitPairReference bpr(
					outfile, // ebwt basename
					true,    // sanity check?
					&infiles,// files to check against
					NULL,    // sequences to check against
					format == CMDLINE, // whether infiles contains strings
					true,    // load sequence?
					false,   // use memory-mapped files
					false,   // use shared memory
					false,   // sweep through memory-mapped memory
					false,   // be talkative
					false);  // be talkative
			}
#endif
		} else {
			// Read in the sizes of all the unambiguous stretches of the
			// genome into a vector of RefRecords
			TIndexOff numSeqs = 0;
			sztot = fastaRefReadSizes(is, szs, plens, refparams, NULL, numSeqs);
		}
	}
	if(justRef) return;
	assert_gt(sztot.first, 0);
	assert_gt(sztot.second, 0);
	assert_gt(szs.size(), 0);
	// Construct Ebwt from input strings and parameters
	Ebwt ebwt(TStr(),
		  packed,
		  lineRate,
		  linesPerSide,
		  offRate,      // suffix-array sampling rate
		  -1,           // ISA sampling rate
		  ftabChars,    // number of chars in initial arrow-pair calc
		  nthreads,
		  outfile,      // basename for .?.ebwt files
		  !reverse,     // fw
		  !entireSA,    // useBlockwise
		  bmax,         // block size for blockwise SA builder
		  bmaxMultSqrt, // block size as multiplier of sqrt(len)
		  bmaxDivN,     // block size as divisor of len
		  noDc? 0 : dcv,// difference-cover period
		  is,           // list of input streams
		  szs,          // list of reference sizes
		  plens,        // list of not-all-gap reference sequence lengths
		  (TIndexOffU)sztot.first,  // total size of all unambiguous ref chars
		  refparams,    // reference read-in parameters
		  seed,         // pseudo-random number generator seed
		  -1,           // override offRate
		  -1,           // override isaRate
		  verbose,      // be talkative
		  autoMem,      // pass exceptions up to the toplevel so that we can adjust memory settings automatically
		  sanityCheck,  // verify results and internal consistency
		  false);       // are we building a bt2 index?
	// Note that the Ebwt is *not* resident in memory at this time.  To
	// load it into memory, call ebwt.loadIntoMemory()
	if(verbose) {
		// Print Ebwt's vital stats
		ebwt.eh().print(cout);
	}
	if(sanityCheck) {
		// Try restoring the original string (if there were
		// multiple texts, what we'll get back is the joined,
		// padded string, not a list)
		ebwt.loadIntoMemory(
			-1,
			false,
			false);
		BTRefString s2; ebwt.restore(s2);
		ebwt.evictFromMemory();
		{
			BTRefString joinedss = Ebwt::join<BTRefString >(
				is,          // list of input streams
				szs,         // list of reference sizes
				(TIndexOffU)sztot.first, // total size of all unambiguous ref chars
				refparams,   // reference read-in parameters
				seed);       // pseudo-random number generator seed
			if(refparams.reverse == REF_READ_REVERSE) {
				joinedss.reverse();
			}
			assert_eq(joinedss.length(), s2.length());
			assert(sstr_eq(joinedss, s2));
		}
		if(verbose) {
			if(s2.length() < 1000) {
				cout << "Passed restore check: " << s2.toZBufXForm("ACGTN") << endl;
			} else {
				cout << "Passed restore check: (" << s2.length() << " chars)" << endl;
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20348, %rsp          # imm = 0x20348
movl %edx, %ebx
movq %rsi, 0x20(%rsp)
movq %rdi, %r14
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x90(%rsp)
xorl %eax, %eax
movq %rax, 0x98(%rsp)
movq $0x80, 0xa0(%rsp)
movq %rax, 0xa8(%rsp)
movl %edx, %eax
testl %edx, %edx
je 0xb2f9
movl 0x32aab(%rip), %eax     # 0x3dda4
movb 0x32aa1(%rip), %cl      # 0x3dda0
movl %eax, 0x8(%rsp)
movb %cl, 0xc(%rsp)
movb $0x0, 0xd(%rsp)
cmpl $0x7, 0x32a7d(%rip)     # 0x3dd90
movl %ebx, 0x18(%rsp)
jne 0xb441
movl $0x188, %edi            # imm = 0x188
callq 0x5360
movq %rax, 0x10(%rsp)
movq %rax, %rdi
callq 0x5200
cmpq $0x0, 0x18(%r14)
je 0xb3ed
movq 0x10(%rsp), %r12
addq $0x10, %r12
movl $0x8, %r15d
xorl %r13d, %r13d
leaq 0x23fb1(%rip), %rbx     # 0x2f309
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x53f0
movq %r12, %rdi
movq %r13, %rsi
callq 0x51e0
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x5330
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x51f0
movq 0x8(%r14), %rcx
movq -0x8(%rcx,%r15), %rsi
movq (%rcx,%r15), %rdx
movq %rax, %rdi
callq 0x53f0
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x5330
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x51f0
incq %r13
addq $0x20, %r15
cmpq 0x18(%r14), %r13
jb 0xb358
movl $0x42040, %edi          # imm = 0x42040
callq 0x5360
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x10(%rax)
movl $0x40000, %edx          # imm = 0x40000
movq %rdx, 0x28(%rax)
movq %rdx, 0x20(%rax)
movb $0x0, 0x30(%rax)
movq %rcx, 0x40038(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x18(%rax)
leaq 0x330(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x90(%rsp), %rdi
callq 0x124fe
jmp 0xb53a
cmpq $0x0, 0x18(%r14)
je 0xb53a
movl $0x40000, %ebx          # imm = 0x40000
leaq 0x330(%rsp), %r12
xorl %ebp, %ebp
xorl %r15d, %r15d
movq $0x0, 0x330(%rsp)
movq 0x8(%r14), %rax
movq (%rax,%rbp), %rdi
callq 0x1258e
movq 0x8(%r14), %rcx
movq (%rcx,%rbp), %rdi
testb %al, %al
je 0xb4cc
leaq 0x22d87(%rip), %rsi     # 0x2e211
callq 0x5520
movq %rax, %r13
testq %rax, %rax
je 0xbd69
movl $0x42040, %edi          # imm = 0x42040
callq 0x5360
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movq %rbx, 0x28(%rax)
movq %rbx, 0x20(%rax)
movb $0x0, 0x30(%rax)
movq $0x0, 0x40038(%rax)
movq %r13, 0x8(%rax)
jmp 0xb511
leaq 0x22d3e(%rip), %rsi     # 0x2e211
callq 0x53c0
testq %rax, %rax
je 0xbdc3
movq %rax, %r13
movl $0x42040, %edi          # imm = 0x42040
callq 0x5360
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
xorl %ecx, %ecx
movq %rcx, 0x18(%rax)
movq %rbx, 0x28(%rax)
movq %rbx, 0x20(%rax)
movb $0x0, 0x30(%rax)
movq %rcx, 0x40038(%rax)
movq %r13, (%rax)
movq %rax, 0x330(%rsp)
leaq 0x90(%rsp), %rdi
movq %r12, %rsi
callq 0x124fe
incq %r15
addq $0x20, %rbp
cmpq 0x18(%r14), %r15
jb 0xb45e
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
movq %rcx, 0x30(%rsp)
xorl %ebx, %ebx
movq %rbx, 0x38(%rsp)
movl $0x80, %eax
movq %rax, 0x40(%rsp)
movq %rbx, 0x48(%rsp)
movq %rcx, 0xd0(%rsp)
movq %rbx, 0xd8(%rsp)
movq %rax, 0xe0(%rsp)
movq %rbx, 0xe8(%rsp)
cmpb $0x1, 0x327d6(%rip)     # 0x3dd5c
movl 0x18(%rsp), %ebp
jne 0xb5d8
movq 0x2fa0d(%rip), %rbx     # 0x3afa0
leaq 0x24727(%rip), %rsi     # 0x2fcc1
movl $0x17, %edx
movq %rbx, %rdi
callq 0x53f0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x5330
movsbl %al, %esi
movq 0x2f9db(%rip), %rdi     # 0x3afa0
callq 0x5040
movq %rax, %rdi
callq 0x51f0
movb 0x32784(%rip), %bl      # 0x3dd5c
xorl %edi, %edi
callq 0x52f0
movq %rax, 0x70(%rsp)
movq 0x2f9b5(%rip), %rax     # 0x3afa0
movq %rax, 0x78(%rsp)
leaq 0x246e2(%rip), %rax     # 0x2fcd9
movq %rax, 0x80(%rsp)
movb %bl, 0x88(%rsp)
testb %bpl, %bpl
je 0xb644
leaq 0x330(%rsp), %r9
movl $0x0, (%r9)
leaq 0x90(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
leaq 0x8(%rsp), %rcx
xorl %r8d, %r8d
callq 0x2bbba
movq %rax, %r15
jmp 0xb972
cmpb $0x0, 0x32756(%rip)     # 0x3dda1
jne 0xb656
cmpb $0x1, 0x3274e(%rip)     # 0x3dda2
jne 0xb60b
leaq 0x340(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x330(%rsp), %rdi
callq 0x10798
leaq 0x24675(%rip), %rsi     # 0x2fcfa
leaq 0x330(%rsp), %rdi
callq 0x5700
leaq 0x347a7(%rip), %rbx     # 0x3fe40
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
leaq 0x330(%rsp), %rdi
callq 0x5120
leaq 0x60(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xb6d4
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0xb6da
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x330(%rsp), %rdi
cmpq %r14, %rdi
je 0xb70f
movq 0x340(%rsp), %rsi
incq %rsi
callq 0x5370
leaq 0x330(%rsp), %rdi
movq %r14, (%rdi)
movq 0x20(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
callq 0x10798
leaq 0x245c9(%rip), %rsi     # 0x2fcfe
leaq 0x330(%rsp), %rdi
callq 0x5700
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
leaq 0x330(%rsp), %rdi
callq 0x5120
leaq 0xc0(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xb787
movq %rdx, 0xb0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xc0(%rsp)
jmp 0xb78f
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0xb8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x330(%rsp), %rdi
cmpq %r14, %rdi
je 0xb7c7
movq 0x340(%rsp), %rsi
incq %rsi
callq 0x5370
movq 0x50(%rsp), %rsi
leaq 0x130(%rsp), %rdi
movl $0x4, %edx
callq 0x53a0
movq 0x130(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x150(%rsp,%rax)
jne 0xbe22
movq 0xb0(%rsp), %rsi
leaq 0x330(%rsp), %rdi
callq 0x126ae
cmpl $0x0, 0x32570(%rip)     # 0x3dd84
movl $0x1, %eax
movl $0x1000000, %ecx        # imm = 0x1000000
cmovel %eax, %ecx
leaq 0x2c(%rsp), %rsi
movl %ecx, (%rsi)
leaq 0x130(%rsp), %rdi
movl $0x4, %edx
callq 0x5450
leaq 0x10c(%rsp), %r9
movl $0x0, (%r9)
leaq 0x90(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
leaq 0x8(%rsp), %rcx
leaq 0x330(%rsp), %r8
callq 0x2bbba
movq %rax, %r15
movl 0x48(%rsp), %eax
cmpl $0x0, 0x32506(%rip)     # 0x3dd84
movl %eax, %ecx
bswapl %ecx
cmovel %eax, %ecx
leaq 0x2c(%rsp), %rsi
movl %ecx, (%rsi)
leaq 0x130(%rsp), %rdi
movl $0x4, %edx
callq 0x5450
cmpq $0x0, 0x48(%rsp)
je 0xb8de
xorl %r14d, %r14d
leaq 0x130(%rsp), %rbx
xorl %r13d, %r13d
movq 0x38(%rsp), %rdi
addq %r14, %rdi
xorl %edx, %edx
cmpl $0x0, 0x324bf(%rip)     # 0x3dd84
setne %dl
movq %rbx, %rsi
callq 0x12740
incq %r13
addq $0xc, %r14
cmpq 0x48(%rsp), %r13
jb 0xb8b4
testq %r15, %r15
je 0xbed0
leaq 0x330(%rsp), %rdi
callq 0x127a6
leaq 0x130(%rsp), %rdi
callq 0x54c0
movq 0x2f680(%rip), %rax     # 0x3af88
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x138(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x130(%rsp,%rcx)
callq 0x5290
leaq 0x228(%rsp), %rdi
callq 0x5130
movq 0xb0(%rsp), %rdi
cmpq %r12, %rdi
je 0xb956
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x5370
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xb972
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5370
leaq 0x70(%rsp), %rdi
callq 0xfe36
cmpb $0x0, 0x3241f(%rip)     # 0x3dda2
jne 0xbd24
movq %r15, 0x10(%rsp)
leaq 0x2f12b(%rip), %rax     # 0x3aac0
movq %rax, 0x110(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x118(%rsp)
movq $0x0, 0x128(%rsp)
movzbl 0x323b5(%rip), %edx     # 0x3dd70
movl 0x3239f(%rip), %ecx     # 0x3dd60
movl 0x3239c(%rip), %r8d     # 0x3dd64
movl 0x32399(%rip), %r9d     # 0x3dd68
movl 0x32397(%rip), %eax     # 0x3dd6c
movq %rax, 0x100(%rsp)
xorb $0x1, %bpl
movl %ebp, %edi
xorl %r11d, %r11d
cmpl $0x0, 0x323af(%rip)     # 0x3dd9c
movl 0x323b5(%rip), %eax     # 0x3dda8
movq %rax, 0x18(%rsp)
sete %sil
movl 0x32372(%rip), %eax     # 0x3dd74
movq %rax, 0xf8(%rsp)
movl 0x32368(%rip), %eax     # 0x3dd78
movq %rax, 0xf0(%rsp)
movl 0x3235e(%rip), %ebp     # 0x3dd7c
xorl %ebx, %ebx
cmpl $0x0, 0x32371(%rip)     # 0x3dd98
jne 0xba2f
movl 0x32351(%rip), %ebx     # 0x3dd80
movl 0x32357(%rip), %eax     # 0x3dd8c
movzbl 0x3231f(%rip), %r10d    # 0x3dd5c
movzbl 0x3234f(%rip), %r15d    # 0x3dd94
movzbl 0x3233b(%rip), %r13d    # 0x3dd88
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movb %sil, %r11b
movzbl %dil, %r14d
leaq 0x330(%rsp), %rdi
leaq 0x110(%rsp), %rsi
pushq $0x0
pushq %r13
pushq %r15
pushq %r10
pushq %r12
pushq %r12
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
pushq %rax
leaq 0x40(%rsp), %rax
pushq %rax
movq 0x50(%rsp), %r15
pushq %r15
leaq 0x118(%rsp), %rax
pushq %rax
leaq 0x80(%rsp), %rax
pushq %rax
leaq 0xe8(%rsp), %rax
pushq %rax
pushq %rbx
pushq %rbp
pushq 0x160(%rsp)
pushq 0x170(%rsp)
pushq %r11
pushq %r14
pushq 0xb0(%rsp)
pushq 0xb0(%rsp)
pushq 0x1a0(%rsp)
pushq %r10
callq 0x1282c
addq $0xb0, %rsp
leaq 0x110(%rsp), %rdi
callq 0xdc70
cmpb $0x1, 0x3226c(%rip)     # 0x3dd5c
jne 0xbb06
leaq 0x428(%rsp), %rdi
movq 0x2f49f(%rip), %rsi     # 0x3afa0
callq 0xde84
cmpb $0x1, 0x3227b(%rip)     # 0x3dd88
jne 0xbd17
subq $0x8, %rsp
leaq 0x338(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq $0x0
callq 0x6b68
addq $0x10, %rsp
leaq 0x130(%rsp), %rsi
leaq 0x2ef78(%rip), %rax     # 0x3aac0
movq %rax, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsi)
movq $0x0, 0x18(%rsi)
leaq 0x330(%rsp), %rdi
callq 0x693a
leaq 0x330(%rsp), %rdi
callq 0x136a0
movl 0x32211(%rip), %r9d     # 0x3dd8c
leaq 0x70(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0x30(%rsp), %rdx
leaq 0x8(%rsp), %r8
movl %r15d, %ecx
callq 0x13768
cmpl $0x1, 0x8(%rsp)
jne 0xbbf4
movq 0x88(%rsp), %rdx
cmpq $0x2, %rdx
jb 0xbbf4
movq $-0x1, %rax
xorl %ecx, %ecx
movq 0x78(%rsp), %rsi
movb (%rsi,%rcx), %dil
addq %rsi, %rdx
movb (%rax,%rdx), %dl
movb %dl, (%rsi,%rcx)
movq 0x78(%rsp), %rdx
addq 0x88(%rsp), %rdx
movb %dil, (%rax,%rdx)
incq %rcx
movq 0x88(%rsp), %rdx
movq %rdx, %rsi
shrq %rsi
decq %rax
cmpq %rsi, %rcx
jb 0xbbb8
leaq 0x70(%rsp), %rdi
callq 0xdc70
cmpb $0x1, 0x32157(%rip)     # 0x3dd5c
jne 0xbd0a
cmpq $0x3e7, 0x148(%rsp) # imm = 0x3E7
ja 0xbc6c
movq 0x2f380(%rip), %rbx     # 0x3afa0
leaq 0x241a1(%rip), %rsi     # 0x2fdc8
movl $0x16, %edx
movq %rbx, %rdi
callq 0x53f0
leaq 0x241a4(%rip), %rsi     # 0x2fddf
leaq 0x130(%rsp), %rdi
callq 0x13824
movq %rax, %r14
testq %rax, %rax
je 0xbcc5
movq %r14, %rdi
callq 0x5150
movq 0x2f341(%rip), %rdi     # 0x3afa0
movq %r14, %rsi
movq %rax, %rdx
callq 0x53f0
jmp 0xbce3
movq 0x2f32d(%rip), %rdi     # 0x3afa0
leaq 0x2416b(%rip), %rsi     # 0x2fde5
movl $0x17, %edx
callq 0x53f0
movq 0x148(%rsp), %rsi
movq 0x2f30d(%rip), %rdi     # 0x3afa0
callq 0x51e0
movq %rax, %rbx
leaq 0x2415b(%rip), %rsi     # 0x2fdfd
movl $0x7, %edx
movq %rax, %rdi
callq 0x53f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5330
jmp 0xbcf7
movq 0x2f2d4(%rip), %rax     # 0x3afa0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %rdi
movl 0x20(%rax,%rcx), %esi
orl $0x1, %esi
callq 0x5610
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5330
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x51f0
leaq 0x130(%rsp), %rdi
callq 0xdc70
leaq 0x330(%rsp), %rdi
callq 0x1387e
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0xbd36
callq 0x5440
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0xbd45
callq 0x5440
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0xbd57
callq 0x5440
addq $0x20348, %rsp          # imm = 0x20348
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2f280(%rip), %rdi     # 0x3aff0
leaq 0x23f33(%rip), %rsi     # 0x2fcaa
movl $0x16, %edx
callq 0x53f0
movq 0x8(%r14), %rax
movq (%rax,%rbp), %rsi
movq 0x2f260(%rip), %rdi     # 0x3aff0
callq 0x5340
movq %rax, %rdi
callq 0x5170
movl $0x4, %edi
callq 0x5180
movl $0x1, (%rax)
movq 0x2f194(%rip), %rsi     # 0x3af48
movq %rax, %rdi
xorl %edx, %edx
callq 0x5630
jmp 0xbf15
movq 0x2f226(%rip), %rdi     # 0x3aff0
leaq 0x23ed9(%rip), %rsi     # 0x2fcaa
movl $0x16, %edx
callq 0x53f0
movq 0x8(%r14), %rax
movq (%rax,%rbp), %rsi
movq 0x8(%rax,%rbp), %rdx
movq 0x2f201(%rip), %rdi     # 0x3aff0
callq 0x53f0
movq %rax, %rdi
callq 0x5170
movl $0x4, %edi
callq 0x5180
movl $0x1, (%rax)
movq 0x2f135(%rip), %rsi     # 0x3af48
movq %rax, %rdi
xorl %edx, %edx
callq 0x5630
jmp 0xbf15
movq 0x2f1c7(%rip), %rdi     # 0x3aff0
leaq 0x23ed2(%rip), %rsi     # 0x2fd02
movl $0x28, %edx
callq 0x53f0
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x2f1a5(%rip), %rdi     # 0x3aff0
callq 0x53f0
movq %rax, %rbx
leaq 0x23ecf(%rip), %rsi     # 0x2fd29
movl $0x1, %edx
movq %rax, %rdi
callq 0x53f0
movq %rbx, %rdi
callq 0x5170
movq %rax, %rbx
leaq 0x23eb2(%rip), %rsi     # 0x2fd2b
movl $0x4b, %edx
movq %rax, %rdi
callq 0x53f0
movq %rbx, %rdi
callq 0x5170
movq %rax, %rbx
leaq 0x23edf(%rip), %rsi     # 0x2fd77
movl $0x7, %edx
movq %rax, %rdi
callq 0x53f0
movq %rbx, %rdi
callq 0x5170
movl $0x4, %edi
callq 0x5180
movl $0x1, (%rax)
movq 0x2f084(%rip), %rsi     # 0x3af48
movq %rax, %rdi
xorl %edx, %edx
callq 0x5630
jmp 0xbf15
movq 0x2f119(%rip), %rdi     # 0x3aff0
leaq 0x23ea1(%rip), %rsi     # 0x2fd7f
movl $0x48, %edx
callq 0x53f0
movq 0x2f101(%rip), %rdi     # 0x3aff0
callq 0x5170
movl $0x4, %edi
callq 0x5180
movl $0x1, (%rax)
movq 0x2f03d(%rip), %rsi     # 0x3af48
movq %rax, %rdi
xorl %edx, %edx
callq 0x5630
jmp 0xbfbe
jmp 0xbfea
jmp 0xbfea
movq %rax, %rbx
jmp 0xbffa
jmp 0xbf2e
movq %rax, %rbx
movq 0x330(%rsp), %rdi
cmpq %r14, %rdi
je 0xc017
movq 0x340(%rsp), %rsi
jmp 0xc00f
movq %rax, %rbx
jmp 0xc017
jmp 0xbf59
movq %rax, %rbx
movq 0x330(%rsp), %rdi
cmpq %r14, %rdi
je 0xc033
movq 0x340(%rsp), %rsi
jmp 0xc02b
jmp 0xbfb2
movq %rax, %rbx
jmp 0xbfce
movq %rax, %rbx
leaq 0x110(%rsp), %rdi
callq 0xdc70
jmp 0xc03d
movq %rax, %rbx
movl $0x188, %esi            # imm = 0x188
movq 0x10(%rsp), %rdi
callq 0x5370
jmp 0xc067
jmp 0xc064
movq %rax, %rbx
jmp 0xc033
jmp 0xbfea
jmp 0xc064
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0xdc70
leaq 0x330(%rsp), %rdi
callq 0x1387e
jmp 0xc03d
jmp 0xbfea
movq %rax, %rbx
jmp 0xc03d
jmp 0xc064
jmp 0xc064
jmp 0xc064
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0x5500
movq 0xb0(%rsp), %rdi
cmpq %r12, %rdi
je 0xc017
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x5370
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xc033
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5370
leaq 0x70(%rsp), %rdi
callq 0xfe36
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0xc04f
callq 0x5440
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0xc067
callq 0x5440
jmp 0xc067
jmp 0xc064
jmp 0xc064
movq %rax, %rbx
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0xc079
callq 0x5440
movq %rbx, %rdi
callq 0x5680