// File: /workspace/github_cpp_makefile_star2_O1/BenLangmead[P]bowtie/hit.cpp
// Function: VerboseHitSink::append(SStringExpandable<char, 25, 2, 0>&, Hit const&, EList<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 128> const*, bool, int, int, bool, Bitset const&)
void VerboseHitSink::append(
	BTString& o,
	const Hit& h,
	const EList<string>* refnames,
	bool fullRef,
	int partition,
	int offBase,
	bool cost,
	const Bitset& suppress)
{
	bool spill = false;
	int spillAmt = 0;
	uint32_t pdiv = 0xffffffff;
	uint32_t pmod = 0xffffffff;
	do {
		bool dospill = false;
		if(spill) {
			// The read spilled over a partition boundary and so
			// needs to be printed more than once
			spill = false;
			dospill = true;
			spillAmt++;
		}
		assert(!spill);
		size_t field = 0;
		bool firstfield = true;
		if(partition != 0) {
			int pospart = abs(partition);
			if(!suppress.test((uint32_t)field++)) {
				if(firstfield) firstfield = false;
				else o << '\t';
				// Output a partitioning key
				// First component of the key is the reference index
				if(refnames != NULL && h.h.first < refnames->size()) {
					printUptoWs(o, (*refnames)[h.h.first], !fullRef);
				} else {
					o << h.h.first;
				}
			}
			// Next component of the key is the partition id
			if(!dospill) {
				pdiv = (h.h.second + offBase) / pospart;
				pmod = (h.h.second + offBase) % pospart;
			}
			assert_neq(0xffffffff, pdiv);
			assert_neq(0xffffffff, pmod);
			if(dospill) assert_gt(spillAmt, 0);
			if(partition > 0 &&
			   (pmod + h.length()) >= ((uint32_t)pospart * (spillAmt + 1))) {
				// Spills into the next partition so we need to
				// output another alignment for that partition
				spill = true;
			}
			if(!suppress.test((uint32_t)field++)) {
				if(firstfield) {
					firstfield = false;
				} else {
					o << '\t';
				}
				// Print partition id with leading 0s so that Hadoop
				// can do lexicographical sort (modern Hadoop versions
				// seen to support numeric)
				int padding = 10;
				uint32_t part = (pdiv + (dospill ? spillAmt : 0));
				uint32_t parttmp = part;
				while(parttmp > 0) {
					padding--;
					parttmp /= 10;
				}
				assert_geq(padding, 0);
				for(int i = 0; i < padding; i++) {
					o << '0';
				}
				o << part;
			}
			if(!suppress.test((uint32_t)field++)) {
				if(firstfield) {
					firstfield = false;
				} else {
					o << '\t';
				}
				// Print offset with leading 0s
				int padding = 9;
				uint32_t off = h.h.second + offBase;
				uint32_t offtmp = off;
				while(offtmp > 0) {
					padding--;
					offtmp /= 10;
				}
				assert_geq(padding, 0);
				for(int i = 0; i < padding; i++) {
					o << '0';
				}
				o << off;
			}
			if(!suppress.test((uint32_t)field++)) {
				if(firstfield) firstfield = false;
				else o << '\t';
				o << (h.fw? "+":"-");
			}
			// end if(partition != 0)
		} else {
			assert(!dospill);
			if(!suppress.test((uint32_t)field++)) {
				if(firstfield) firstfield = false;
				else o << '\t';
				for (size_t i = 0; i < h.patName.length(); i++)
					o << h.patName[i];
			}
			if(!suppress.test((uint32_t)field++)) {
				if(firstfield) firstfield = false;
				else o << '\t';
				o << (h.fw? '+' : '-');
			}
			if(!suppress.test((uint32_t)field++)) {
				if(firstfield) firstfield = false;
				else o << '\t';
				// .first is text id, .second is offset
				if(refnames != NULL && h.h.first < refnames->size()) {
					printUptoWs(o, (*refnames)[h.h.first], !fullRef);
				} else {
					o << h.h.first;
				}
			}
			if(!suppress.test((uint32_t)field++)) {
				if(firstfield) firstfield = false;
				else o << '\t';
				o << (h.h.second + offBase);
			}
			// end else clause of if(partition != 0)
		}
		if(!suppress.test((uint32_t)field++)) {
			if(firstfield) firstfield = false;
			else o << '\t';
			o << h.patSeq.toZBuf();
		}
		if(!suppress.test((uint32_t)field++)) {
			if(firstfield) firstfield = false;
			else o << '\t';
			o << h.quals.toZBuf();
		}
		if(!suppress.test((uint32_t)field++)) {
			if(firstfield) firstfield = false;
			else o << '\t';
			o << h.oms;
		}
		if(!suppress.test((uint32_t)field++)) {
			if(firstfield) firstfield = false;
			else o << '\t';
			// Output mismatch column
			bool firstmm = true;
			for (unsigned int i = 0; i < h.patSeq.length(); ++ i) {
				if(h.mms.test(i)) {
					// There's a mismatch at this position
					if (!firstmm) {
						o << ",";
					}
					o << i; // position
					assert_gt(h.refcs.size(), i);
					char refChar = toupper(h.refcs[i]);
					char qryChar = (h.fw ? h.patSeq.toChar(i) : h.patSeq.toChar(h.patSeq.length()-i-1));
					assert_neq(refChar, qryChar);
					o << ":" << refChar << ">" << qryChar;
					firstmm = false;
				}
			}
			if(partition != 0 && firstmm) o << '-';
		}
		if(partition != 0) {
			// Fields addded as of Crossbow 0.1.4
			if(!suppress.test((uint32_t)field++)) {
				if(firstfield) firstfield = false;
				else o << '\t';
				o << (int)h.mate;
			}
			// Print label, or whole read name if label isn't found
			if(!suppress.test((uint32_t)field++)) {
				if(firstfield) firstfield = false;
				else o << '\t';
				int labelOff = -1;
				// If LB: field is present, print its value
				for(int i = 0; i < (int)h.patName.length() - 3; i++) {
					if(h.patName[i]   == 'L' &&
					   h.patName[i+1] == 'B' &&
					   h.patName[i+2] == ':' &&
					   ((i == 0) || h.patName[i-1] == ';'))
					{
						labelOff = i+3;
						for(int j = labelOff; j < (int)h.patName.length(); j++) {
							if(h.patName[j] != ';') {
								o << h.patName[j];
							} else {
								break;
							}
						}
					}
				}
				// Otherwise, print the whole read name
				if(labelOff == -1) {
					for (size_t i = 0; i < h.patName.length(); i++)
						o << h.patName[i];
				}
			}
		}
		if(cost) {
			// Stratum
			if(!suppress.test((uint32_t)field++)) {
				if(firstfield) firstfield = false;
				else o << '\t';
				o << (int)h.stratum;
			}
			// Cost
			if(!suppress.test((uint32_t)field++)) {
				if(firstfield) firstfield = false;
				else o << '\t';
				o << (int)h.cost;
			}
		}
		if(showSeed) {
			// Seed
			if(!suppress.test((uint32_t)field++)) {
				if(firstfield) firstfield = false;
				else o << '\t';
				o << h.seed;
			}
		}
		o << '\n';
	} while(spill);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, 0x14(%rsp)
movq %rdx, 0x28(%rsp)
movq %rsi, %r12
movq %rdi, %r13
movq 0x98(%rsp), %rsi
movl %r8d, %eax
negl %eax
cmovsl %r8d, %eax
movl %eax, 0x20(%rsp)
xorb $0x1, %cl
movl %ecx, 0x18(%rsp)
leaq 0x48(%r12), %rax
movq %rax, 0x50(%rsp)
leaq 0x91(%r12), %rax
movq %rax, 0x38(%rsp)
leaq 0x178(%r12), %rax
movq %rax, 0x48(%rsp)
leaq 0x18c(%r12), %rax
movq %rax, 0x40(%rsp)
movl $0xffffffff, 0x1c(%rsp) # imm = 0xFFFFFFFF
leaq 0x5049(%rip), %rbp      # 0x56757
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
movq $0x0, 0x30(%rsp)
xorl %edx, %edx
movl %r8d, 0x10(%rsp)
movq 0x30(%rsp), %rcx
leal 0x1(%rcx), %eax
testb $0x1, %dl
movl $0x0, %ebx
cmovnel %eax, %ebx
cmovnel %eax, %ecx
movq %rcx, 0x30(%rsp)
movzbl %dl, %r15d
movl $0x0, %eax
cmovnel %eax, %r15d
cmpl $0x0, 0x10(%rsp)
je 0x517a0
movl %edx, %r14d
cmpl $0x0, 0x10(%rsi)
je 0x51771
movq 0x18(%rsi), %rax
movb $0x1, %cl
movl %ecx, 0x4(%rsp)
testb $0x1, (%rax)
jne 0x51821
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x51806
movl (%r12), %esi
cmpq %rsi, 0x18(%rax)
jbe 0x51806
shlq $0x5, %rsi
addq 0x8(%rax), %rsi
movzbl 0x18(%rsp), %edx
movq %r13, %rdi
callq 0x50fee
jmp 0x51811
cmpl $0x0, 0x10(%rsi)
je 0x517b9
movq 0x18(%rsi), %rax
movb $0x1, %cl
movl %ecx, 0x4(%rsp)
testb $0x1, (%rax)
jne 0x519fa
cmpq $0x0, 0x38(%r12)
je 0x519f2
xorl %ebx, %ebx
movq %rsp, %rbp
movq 0x20(%r12), %rax
movb (%rax,%rbx), %al
movb %al, (%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x4f02e
incq %rbx
cmpq 0x38(%r12), %rbx
jb 0x517ca
movl $0x0, 0x4(%rsp)
movq 0x98(%rsp), %rsi
leaq 0x4f56(%rip), %rbp      # 0x56757
jmp 0x519fa
movq %r13, %rdi
movq %r12, %rsi
callq 0x5115d
movl $0x0, 0x4(%rsp)
movq 0x98(%rsp), %rsi
testb $0x1, %r14b
jne 0x5183e
movl 0x4(%r12), %eax
addl 0x14(%rsp), %eax
xorl %edx, %edx
divl 0x20(%rsp)
movl %edx, 0x1c(%rsp)
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0x5186f
movl 0x1c(%rsp), %eax
addq 0x68(%r12), %rax
movq 0x30(%rsp), %rcx
incl %ecx
imull 0x20(%rsp), %ecx
cmpq %rcx, %rax
movzbl %r15b, %ecx
movl $0x1, %eax
cmovael %eax, %ecx
movl %ecx, 0xc(%rsp)
jmp 0x51874
movl %r15d, 0xc(%rsp)
cmpl $0x2, 0x10(%rsi)
movq %rsp, %r15
jb 0x51886
movq 0x18(%rsi), %rax
testb $0x2, (%rax)
jne 0x51900
cmpb $0x0, 0x4(%rsp)
je 0x51897
movl $0x0, 0x4(%rsp)
jmp 0x518a6
movb $0x9, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x4f02e
movl $0xcccccccd, %ecx       # imm = 0xCCCCCCCD
addl 0x24(%rsp), %ebx
movl %ebx, (%rsp)
movl $0xa, %r14d
je 0x518ce
decl %r14d
movl %ebx, %eax
imulq %rcx, %rax
shrq $0x23, %rax
cmpl $0xa, %ebx
movl %eax, %ebx
jae 0x518ba
testl %r14d, %r14d
leaq 0xb(%rsp), %rbx
jle 0x518ed
movb $0x30, 0xb(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4f02e
decl %r14d
jne 0x518d8
movq %r13, %rdi
movq %r15, %rsi
callq 0x5115d
movq 0x98(%rsp), %rsi
cmpl $0x3, 0x10(%rsi)
jb 0x5190f
movq 0x18(%rsi), %rax
testb $0x4, (%rax)
jne 0x5198a
cmpb $0x0, 0x4(%rsp)
je 0x51920
movl $0x0, 0x4(%rsp)
jmp 0x5192f
movb $0x9, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x4f02e
movl $0xcccccccd, %edx       # imm = 0xCCCCCCCD
movl 0x4(%r12), %eax
addl 0x14(%rsp), %eax
movl %eax, (%rsp)
movl $0x9, %ebx
je 0x5195a
decl %ebx
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x23, %rcx
cmpl $0xa, %eax
movl %ecx, %eax
jae 0x51947
testl %ebx, %ebx
leaq 0xb(%rsp), %r14
jle 0x51977
movb $0x30, 0xb(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x4f02e
decl %ebx
jne 0x51963
movq %r13, %rdi
movq %r15, %rsi
callq 0x5115d
movq 0x98(%rsp), %rsi
cmpl $0x4, 0x10(%rsi)
jb 0x5199d
movq 0x18(%rsi), %rax
testb $0x8, (%rax)
jne 0x51b26
cmpb $0x0, 0x4(%rsp)
je 0x519ae
movl $0x0, 0x4(%rsp)
jmp 0x519bd
movb $0x9, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x4f02e
cmpb $0x0, 0x17c(%r12)
leaq 0x520f(%rip), %rsi      # 0x56bdc
leaq 0x6a26(%rip), %rax      # 0x583fa
cmovneq %rax, %rsi
movl $0x1, %edx
movq %r13, %rdi
callq 0x512bc
movq 0x98(%rsp), %rsi
jmp 0x51b26
movl $0x0, 0x4(%rsp)
cmpl $0x2, 0x10(%rsi)
jb 0x51a09
movq 0x18(%rsi), %rax
testb $0x2, (%rax)
jne 0x51a53
cmpb $0x0, 0x4(%rsp)
je 0x51a1d
movl $0x0, 0x4(%rsp)
movq %rsp, %rbx
jmp 0x51a2f
movb $0x9, (%rsp)
movq %r13, %rdi
movq %rsp, %rbx
movq %rbx, %rsi
callq 0x4f02e
movb 0x17c(%r12), %al
xorb $0x1, %al
addb %al, %al
addb $0x2b, %al
movb %al, (%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4f02e
movq 0x98(%rsp), %rsi
cmpl $0x3, 0x10(%rsi)
jb 0x51a62
movq 0x18(%rsi), %rax
testb $0x4, (%rax)
jne 0x51ac0
cmpb $0x0, 0x4(%rsp)
je 0x51a73
movl $0x0, 0x4(%rsp)
jmp 0x51a82
movb $0x9, (%rsp)
movq %r13, %rdi
movq %rsp, %rsi
callq 0x4f02e
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x51aad
movl (%r12), %esi
cmpq %rsi, 0x18(%rax)
jbe 0x51aad
shlq $0x5, %rsi
addq 0x8(%rax), %rsi
movzbl 0x18(%rsp), %edx
movq %r13, %rdi
callq 0x50fee
jmp 0x51ab8
movq %r13, %rdi
movq %r12, %rsi
callq 0x5115d
movq 0x98(%rsp), %rsi
cmpl $0x4, 0x10(%rsi)
jb 0x51acf
movq 0x18(%rsi), %rax
testb $0x8, (%rax)
jne 0x51b1e
cmpb $0x0, 0x4(%rsp)
je 0x51ae3
movl $0x0, 0x4(%rsp)
movq %rsp, %rbx
jmp 0x51af5
movb $0x9, (%rsp)
movq %r13, %rdi
movq %rsp, %rbx
movq %rbx, %rsi
callq 0x4f02e
movl 0x4(%r12), %eax
addl 0x14(%rsp), %eax
movl %eax, (%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5115d
movl %r15d, 0xc(%rsp)
movq 0x98(%rsp), %rsi
movq %rbx, %r15
jmp 0x51b26
movl %r15d, 0xc(%rsp)
movq %rsp, %r15
cmpl $0x5, 0x10(%rsi)
jb 0x51b35
movq 0x18(%rsi), %rax
testb $0x10, (%rax)
jne 0x51b83
cmpb $0x0, 0x4(%rsp)
je 0x51b46
movl $0x0, 0x4(%rsp)
jmp 0x51b55
movb $0x9, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x4f02e
movq 0x50(%rsp), %rdi
movq %rbp, %rsi
callq 0x255e6
movq %rax, %r15
movq %rax, %rdi
callq 0x91b0
movq %r13, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x512bc
movq 0x98(%rsp), %rsi
cmpl $0x6, 0x10(%rsi)
jb 0x51b92
movq 0x18(%rsi), %rax
testb $0x20, (%rax)
jne 0x51bfc
cmpb $0x0, 0x4(%rsp)
je 0x51ba3
movl $0x0, 0x4(%rsp)
jmp 0x51bb2
movb $0x9, (%rsp)
movq %r13, %rdi
movq %rsp, %rsi
callq 0x4f02e
movq 0x98(%r12), %rax
testq %rax, %rax
je 0x51bd5
movq 0x80(%r12), %rcx
movb $0x0, (%rcx,%rax)
movq 0x80(%r12), %r15
jmp 0x51bde
movq 0x38(%rsp), %r15
movb $0x0, (%r15)
movq %r15, %rdi
callq 0x91b0
movq %r13, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x512bc
movq 0x98(%rsp), %rsi
cmpl $0x7, 0x10(%rsi)
movq %rsp, %r15
jb 0x51c0e
movq 0x18(%rsi), %rax
testb $0x40, (%rax)
jne 0x51c43
cmpb $0x0, 0x4(%rsp)
je 0x51c1f
movl $0x0, 0x4(%rsp)
jmp 0x51c2e
movb $0x9, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x4f02e
movq %r13, %rdi
movq 0x48(%rsp), %rsi
callq 0x5115d
movq 0x98(%rsp), %rsi
cmpl $0x8, 0x10(%rsi)
jb 0x51c56
movq 0x18(%rsi), %rax
testb $-0x80, (%rax)
jne 0x51d92
cmpb $0x0, 0x4(%rsp)
je 0x51c67
movl $0x0, 0x4(%rsp)
jmp 0x51c76
movb $0x9, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x4f02e
movl $0x0, (%rsp)
xorl %ecx, %ecx
cmpq $0x0, 0x68(%r12)
je 0x51d6d
movb $0x1, %al
movl %ecx, %edx
shrl $0x5, %edx
movl 0xb0(%r12,%rdx,4), %edx
btl %ecx, %edx
jae 0x51d56
testb $0x1, %al
jne 0x51cbb
movl $0x1, %edx
movq %r13, %rdi
leaq 0x573e(%rip), %rsi      # 0x573f4
callq 0x512bc
movq %r13, %rdi
movq %r15, %rsi
callq 0x5115d
movl (%rsp), %ebx
movq 0x140(%r12), %rax
movsbl (%rax,%rbx), %edi
callq 0x9990
movl %eax, %r15d
movq 0x50(%r12), %rax
leaq (%rax,%rbx), %rcx
addq 0x68(%r12), %rax
notq %rbx
addq %rbx, %rax
cmpb $0x0, 0x17c(%r12)
cmovneq %rcx, %rax
movsbq (%rax), %rax
movb (%rax,%rbp), %bl
movl $0x1, %edx
movq %r13, %rdi
leaq 0x21f6(%rip), %rsi      # 0x53f0a
callq 0x512bc
movb %r15b, 0xb(%rsp)
movq %rsp, %r15
movq %r13, %rdi
leaq 0xb(%rsp), %r14
movq %r14, %rsi
callq 0x4f02e
movl $0x1, %edx
movq %r13, %rdi
leaq 0x4c1c(%rip), %rsi      # 0x5695c
callq 0x512bc
movb %bl, 0xb(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x4f02e
xorl %eax, %eax
movl (%rsp), %ecx
incl %ecx
movl %ecx, (%rsp)
cmpq %rcx, 0x68(%r12)
ja 0x51c8d
xorb $0x1, %al
movl %eax, %ecx
cmpl $0x0, 0x10(%rsp)
sete %al
orb %cl, %al
testb $0x1, %al
jne 0x51d8a
movb $0x2d, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x4f02e
movq 0x98(%rsp), %rsi
cmpl $0x0, 0x10(%rsp)
je 0x51dba
cmpl $0x9, 0x10(%rsi)
jb 0x51da9
movq 0x18(%rsi), %rax
testb $0x1, 0x1(%rax)
jne 0x51df2
cmpb $0x0, 0x4(%rsp)
je 0x51dc4
movl $0x0, 0x4(%rsp)
jmp 0x51dd3
movl $0x8, %ebx
jmp 0x51f17
movb $0x9, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x4f02e
movzbl 0x188(%r12), %eax
movl %eax, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x511ff
movq 0x98(%rsp), %rsi
cmpl $0xa, 0x10(%rsi)
jb 0x51e0b
movq 0x18(%rsi), %rax
movl $0xa, %ebx
testb $0x2, 0x1(%rax)
jne 0x51f17
cmpb $0x0, 0x4(%rsp)
je 0x51e1c
movl $0x0, 0x4(%rsp)
jmp 0x51e33
movb $0x9, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x4f02e
movq 0x98(%rsp), %rsi
movb $0x1, %al
cmpl $0x4, 0x38(%r12)
jl 0x51eda
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl $0x3, %ebp
xorl %r14d, %r14d
movq 0x20(%r12), %rax
cmpb $0x4c, (%rax,%r14)
jne 0x51eb8
cmpb $0x42, 0x1(%rax,%r14)
jne 0x51eb8
cmpb $0x3a, 0x2(%rax,%r14)
jne 0x51eb8
testq %r14, %r14
je 0x51e77
cmpb $0x3b, -0x1(%rax,%r14)
jne 0x51eb8
leaq 0x3(%r14), %rbx
movslq 0x38(%r12), %rax
cmpq %rax, %rbx
jge 0x51eb8
movq %rbp, %r15
movq 0x20(%r12), %rax
movb (%rax,%r15), %al
cmpb $0x3b, %al
je 0x51eb5
movb %al, (%rsp)
movq %r13, %rdi
movq %rsp, %rsi
callq 0x4f02e
movq 0x98(%rsp), %rsi
incq %r15
cmpl 0x38(%r12), %r15d
jl 0x51e88
movq %rsp, %r15
incq %r14
movl 0x38(%r12), %eax
addl $-0x3, %eax
cltq
incq %rbp
cmpq %rax, %r14
jl 0x51e4e
cmpl $-0x1, %ebx
sete %al
leaq 0x487d(%rip), %rbp      # 0x56757
movl $0xa, %ebx
testb %al, %al
je 0x51f17
cmpq $0x0, 0x38(%r12)
je 0x51f17
xorl %r14d, %r14d
movq 0x20(%r12), %rax
movb (%rax,%r14), %al
movb %al, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x4f02e
incq %r14
cmpq 0x38(%r12), %r14
jb 0x51eee
movq 0x98(%rsp), %rsi
cmpb $0x0, 0x90(%rsp)
je 0x51fec
movl %ebx, %r15d
cmpl %ebx, 0x10(%rsi)
jbe 0x51f39
movq 0x18(%rsi), %rax
movl (%rax), %eax
btl %r15d, %eax
jb 0x51f85
cmpb $0x0, 0x4(%rsp)
je 0x51f4d
movl $0x0, 0x4(%rsp)
movq %rsp, %rbp
jmp 0x51f5f
movb $0x9, (%rsp)
movq %r13, %rdi
movq %rsp, %rbp
movq %rbp, %rsi
callq 0x4f02e
movsbl 0x180(%r12), %eax
movl %eax, (%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x511ff
movq 0x98(%rsp), %rsi
leaq 0x47d2(%rip), %rbp      # 0x56757
addq $0x2, %rbx
movl %r15d, %eax
orl $0x1, %eax
cmpl %eax, 0x10(%rsi)
jbe 0x51fa8
movq 0x18(%rsi), %rax
movl (%rax), %eax
movl %r15d, %ecx
shrl %cl, %eax
testb $0x2, %al
je 0x51fa8
movq %rsp, %r15
jmp 0x51fec
cmpb $0x0, 0x4(%rsp)
je 0x51fbc
movl $0x0, 0x4(%rsp)
movq %rsp, %r15
jmp 0x51fce
movb $0x9, (%rsp)
movq %r13, %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x4f02e
movl 0x184(%r12), %eax
movl %eax, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x511ff
movq 0x98(%rsp), %rsi
leaq 0x1c155(%rip), %rax     # 0x6e148
cmpb $0x1, (%rax)
jne 0x5202b
cmpl %ebx, 0x10(%rsi)
jbe 0x52008
movq 0x18(%rsi), %rax
movl (%rax), %eax
btl %ebx, %eax
jb 0x5202b
cmpb $0x0, 0x4(%rsp)
jne 0x5201e
movb $0x9, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x4f02e
movq %r13, %rdi
movq 0x40(%rsp), %rsi
callq 0x5115d
movb $0xa, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x4f02e
movq 0x98(%rsp), %rsi
movl 0xc(%rsp), %edx
testb $0x1, %dl
jne 0x51726
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq