// File: /workspace/github_cpp_makefile_star2_O1/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, %r12
movl %esi, %ebp
movq %rdi, %rbx
callq 0xb52c
leaq 0x60(%rsp), %rsi
movl %ebp, (%rsi)
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rcx
movl $0x1, %edx
callq 0x1f586
movslq %ebp, %rax
leaq (%rax,%rax,2), %rsi
shlq $0x3, %rsi
addq 0x18(%rbx), %rsi
leaq 0x60(%rsp), %rdi
callq 0x1ffa6
movq $0x0, 0x98(%rsp)
movl $0x0, 0x3c(%rsp)
movq %rbx, 0xb0(%rsp)
movq %r12, 0xa8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x60(%rsp), %r14
movq 0x68(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpq %rax, %r14
je 0x16b8d
movl (%r14), %r13d
movslq %r13d, %rcx
movq (%rbx), %rax
leaq (%rcx,%rcx,4), %r12
movq (%rax,%r12,8), %rcx
movq 0x8(%rax,%r12,8), %rdx
subq %rcx, %rdx
cmpq $0x4, %rdx
je 0x16ab4
movl (%rcx), %r15d
cmpl %ebp, %r15d
jne 0x16a43
movl 0x4(%rcx), %r15d
movq 0xa8(%rsp), %rcx
cmpq $0x0, 0x18(%rcx)
je 0x16ac8
leaq (%rax,%r12,8), %rcx
movq $0x0, 0x40(%rsp)
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
cmpq %rcx, %rax
je 0x16a93
movq 0x40(%rsp), %rdx
movq 0x328(%rbx), %rsi
movslq (%rax), %rdi
cmpl %ebp, %edi
je 0x16a8a
imulq %rsi, %rdx
addq %rdi, %rdx
movq %rdx, 0x40(%rsp)
addq $0x4, %rax
cmpq %rcx, %rax
jne 0x16a77
movq 0xa8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x241d6
movl (%rax), %eax
testl %eax, %eax
jle 0x17934
cmpl $0x1, %eax
jne 0x16ac8
addq $0x4, %r14
cmpq 0x30(%rsp), %r14
jne 0x16a18
jmp 0x16b8d
movq (%rbx), %rcx
movq (%rcx,%r12,8), %rax
movq 0x8(%rcx,%r12,8), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq $0x2, %rcx
jb 0x16b32
movq 0x18(%rbx), %rdx
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 0x16b1c
movl %r8d, %esi
cmpl %ebp, %r8d
cmovel %r15d, %esi
movl %edi, %r8d
incl %edi
movl %esi, %r15d
cmpq %r8, %rcx
ja 0x16af3
jmp 0x16b35
movl %r15d, %esi
movslq %esi, %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %r15
movq 0x8(%rcx,%rax,8), %r12
cmpq %r12, %r15
je 0x16ab4
movl (%r15), %edx
movq %rbx, %rdi
movl %r13d, %esi
movl %ebp, %ecx
callq 0x16874
cmpl $-0x1, %eax
je 0x16b87
cmpl %ebp, %eax
je 0x17915
movl %eax, 0x40(%rsp)
movl %r13d, 0x44(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x23a38
addq $0x4, %r15
jmp 0x16b49
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %r14
movq %r14, %rax
subq %r13, %rax
je 0x16c12
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r13, %rdi
movq %r14, %rsi
callq 0x23b91
movq %r13, %rdi
movq %r14, %rsi
callq 0x23c44
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x2401c
cmpq %rax, 0x18(%rsp)
je 0x16be1
movq %rax, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movl $0xd, %r14d
cmpq %rcx, %rax
sete %r13b
je 0x16d13
movl (%rax), %r15d
movl %r15d, %edx
xorl %ebp, %edx
cmpl $0x1, %edx
jne 0x16c1d
movb %r13b, 0x78(%rsp)
jmp 0x16c48
movl $0x3, %r14d
jmp 0x17320
addq $0x8, %rax
cmpq %rcx, %rax
sete %r13b
je 0x16d13
movl (%rax), %r15d
movl %r15d, %edx
xorl %ebp, %edx
addq $0x8, %rax
cmpl $0x1, %edx
jne 0x16c21
movb %r13b, 0x78(%rsp)
addq $-0x8, %rax
movslq 0x4(%rax), %rax
movq %rax, 0x30(%rsp)
movslq %r15d, %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %rbx
movq 0x8(%rcx,%rax,8), %r13
cmpq %r13, %rbx
je 0x16ca6
addq $0x4, %rbx
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl -0x4(%rbx), %r12d
movq 0xb0(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl %r12d, %edx
movl %ebp, %ecx
callq 0x16874
cmpl %r15d, %eax
cmovel %r12d, %r14d
je 0x16cac
leaq 0x4(%rbx), %rax
cmpq %r13, %rbx
movq %rax, %rbx
jne 0x16c74
jmp 0x16cac
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
cmpl $-0x1, %r14d
je 0x17972
movq 0xb0(%rsp), %rbx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x28c34
movq 0xa8(%rsp), %r12
movb 0x78(%rsp), %r13b
movq %rbx, %rdi
movl %ebp, %esi
movq 0x30(%rsp), %rdx
movl $0x1, %ecx
callq 0x28f40
movl $0x1, %r14d
cmpq $0x0, 0x18(%r12)
je 0x16d13
movq 0x30(%rsp), %rax
leaq (%rax,%rax,4), %rsi
shlq $0x3, %rsi
addq (%rbx), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x166ce
testb %r13b, %r13b
je 0x17320
movq 0x80(%rsp), %r14
movq 0x88(%rsp), %r13
cmpq %r13, %r14
je 0x16d5e
movq %r13, %rax
subq %r14, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %r13, %rsi
callq 0x22eaf
movq %r14, %rdi
movq %r13, %rsi
callq 0x22f92
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %rsi
movq %rsi, %r15
subq %r14, %r15
sarq $0x3, %r15
movl $0xffffffff, 0x8(%rsp)  # imm = 0xFFFFFFFF
cmpq %r14, %rsi
je 0x16e0c
movq 0x80(%rsp), %rdx
movq 0x88(%rsp), %rdi
subq %rdx, %rdi
sarq $0x2, %rdi
xorl %r8d, %r8d
xorl %r10d, %r10d
xorl %r13d, %r13d
xorl %r9d, %r9d
testq %r8, %r8
je 0x16dbd
movl (%r14,%r8,8), %ecx
cmpl -0x8(%r14,%r8,8), %ecx
movl $0x0, %eax
cmovnel %eax, %r10d
movl %r10d, %r11d
movl %r9d, %ecx
cmpq %rcx, %rdi
jbe 0x16ddd
movl (%r14,%r8,8), %r10d
cmpl %r10d, (%rdx,%rcx,4)
jge 0x16ddd
incl %r9d
movq %r9, %rcx
cmpq %r9, %rdi
ja 0x16dcc
leal 0x1(%r11), %r10d
cmpq %rcx, %rdi
je 0x16def
movl (%rdx,%rcx,4), %ecx
cmpl (%r14,%r8,8), %ecx
je 0x16dff
cmpl %r13d, %r11d
jl 0x16dff
movl (%r14,%r8,8), %ecx
movl %ecx, 0x8(%rsp)
movl %r10d, %r13d
incq %r8
movl %r8d, %ecx
cmpq %rcx, %r15
ja 0x16da6
jmp 0x16e0f
xorl %r13d, %r13d
movl 0x8(%rsp), %ecx
cmpl $-0x1, %ecx
je 0x16e9d
movq %rsi, %rdx
movq %r15, 0xe0(%rsp)
movq %r14, 0x30(%rsp)
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rsi
movq %rsi, %rdi
movq %rax, 0xd0(%rsp)
subq %rax, %rdi
sarq $0x2, %rdi
leal 0x1(%rdi), %r8d
movl %r8d, 0xcc(%rsp)
imull %r13d, %r8d
movl %edi, %r15d
notl %r15d
movq 0x98(%rsp), %rax
subl %r13d, %r15d
subl %eax, %r15d
addl %r8d, %r15d
cmpl 0x3c(%rsp), %r15d
jle 0x16ea7
cmpq 0x90(%rsp), %rsi
je 0x17087
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x88(%rsp)
jmp 0x17099
movl 0x3c(%rsp), %r15d
jmp 0x1717d
movq %rsi, 0xd8(%rsp)
movl $0xffffffff, 0x8(%rsp)  # imm = 0xFFFFFFFF
cmpq 0x30(%rsp), %rdx
je 0x17132
movq 0x60(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0x68(%rsp), %r10
movq (%rbx), %r11
movl $0xffffffff, 0xa0(%rsp) # imm = 0xFFFFFFFF
xorl %r13d, %r13d
xorl %r12d, %r12d
xorl %r8d, %r8d
movl $0x0, 0xa4(%rsp)
xorl %esi, %esi
movl %r15d, 0x78(%rsp)
testq %r13, %r13
je 0x16f38
cmpq %r10, 0xc0(%rsp)
sete %cl
movq 0x30(%rsp), %rax
movl (%rax,%r13,8), %r9d
cmpl -0x8(%rax,%r13,8), %r9d
sete %r9b
movl $0x0, %eax
cmovnel %eax, %esi
cmovnel %eax, %r12d
orb %cl, %r9b
movl %r12d, %r15d
je 0x16f46
jmp 0x16fd4
cmpq %r10, 0xc0(%rsp)
je 0x16fcf
movq 0x30(%rsp), %rax
movl (%rax,%r13,8), %r12d
xorl $0x1, %r12d
xorl %r15d, %r15d
xorl %esi, %esi
movq 0xc0(%rsp), %r9
movslq (%r9), %rcx
leaq (%rcx,%rcx,4), %rcx
movq (%r11,%rcx,8), %r14
movq 0x8(%r11,%rcx,8), %rdx
movq %rdx, %rax
subq %r14, %rax
sarq $0x2, %rax
testq %rax, %rax
jle 0x16faa
movq %rax, %rcx
shrq %rcx
movq %rcx, %rbx
notq %rbx
addq %rax, %rbx
leaq (%r14,%rcx,4), %rax
addq $0x4, %rax
cmpl %r12d, -0x4(%rax)
cmovlq %rax, %r14
cmovgeq %rcx, %rbx
movq %rbx, %rax
testq %rbx, %rbx
jg 0x16f7f
xorl %ecx, %ecx
cmpq %rdx, %r14
je 0x16fb7
cmpl (%r14), %r12d
setge %cl
movq 0xb0(%rsp), %rbx
addl %ecx, %esi
addl %ecx, %r15d
addq $0x4, %r9
cmpq %r10, %r9
jne 0x16f60
jmp 0x16fd4
xorl %esi, %esi
xorl %r15d, %r15d
movl %r8d, %ecx
cmpq %rcx, %rdi
jbe 0x16ffe
movq 0x30(%rsp), %rax
movl (%rax,%r13,8), %r9d
movq 0xd0(%rsp), %rax
cmpl %r9d, (%rax,%rcx,4)
jge 0x16ffe
incl %r8d
movq %r8, %rcx
cmpq %r8, %rdi
ja 0x16fed
leal 0x1(%r15), %r12d
cmpq %rcx, %rdi
je 0x17024
movq 0xd0(%rsp), %rax
movl (%rax,%rcx,4), %eax
movq 0x30(%rsp), %rcx
cmpl (%rcx,%r13,8), %eax
jne 0x17024
movl 0x78(%rsp), %r15d
jmp 0x1706e
movl %r12d, %ecx
imull 0xcc(%rsp), %ecx
movq 0x98(%rsp), %rax
addl %esi, %eax
addl %edi, %r15d
addl %eax, %r15d
subl %r15d, %ecx
addl $-0x2, %ecx
movl 0x78(%rsp), %r15d
cmpl %r15d, %ecx
jle 0x1706e
movq 0x30(%rsp), %rax
movl (%rax,%r13,8), %eax
movl %eax, 0x8(%rsp)
movl %esi, 0xa4(%rsp)
movl %ecx, %r15d
movl %r12d, 0xa0(%rsp)
incq %r13
movl %r13d, %eax
cmpq %rax, 0xe0(%rsp)
ja 0x16ef8
jmp 0x17148
leaq 0x80(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x98e8
movq 0x60(%rsp), %rax
cmpq %rax, 0x68(%rsp)
je 0x170aa
movq %rax, 0x68(%rsp)
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x17110
movl $0x1, %r14d
xorl %ecx, %ecx
movl (%rax,%rcx,8), %edx
cmpl 0x8(%rsp), %edx
jne 0x170f4
leaq (%rax,%rcx,8), %rdx
addq $0x4, %rdx
movq 0x68(%rsp), %rsi
cmpq 0x70(%rsp), %rsi
je 0x170ea
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x68(%rsp)
jmp 0x170f4
leaq 0x60(%rsp), %rdi
callq 0x98e8
movl %r14d, %ecx
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %r14d
cmpq %rcx, %rdx
ja 0x170be
movq 0x68(%rsp), %rax
subq 0x60(%rsp), %rax
shrq $0x2, %rax
cmpl %eax, %r13d
movl $0x0, %r14d
je 0x1731b
jmp 0x17991
movl $0xffffffff, 0xa0(%rsp) # imm = 0xFFFFFFFF
movl $0x0, 0xa4(%rsp)
movl 0x3c(%rsp), %eax
cmpl %eax, %r15d
jle 0x1717a
movq 0xd8(%rsp), %rsi
cmpq 0x90(%rsp), %rsi
je 0x17188
movl %r15d, %r14d
movl 0x8(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x88(%rsp)
jmp 0x1719d
movl %eax, %r15d
movl $0x3, %r14d
jmp 0x1731b
movl %r15d, %r14d
leaq 0x80(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x98e8
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movq 0x60(%rsp), %r15
movq 0x68(%rsp), %r12
cmpq %r12, %r15
je 0x17258
movslq (%r15), %rax
movl %eax, 0xbc(%rsp)
movq (%rbx), %rdx
leaq (%rax,%rax,4), %rsi
movq (%rdx,%rsi,8), %rcx
movq 0x8(%rdx,%rsi,8), %rsi
movl 0x8(%rsp), %edx
xorl $0x1, %edx
movq %rsi, %rdi
subq %rcx, %rdi
sarq $0x2, %rdi
testq %rdi, %rdi
jle 0x1721b
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 0x171f1
cmpq %rsi, %rcx
je 0x1724f
cmpl (%rcx), %edx
jl 0x1724f
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0x1723d
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x48(%rsp)
jmp 0x1724f
leaq 0x40(%rsp), %rdi
leaq 0xbc(%rsp), %rdx
callq 0x98e8
addq $0x4, %r15
jmp 0x171b8
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x1fb22
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
movl %r14d, %r15d
je 0x172d0
movl $0x1, %r14d
xorl %ecx, %ecx
movl (%rax,%rcx,8), %edx
cmpl 0x8(%rsp), %edx
jne 0x172b4
leaq (%rax,%rcx,8), %rdx
addq $0x4, %rdx
movq 0x68(%rsp), %rsi
cmpq 0x70(%rsp), %rsi
je 0x172aa
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x68(%rsp)
jmp 0x172b4
leaq 0x60(%rsp), %rdi
callq 0x98e8
movl %r14d, %ecx
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %r14d
cmpq %rcx, %rdx
ja 0x1727e
movq 0x68(%rsp), %rax
subq 0x60(%rsp), %rax
shrq $0x2, %rax
cmpl %eax, 0xa0(%rsp)
jne 0x179b0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x17302
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movl 0xa4(%rsp), %eax
addl 0x98(%rsp), %eax
xorl %r14d, %r14d
movq %rax, 0x98(%rsp)
movl %r15d, 0x3c(%rsp)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x17337
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
testl %r14d, %r14d
je 0x169ef
cmpl $0x3, %r14d
jne 0x176cb
movl 0x3c(%rsp), %esi
testl %esi, %esi
je 0x176d5
movq 0x80(%rsp), %r12
movq 0x88(%rsp), %r15
movq %r15, %rax
subq %r12, %rax
movq 0x68(%rsp), %rcx
subq 0x60(%rsp), %rcx
sarq $0x2, %rax
shrq $0x2, %rcx
movq 0x98(%rsp), %rdx
addl %eax, %edx
addl %ecx, %edx
imull %eax, %ecx
subl %edx, %ecx
cmpl %ecx, %esi
jne 0x179cf
cmpq %r15, %r12
je 0x173bf
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x22eaf
movq %r12, %rdi
movq %r15, %rsi
callq 0x22f92
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x60(%rsp), %r14
movq 0x68(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpq %rax, %r14
je 0x17560
movl (%r14), %eax
movl %eax, 0x40(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x17408
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x17417
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x98e8
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 0x17953
movl (%rax), %edx
cmpl %ebp, %edx
jne 0x17446
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 0x17481
movl %r8d, %r9d
cmpl %ebp, %r8d
cmovnel %r9d, %edx
movl %edi, %r8d
incl %edi
cmpq %r8, %rcx
ja 0x17455
movslq %edx, %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %r15
movq 0x8(%rcx,%rax,8), %r13
cmpq %r13, %r15
je 0x17551
movl (%r15), %r12d
movl %r12d, 0x8(%rsp)
movl 0x40(%rsp), %esi
movq %rbx, %rdi
movl %r12d, %edx
movl %ebp, %ecx
callq 0x16874
cmpl $-0x1, %eax
je 0x17548
movq 0x80(%rsp), %rcx
movq 0x88(%rsp), %rdx
movq %rdx, %rsi
subq %rcx, %rsi
sarq $0x2, %rsi
testq %rsi, %rsi
jle 0x17516
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 0x174ec
cmpq %rdx, %rcx
je 0x17548
cmpl (%rcx), %eax
jl 0x17548
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x17539
movl %r12d, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x17548
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x98e8
addq $0x4, %r15
jmp 0x174a6
addq $0x4, %r14
cmpq 0x30(%rsp), %r14
jne 0x173e8
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %r15
cmpq %r15, %r14
je 0x1759c
movq %r15, %rax
subq %r14, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x22eaf
movq %r14, %rdi
movq %r15, %rsi
callq 0x22f92
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x2352e
movq 0x18(%rsp), %rcx
cmpq %rcx, %rax
je 0x175cd
movq 0x18(%rsp), %rdx
movq %rdx, %rsi
subq %rcx, %rsi
addq %rsi, %rax
cmpq %rax, %rdx
je 0x175cd
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
shrq $0x2, %rax
movq 0x88(%rsp), %rdx
subq 0x80(%rsp), %rdx
shrq $0x2, %rdx
movq 0x68(%rsp), %rcx
subq 0x60(%rsp), %rcx
shrq $0x2, %rcx
imull %edx, %ecx
movl %ecx, %edx
subl 0x98(%rsp), %edx
cmpl %eax, %edx
jg 0x179ee
cmpl %eax, %ecx
jl 0x17a0d
movq %rbx, %rdi
callq 0x28d9a
movq 0x80(%rsp), %r14
movq 0x88(%rsp), %r15
cmpq %r15, %r14
movq %rax, 0x78(%rsp)
je 0x176dc
leal (%rax,%rax), %r13d
xorl %ebp, %ebp
leaq 0x40(%rsp), %r12
movl (%r14), %eax
movl %eax, 0x8(%rsp)
movl %r13d, 0xc(%rsp)
movl $0x2, %edx
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
leaq 0xbc(%rsp), %rcx
callq 0x1f586
movq %rbx, %rdi
movq %r12, %rsi
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
callq 0x28c8e
movq 0xa8(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x176a7
movq %rbx, %rdi
movq %r12, %rsi
movq 0xa8(%rsp), %rdx
callq 0x166ce
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x176be
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
addq $0x4, %r14
decl %ebp
cmpq %r15, %r14
jne 0x1764a
jmp 0x176de
movl $0x1, %ebp
jmp 0x178cd
xorl %ebp, %ebp
jmp 0x178cd
xorl %ebp, %ebp
movq 0x60(%rsp), %r14
movq 0x68(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpq %rax, %r14
je 0x1784f
movq 0x78(%rsp), %rax
leal 0x1(,%rax,2), %r13d
leaq 0x40(%rsp), %r15
movl %r13d, 0x78(%rsp)
movslq (%r14), %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movq (%rbx), %rcx
leaq (%rax,%rax,4), %rax
movq (%rcx,%rax,8), %r13
movq 0x8(%rcx,%rax,8), %r12
cmpq %r12, %r13
je 0x177c3
movl (%r13), %eax
movl %eax, 0x8(%rsp)
movq 0x80(%rsp), %rcx
movq 0x88(%rsp), %rdx
movq %rdx, %rsi
subq %rcx, %rsi
sarq $0x2, %rsi
testq %rsi, %rsi
jle 0x1778b
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 0x17761
cmpq %rdx, %rcx
je 0x17794
cmpl (%rcx), %eax
jge 0x177ba
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0x177ad
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x48(%rsp)
jmp 0x177ba
movq %r15, %rdi
leaq 0x8(%rsp), %rdx
callq 0x98e8
addq $0x4, %r13
jmp 0x17731
movl 0x78(%rsp), %r13d
movl %r13d, 0x8(%rsp)
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
movq 0xa8(%rsp), %r12
je 0x177ef
movl %r13d, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x48(%rsp)
jmp 0x177fc
movq %r15, %rdi
leaq 0x8(%rsp), %rdx
callq 0x20b8a
movq %rbx, %rdi
movq %r15, %rsi
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
callq 0x28c8e
cmpq $0x0, 0x18(%r12)
je 0x17827
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x166ce
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1783e
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
decl %ebp
addq $0x4, %r14
cmpq 0x30(%rsp), %r14
jne 0x1770d
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r14
cmpq %r14, %rbx
je 0x17875
movl (%rbx), %esi
movq 0xb0(%rsp), %rdi
callq 0x28c34
incl %ebp
addq $0x4, %rbx
jmp 0x17859
movl 0x3c(%rsp), %eax
cmpl %eax, %ebp
jl 0x17a2c
addl 0x98(%rsp), %eax
cmpl %eax, %ebp
movq 0xb0(%rsp), %rbx
jg 0x17a4b
addq $0x218, %rbx            # imm = 0x218
movq %rbx, %rdi
movl %ebp, %esi
callq 0x29970
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x299ac
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x178cd
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x178e4
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x17901
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 0x22416(%rip), %rdi     # 0x39d32
leaq 0x223b6(%rip), %rsi     # 0x39cd9
leaq 0x223b9(%rip), %rcx     # 0x39ce3
movl $0x5a, %edx
callq 0x31b0
leaq 0x22396(%rip), %rdi     # 0x39cd1
leaq 0x22397(%rip), %rsi     # 0x39cd9
leaq 0x2239a(%rip), %rcx     # 0x39ce3
movl $0x4f, %edx
callq 0x31b0
leaq 0x22462(%rip), %rdi     # 0x39dbc
leaq 0x22378(%rip), %rsi     # 0x39cd9
leaq 0x2237b(%rip), %rcx     # 0x39ce3
movl $0xd2, %edx
callq 0x31b0
leaq 0x223c3(%rip), %rdi     # 0x39d3c
leaq 0x22359(%rip), %rsi     # 0x39cd9
leaq 0x2235c(%rip), %rcx     # 0x39ce3
movl $0x6c, %edx
callq 0x31b0
leaq 0x223b2(%rip), %rdi     # 0x39d4a
leaq 0x2233a(%rip), %rsi     # 0x39cd9
leaq 0x2233d(%rip), %rcx     # 0x39ce3
movl $0xc9, %edx
callq 0x31b0
leaq 0x22393(%rip), %rdi     # 0x39d4a
leaq 0x2231b(%rip), %rsi     # 0x39cd9
leaq 0x2231e(%rip), %rcx     # 0x39ce3
movl $0xba, %edx
callq 0x31b0
leaq 0x2238d(%rip), %rdi     # 0x39d63
leaq 0x222fc(%rip), %rsi     # 0x39cd9
leaq 0x222ff(%rip), %rcx     # 0x39ce3
movl $0xcd, %edx
callq 0x31b0
leaq 0x223e4(%rip), %rdi     # 0x39dd9
leaq 0x222dd(%rip), %rsi     # 0x39cd9
leaq 0x222e0(%rip), %rcx     # 0x39ce3
movl $0xe3, %edx
callq 0x31b0
leaq 0x22409(%rip), %rdi     # 0x39e1d
leaq 0x222be(%rip), %rsi     # 0x39cd9
leaq 0x222c1(%rip), %rcx     # 0x39ce3
movl $0xe4, %edx
callq 0x31b0
leaq 0x22427(%rip), %rdi     # 0x39e5a
leaq 0x2229f(%rip), %rsi     # 0x39cd9
leaq 0x222a2(%rip), %rcx     # 0x39ce3
movl $0xfd, %edx
callq 0x31b0
leaq 0x22419(%rip), %rdi     # 0x39e6b
leaq 0x22280(%rip), %rsi     # 0x39cd9
leaq 0x22283(%rip), %rcx     # 0x39ce3
movl $0xfe, %edx
callq 0x31b0
jmp 0x17aba
jmp 0x17aba
jmp 0x17aba
jmp 0x17aba
movq %rax, %rbx
jmp 0x17ad4
jmp 0x17aba
jmp 0x17aba
jmp 0x17a9c
movq %rax, %rbx
jmp 0x17aeb
jmp 0x17a9c
jmp 0x17a9c
jmp 0x17aba
jmp 0x17a9c
jmp 0x17aba
jmp 0x17aba
jmp 0x17aba
jmp 0x17aba
jmp 0x17a9c
jmp 0x17a9c
jmp 0x17aba
jmp 0x17aba
jmp 0x17aba
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x17abd
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
jmp 0x17abd
jmp 0x17aba
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x17ad4
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x17aeb
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x17b08
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq %rbx, %rdi
callq 0x34a0