// File: /workspace/github_cpp_makefile_star2_O1/Laakeri[P]maxpre/src/./BVE.cpp
// Function: maxPreprocessor::Preprocessor::tryBVE2(int)
int Preprocessor::tryBVE2(int var) {
	int sizeLimit = pi.litClauses[posLit(var)].size() + pi.litClauses[negLit(var)].size();

  sizeLimit += min(BVElocalGrow, BVEglobalGrow);
	
	vector<int> isPosDef, isNegDef;
	vector<int> defClauses;
	if (BVEgate) {
		defClauses = tryBVEGE(var);
	}
	bool defFound = false;
	if (defClauses.size() > 0) {
		defFound = true;
		rLog.gatesExtracted++;
		isPosDef.resize(pi.litClauses[posLit(var)].size());
		isNegDef.resize(pi.litClauses[negLit(var)].size());
		sort(defClauses.begin(), defClauses.end());
		for (int i = 0; i < (int)pi.litClauses[posLit(var)].size(); i++) {
			if (binary_search(defClauses.begin(), defClauses.end(), pi.litClauses[posLit(var)][i])) {
				isPosDef[i] = 1;
			}
		}
		for (int i = 0; i < (int)pi.litClauses[negLit(var)].size(); i++) {
			if (binary_search(defClauses.begin(), defClauses.end(), pi.litClauses[negLit(var)][i])) {
				isNegDef[i] = 1;
			}
		}
	}
	
	//the condition sizelimit >= 6 doesnt really help
	if (sizeLimit >= 6) { // magic constant
		vector<uint64_t> h1=getBVEHash(pi.litClauses[posLit(var)], var, 0);
		vector<uint64_t> h2=getBVEHash(pi.litClauses[negLit(var)], var, 1);
		int hcnt = 0;
		for (int i = 0; i < (int)pi.litClauses[posLit(var)].size(); i++) {
			for (int ii = 0; ii < (int)pi.litClauses[negLit(var)].size(); ii++) {
				if (defFound && (isPosDef[i] == isNegDef[ii])) continue;
				if ((h1[i] & h2[ii]) == 0) {
					hcnt++;
					if (hcnt > sizeLimit) return 0;
				}
			}
		}
	}
	
	vector<vector<int> > newClauses;
	for (int i = 0; i < (int)pi.litClauses[posLit(var)].size(); i++) {
		for (int ii = 0; ii < (int)pi.litClauses[negLit(var)].size(); ii++) {
			if (defFound && (isPosDef[i] == isNegDef[ii])) continue;
			const vector<int>& c1 = pi.clauses[pi.litClauses[posLit(var)][i]].lit;
			const vector<int>& c2 = pi.clauses[pi.litClauses[negLit(var)][ii]].lit;
			unsigned j2 = 0;
			bool f = false;
			for (unsigned j = 0; j < c1.size(); j++) {
				while (j2 < c2.size() && c2[j2] <= c1[j]) {
					if (litNegation(c2[j2]) == c1[j] && litVariable(c1[j]) != var) {
						f = true;
						break;
					}
					j2++;
				}
				if (f) break;
				if (j2 < c2.size() && litNegation(c2[j2]) == c1[j] && litVariable(c1[j]) != var) {
					f = true;
					break;
				}
			}
			
			if (f) continue;
			if ((int)newClauses.size() >= sizeLimit) return 0;
			newClauses.push_back(vector<int>());
			j2 = 0;
			for (unsigned j = 0; j < c1.size(); j++) {
				while (j2 < c2.size() && c2[j2] <= c1[j]) {
					if (litVariable(c2[j2]) != var) {
						newClauses.back().push_back(c2[j2]);
					}
					j2++;
				}
				if (!(newClauses.back().size() > 0 && newClauses.back().back() == c1[j]) && litVariable(c1[j]) != var) {
					newClauses.back().push_back(c1[j]);
				}
			}
			while (j2 < c2.size()) {
				if (litVariable(c2[j2]) != var) {
					newClauses.back().push_back(c2[j2]);
				}
				j2++;
			}
		}
	}
	
	vector<vector<int> > nClauses;
	vector<int> toRemove;
	for (int c : pi.litClauses[posLit(var)]) {
		toRemove.push_back(c);
	}
	for (int c : pi.litClauses[negLit(var)]) {
		toRemove.push_back(c);
		nClauses.push_back(pi.clauses[c].lit);
	}
	for (int c : toRemove) {
		pi.removeClause(c);
	}
	for (auto& nc : newClauses) {
		pi.addClause(nc);
	}
	trace.BVE(var, nClauses);
	
	rLog.removeVariable(1);
	rLog.removeClause((int)toRemove.size() - (int)newClauses.size());

  BVEglobalGrow += (int)toRemove.size() - (int)newClauses.size();
	
	assert(pi.litClauses[posLit(var)].size() == 0 && pi.litClauses[negLit(var)].size() == 0);
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movl %esi, %r12d
leal (%r12,%r12), %eax
cltq
movq 0x18(%rdi), %rcx
leaq (%rax,%rax,2), %rax
movq 0x8(%rcx,%rax,8), %rbx
movq %rax, 0x18(%rsp)
subq (%rcx,%rax,8), %rbx
leal 0x1(,%r12,2), %eax
cltq
leaq (%rax,%rax,2), %rsi
movq 0x8(%rcx,%rsi,8), %r14
movl 0x3a8(%rdi), %eax
movl $0x0, %edx
movq %rsi, 0x20(%rsp)
subq (%rcx,%rsi,8), %r14
movl $0x0, %r15d
movl 0x3a4(%rdi), %ebp
cmpl %ebp, %eax
cmovll %eax, %ebp
xorl %eax, %eax
movq %rax, 0xe0(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xd0(%rsp)
movq %rax, 0xc0(%rsp)
movaps %xmm0, 0xb0(%rsp)
movq %rdi, (%rsp)
cmpb $0x1, 0x3a0(%rdi)
jne 0xecb0
leaq 0x30(%rsp), %rdi
movq (%rsp), %rsi
movl %r12d, %edx
callq 0xe8ba
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %r15
movq 0x40(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq %rdx, 0x10(%rsp)
movq %r15, 0x58(%rsp)
subq %rdx, %r15
je 0xee4f
movq (%rsp), %rax
incl 0x2c8(%rax)
movq 0x18(%rax), %rax
movq 0x18(%rsp), %rcx
movq 0x8(%rax,%rcx,8), %rsi
subq (%rax,%rcx,8), %rsi
sarq $0x2, %rsi
leaq 0xd0(%rsp), %rdi
callq 0x8cbc
movq (%rsp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rsp), %rcx
movq 0x8(%rax,%rcx,8), %rsi
subq (%rax,%rcx,8), %rsi
sarq $0x2, %rsi
leaq 0xb0(%rsp), %rdi
callq 0x8cbc
movq 0x58(%rsp), %rax
cmpq %rax, 0x10(%rsp)
je 0xed5a
sarq $0x2, %r15
bsrq %r15, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq 0x10(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x22eaf
movq 0x10(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x22f92
movq (%rsp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x8(%rax,%rcx,8), %rax
subq %rdx, %rax
shrq $0x2, %rax
testl %eax, %eax
movq 0x10(%rsp), %rdi
jle 0xedd7
xorl %r15d, %r15d
xorl %r13d, %r13d
addq %r15, %rdx
movq 0x58(%rsp), %rsi
callq 0x1fbf7
testb %al, %al
je 0xeda7
movq 0xd0(%rsp), %rax
movl $0x1, (%rax,%r15)
incq %r13
movq (%rsp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x8(%rax,%rcx,8), %rax
subq %rdx, %rax
shrq $0x2, %rax
cltq
addq $0x4, %r15
cmpq %rax, %r13
movq 0x10(%rsp), %rdi
jl 0xed86
movq (%rsp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x8(%rax,%rcx,8), %rax
subq %rdx, %rax
shrq $0x2, %rax
testl %eax, %eax
jle 0xee4f
xorl %r15d, %r15d
xorl %r13d, %r13d
addq %r15, %rdx
movq 0x58(%rsp), %rsi
callq 0x1fbf7
testb %al, %al
je 0xee1f
movq 0xb0(%rsp), %rax
movl $0x1, (%rax,%r15)
incq %r13
movq (%rsp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x8(%rax,%rcx,8), %rax
subq %rdx, %rax
shrq $0x2, %rax
cltq
addq $0x4, %r15
cmpq %rax, %r13
movq 0x10(%rsp), %rdi
jl 0xedfe
shrq $0x2, %rbx
shrq $0x2, %r14
addl %r14d, %ebx
addl %ebx, %ebp
movl %ebp, 0x9c(%rsp)
cmpl $0x6, %ebp
movq (%rsp), %rbx
jl 0xf01e
movq 0x18(%rsp), %rax
leaq (,%rax,8), %rdx
addq 0x18(%rbx), %rdx
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0xcc6e
movq 0x20(%rsp), %rax
leaq (,%rax,8), %rdx
addq 0x18(%rbx), %rdx
leaq 0x80(%rsp), %rdi
movq %rbx, %rsi
movl %r12d, %ecx
movl $0x1, %r8d
callq 0xcc6e
movq 0x18(%rbx), %rdx
movq 0x18(%rsp), %rcx
movq 0x8(%rdx,%rcx,8), %rax
subq (%rdx,%rcx,8), %rax
shrq $0x2, %rax
testl %eax, %eax
setg %bl
jle 0xefa1
movq 0x20(%rsp), %rsi
movq 0x8(%rdx,%rsi,8), %rcx
subq (%rdx,%rsi,8), %rcx
shrq $0x2, %rcx
testl %ecx, %ecx
setg 0x50(%rsp)
movq 0xd0(%rsp), %rsi
movq 0xb0(%rsp), %rdi
movq 0x30(%rsp), %r8
movq 0x80(%rsp), %r9
movslq %ecx, %r10
movl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
andq %r14, %rax
movq %rcx, %r11
andq %r14, %r11
negq %r11
xorl %r14d, %r14d
xorl %r15d, %r15d
testl %ecx, %ecx
jle 0xef8b
movl $0x1, %r13d
movb 0x50(%rsp), %bpl
movq 0x58(%rsp), %rdx
cmpq 0x10(%rsp), %rdx
je 0xef56
movl (%rsi,%r14,4), %edx
cmpl -0x4(%rdi,%r13,4), %edx
je 0xef72
movq -0x8(%r9,%r13,8), %rdx
testq %rdx, (%r8,%r14,8)
jne 0xef72
leal 0x1(%r15), %edx
cmpl 0x9c(%rsp), %r15d
movl %edx, %r15d
jge 0xef90
cmpq %r10, %r13
setl %bpl
leaq (%r11,%r13), %rdx
incq %rdx
incq %r13
cmpq $0x1, %rdx
jne 0xef3f
jmp 0xef90
movb 0x50(%rsp), %bpl
testb $0x1, %bpl
jne 0xefdb
incq %r14
cmpq %rax, %r14
setb %bl
jne 0xef30
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0xefbe
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
movq (%rsp), %rbx
je 0xf01e
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
jmp 0xf01e
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0xeff8
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xf00f
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
xorl %ebp, %ebp
testb $0x1, %bl
movq (%rsp), %rbx
jne 0xf647
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movq 0x18(%rbx), %rax
movq 0x18(%rsp), %rdx
movq 0x8(%rax,%rdx,8), %rcx
subq (%rax,%rdx,8), %rcx
shrq $0x2, %rcx
testl %ecx, %ecx
setg %al
jle 0xf41f
movq $0x0, 0xa0(%rsp)
movb %al, 0xf(%rsp)
movq 0x18(%rbx), %rax
movq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x8(%rax,%rcx,8), %rcx
subq %rsi, %rcx
shrq $0x2, %rcx
testl %ecx, %ecx
jle 0xf3d8
xorl %r14d, %r14d
movq 0x58(%rsp), %rcx
cmpq 0x10(%rsp), %rcx
je 0xf0b5
movq 0xd0(%rsp), %rcx
movq 0xa0(%rsp), %rdx
movl (%rcx,%rdx,4), %ecx
movq 0xb0(%rsp), %rdx
cmpl (%rdx,%r14,4), %ecx
je 0xf3b0
movq 0x18(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xa0(%rsp), %rcx
movslq (%rax,%rcx,4), %rax
movq (%rbx), %rdi
leaq (%rax,%rax,4), %rcx
movq (%rdi,%rcx,8), %rax
movq %rcx, 0xe8(%rsp)
movq 0x8(%rdi,%rcx,8), %rcx
xorl %edx, %edx
movslq (%rsi,%r14,4), %rsi
leaq (%rsi,%rsi,4), %rsi
movq %rdi, 0xf0(%rsp)
leaq (%rdi,%rsi,8), %rbx
subq %rax, %rcx
movq %r14, 0x50(%rsp)
je 0xf1b9
sarq $0x2, %rcx
movq (%rbx), %rdi
movq 0x8(%rbx), %r8
subq %rdi, %r8
sarq $0x2, %r8
xorl %esi, %esi
xorl %r9d, %r9d
movl %r9d, %r10d
cmpq %r10, %r8
seta %r11b
jbe 0xf17e
movl (%rax,%rdx,4), %r15d
movl (%rdi,%r10,4), %ebp
cmpl %r15d, %ebp
jg 0xf17e
movl %r15d, %r13d
sarl %r13d
movl %r9d, %r14d
cmpl %r12d, %r13d
setne %r9b
xorl %r15d, %ebp
cmpl $0x1, %ebp
sete %bpl
testb %r9b, %bpl
jne 0xf173
leal 0x1(%r14), %r9d
movl %r9d, %r10d
cmpq %r10, %r8
seta %r11b
jbe 0xf16e
movl (%rdi,%r10,4), %ebp
cmpl %r15d, %ebp
jle 0xf13c
incl %r14d
jmp 0xf176
movb $0x1, %sil
movl %r14d, %r9d
movq 0x50(%rsp), %r14
testb $0x1, %sil
jne 0xf1c0
testb $0x1, %r11b
je 0xf1ac
movl (%rax,%rdx,4), %r11d
movl (%rdi,%r10,4), %r10d
xorl %r11d, %r10d
cmpl $0x1, %r10d
sete %r10b
sarl %r11d
cmpl %r12d, %r11d
setne %r11b
testb %r11b, %r10b
jne 0xf1bd
incl %edx
cmpq %rdx, %rcx
ja 0xf11d
jmp 0xf1c0
xorl %esi, %esi
jmp 0xf1c0
movb $0x1, %sil
movl $0x13, %ebp
testb $0x1, %sil
jne 0xf3a3
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
movl $0x1, %ebp
cmpl %eax, 0x9c(%rsp)
jle 0xf3a3
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movq $0x0, 0x90(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x23202
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0xf23b
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq 0xf0(%rsp), %rax
movq 0xe8(%rsp), %rcx
leaq (%rax,%rcx,8), %r14
movq 0x8(%r14), %rax
xorl %ebp, %ebp
movl $0x0, %r13d
cmpq (%r14), %rax
je 0xf337
xorl %r15d, %r15d
xorl %r13d, %r13d
movl %r13d, %ecx
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %rcx, %rdx
jbe 0xf2d6
movl (%rax,%rcx,4), %edx
movq (%r14), %rsi
cmpl (%rsi,%r15,4), %edx
jg 0xf2d6
movl %edx, %esi
sarl %esi
cmpl %r12d, %esi
je 0xf2bd
movq 0x38(%rsp), %rdi
movq -0x10(%rdi), %rsi
cmpq -0x8(%rdi), %rsi
je 0xf2b0
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x10(%rdi)
jmp 0xf2bd
leaq (%rax,%rcx,4), %rdx
addq $-0x18, %rdi
callq 0x98e8
incl %r13d
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
movq %r13, %rcx
cmpq %r13, %rdx
ja 0xf280
movq 0x38(%rsp), %rdi
movq -0x10(%rdi), %rsi
cmpq -0x18(%rdi), %rsi
je 0xf2f1
movl -0x4(%rsi), %eax
movq (%r14), %rcx
cmpl (%rcx,%r15,4), %eax
je 0xf320
movq (%r14), %rax
movl (%rax,%r15,4), %ecx
movl %ecx, %edx
sarl %edx
cmpl %r12d, %edx
je 0xf320
cmpq -0x8(%rdi), %rsi
je 0xf313
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x10(%rdi)
jmp 0xf320
addq $-0x18, %rdi
leaq (%rax,%r15,4), %rdx
callq 0x98e8
incl %r15d
movq 0x8(%r14), %rax
subq (%r14), %rax
sarq $0x2, %rax
cmpq %r15, %rax
ja 0xf26a
movl %r13d, %eax
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
cmpq %rax, %rdx
jbe 0xf39e
leal 0x1(%rax), %r14d
movl (%rcx,%rax,4), %edx
movl %edx, %esi
sarl %esi
cmpl %r12d, %esi
je 0xf385
movq 0x38(%rsp), %rdi
movq -0x10(%rdi), %rsi
cmpq -0x8(%rdi), %rsi
je 0xf378
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x10(%rdi)
jmp 0xf385
leaq (%rcx,%rax,4), %rdx
addq $-0x18, %rdi
callq 0x98e8
movl %r14d, %eax
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
incl %r14d
cmpq %rax, %rdx
ja 0xf351
movq 0x50(%rsp), %r14
cmpl $0x13, %ebp
movq (%rsp), %rbx
je 0xf3b0
testl %ebp, %ebp
jne 0xf412
incq %r14
movq 0x18(%rbx), %rax
movq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x8(%rax,%rcx,8), %rcx
subq %rsi, %rcx
shrq $0x2, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r14
jl 0xf084
movq 0xa0(%rsp), %rsi
incq %rsi
movq 0x18(%rbx), %rax
movq 0x18(%rsp), %rdx
movq 0x8(%rax,%rdx,8), %rcx
subq (%rax,%rdx,8), %rcx
shrq $0x2, %rcx
movslq %ecx, %rax
movq %rsi, 0xa0(%rsp)
cmpq %rax, %rsi
setl %al
jl 0xf05c
jmp 0xf41f
xorl %ebp, %ebp
testb $0x1, 0xf(%rsp)
jne 0xf63d
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
xorl %eax, %eax
movq %rax, 0x90(%rsp)
movq %rax, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movq 0x18(%rbx), %rax
movq 0x18(%rsp), %rcx
movq (%rax,%rcx,8), %rbx
movq 0x8(%rax,%rcx,8), %r15
cmpq %r15, %rbx
je 0xf492
leaq 0x60(%rsp), %r14
leaq 0x2c(%rsp), %r13
movl (%rbx), %eax
movl %eax, 0x2c(%rsp)
movq 0x68(%rsp), %rsi
cmpq 0x70(%rsp), %rsi
je 0xf47e
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x68(%rsp)
jmp 0xf489
movq %r14, %rdi
movq %r13, %rdx
callq 0x98e8
addq $0x4, %rbx
cmpq %r15, %rbx
jne 0xf45f
movq (%rsp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rbx
movq 0x8(%rax,%rcx,8), %r15
cmpq %r15, %rbx
je 0xf50e
leaq 0x60(%rsp), %rbp
leaq 0x2c(%rsp), %r13
leaq 0x80(%rsp), %r14
movl (%rbx), %eax
movl %eax, 0x2c(%rsp)
movq 0x68(%rsp), %rsi
cmpq 0x70(%rsp), %rsi
je 0xf4de
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x68(%rsp)
jmp 0xf4e9
movq %rbp, %rdi
movq %r13, %rdx
callq 0x98e8
movslq 0x2c(%rsp), %rax
leaq (%rax,%rax,4), %rsi
shlq $0x3, %rsi
movq (%rsp), %rax
addq (%rax), %rsi
movq %r14, %rdi
callq 0x1fc42
addq $0x4, %rbx
cmpq %r15, %rbx
jne 0xf4bf
movq 0x60(%rsp), %rbx
movq 0x68(%rsp), %r14
cmpq %r14, %rbx
je 0xf52e
movl (%rbx), %esi
movq (%rsp), %rdi
callq 0x28c34
addq $0x4, %rbx
jmp 0xf518
movq 0x30(%rsp), %r14
movq 0x38(%rsp), %rbx
cmpq %rbx, %r14
je 0xf55f
movabsq $-0x8000000000000000, %r13 # imm = 0x8000000000000000
movq (%rsp), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x28c8e
addq $0x18, %r14
cmpq %rbx, %r14
jne 0xf547
movq (%rsp), %rbx
leaq 0x2f0(%rbx), %rdi
leaq 0x80(%rsp), %rdx
movl %r12d, %esi
callq 0x275dc
leaq 0x218(%rbx), %r14
movq %r14, %rdi
movl $0x1, %esi
callq 0x299ac
movq 0x68(%rsp), %rax
subq 0x60(%rsp), %rax
movq 0x38(%rsp), %rcx
subq 0x30(%rsp), %rcx
shrq $0x2, %rax
shrq $0x3, %rcx
imull $0x55555555, %ecx, %esi # imm = 0x55555555
addl %eax, %esi
movq %r14, %rdi
callq 0x29970
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rax
subq %rdi, %rax
shrq $0x2, %rax
movq 0x38(%rsp), %rcx
subq 0x30(%rsp), %rcx
shrq $0x3, %rcx
imull $0x55555555, %ecx, %ecx # imm = 0x55555555
addl 0x3a8(%rbx), %eax
addl %ecx, %eax
movl %eax, 0x3a8(%rbx)
movq 0x18(%rbx), %rax
movq 0x18(%rsp), %rdx
movq 0x8(%rax,%rdx,8), %rcx
cmpq (%rax,%rdx,8), %rcx
jne 0xf6af
movq 0x20(%rsp), %rdx
movq 0x8(%rax,%rdx,8), %rcx
cmpq (%rax,%rdx,8), %rcx
jne 0xf6af
testq %rdi, %rdi
je 0xf62b
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
leaq 0x80(%rsp), %rdi
callq 0x8f6e
movl $0x1, %ebp
leaq 0x30(%rsp), %rdi
callq 0x8f6e
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xf661
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0xf67e
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0xf69b
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movl %ebp, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x29f63(%rip), %rdi     # 0x39619
leaq 0x29de2(%rip), %rsi     # 0x3949f
leaq 0x29fa6(%rip), %rcx     # 0x3966a
movl $0x1cf, %edx            # imm = 0x1CF
callq 0x31b0
movq %rax, %r14
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xf77a
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
jmp 0xf77a
jmp 0xf737
movq %rax, %r14
movq $0x0, 0xa8(%rsp)
movq $0x0, 0x10(%rsp)
jmp 0xf77a
jmp 0xf740
jmp 0xf737
jmp 0xf740
movq %rax, %r14
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0xf770
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
jmp 0xf770
jmp 0xf737
movq %rax, %r14
jmp 0xf77a
jmp 0xf740
jmp 0xf740
movq %rax, %r14
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0xf75a
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
leaq 0x80(%rsp), %rdi
callq 0x8f6e
jmp 0xf770
jmp 0xf76d
jmp 0xf76d
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x8f6e
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xf794
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0xf7b1
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0xf7ce
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq %r14, %rdi
callq 0x34a0