// File: BenLangmead[P]bowtie/ebwt_search.cpp
// Function: mismatchSearchFull(PatternComposer&, HitSink&, Ebwt&, Ebwt&, EList<SString<char>, 128>&)
static void mismatchSearchFull(PatternComposer& _patsrc,
                               HitSink& _sink,
                               Ebwt& ebwtFw,
                               Ebwt& ebwtBw,
                               EList<BTRefString >& os)
{
	mismatchSearch_patsrc       = &_patsrc;
	mismatchSearch_sink         = &_sink;
	mismatchSearch_ebwtFw       = &ebwtFw;
	mismatchSearch_ebwtBw       = &ebwtBw;
	mismatchSearch_doneMask     = NULL;
	mismatchSearch_hitMask      = NULL;
	mismatchSearch_os           = &os;

	assert(!ebwtFw.isInMemory());
	assert(!ebwtBw.isInMemory());
	{
		// Load the other half of the index into memory
		Timer _t(cerr, "Time loading forward index: ", timing);
		ebwtFw.loadIntoMemory(-1, !noRefNames, startVerbose);
	}
	{
		// Load the other half of the index into memory
		Timer _t(cerr, "Time loading mirror index: ", timing);
		ebwtBw.loadIntoMemory(-1, !noRefNames, startVerbose);
	}
	// Create range caches, which are shared among all aligners
	BitPairReference *refs = NULL;
	bool pair = mates1.size() > 0 || mates12.size() > 0;
	if(pair && mixedThresh < 0xffffffff) {
		Timer _t(cerr, "Time loading reference: ", timing);
		refs = new BitPairReference(adjustedEbwtFileBase, sanityCheck, NULL, &os, false, true, useMm, useShmem, mmSweep, verbose, startVerbose);
		if(!refs->loaded()) throw 1;
	}
	mismatchSearch_refs = refs;

	int tids[max(nthreads, thread_ceiling)];
#if (__cplusplus >= 201103L)
	EList<std::thread*> threads;
	EList<thread_tracking_pair> tps;
	tps.resizeExact(max(nthreads, thread_ceiling));
#else
	EList<tthread::thread*> threads;
#endif

#if (__cplusplus >= 201103L)
	std::atomic<int> all_threads_done;
	all_threads_done = 0;
#endif

	CHUD_START();
	{
		Timer _t(cerr, "Time for 1-mismatch full-index search: ", timing);

#ifndef _WIN32
		int pid = 0;
		if(thread_stealing) {
			pid = getpid();
			write_pid(thread_stealing_dir.c_str(), pid);
			thread_counter = 0;
		}
#endif

		for(int i = 0; i < nthreads; i++) {
			tids[i] = i;
#if (__cplusplus >= 201103L)
			tps[i].tid = tids[i];
			tps[i].done = &all_threads_done;
			if (i == nthreads - 1) {
				if(stateful) {
					mismatchSearchWorkerFullStateful((void*)&tps[i]);
				} else {
					mismatchSearchWorkerFull((void*)&tps[i]);
				}
			}
			else {
				if(stateful) {
					threads.push_back(new std::thread(mismatchSearchWorkerFullStateful, (void*)&tps[i]));
				} else {
					threads.push_back(new std::thread(mismatchSearchWorkerFull, (void*)&tps[i]));
				}
				threads[i]->detach();
				SLEEP(10);
			}
#else
			if (i == nthreads - 1) {
				if(stateful) {
					mismatchSearchWorkerFullStateful((void*)(tids + i));
				} else {
					mismatchSearchWorkerFull((void*)(tids + i));
				}
			}
			else {
				if(stateful) {
					threads.push_back(new tthread::thread(mismatchSearchWorkerFullStateful, (void *)(tids + i)));
				} else {
					threads.push_back(new tthread::thread(mismatchSearchWorkerFull, (void *)(tids + i)));
				}
			}
#endif
		}

#ifndef _WIN32
		if(thread_stealing) {
			int orig_threads = nthreads, steal_ctr = 1;
			for(int j = 0; j < 10; j++) {
				sleep(1);
			}
			while(thread_counter > 0) {
				if(steal_thread(pid, orig_threads)) {
					nthreads++;
					tids[nthreads-1] = nthreads;
#if (__cplusplus >= 201103L)
					tps[nthreads-1].tid = nthreads - 1;
					tps[nthreads-1].done = &all_threads_done;
					if(stateful) {
						threads.push_back(new std::thread(mismatchSearchWorkerFullStateful, (void*)&tps[nthreads-1]));
					} else {
						threads.push_back(new std::thread(mismatchSearchWorkerFull, (void*)&tps[nthreads-1]));
					}
					threads[nthreads - 1]->detach();
					SLEEP(10);
#else
					if(stateful) {
						threads.push_back(new tthread::thread(mismatchSearchWorkerFullStateful, (void *)(tids + nthreads - 1)));
					} else {
						threads.push_back(new tthread::thread(mismatchSearchWorkerFull, (void *)(tids + nthreads - 1)));
					}
#endif
					cerr << "pid " << pid << " started new worker # " << nthreads << endl;
				}
				steal_ctr++;
				for(int j = 0; j < 10; j++) {
					sleep(1);
				}
			}
		}
#endif

#if (__cplusplus >= 201103L)
		while(all_threads_done < nthreads) {
			SLEEP(10);
		}
#else
		for (int i = 0; i < nthreads - 1; i++) {
			threads[i]->join();
		}
#endif

#ifndef _WIN32
		if(thread_stealing) {
			del_pid(thread_stealing_dir.c_str(), pid);
		}
#endif
	}
	if(refs != NULL) delete refs;

	for (int i = 0; i < nthreads - 1; i++) {
		if (threads[i] != NULL) {
			delete threads[i];
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, 0x91d5e(%rip)     # 0xab4e8
movq -0x10(%rbp), %rax
movq %rax, 0x91d5b(%rip)     # 0xab4f0
movq -0x18(%rbp), %rax
movq %rax, 0x91d58(%rip)     # 0xab4f8
movq -0x20(%rbp), %rax
movq %rax, 0x91d55(%rip)     # 0xab500
movq $0x0, 0x91d52(%rip) # 0xab508
movq $0x0, 0x91d4f(%rip) # 0xab510
movq -0x28(%rbp), %rax
movq %rax, 0x91d4c(%rip)     # 0xab518
movl 0x91bca(%rip), %eax     # 0xab39c
testl %eax, %eax
setne %al
movzbl %al, %ecx
movq 0x8e80f(%rip), %rsi     # 0xa7ff0
leaq 0x72f6f(%rip), %rdx     # 0x8c757
leaq -0x48(%rbp), %rdi
callq 0x273f0
movq -0x18(%rbp), %rdi
movb 0x91c09(%rip), %al      # 0xab404
notb %al
movzbl 0x91b84(%rip), %ecx     # 0xab388
andl $0x1, %ecx
movzbl %al, %edx
andl $0x1, %edx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x290f0
jmp 0x19819
leaq -0x48(%rbp), %rdi
callq 0x27490
movl 0x91b74(%rip), %eax     # 0xab39c
testl %eax, %eax
setne %al
movzbl %al, %ecx
movq 0x8e7b9(%rip), %rsi     # 0xa7ff0
leaq 0x72f36(%rip), %rdx     # 0x8c774
leaq -0x78(%rbp), %rdi
callq 0x273f0
movq -0x20(%rbp), %rdi
movb 0x91bb3(%rip), %al      # 0xab404
notb %al
movzbl 0x91b2e(%rip), %ecx     # 0xab388
andl $0x1, %ecx
movzbl %al, %edx
andl $0x1, %edx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x290f0
jmp 0x1986f
leaq -0x78(%rbp), %rdi
callq 0x27490
movq $0x0, -0x80(%rbp)
leaq 0x918b9(%rip), %rdi     # 0xab140
callq 0x26400
movq %rax, %rcx
movb $0x1, %al
cmpq $0x0, %rcx
movb %al, -0x181(%rbp)
ja 0x198b6
leaq 0x918dc(%rip), %rdi     # 0xab180
callq 0x26400
cmpq $0x0, %rax
seta %al
movb %al, -0x181(%rbp)
movb -0x181(%rbp), %al
andb $0x1, %al
movb %al, -0x81(%rbp)
testb $0x1, -0x81(%rbp)
je 0x19a65
cmpl $-0x1, 0x91b68(%rip)    # 0xab440
jae 0x19a65
movl 0x91ab8(%rip), %eax     # 0xab39c
testl %eax, %eax
setne %al
movzbl %al, %ecx
movq 0x8e6fd(%rip), %rsi     # 0xa7ff0
leaq 0x72e44(%rip), %rdx     # 0x8c73e
leaq -0xa8(%rbp), %rdi
callq 0x273f0
movl $0x568, %edi            # imm = 0x568
callq 0xa5f0
movq %rax, -0x190(%rbp)
jmp 0x19919
movq -0x190(%rbp), %rdi
movl 0x91a82(%rip), %eax     # 0xab3a8
testl %eax, %eax
setne %al
movq -0x28(%rbp), %r8
movzbl 0x91af5(%rip), %edx     # 0xab42b
movzbl 0x91aed(%rip), %esi     # 0xab42a
movzbl 0x91ae7(%rip), %r9d     # 0xab42c
movzbl 0x91a53(%rip), %r10d    # 0xab3a0
movzbl 0x91a33(%rip), %r11d    # 0xab388
subq $0x30, %rsp
andl $0x1, %r11d
movq %rsp, %rcx
movl %r11d, 0x28(%rcx)
andl $0x1, %r10d
movl %r10d, 0x20(%rcx)
andl $0x1, %r9d
movl %r9d, 0x18(%rcx)
andl $0x1, %esi
movl %esi, 0x10(%rcx)
andl $0x1, %edx
movl %edx, 0x8(%rcx)
movl $0x1, (%rcx)
movzbl %al, %edx
leaq 0x91810(%rip), %rsi     # 0xab1a0
xorl %r9d, %r9d
movl %r9d, %ecx
callq 0x2fe70
addq $0x30, %rsp
jmp 0x199a1
movq -0x190(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rdi
callq 0x31950
testb $0x1, %al
jne 0x19a46
movl $0x4, %edi
callq 0xa290
movq %rax, %rdi
movl $0x1, (%rdi)
movq 0x8e579(%rip), %rsi     # 0xa7f50
xorl %eax, %eax
movl %eax, %edx
callq 0xab10
jmp 0x1a2b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x27490
jmp 0x1a2ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x27490
jmp 0x1a2ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x19a54
movq -0x190(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
movl $0x568, %esi            # imm = 0x568
callq 0xa600
jmp 0x19a54
leaq -0xa8(%rbp), %rdi
callq 0x27490
jmp 0x19a65
leaq -0xa8(%rbp), %rdi
callq 0x27490
jmp 0x1a2ae
movq -0x80(%rbp), %rax
movq %rax, 0x91ab0(%rip)     # 0xab520
leaq 0x91979(%rip), %rdi     # 0xab3f0
leaq 0x9197a(%rip), %rsi     # 0xab3f8
callq 0x31970
movl (%rax), %eax
movq %rsp, %rcx
movq %rcx, -0xb0(%rbp)
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x198(%rbp)
movq %rcx, %rsp
movq %rax, -0xb8(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x319b0
leaq -0xf8(%rbp), %rdi
callq 0x319f0
jmp 0x19acc
leaq 0x9191d(%rip), %rdi     # 0xab3f0
leaq 0x9191e(%rip), %rsi     # 0xab3f8
callq 0x31970
movslq (%rax), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x31a30
jmp 0x19af0
leaq -0xfc(%rbp), %rdi
xorl %esi, %esi
callq 0x31ab0
movl 0x91898(%rip), %eax     # 0xab39c
testl %eax, %eax
setne %al
movzbl %al, %ecx
movq 0x8e4dd(%rip), %rsi     # 0xa7ff0
leaq 0x73901(%rip), %rdx     # 0x8d41b
leaq -0x120(%rbp), %rdi
callq 0x273f0
jmp 0x19b28
movl $0x0, -0x124(%rbp)
testb $0x1, 0x918c3(%rip)     # 0xab3fc
je 0x19ba5
callq 0xa910
movl %eax, -0x124(%rbp)
leaq 0x9169b(%rip), %rdi     # 0xab1e8
callq 0xa210
movq %rax, %rdi
movl -0x124(%rbp), %esi
callq 0x1c7c0
jmp 0x19b62
leaq 0x917f3(%rip), %rdi     # 0xab35c
xorl %esi, %esi
callq 0x31ab0
jmp 0x19ba5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x1a2a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x1a296
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x1a1d0
movl $0x0, -0x128(%rbp)
movl -0x128(%rbp), %eax
cmpl 0x91835(%rip), %eax     # 0xab3f0
jge 0x19df7
movq -0x198(%rbp), %rax
movl -0x128(%rbp), %edx
movslq -0x128(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movslq -0x128(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x19c(%rbp)
movslq -0x128(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x31b50
movl -0x19c(%rbp), %ecx
movl %ecx, (%rax)
movslq -0x128(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x31b50
leaq -0xfc(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0x128(%rbp), %eax
movl 0x917c3(%rip), %ecx     # 0xab3f0
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x19c80
testb $0x1, 0x917f2(%rip)     # 0xab42d
je 0x19c5c
movslq -0x128(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x31b50
movq %rax, %rdi
callq 0x1ff50
jmp 0x19c5a
jmp 0x19c7b
movslq -0x128(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x31b50
movq %rax, %rdi
callq 0x205e0
jmp 0x19c79
jmp 0x19c7b
jmp 0x19de1
testb $0x1, 0x917a6(%rip)     # 0xab42d
je 0x19d20
movl $0x8, %edi
callq 0xa5f0
movq %rax, -0x1a8(%rbp)
jmp 0x19ca0
movslq -0x128(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x31b50
movq -0x1a8(%rbp), %rdi
movq %rax, -0x138(%rbp)
leaq 0x6288(%rip), %rsi      # 0x1ff50
leaq -0x138(%rbp), %rdx
callq 0x31bf0
jmp 0x19cd6
movq -0x1a8(%rbp), %rax
movq %rax, -0x130(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x31b80
jmp 0x19cf9
jmp 0x19db0
movq -0x1a8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
movl $0x8, %esi
callq 0xa600
jmp 0x1a1d0
movl $0x8, %edi
callq 0xa5f0
movq %rax, -0x1b0(%rbp)
jmp 0x19d33
movslq -0x128(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x31b50
movq -0x1b0(%rbp), %rdi
movq %rax, -0x148(%rbp)
leaq 0x6885(%rip), %rsi      # 0x205e0
leaq -0x148(%rbp), %rdx
callq 0x31bf0
jmp 0x19d69
movq -0x1b0(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x31b80
jmp 0x19d8c
jmp 0x19db0
movq -0x1b0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
movl $0x8, %esi
callq 0xa600
jmp 0x1a1d0
movslq -0x128(%rbp), %rsi
leaq -0xd8(%rbp), %rdi
callq 0x31cb0
movq (%rax), %rdi
callq 0xab50
jmp 0x19dcd
leaq 0x6f88c(%rip), %rdi     # 0x89660
xorl %eax, %eax
movl %eax, %esi
callq 0xa1b0
jmp 0x19ddf
jmp 0x19de1
jmp 0x19de3
movl -0x128(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x128(%rbp)
jmp 0x19baf
testb $0x1, 0x915fe(%rip)     # 0xab3fc
je 0x1a140
movl 0x915e6(%rip), %eax     # 0xab3f0
movl %eax, -0x14c(%rbp)
movl $0x1, -0x150(%rbp)
movl $0x0, -0x154(%rbp)
cmpl $0xa, -0x154(%rbp)
jge 0x19e4c
movl $0x1, %edi
callq 0xa450
jmp 0x19e39
jmp 0x19e3b
movl -0x154(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x154(%rbp)
jmp 0x19e24
jmp 0x19e4e
leaq 0x91507(%rip), %rdi     # 0xab35c
callq 0x31ce0
cmpl $0x0, %eax
jle 0x1a13e
movl -0x124(%rbp), %edi
movl -0x14c(%rbp), %esi
callq 0x1f730
movb %al, -0x1b1(%rbp)
jmp 0x19e7c
movb -0x1b1(%rbp), %al
testb $0x1, %al
jne 0x19e8b
jmp 0x1a0f8
movq -0x198(%rbp), %rax
movl 0x91558(%rip), %ecx     # 0xab3f0
addl $0x1, %ecx
movl %ecx, 0x9154f(%rip)     # 0xab3f0
movl 0x91549(%rip), %edx     # 0xab3f0
movl 0x91543(%rip), %ecx     # 0xab3f0
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl 0x91534(%rip), %eax     # 0xab3f0
subl $0x1, %eax
movl %eax, -0x1b8(%rbp)
movl 0x91525(%rip), %eax     # 0xab3f0
subl $0x1, %eax
movslq %eax, %rsi
leaq -0xf8(%rbp), %rdi
callq 0x31b50
movl -0x1b8(%rbp), %ecx
movl %ecx, (%rax)
movl 0x91505(%rip), %eax     # 0xab3f0
subl $0x1, %eax
movslq %eax, %rsi
leaq -0xf8(%rbp), %rdi
callq 0x31b50
leaq -0xfc(%rbp), %rcx
movq %rcx, 0x8(%rax)
testb $0x1, 0x9151e(%rip)     # 0xab42d
je 0x19fac
movl $0x8, %edi
callq 0xa5f0
movq %rax, -0x1c0(%rbp)
jmp 0x19f28
movl 0x914c2(%rip), %eax     # 0xab3f0
decl %eax
movslq %eax, %rsi
leaq -0xf8(%rbp), %rdi
callq 0x31b50
movq -0x1c0(%rbp), %rdi
movq %rax, -0x168(%rbp)
leaq 0x5ffc(%rip), %rsi      # 0x1ff50
leaq -0x168(%rbp), %rdx
callq 0x31bf0
jmp 0x19f62
movq -0x1c0(%rbp), %rax
movq %rax, -0x160(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x31b80
jmp 0x19f85
jmp 0x1a040
movq -0x1c0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
movl $0x8, %esi
callq 0xa600
jmp 0x1a1d0
movl $0x8, %edi
callq 0xa5f0
movq %rax, -0x1c8(%rbp)
jmp 0x19fbf
movl 0x9142b(%rip), %eax     # 0xab3f0
decl %eax
movslq %eax, %rsi
leaq -0xf8(%rbp), %rdi
callq 0x31b50
movq -0x1c8(%rbp), %rdi
movq %rax, -0x178(%rbp)
leaq 0x65f5(%rip), %rsi      # 0x205e0
leaq -0x178(%rbp), %rdx
callq 0x31bf0
jmp 0x19ff9
movq -0x1c8(%rbp), %rax
movq %rax, -0x170(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x31b80
jmp 0x1a01c
jmp 0x1a040
movq -0x1c8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
movl $0x8, %esi
callq 0xa600
jmp 0x1a1d0
movl 0x913aa(%rip), %eax     # 0xab3f0
decl %eax
movslq %eax, %rsi
leaq -0xd8(%rbp), %rdi
callq 0x31cb0
movq (%rax), %rdi
callq 0xab50
jmp 0x1a061
leaq 0x6f608(%rip), %rdi     # 0x89670
xorl %eax, %eax
movl %eax, %esi
callq 0xa1b0
jmp 0x1a073
movq 0x8df76(%rip), %rdi     # 0xa7ff0
leaq 0x72732(%rip), %rsi     # 0x8c7b3
callq 0xa5d0
movq %rax, -0x1d0(%rbp)
jmp 0x1a08f
movq -0x1d0(%rbp), %rdi
movl -0x124(%rbp), %esi
callq 0xab40
movq %rax, -0x1d8(%rbp)
jmp 0x1a0aa
movq -0x1d8(%rbp), %rdi
leaq 0x72700(%rip), %rsi     # 0x8c7b8
callq 0xa5d0
movq %rax, -0x1e0(%rbp)
jmp 0x1a0c6
movq -0x1e0(%rbp), %rdi
movl 0x9131d(%rip), %esi     # 0xab3f0
callq 0xab40
movq %rax, -0x1e8(%rbp)
jmp 0x1a0e1
movq -0x1e8(%rbp), %rdi
movq 0x8de79(%rip), %rsi     # 0xa7f68
callq 0xa640
jmp 0x1a0f6
jmp 0x1a0f8
movl -0x150(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x150(%rbp)
movl $0x0, -0x17c(%rbp)
cmpl $0xa, -0x17c(%rbp)
jge 0x1a139
movl $0x1, %edi
callq 0xa450
jmp 0x1a126
jmp 0x1a128
movl -0x17c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x17c(%rbp)
jmp 0x1a111
jmp 0x19e4e
jmp 0x1a140
jmp 0x1a142
leaq -0xfc(%rbp), %rdi
callq 0x31ce0
cmpl 0x9129c(%rip), %eax     # 0xab3f0
jge 0x1a16a
leaq 0x6f523(%rip), %rdi     # 0x89680
xorl %eax, %eax
movl %eax, %esi
callq 0xa1b0
jmp 0x1a168
jmp 0x1a142
testb $0x1, 0x9128b(%rip)     # 0xab3fc
je 0x1a18d
leaq 0x9106e(%rip), %rdi     # 0xab1e8
callq 0xa210
movq %rax, %rdi
movl -0x124(%rbp), %esi
callq 0x11ac0
leaq -0x120(%rbp), %rdi
callq 0x27490
cmpq $0x0, -0x80(%rbp)
je 0x1a1e1
movq -0x80(%rbp), %rax
movq %rax, -0x1f0(%rbp)
cmpq $0x0, %rax
je 0x1a1ce
movq -0x1f0(%rbp), %rdi
callq 0x31d60
movq -0x1f0(%rbp), %rdi
movl $0x568, %esi            # imm = 0x568
callq 0xa600
jmp 0x1a1e1
leaq -0x120(%rbp), %rdi
callq 0x27490
jmp 0x1a296
movl $0x0, -0x180(%rbp)
movl -0x180(%rbp), %eax
movl 0x911f9(%rip), %ecx     # 0xab3f0
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x1a26f
movslq -0x180(%rbp), %rsi
leaq -0xd8(%rbp), %rdi
callq 0x31cb0
cmpq $0x0, (%rax)
je 0x1a259
movslq -0x180(%rbp), %rsi
leaq -0xd8(%rbp), %rdi
callq 0x31cb0
movq (%rax), %rax
movq %rax, -0x1f8(%rbp)
cmpq $0x0, %rax
je 0x1a257
movq -0x1f8(%rbp), %rdi
callq 0x31e90
movq -0x1f8(%rbp), %rdi
movl $0x8, %esi
callq 0xa600
jmp 0x1a259
jmp 0x1a25b
movl -0x180(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x180(%rbp)
jmp 0x1a1eb
leaq -0xf8(%rbp), %rdi
callq 0x31ec0
leaq -0xd8(%rbp), %rdi
callq 0x31ee0
movq -0xb0(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
leaq -0xf8(%rbp), %rdi
callq 0x31ec0
leaq -0xd8(%rbp), %rdi
callq 0x31ee0
movq -0x50(%rbp), %rdi
callq 0xab60
nopw (%rax,%rax)