// File: /workspace/github_cpp_makefile_star2_O3/Laakeri[P]maxpre/src/./BVA.cpp
// Function: maxPreprocessor::Preprocessor::tryBVA(int, std::unordered_map<unsigned long, int, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<std::pair<unsigned long const, int>>>&)
int Preprocessor::tryBVA(int lit, unordered_map<uint64_t, int>& hashes) {
	const bool noLabels = false;
	if (noLabels && pi.isLabel[litVariable(lit)]) return 0;
	removeDuplicateClauses();
	vector<int> mLit = {lit};
	vector<int> mCls = pi.litClauses[lit];
	int redu = 0;
	int taut = 0;
	while (1) {
		vector<pair<int, int> > P;
		for (int c : mCls) {
			if (pi.clauses[c].lit.size() == 1) continue;
			int lMin = pi.clauses[c].lit[0];
			if (lMin == lit) lMin = pi.clauses[c].lit[1];
			if (hashes.size() > 0) {
				uint64_t hash = 0;
				for (int l : pi.clauses[c].lit) {
					if (l != lit) {
						hash *= polyHashMul;
						hash += (uint64_t)l;
					}
				}
				int asd = hashes[hash];
				assert(asd > 0);
				if (asd == 1) continue;
			}
			for (unsigned i = 1; i < pi.clauses[c].lit.size(); i++) {
				if (pi.litClauses[pi.clauses[c].lit[i]].size() < pi.litClauses[lMin].size() && pi.clauses[c].lit[i] != lit) {
					lMin = pi.clauses[c].lit[i];
				}
			}
			for (int d : pi.litClauses[lMin]) {
				int hd = canBVA(c, d, lit);
				if (hd != -1) {
					assert(hd != lit);
					if (!(pi.isLabel[litVariable(hd)] && noLabels)) P.push_back({hd, c});
				}
			}
		}
		if (P.size() == 0) break;
		sort(P.begin(), P.end());
		P.erase(unique(P.begin(), P.end()), P.end());
		for (auto p : P) {
			if (p.F == litNegation(lit)) {
				int rClause = -1;
				for (int d : pi.litClauses[p.F]) {
					int hd = canBVA(p.S, d, lit);
					if (hd == p.F) {
						rClause = d;
						break;
					}
				}
				assert(rClause != -1);
				pi.removeClause(rClause);
				pi.removeLiteralFromClause(lit, p.S);
				if (hashes.size() > 0) addBVAHash(pi.clauses[p.S].lit, hashes);
				return 1;
			}
		}
		sort(mLit.begin(), mLit.end());
		int fq = 0;
		int lMax = -1;
		int fMax = 0;
		unsigned i2 = 0;
		for (unsigned i = 0; i < P.size(); i++) {
			if (i > 0 && P[i].F != P[i - 1].F) {
				fq = 0;
			}
			fq++;
			while (i2 < mLit.size() && mLit[i2] < P[i].F) {
				i2++;
			}
			if (i2 == mLit.size() || mLit[i2] != P[i].F) {
				if (fq > fMax) {
					fMax = fq;
					lMax = P[i].F;
				}
			}
		}
		if (lMax == -1) break;
		int nRedu = ((int)mLit.size() + 1) * fMax - ((int)mLit.size() + 1) - fMax - taut;
		if (nRedu <= redu) {
			// Try allowing tautologies in resolvents to find more
			fq = 0;
			int tMax = 0;
			fMax = -1;
			lMax = -1;
			int ft = 0;
			i2 = 0;
			for (unsigned i = 0; i < P.size(); i++) {
				if (i == 0 || P[i].F != P[i - 1].F) {
					fq = 0;
					ft = 0;
					for (int c : mCls) {
						if (binary_search(pi.clauses[c].lit.begin(), pi.clauses[c].lit.end(), litNegation(P[i].F))) {
							fq++;
							ft++;
						}
					}
				}
				fq++;
				while (i2 < mLit.size() && mLit[i2] < P[i].F) {
					i2++;
				}
				if (i2 == mLit.size() || mLit[i2] != P[i].F) {
					int nR = ((int)mLit.size() + 1) * fq - ((int)mLit.size() + 1) - fq - taut - ft;
					if (nR > nRedu) {
						nRedu = nR;
						lMax = P[i].F;
						fMax = fq;
						tMax = ft;
					}
				}
			}
			if (nRedu > redu) {
				redu = nRedu;
				mLit.push_back(lMax);
				vector<int> tmCls;
				for (int c : mCls) {
					if (binary_search(pi.clauses[c].lit.begin(), pi.clauses[c].lit.end(), litNegation(lMax))) {
						tmCls.push_back(c);
					}
				}
				mCls = tmCls;
				taut += tMax;
				for (unsigned i = 0; i < P.size(); i++) {
					if (P[i].F == lMax) {
						mCls.push_back(P[i].S);
					}
				}
				assert((int)mCls.size() == fMax);
			}
			else {
				break;
			}
		}
		else {
			redu = nRedu;
			mLit.push_back(lMax);
			mCls.clear();
			for (unsigned i = 0; i < P.size(); i++) {
				if (P[i].F == lMax) {
					mCls.push_back(P[i].S);
				}
			}
			assert((int)mCls.size() == fMax);
		}
	}
	if (redu == 0) return 0;
	assert(redu == (int)mLit.size() * (int)mCls.size() - (int)mLit.size() - (int)mCls.size() - taut);
	sort(mLit.begin(), mLit.end());
	vector<int> rmClauses;
	for (int c : mCls) {
		rmClauses.push_back(c);
		assert(pi.clauses[c].lit.size() > 1);
		int lMin = pi.clauses[c].lit[0];
		if (lMin == lit) lMin = pi.clauses[c].lit[1];
		for (unsigned i = 1; i < pi.clauses[c].lit.size(); i++) {
			if (pi.litClauses[pi.clauses[c].lit[i]].size() < pi.litClauses[lMin].size() && pi.clauses[c].lit[i] != lit) {
				lMin = pi.clauses[c].lit[i];
			}
		}
		for (int d : pi.litClauses[lMin]) {
			int hd = canBVA(c, d, lit);
			if (hd != -1 && binary_search(mLit.begin(), mLit.end(), hd)) {
				rmClauses.push_back(d);
			}
		}
	}
	sort(rmClauses.begin(), rmClauses.end());
	rmClauses.erase(unique(rmClauses.begin(), rmClauses.end()), rmClauses.end());
	assert((int)rmClauses.size() >= (int)mLit.size() * (int)mCls.size() - taut);
	assert((int)rmClauses.size() <= (int)mLit.size() * (int)mCls.size());
	int nVar = pi.addVar();
	int realRedu = 0;
	for (int l : mLit) {
		vector<int> newClause = {l, posLit(nVar)};
		pi.addClause(newClause);
		realRedu--;
		if (hashes.size() > 0) addBVAHash(newClause, hashes);
	}
	for (int c : mCls) {
		vector<int> newClause;
		for (int l : pi.clauses[c].lit) {
			if (!binary_search(mLit.begin(), mLit.end(), l)) {
				newClause.push_back(l);
			}
		}
		newClause.push_back(negLit(nVar));
		pi.addClause(newClause);
		realRedu--;
		if (hashes.size() > 0) addBVAHash(newClause, hashes);
	}
	for (int c : rmClauses) {
		pi.removeClause(c);
		realRedu++;
	}
	assert(realRedu >= redu);
	assert(realRedu <= redu + taut);
	rLog.removeClause(realRedu);
	rLog.removeVariable(-1);
	return realRedu;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdx, 0xa0(%rsp)
movl %esi, %ebp
movq %rdi, %rbx
callq 0xb3de
leaq 0x68(%rsp), %rsi
movl %ebp, (%rsi)
leaq 0x80(%rsp), %rdi
leaq 0x20(%rsp), %rcx
movl $0x1, %edx
callq 0x1e9a8
movslq %ebp, %rax
leaq (%rax,%rax,2), %rsi
shlq $0x3, %rsi
addq 0x18(%rbx), %rsi
leaq 0x68(%rsp), %rdi
callq 0x1f3de
movq $0x0, 0x98(%rsp)
movl $0x0, 0x1c(%rsp)
movq %rbx, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x68(%rsp), %r14
movq 0x70(%rsp), %r12
cmpq %r12, %r14
je 0x1642b
movl (%r14), %r13d
movslq %r13d, %rax
movq (%rbx), %rcx
leaq (%rax,%rax,4), %rbx
movq (%rcx,%rbx,8), %rax
movq 0x8(%rcx,%rbx,8), %rdx
movq %rdx, %rcx
subq %rax, %rcx
cmpq $0x4, %rcx
je 0x162cf
movl (%rax), %r15d
cmpl %ebp, %r15d
jne 0x16267
movl 0x4(%rax), %r15d
movq 0xa0(%rsp), %rsi
cmpq $0x0, 0x18(%rsi)
je 0x162e6
movq $0x0, 0x40(%rsp)
cmpq %rdx, %rax
je 0x162ae
movq 0x8(%rsp), %rcx
movq 0x328(%rcx), %rcx
xorl %esi, %esi
movslq (%rax), %rdi
cmpl %ebp, %edi
je 0x162a5
imulq %rcx, %rsi
addq %rdi, %rsi
movq %rsi, 0x40(%rsp)
addq $0x4, %rax
cmpq %rdx, %rax
jne 0x16292
movq 0xa0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x234ca
movl (%rax), %eax
testl %eax, %eax
jle 0x17196
cmpl $0x1, %eax
jne 0x162ed
addq $0x4, %r14
cmpq %r12, %r14
movq 0x8(%rsp), %rbx
jne 0x16239
jmp 0x163b4
movq 0x8(%rsp), %rdx
jmp 0x16301
movq 0x8(%rsp), %rdx
movq (%rdx), %rcx
movq (%rcx,%rbx,8), %rax
movq 0x8(%rcx,%rbx,8), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
movq 0x18(%rdx), %rdx
cmpq $0x2, %rcx
jb 0x1635c
movl $0x1, %r8d
movl $0x2, %edi
movl %r15d, %esi
movslq (%rax,%r8,4), %r8
leaq (%r8,%r8,2), %r9
movq 0x8(%rdx,%r9,8), %r10
subq (%rdx,%r9,8), %r10
movslq %r15d, %r9
leaq (%r9,%r9,2), %r9
movq 0x8(%rdx,%r9,8), %r11
subq (%rdx,%r9,8), %r11
cmpq %r11, %r10
jae 0x16346
movl %r8d, %esi
cmpl %ebp, %r8d
cmovel %r15d, %esi
movl %edi, %r8d
incl %edi
movl %esi, %r15d
cmpq %r8, %rcx
ja 0x1631d
jmp 0x1635f
movl %r15d, %esi
movslq %esi, %rax
leaq (%rax,%rax,2), %rax
movq (%rdx,%rax,8), %rbx
movq 0x8(%rdx,%rax,8), %r15
cmpq %r15, %rbx
je 0x162cf
movl (%rbx), %edx
movq 0x8(%rsp), %rdi
movl %r13d, %esi
movl %ebp, %ecx
callq 0x160d8
cmpl $-0x1, %eax
je 0x163ae
cmpl %ebp, %eax
je 0x17177
movl %eax, 0x40(%rsp)
movl %r13d, 0x44(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x22d46
addq $0x4, %rbx
jmp 0x1636f
movq 0x20(%rsp), %r13
movq 0x28(%rsp), %r14
movq %r14, %rax
subq %r13, %rax
je 0x1642e
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r13, %rdi
movq %r14, %rsi
callq 0x22ea7
xorl %r15d, %r15d
movq %r13, %rdi
movq %r14, %rsi
callq 0x22f5a
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x2331d
cmpq %rax, 0x28(%rsp)
je 0x1640b
movq %rax, 0x28(%rsp)
movq 0x20(%rsp), %rcx
cmpq %rax, %rcx
je 0x16439
movslq (%rcx), %rbx
movl %ebx, %edx
xorl %ebp, %edx
cmpl $0x1, %edx
je 0x165da
addq $0x8, %rcx
jmp 0x16410
xorl %r13d, %r13d
movl $0x3, %r14d
jmp 0x16b3c
movq 0x80(%rsp), %r13
movq 0x88(%rsp), %r14
cmpq %r14, %r13
movq 0x8(%rsp), %rbx
je 0x16480
movq %r14, %rax
subq %r13, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r13, %rdi
movq %r14, %rsi
callq 0x2226b
movq %r13, %rdi
movq %r14, %rsi
callq 0x2234e
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rsi
movq %rsi, %r12
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
subq %rax, %r12
je 0x165ca
sarq $0x3, %r12
movq 0x80(%rsp), %rdx
movq 0x88(%rsp), %rdi
subq %rdx, %rdi
sarq $0x2, %rdi
xorl %r9d, %r9d
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r11d, %r11d
xorl %r13d, %r13d
xorl %r10d, %r10d
testq %r9, %r9
je 0x164dd
movl (%rax,%r9,8), %ecx
cmpl -0x8(%rax,%r9,8), %ecx
cmovnel %r15d, %r11d
movl %r11d, %ebx
movl %r10d, %r14d
cmpq %r14, %rdi
jbe 0x164fd
movl (%rax,%r9,8), %ecx
cmpl %ecx, (%rdx,%r14,4)
jge 0x164fd
incl %r10d
movq %r10, %r14
cmpq %r10, %rdi
ja 0x164ec
leal 0x1(%rbx), %r11d
cmpq %r14, %rdi
jne 0x16516
cmpl %r13d, %ebx
movq 0x8(%rsp), %rbx
jl 0x16534
movl (%rax,%r9,8), %ecx
jmp 0x1652a
movl (%rax,%r9,8), %ecx
cmpl %ecx, (%rdx,%r14,4)
je 0x16541
cmpl %r13d, %ebx
movq 0x8(%rsp), %rbx
jl 0x16534
movl %ecx, 0x14(%rsp)
movl %ecx, %r8d
movl %r11d, %r13d
incq %r9
movl %r9d, %ecx
cmpq %rcx, %r12
ja 0x164cb
jmp 0x16548
movq 0x8(%rsp), %rbx
jmp 0x16534
cmpl $-0x1, %r8d
je 0x165ca
movq %rsi, %r10
movq %r12, 0xe0(%rsp)
movq %rax, 0x60(%rsp)
movq 0x80(%rsp), %rdx
movq 0x88(%rsp), %rsi
movq %rsi, %rdi
subq %rdx, %rdi
sarq $0x2, %rdi
leal 0x1(%rdi), %ecx
movl %ecx, 0xcc(%rsp)
imull %r13d, %ecx
movl %edi, %r12d
notl %r12d
movq 0x98(%rsp), %rax
subl %r13d, %r12d
subl %eax, %r12d
addl %ecx, %r12d
cmpl 0x1c(%rsp), %r12d
jle 0x16688
cmpq 0x90(%rsp), %rsi
je 0x16898
movl %r8d, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x88(%rsp)
jmp 0x168aa
movl 0x1c(%rsp), %r12d
movl $0x3, %r14d
jmp 0x16b32
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
leaq (%rbx,%rbx,2), %rdx
movq (%rax,%rdx,8), %r15
movq 0x8(%rax,%rdx,8), %r12
cmpq %r12, %r15
je 0x171b5
movslq 0x4(%rcx), %r13
movl (%r15), %r14d
movq 0x8(%rsp), %rdi
movl %r13d, %esi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x160d8
cmpl %ebx, %eax
je 0x16624
addq $0x4, %r15
cmpq %r12, %r15
jne 0x165fd
jmp 0x171b5
cmpl $-0x1, %r14d
je 0x171b5
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x27f28
movq %rbx, %rdi
movl %ebp, %esi
movl %r13d, %edx
movl $0x1, %ecx
callq 0x28218
movl $0x1, %r14d
movq 0xa0(%rsp), %rdx
cmpq $0x0, 0x18(%rdx)
je 0x16b37
leaq (,%r13,4), %rsi
addq %r13, %rsi
shlq $0x3, %rsi
addq (%rbx), %rsi
movq %rbx, %rdi
callq 0x15f32
jmp 0x16b37
movq %rsi, 0xd8(%rsp)
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
cmpq 0x60(%rsp), %r10
je 0x16948
movq 0x68(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0x70(%rsp), %r11
movq (%rbx), %r13
xorl %r9d, %r9d
movl $0xffffffff, 0xa8(%rsp) # imm = 0xFFFFFFFF
xorl %r15d, %r15d
movl $0xffffffff, 0xb0(%rsp) # imm = 0xFFFFFFFF
xorl %esi, %esi
movl $0x0, 0xac(%rsp)
xorl %r8d, %r8d
movq %rdx, 0xd0(%rsp)
testq %r9, %r9
movl %r12d, 0xb8(%rsp)
je 0x16730
cmpq %r11, 0xc0(%rsp)
sete %cl
movq 0x60(%rsp), %rax
movl (%rax,%r9,8), %r14d
cmpl -0x8(%rax,%r9,8), %r14d
sete %r10b
movl $0x0, %eax
cmovnel %eax, %r8d
cmovnel %eax, %r15d
orb %cl, %r10b
movl %r15d, %r12d
je 0x16746
jmp 0x167c7
cmpq %r11, 0xc0(%rsp)
je 0x167c1
movq 0x60(%rsp), %rax
movl (%rax), %r14d
xorl $0x1, %r14d
xorl %r12d, %r12d
xorl %r8d, %r8d
movq 0xc0(%rsp), %rbx
movslq (%rbx), %rcx
leaq (%rcx,%rcx,4), %rcx
movq (%r13,%rcx,8), %r15
movq 0x8(%r13,%rcx,8), %rax
movq %rax, %rdx
subq %r15, %rdx
sarq $0x2, %rdx
testq %rdx, %rdx
jle 0x167a3
movq %rdx, %rcx
shrq %rcx
movq %rcx, %r10
notq %r10
addq %rdx, %r10
leaq (%r15,%rcx,4), %rdx
addq $0x4, %rdx
cmpl %r14d, -0x4(%rdx)
cmovlq %rdx, %r15
cmovgeq %rcx, %r10
movq %r10, %rdx
testq %r10, %r10
jg 0x16778
cmpq %rax, %r15
je 0x167b6
xorl %eax, %eax
cmpl (%r15), %r14d
setge %al
addl %eax, %r8d
addl %eax, %r12d
addq $0x4, %rbx
cmpq %r11, %rbx
jne 0x16758
jmp 0x167c7
xorl %r8d, %r8d
xorl %r12d, %r12d
movl %esi, %r10d
cmpq %r10, %rdi
jbe 0x167f7
movq 0x60(%rsp), %rax
movl (%rax,%r9,8), %ecx
movq 0x8(%rsp), %rbx
movq 0xd0(%rsp), %rax
cmpl %ecx, (%rax,%r10,4)
jge 0x16804
incl %esi
movq %rsi, %r10
cmpq %rsi, %rdi
ja 0x167e5
jmp 0x16804
movq 0x8(%rsp), %rbx
movq 0xd0(%rsp), %rax
leal 0x1(%r12), %r15d
cmpq %r10, %rdi
je 0x16827
movl (%rax,%r10,4), %eax
movq 0x60(%rsp), %rcx
cmpl (%rcx,%r9,8), %eax
jne 0x16827
movl 0xb8(%rsp), %r12d
jmp 0x1687f
movl %r15d, %r10d
imull 0xcc(%rsp), %r10d
movq 0x98(%rsp), %rax
addl %r8d, %eax
addl %edi, %r12d
addl %eax, %r12d
subl %r12d, %r10d
addl $-0x2, %r10d
movl 0xb8(%rsp), %r12d
cmpl %r12d, %r10d
jle 0x1687f
movq 0x60(%rsp), %rax
movl (%rax,%r9,8), %eax
movl %eax, 0xa8(%rsp)
movl %eax, 0x14(%rsp)
movl %r8d, 0xac(%rsp)
movl %r10d, %r12d
movl %r15d, 0xb0(%rsp)
incq %r9
movl %r9d, %eax
cmpq %rax, 0xe0(%rsp)
ja 0x166ec
jmp 0x16969
leaq 0x80(%rsp), %rdi
leaq 0x14(%rsp), %rdx
callq 0x98f8
movq 0x68(%rsp), %rcx
cmpq %rcx, 0x70(%rsp)
je 0x168bb
movq %rcx, 0x70(%rsp)
movq 0x20(%rsp), %rax
movq %rcx, %rdx
cmpq %rax, 0x28(%rsp)
je 0x1692b
movl $0x1, %ebx
xorl %ecx, %ecx
movl (%rax,%rcx,8), %edx
cmpl 0x14(%rsp), %edx
jne 0x16907
leaq (%rax,%rcx,8), %rdx
addq $0x4, %rdx
movq 0x70(%rsp), %rsi
cmpq 0x78(%rsp), %rsi
je 0x168fd
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x70(%rsp)
jmp 0x16907
leaq 0x68(%rsp), %rdi
callq 0x98f8
movl %ebx, %ecx
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %ebx
cmpq %rcx, %rdx
ja 0x168d1
movq 0x68(%rsp), %rcx
movq 0x70(%rsp), %rdx
subq %rcx, %rdx
shrq $0x2, %rdx
xorl %r14d, %r14d
cmpl %edx, %r13d
movq 0x8(%rsp), %rbx
je 0x16b32
jmp 0x171f3
movl $0x0, 0xac(%rsp)
movl $0xffffffff, 0xa8(%rsp) # imm = 0xFFFFFFFF
movl $0xffffffff, 0xb0(%rsp) # imm = 0xFFFFFFFF
movl 0x1c(%rsp), %eax
cmpl %eax, %r12d
jle 0x1699b
movq 0xd8(%rsp), %rsi
cmpq 0x90(%rsp), %rsi
je 0x169a3
movl 0xa8(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x88(%rsp)
jmp 0x169b5
movl %eax, %r12d
jmp 0x165cf
leaq 0x80(%rsp), %rdi
leaq 0x14(%rsp), %rdx
callq 0x98f8
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movq 0x68(%rsp), %r14
movq 0x70(%rsp), %r15
cmpq %r15, %r14
je 0x16a70
movslq (%r14), %rax
movl %eax, 0xb4(%rsp)
movq (%rbx), %rdx
leaq (%rax,%rax,4), %rsi
movq (%rdx,%rsi,8), %rcx
movq 0x8(%rdx,%rsi,8), %rsi
movl 0x14(%rsp), %edx
xorl $0x1, %edx
movq %rsi, %rdi
subq %rcx, %rdi
sarq $0x2, %rdi
testq %rdi, %rdi
jle 0x16a33
movq %rdi, %r8
shrq %r8
movq %r8, %r9
notq %r9
addq %rdi, %r9
leaq (%rcx,%r8,4), %rdi
addq $0x4, %rdi
cmpl %edx, -0x4(%rdi)
cmovlq %rdi, %rcx
cmovgeq %r8, %r9
movq %r9, %rdi
testq %r9, %r9
jg 0x16a09
cmpq %rsi, %rcx
je 0x16a67
cmpl (%rcx), %edx
jl 0x16a67
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0x16a55
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x48(%rsp)
jmp 0x16a67
leaq 0x40(%rsp), %rdi
leaq 0xb4(%rsp), %rdx
callq 0x98f8
addq $0x4, %r14
jmp 0x169d0
leaq 0x68(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x1ef50
movq 0x20(%rsp), %rax
cmpq %rax, 0x28(%rsp)
je 0x16ae2
movl $0x1, %ebx
xorl %ecx, %ecx
movl (%rax,%rcx,8), %edx
cmpl 0x14(%rsp), %edx
jne 0x16ac8
leaq (%rax,%rcx,8), %rdx
addq $0x4, %rdx
movq 0x70(%rsp), %rsi
cmpq 0x78(%rsp), %rsi
je 0x16abe
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x70(%rsp)
jmp 0x16ac8
leaq 0x68(%rsp), %rdi
callq 0x98f8
movl %ebx, %ecx
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %ebx
cmpq %rcx, %rdx
ja 0x16a92
movq 0x70(%rsp), %rax
subq 0x68(%rsp), %rax
shrq $0x2, %rax
cmpl %eax, 0xb0(%rsp)
jne 0x17212
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
movq 0x8(%rsp), %rbx
je 0x16b19
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movl 0xac(%rsp), %eax
addl 0x98(%rsp), %eax
xorl %r14d, %r14d
movq %rax, 0x98(%rsp)
movl %r12d, 0x1c(%rsp)
movq 0x20(%rsp), %r13
testq %r13, %r13
je 0x16b51
movq 0x30(%rsp), %rsi
subq %r13, %rsi
movq %r13, %rdi
callq 0x32b0
testl %r14d, %r14d
je 0x16215
cmpl $0x3, %r14d
jne 0x16e01
movl 0x1c(%rsp), %esi
testl %esi, %esi
je 0x16e0b
movq 0x80(%rsp), %r12
movq 0x88(%rsp), %r15
movq %r15, %rax
subq %r12, %rax
sarq $0x2, %rax
movq 0x68(%rsp), %r14
movq 0x70(%rsp), %rcx
movq %rcx, 0x60(%rsp)
subq %r14, %rcx
shrq $0x2, %rcx
movq 0x98(%rsp), %rdx
addl %eax, %edx
addl %ecx, %edx
imull %eax, %ecx
subl %edx, %ecx
cmpl %ecx, %esi
jne 0x17231
cmpq %r15, %r12
je 0x16bf0
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x2226b
movq %r12, %rdi
movq %r15, %rsi
callq 0x2234e
movq 0x68(%rsp), %r14
movq 0x70(%rsp), %rax
movq %rax, 0x60(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
cmpq 0x60(%rsp), %r14
je 0x16e12
movl (%r14), %eax
movl %eax, 0x40(%rsp)
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0x16c2c
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x28(%rsp)
jmp 0x16c3b
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x98f8
movslq 0x40(%rsp), %rax
movq (%rbx), %rcx
leaq (%rax,%rax,4), %rdx
movq (%rcx,%rdx,8), %rax
movq 0x8(%rcx,%rdx,8), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq $0x1, %rcx
jbe 0x171d4
movl (%rax), %edx
cmpl %ebp, %edx
jne 0x16c6a
movl 0x4(%rax), %edx
movq 0x18(%rbx), %rsi
movl $0x1, %r8d
movl $0x2, %edi
movslq (%rax,%r8,4), %r8
leaq (%r8,%r8,2), %r9
movq 0x8(%rsi,%r9,8), %r10
subq (%rsi,%r9,8), %r10
movslq %edx, %r9
leaq (%r9,%r9,2), %r9
movq 0x8(%rsi,%r9,8), %r11
subq (%rsi,%r9,8), %r11
movl %edx, %r9d
cmpq %r11, %r10
jae 0x16ca5
movl %r8d, %r9d
cmpl %ebp, %r8d
cmovnel %r9d, %edx
movl %edi, %r8d
incl %edi
cmpq %r8, %rcx
ja 0x16c79
movslq %edx, %rax
leaq (%rax,%rax,2), %rax
movq (%rsi,%rax,8), %r15
movq 0x8(%rsi,%rax,8), %r13
cmpq %r13, %r15
je 0x16d71
movl (%r15), %r12d
movl %r12d, 0x14(%rsp)
movl 0x40(%rsp), %esi
movq %rbx, %rdi
movl %r12d, %edx
movl %ebp, %ecx
callq 0x160d8
cmpl $-0x1, %eax
je 0x16d68
movq 0x80(%rsp), %rcx
movq 0x88(%rsp), %rdx
movq %rdx, %rsi
subq %rcx, %rsi
sarq $0x2, %rsi
testq %rsi, %rsi
jle 0x16d36
movq %rsi, %rdi
shrq %rdi
movq %rdi, %r8
notq %r8
addq %rsi, %r8
leaq (%rcx,%rdi,4), %rsi
addq $0x4, %rsi
cmpl %eax, -0x4(%rsi)
cmovlq %rsi, %rcx
cmovgeq %rdi, %r8
movq %r8, %rsi
testq %r8, %r8
jg 0x16d0c
cmpq %rdx, %rcx
je 0x16d68
cmpl (%rcx), %eax
jl 0x16d68
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0x16d59
movl %r12d, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x28(%rsp)
jmp 0x16d68
leaq 0x20(%rsp), %rdi
leaq 0x14(%rsp), %rdx
callq 0x98f8
addq $0x4, %r15
jmp 0x16cc6
addq $0x4, %r14
cmpq 0x60(%rsp), %r14
jne 0x16c0c
movq 0x20(%rsp), %r12
movq 0x28(%rsp), %r15
cmpq %r15, %r12
je 0x16dc6
movq %r15, %rax
subq %r12, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x2226b
movq %r12, %rdi
movq %r15, %rsi
callq 0x2234e
movq 0x20(%rsp), %r12
movq 0x28(%rsp), %r15
cmpq %r15, %r12
je 0x16e2b
leaq 0x4(%r12), %rax
cmpq %r15, %rax
je 0x16e2b
movl -0x4(%rax), %ecx
leaq 0x4(%rax), %rdx
cmpl (%rax), %ecx
movq %rdx, %rax
jne 0x16dd0
leaq -0x8(%rdx), %rax
cmpq %r15, %rdx
je 0x16e1a
movl %ecx, %esi
movl (%rdx), %ecx
cmpl %ecx, %esi
je 0x16dfb
movl %ecx, 0x4(%rax)
addq $0x4, %rax
addq $0x4, %rdx
jmp 0x16de7
movl $0x1, %ebp
jmp 0x1712f
xorl %ebp, %ebp
jmp 0x1712f
xorl %r12d, %r12d
xorl %r15d, %r15d
jmp 0x16e2b
addq $0x4, %rax
cmpq %r15, %rax
je 0x16e2b
movq %rax, 0x28(%rsp)
movq %rax, %r15
subq %r12, %r15
shrq $0x2, %r15
movq 0x88(%rsp), %rcx
subq 0x80(%rsp), %rcx
shrq $0x2, %rcx
movq 0x70(%rsp), %rax
subq 0x68(%rsp), %rax
shrq $0x2, %rax
imull %ecx, %eax
movl %eax, %ecx
subl 0x98(%rsp), %ecx
cmpl %r15d, %ecx
jg 0x17250
cmpl %r15d, %eax
jl 0x1726f
movq %rbx, %rdi
callq 0x2808e
movq 0x80(%rsp), %r14
movq 0x88(%rsp), %r15
cmpq %r15, %r14
movq %rax, 0xb8(%rsp)
je 0x16f2c
leal (%rax,%rax), %ebx
xorl %ebp, %ebp
leaq 0x40(%rsp), %r12
movabsq $-0x8000000000000000, %r13 # imm = 0x8000000000000000
movl (%r14), %eax
movl %eax, 0x14(%rsp)
movl %ebx, 0x18(%rsp)
movl $0x2, %edx
movq %r12, %rdi
leaq 0x14(%rsp), %rsi
leaq 0xb4(%rsp), %rcx
callq 0x1e9a8
movq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x27f82
movq 0xa0(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x16f08
movq 0x8(%rsp), %rdi
movq %r12, %rsi
movq 0xa0(%rsp), %rdx
callq 0x15f32
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x16f1f
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
addq $0x4, %r14
decl %ebp
cmpq %r15, %r14
jne 0x16eaf
jmp 0x16f2e
xorl %ebp, %ebp
movq 0x68(%rsp), %r14
movq 0x70(%rsp), %rax
movq %rax, 0x60(%rsp)
cmpq %rax, %r14
movq 0x8(%rsp), %r13
je 0x170b7
movq 0xb8(%rsp), %rax
leal 0x1(,%rax,2), %ebx
leaq 0x40(%rsp), %r15
movslq (%r14), %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movq (%r13), %rcx
leaq (%rax,%rax,4), %rax
movq (%rcx,%rax,8), %r13
movq 0x8(%rcx,%rax,8), %r12
cmpq %r12, %r13
je 0x17044
movl (%r13), %eax
movl %eax, 0x14(%rsp)
movq 0x80(%rsp), %rcx
movq 0x88(%rsp), %rdx
movq %rdx, %rsi
subq %rcx, %rsi
sarq $0x2, %rsi
testq %rsi, %rsi
jle 0x16fde
movq %rsi, %rdi
shrq %rdi
movq %rdi, %r8
notq %r8
addq %rsi, %r8
leaq (%rcx,%rdi,4), %rsi
addq $0x4, %rsi
cmpl %eax, -0x4(%rsi)
cmovlq %rsi, %rcx
cmovgeq %rdi, %r8
movq %r8, %rsi
testq %r8, %r8
jg 0x16fb4
cmpq %rdx, %rcx
je 0x16fe7
cmpl (%rcx), %eax
jge 0x1700d
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0x17000
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x48(%rsp)
jmp 0x1700d
movq %r15, %rdi
leaq 0x14(%rsp), %rdx
callq 0x98f8
addq $0x4, %r13
cmpq %r12, %r13
jne 0x16f8d
movq 0x48(%rsp), %rsi
movl %ebx, 0x14(%rsp)
cmpq 0x50(%rsp), %rsi
movq 0xa0(%rsp), %r12
je 0x17052
movl %ebx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x48(%rsp)
movq 0x8(%rsp), %r13
jmp 0x17064
movl %ebx, 0x14(%rsp)
xorl %esi, %esi
movq 0xa0(%rsp), %r12
movq 0x8(%rsp), %r13
movq %r15, %rdi
leaq 0x14(%rsp), %rdx
callq 0x1ffb8
movq %r13, %rdi
movq %r15, %rsi
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
callq 0x27f82
cmpq $0x0, 0x18(%r12)
je 0x1708f
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x15f32
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x170a6
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
decl %ebp
addq $0x4, %r14
cmpq 0x60(%rsp), %r14
jne 0x16f5f
movq 0x20(%rsp), %rbx
movq 0x28(%rsp), %r14
cmpq %r14, %rbx
je 0x170da
movl (%rbx), %esi
movq 0x8(%rsp), %rdi
callq 0x27f28
incl %ebp
addq $0x4, %rbx
jmp 0x170c1
movl 0x1c(%rsp), %eax
cmpl %eax, %ebp
jl 0x1728e
addl 0x98(%rsp), %eax
cmpl %eax, %ebp
movq 0x8(%rsp), %rbx
jg 0x172ad
addq $0x218, %rbx            # imm = 0x218
movq %rbx, %rdi
movl %ebp, %esi
callq 0x28c28
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x28c64
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1712f
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x17146
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x17163
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movl %ebp, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x21c64(%rip), %rdi     # 0x38de2
leaq 0x21c04(%rip), %rsi     # 0x38d89
leaq 0x21c07(%rip), %rcx     # 0x38d93
movl $0x5a, %edx
callq 0x31b0
leaq 0x21be4(%rip), %rdi     # 0x38d81
leaq 0x21be5(%rip), %rsi     # 0x38d89
leaq 0x21be8(%rip), %rcx     # 0x38d93
movl $0x4f, %edx
callq 0x31b0
leaq 0x21c30(%rip), %rdi     # 0x38dec
leaq 0x21bc6(%rip), %rsi     # 0x38d89
leaq 0x21bc9(%rip), %rcx     # 0x38d93
movl $0x6c, %edx
callq 0x31b0
leaq 0x21c91(%rip), %rdi     # 0x38e6c
leaq 0x21ba7(%rip), %rsi     # 0x38d89
leaq 0x21baa(%rip), %rcx     # 0x38d93
movl $0xd2, %edx
callq 0x31b0
leaq 0x21c00(%rip), %rdi     # 0x38dfa
leaq 0x21b88(%rip), %rsi     # 0x38d89
leaq 0x21b8b(%rip), %rcx     # 0x38d93
movl $0xc9, %edx
callq 0x31b0
leaq 0x21be1(%rip), %rdi     # 0x38dfa
leaq 0x21b69(%rip), %rsi     # 0x38d89
leaq 0x21b6c(%rip), %rcx     # 0x38d93
movl $0xba, %edx
callq 0x31b0
leaq 0x21bdb(%rip), %rdi     # 0x38e13
leaq 0x21b4a(%rip), %rsi     # 0x38d89
leaq 0x21b4d(%rip), %rcx     # 0x38d93
movl $0xcd, %edx
callq 0x31b0
leaq 0x21c32(%rip), %rdi     # 0x38e89
leaq 0x21b2b(%rip), %rsi     # 0x38d89
leaq 0x21b2e(%rip), %rcx     # 0x38d93
movl $0xe3, %edx
callq 0x31b0
leaq 0x21c57(%rip), %rdi     # 0x38ecd
leaq 0x21b0c(%rip), %rsi     # 0x38d89
leaq 0x21b0f(%rip), %rcx     # 0x38d93
movl $0xe4, %edx
callq 0x31b0
leaq 0x21c75(%rip), %rdi     # 0x38f0a
leaq 0x21aed(%rip), %rsi     # 0x38d89
leaq 0x21af0(%rip), %rcx     # 0x38d93
movl $0xfd, %edx
callq 0x31b0
leaq 0x21c67(%rip), %rdi     # 0x38f1b
leaq 0x21ace(%rip), %rsi     # 0x38d89
leaq 0x21ad1(%rip), %rcx     # 0x38d93
movl $0xfe, %edx
callq 0x31b0
jmp 0x1731a
jmp 0x1731a
jmp 0x1731a
jmp 0x1731a
movq %rax, %rbx
jmp 0x17334
jmp 0x172fc
jmp 0x1731a
movq %rax, %rbx
jmp 0x1734b
jmp 0x172fc
jmp 0x172fc
jmp 0x1731a
jmp 0x1731a
jmp 0x172fc
jmp 0x1731a
jmp 0x1731a
jmp 0x1731a
jmp 0x1731a
jmp 0x1731a
jmp 0x172fc
jmp 0x172fc
jmp 0x1731a
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1731d
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
jmp 0x1731d
jmp 0x1731a
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x17334
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x1734b
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x17368
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq %rbx, %rdi
callq 0x34a0