// File: 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
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq 0x18(%rbp), %rax
movb 0x10(%rbp), %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %cl
movb %cl, -0x19(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
andb $0x1, %al
movb %al, -0x25(%rbp)
movb $0x0, -0x26(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0xffffffff, -0x30(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
movb $0x0, -0x35(%rbp)
testb $0x1, -0x26(%rbp)
je 0x86cd5
movb $0x0, -0x26(%rbp)
movb $0x1, -0x35(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq $0x0, -0x40(%rbp)
movb $0x1, -0x41(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x8701c
movl -0x20(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, -0x48(%rbp)
movq 0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movl %eax, %esi
callq 0x879e0
testb $0x1, %al
jne 0x86da7
testb $0x1, -0x41(%rbp)
je 0x86d26
movb $0x0, -0x41(%rbp)
jmp 0x86d34
movq -0x8(%rbp), %rdi
movl $0x9, %esi
callq 0x862e0
cmpq $0x0, -0x18(%rbp)
je 0x86d98
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq %rax, -0xa8(%rbp)
movq -0x18(%rbp), %rdi
callq 0x26400
movq %rax, %rcx
movq -0xa8(%rbp), %rax
cmpq %rcx, %rax
jae 0x86d98
movq -0x8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x28860
movq -0xb0(%rbp), %rdi
movq %rax, %rsi
movb -0x19(%rbp), %al
xorb $-0x1, %al
movzbl %al, %edx
andl $0x1, %edx
callq 0x861c0
jmp 0x86da5
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x86310
jmp 0x86da7
testb $0x1, -0x35(%rbp)
jne 0x86dd1
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
addl -0x24(%rbp), %eax
xorl %edx, %edx
divl -0x48(%rbp)
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
addl -0x24(%rbp), %eax
xorl %edx, %edx
divl -0x48(%rbp)
movl %edx, -0x34(%rbp)
testb $0x1, -0x35(%rbp)
je 0x86dd9
jmp 0x86dd9
cmpl $0x0, -0x20(%rbp)
jle 0x86e16
movl -0x34(%rbp), %eax
movq %rax, -0xb8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x863d0
movq %rax, %rcx
movq -0xb8(%rbp), %rax
addq %rcx, %rax
movl -0x48(%rbp), %ecx
movl -0x2c(%rbp), %edx
addl $0x1, %edx
imull %edx, %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jb 0x86e16
movb $0x1, -0x26(%rbp)
movq 0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movl %eax, %esi
callq 0x879e0
testb $0x1, %al
jne 0x86ee9
testb $0x1, -0x41(%rbp)
je 0x86e44
movb $0x0, -0x41(%rbp)
jmp 0x86e52
movq -0x8(%rbp), %rdi
movl $0x9, %esi
callq 0x862e0
movl $0xa, -0x4c(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0xbc(%rbp)
testb $0x1, -0x35(%rbp)
je 0x86e73
movl -0x2c(%rbp), %eax
movl %eax, -0xc0(%rbp)
jmp 0x86e7d
xorl %eax, %eax
movl %eax, -0xc0(%rbp)
jmp 0x86e7d
movl -0xbc(%rbp), %eax
movl -0xc0(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
jbe 0x86eb4
movl -0x4c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4c(%rbp)
movl -0x54(%rbp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x54(%rbp)
jmp 0x86e94
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jge 0x86edc
movq -0x8(%rbp), %rdi
movl $0x30, %esi
callq 0x862e0
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x86ebb
movq -0x8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x86310
movq 0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movl %eax, %esi
callq 0x879e0
testb $0x1, %al
jne 0x86f94
testb $0x1, -0x41(%rbp)
je 0x86f17
movb $0x0, -0x41(%rbp)
jmp 0x86f25
movq -0x8(%rbp), %rdi
movl $0x9, %esi
callq 0x862e0
movl $0x9, -0x5c(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x60(%rbp), %eax
movl %eax, -0x64(%rbp)
cmpl $0x0, -0x64(%rbp)
jbe 0x86f5f
movl -0x5c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x5c(%rbp)
movl -0x64(%rbp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x64(%rbp)
jmp 0x86f3f
movl $0x0, -0x68(%rbp)
movl -0x68(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jge 0x86f87
movq -0x8(%rbp), %rdi
movl $0x30, %esi
callq 0x862e0
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x86f66
movq -0x8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x86310
movq 0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movl %eax, %esi
callq 0x879e0
testb $0x1, %al
jne 0x87017
testb $0x1, -0x41(%rbp)
je 0x86fbe
movb $0x0, -0x41(%rbp)
jmp 0x86fcc
movq -0x8(%rbp), %rdi
movl $0x9, %esi
callq 0x862e0
movq -0x8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x10(%rbp), %rax
testb $0x1, 0x17c(%rax)
je 0x86ff4
leaq 0x7755(%rip), %rax      # 0x8e740
movq %rax, -0xd0(%rbp)
jmp 0x87004
leaq 0x5f28(%rip), %rax      # 0x8cf23
movq %rax, -0xd0(%rbp)
jmp 0x87004
movq -0xc8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
callq 0x86190
jmp 0x87248
movq 0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movl %eax, %esi
callq 0x879e0
testb $0x1, %al
jne 0x870c2
testb $0x1, -0x41(%rbp)
je 0x8704a
movb $0x0, -0x41(%rbp)
jmp 0x87058
movq -0x8(%rbp), %rdi
movl $0x9, %esi
callq 0x862e0
movq $0x0, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0x2ef90
movq %rax, %rcx
movq -0xd8(%rbp), %rax
cmpq %rcx, %rax
jae 0x870c0
movq -0x8(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x70(%rbp), %rsi
callq 0x49b90
movq -0xe0(%rbp), %rdi
movsbl (%rax), %esi
callq 0x862e0
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0x87060
jmp 0x870c2
movq 0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movl %eax, %esi
callq 0x879e0
testb $0x1, %al
jne 0x87145
testb $0x1, -0x41(%rbp)
je 0x870ec
movb $0x0, -0x41(%rbp)
jmp 0x870fa
movq -0x8(%rbp), %rdi
movl $0x9, %esi
callq 0x862e0
movq -0x8(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x10(%rbp), %rax
movb 0x17c(%rax), %cl
movb $0x2b, %al
movb $0x2d, %dl
movb %dl, -0xe2(%rbp)
testb $0x1, %cl
movb %al, -0xe1(%rbp)
jne 0x87130
movb -0xe2(%rbp), %al
movb %al, -0xe1(%rbp)
movq -0xf0(%rbp), %rdi
movb -0xe1(%rbp), %al
movsbl %al, %esi
callq 0x862e0
movq 0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movl %eax, %esi
callq 0x879e0
testb $0x1, %al
jne 0x871f4
testb $0x1, -0x41(%rbp)
je 0x87173
movb $0x0, -0x41(%rbp)
jmp 0x87181
movq -0x8(%rbp), %rdi
movl $0x9, %esi
callq 0x862e0
cmpq $0x0, -0x18(%rbp)
je 0x871e5
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq %rax, -0xf8(%rbp)
movq -0x18(%rbp), %rdi
callq 0x26400
movq %rax, %rcx
movq -0xf8(%rbp), %rax
cmpq %rcx, %rax
jae 0x871e5
movq -0x8(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x28860
movq -0x100(%rbp), %rdi
movq %rax, %rsi
movb -0x19(%rbp), %al
xorb $-0x1, %al
movzbl %al, %edx
andl $0x1, %edx
callq 0x861c0
jmp 0x871f2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x86310
jmp 0x871f4
movq 0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movl %eax, %esi
callq 0x879e0
testb $0x1, %al
jne 0x87246
testb $0x1, -0x41(%rbp)
je 0x8721e
movb $0x0, -0x41(%rbp)
jmp 0x8722c
movq -0x8(%rbp), %rdi
movl $0x9, %esi
callq 0x862e0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x74(%rbp)
leaq -0x74(%rbp), %rsi
callq 0x86310
jmp 0x87248
movq 0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movl %eax, %esi
callq 0x879e0
testb $0x1, %al
jne 0x872a7
testb $0x1, -0x41(%rbp)
je 0x87272
movb $0x0, -0x41(%rbp)
jmp 0x87280
movq -0x8(%rbp), %rdi
movl $0x9, %esi
callq 0x862e0
movq -0x8(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x10(%rbp), %rdi
addq $0x48, %rdi
callq 0x35360
movq -0x108(%rbp), %rdi
movq %rax, %rsi
callq 0x86190
movq 0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movl %eax, %esi
callq 0x879e0
testb $0x1, %al
jne 0x87306
testb $0x1, -0x41(%rbp)
je 0x872d1
movb $0x0, -0x41(%rbp)
jmp 0x872df
movq -0x8(%rbp), %rdi
movl $0x9, %esi
callq 0x862e0
movq -0x8(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x10(%rbp), %rdi
addq $0x78, %rdi
callq 0x2e5e0
movq -0x110(%rbp), %rdi
movq %rax, %rsi
callq 0x86190
movq 0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movl %eax, %esi
callq 0x879e0
testb $0x1, %al
jne 0x87352
testb $0x1, -0x41(%rbp)
je 0x87330
movb $0x0, -0x41(%rbp)
jmp 0x8733e
movq -0x8(%rbp), %rdi
movl $0x9, %esi
callq 0x862e0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x178, %rsi            # imm = 0x178
callq 0x86310
movq 0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movl %eax, %esi
callq 0x879e0
testb $0x1, %al
jne 0x874f4
testb $0x1, -0x41(%rbp)
je 0x87380
movb $0x0, -0x41(%rbp)
jmp 0x8738e
movq -0x8(%rbp), %rdi
movl $0x9, %esi
callq 0x862e0
movb $0x1, -0x75(%rbp)
movl $0x0, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
movq %rax, -0x118(%rbp)
movq -0x10(%rbp), %rdi
addq $0x48, %rdi
callq 0x2ef90
movq %rax, %rcx
movq -0x118(%rbp), %rax
cmpq %rcx, %rax
jae 0x874d8
movq -0x10(%rbp), %rdi
addq $0xa8, %rdi
movl -0x7c(%rbp), %esi
callq 0x4daa0
testb $0x1, %al
jne 0x873df
jmp 0x874c8
testb $0x1, -0x75(%rbp)
jne 0x873f5
movq -0x8(%rbp), %rdi
leaq 0x634b(%rip), %rsi      # 0x8d73b
callq 0x86190
movq -0x8(%rbp), %rdi
leaq -0x7c(%rbp), %rsi
callq 0x86310
movq -0x10(%rbp), %rdi
addq $0x138, %rdi            # imm = 0x138
movl -0x7c(%rbp), %eax
movl %eax, %esi
callq 0x86450
movsbl (%rax), %edi
callq 0xabf0
movb %al, -0x7d(%rbp)
movq -0x10(%rbp), %rax
testb $0x1, 0x17c(%rax)
je 0x87449
movq -0x10(%rbp), %rdi
addq $0x48, %rdi
movl -0x7c(%rbp), %eax
movl %eax, %esi
callq 0x45080
movb %al, -0x119(%rbp)
jmp 0x87484
movq -0x10(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x128(%rbp)
movq -0x10(%rbp), %rdi
addq $0x48, %rdi
callq 0x2ef90
movq -0x128(%rbp), %rdi
movq %rax, %rsi
movl -0x7c(%rbp), %eax
subq %rax, %rsi
subq $0x1, %rsi
callq 0x45080
movb %al, -0x119(%rbp)
movb -0x119(%rbp), %al
movb %al, -0x7e(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x2dbd(%rip), %rsi      # 0x8a255
callq 0x86190
movq %rax, %rdi
movsbl -0x7d(%rbp), %esi
callq 0x862e0
movq %rax, %rdi
leaq 0x57f0(%rip), %rsi      # 0x8cca3
callq 0x86190
movq %rax, %rdi
movsbl -0x7e(%rbp), %esi
callq 0x862e0
movb $0x0, -0x75(%rbp)
jmp 0x874ca
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x87399
cmpl $0x0, -0x20(%rbp)
je 0x874f2
testb $0x1, -0x75(%rbp)
je 0x874f2
movq -0x8(%rbp), %rdi
movl $0x2d, %esi
callq 0x862e0
jmp 0x874f4
cmpl $0x0, -0x20(%rbp)
je 0x877af
movq 0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movl %eax, %esi
callq 0x879e0
testb $0x1, %al
jne 0x87557
testb $0x1, -0x41(%rbp)
je 0x87528
movb $0x0, -0x41(%rbp)
jmp 0x87536
movq -0x8(%rbp), %rdi
movl $0x9, %esi
callq 0x862e0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0x188(%rax), %eax
movl %eax, -0x84(%rbp)
leaq -0x84(%rbp), %rsi
callq 0x86380
movq 0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movl %eax, %esi
callq 0x879e0
testb $0x1, %al
jne 0x877ad
testb $0x1, -0x41(%rbp)
je 0x87585
movb $0x0, -0x41(%rbp)
jmp 0x87593
movq -0x8(%rbp), %rdi
movl $0x9, %esi
callq 0x862e0
movl $0xffffffff, -0x88(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
movl %eax, -0x12c(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0x2ef90
movq %rax, %rcx
movl -0x12c(%rbp), %eax
subl $0x3, %ecx
cmpl %ecx, %eax
jge 0x87729
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movslq -0x8c(%rbp), %rsi
callq 0x49b90
movsbl (%rax), %eax
cmpl $0x4c, %eax
jne 0x87713
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x49b90
movsbl (%rax), %eax
cmpl $0x42, %eax
jne 0x87713
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movl -0x8c(%rbp), %eax
addl $0x2, %eax
movslq %eax, %rsi
callq 0x49b90
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0x87713
cmpl $0x0, -0x8c(%rbp)
je 0x8766c
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movl -0x8c(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x49b90
movsbl (%rax), %eax
cmpl $0x3b, %eax
jne 0x87713
movl -0x8c(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x88(%rbp)
movl -0x88(%rbp), %eax
movl %eax, -0x90(%rbp)
movl -0x90(%rbp), %eax
movl %eax, -0x130(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0x2ef90
movq %rax, %rcx
movl -0x130(%rbp), %eax
cmpl %ecx, %eax
jge 0x87711
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movslq -0x90(%rbp), %rsi
callq 0x49b90
movsbl (%rax), %eax
cmpl $0x3b, %eax
je 0x876f9
movq -0x8(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movslq -0x90(%rbp), %rsi
callq 0x49b90
movq -0x138(%rbp), %rdi
movsbl (%rax), %esi
callq 0x862e0
jmp 0x876fb
jmp 0x87711
jmp 0x876fd
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
jmp 0x87687
jmp 0x87713
jmp 0x87715
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
jmp 0x875a7
cmpl $-0x1, -0x88(%rbp)
jne 0x877ab
movq $0x0, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0x2ef90
movq %rax, %rcx
movq -0x140(%rbp), %rax
cmpq %rcx, %rax
jae 0x877a9
movq -0x8(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x98(%rbp), %rsi
callq 0x49b90
movq -0x148(%rbp), %rdi
movsbl (%rax), %esi
callq 0x862e0
movq -0x98(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0x8773d
jmp 0x877ab
jmp 0x877ad
jmp 0x877af
testb $0x1, -0x25(%rbp)
je 0x8786c
movq 0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movl %eax, %esi
callq 0x879e0
testb $0x1, %al
jne 0x87812
testb $0x1, -0x41(%rbp)
je 0x877e3
movb $0x0, -0x41(%rbp)
jmp 0x877f1
movq -0x8(%rbp), %rdi
movl $0x9, %esi
callq 0x862e0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movsbl 0x180(%rax), %eax
movl %eax, -0x9c(%rbp)
leaq -0x9c(%rbp), %rsi
callq 0x86380
movq 0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movl %eax, %esi
callq 0x879e0
testb $0x1, %al
jne 0x8786a
testb $0x1, -0x41(%rbp)
je 0x8783c
movb $0x0, -0x41(%rbp)
jmp 0x8784a
movq -0x8(%rbp), %rdi
movl $0x9, %esi
callq 0x862e0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x184(%rax), %eax
movl %eax, -0xa0(%rbp)
leaq -0xa0(%rbp), %rsi
callq 0x86380
jmp 0x8786c
leaq 0x23a35(%rip), %rax     # 0xab2a8
testb $0x1, (%rax)
je 0x878c6
movq 0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movl %eax, %esi
callq 0x879e0
testb $0x1, %al
jne 0x878c4
testb $0x1, -0x41(%rbp)
je 0x878a2
movb $0x0, -0x41(%rbp)
jmp 0x878b0
movq -0x8(%rbp), %rdi
movl $0x9, %esi
callq 0x862e0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x18c, %rsi            # imm = 0x18C
callq 0x86310
jmp 0x878c6
movq -0x8(%rbp), %rdi
movl $0xa, %esi
callq 0x862e0
testb $0x1, -0x26(%rbp)
jne 0x86cba
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
nopw (%rax,%rax)