// File: Laakeri[P]maxpre/src/preprocessor.cpp
// Function: maxPreprocessor::Preprocessor::eliminateReduntantLabels()
int Preprocessor::eliminateReduntantLabels() {
	map<int64_t, map<int, vector<int> > > labels;
	vector<int> ls;
	for (int var = 0; var < pi.vars; var++) {
		if (pi.isLabel[var]) {
			if (pi.isLabel[var] == VAR_TRUE) {
				if (pi.litClauses[negLit(var)].size() == 1) {
					int c = pi.litClauses[negLit(var)][0];
					for (int lit : pi.clauses[c].lit) {
						labels[pi.labelWeight(var)][lit].push_back(posLit(var));
					}
					ls.push_back(posLit(var));
				}
			}
			else {
				if (pi.litClauses[posLit(var)].size() == 1) {
					int c = pi.litClauses[posLit(var)][0];
					for (int lit : pi.clauses[c].lit) {
						labels[pi.labelWeight(var)][lit].push_back(negLit(var));
					}
					ls.push_back(negLit(var));
				}
			}
		}
	}
	vector<int> matched(pi.vars);
	int fnd = 0;
	//priorize matching ternary clauses
	for (int lb : ls) {
		if (matched[litVariable(lb)]) continue;
		int c = pi.litClauses[litNegation(lb)][0];
		if (pi.clauses[c].lit.size() != 3) continue;
		vector<int> lits;
		for (int lit : pi.clauses[c].lit) {
			if (!pi.isLabel[litVariable(lit)]) lits.push_back(litNegation(lit));
		}
		if (lits.size() != 2) continue;
		int tl = lits[0];
		if (pi.litClauses[lits[1]].size() < pi.litClauses[tl].size()) tl = lits[1];
		for (int c2 : pi.litClauses[tl]) {
			if (pi.clauses[c2].lit.size() != 3) continue;
			int lb2 = -1;
			vector<int> lits2;
			for (int lit : pi.clauses[c2].lit) {
				if (!pi.isLabel[litVariable(lit)]) lits2.push_back(lit);
				else lb2 = litNegation(lit);
			}
			if (lits2.size() != 2) continue;
			if (lb2 == -1) continue;
			if (lb2 == lb) continue;
			if (pi.labelWeight(litVariable(lb)) != pi.labelWeight(litVariable(lb2))) continue;
			if (matched[litVariable(lb2)]) continue;
			if (pi.litClauses[litNegation(lb2)].size() > 1) continue;
			if ((lits[0] == lits2[0] && lits[1] == lits2[1]) || (lits[1] == lits2[0] && lits[0] == lits2[1])) {
				fnd++;
				matched[litVariable(lb)] = 1;
				matched[litVariable(lb2)] = 1;
				pi.removeLiteralFromClause(litNegation(lb2), c2);
				pi.addLiteralToClause(litNegation(lb), c2);
				pi.removeClause(pi.litClauses[lb2][0]);
				assert(pi.isVarRemoved(litVariable(lb2)));
				trace.labelEliminate(lb, lb2, lits2[0]);
				trace.setVar(litVariable(lb2), litValue(lb2));
				pi.isLabel[litVariable(lb2)] = VAR_UNDEFINED;
				break;
			}
		}
	}
	//match greedily
	for (unsigned i = 0; i < ls.size(); i++) {
		if (matched[litVariable(ls[i])]) continue;
		int c1 = pi.litClauses[litNegation(ls[i])][0];
		for (int lit : pi.clauses[c1].lit) {
			if (pi.isLabel[litVariable(lit)]) continue;
			for (int l2 : labels[pi.labelWeight(litVariable(ls[i]))][litNegation(lit)]) {
				if (matched[litVariable(l2)]) continue;
				int c2 = pi.litClauses[litNegation(l2)][0];
				bool taut = false;
				int tautli = 0;
				unsigned j2 = 0;
				for (unsigned j = 0; j < pi.clauses[c1].lit.size(); j++) {
					while (j2 < pi.clauses[c2].lit.size() && pi.clauses[c2].lit[j2] < pi.clauses[c1].lit[j]) {
						if (pi.clauses[c2].lit[j2] == litNegation(pi.clauses[c1].lit[j])) {
							tautli = pi.clauses[c2].lit[j2];
							taut = true;
						}
						j2++;
					}
					if (j2 < pi.clauses[c2].lit.size() && pi.clauses[c2].lit[j2] == litNegation(pi.clauses[c1].lit[j])) {
						tautli = pi.clauses[c2].lit[j2];
						taut = true;
					}
					if (taut) break;
				}
				assert(taut == true);
				fnd++;
				matched[litVariable(ls[i])] = 1;
				matched[litVariable(l2)] = 1;
				pi.removeLiteralFromClause(litNegation(l2), c2);
				pi.addLiteralToClause(litNegation(ls[i]), c2);
				pi.removeClause(pi.litClauses[l2][0]);
				assert(pi.isVarRemoved(litVariable(l2)));
				trace.labelEliminate(ls[i], l2, tautli);
				trace.setVar(litVariable(l2), litValue(l2));
				pi.isLabel[litVariable(l2)] = VAR_UNDEFINED;
				break;
			}
			if (matched[litVariable(ls[i])]) break;
		}
	}
	return fnd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4d0, %rsp            # imm = 0x4D0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x218(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3c670
leaq -0x50(%rbp), %rdi
callq 0xa7e0
movl $0x0, -0x54(%rbp)
movq -0x218(%rbp), %rcx
movl -0x54(%rbp), %eax
cmpl 0x60(%rcx), %eax
jge 0x1114f
movq -0x218(%rbp), %rdi
addq $0x48, %rdi
movslq -0x54(%rbp), %rsi
callq 0xa7c0
cmpl $0x0, (%rax)
je 0x1113f
movq -0x218(%rbp), %rdi
addq $0x48, %rdi
movslq -0x54(%rbp), %rsi
callq 0xa7c0
cmpl $0x1, (%rax)
jne 0x10f68
movq -0x218(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x228(%rbp)
movl -0x54(%rbp), %edi
callq 0x3c5e0
movl %eax, -0x21c(%rbp)
jmp 0x10dc2
movq -0x228(%rbp), %rdi
movl -0x21c(%rbp), %eax
movslq %eax, %rsi
callq 0xaab0
movq %rax, %rdi
callq 0xf940
cmpq $0x1, %rax
jne 0x10f63
movq -0x218(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x238(%rbp)
movl -0x54(%rbp), %edi
callq 0x3c5e0
movl %eax, -0x22c(%rbp)
jmp 0x10e0b
movq -0x238(%rbp), %rdi
movl -0x22c(%rbp), %eax
movslq %eax, %rsi
callq 0xaab0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa7c0
movq -0x218(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x68(%rbp)
movslq -0x68(%rbp), %rsi
callq 0x3c600
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
callq 0xa800
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rdi
callq 0xa830
movq %rax, -0x80(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x10e75
jmp 0x10f33
leaq -0x78(%rbp), %rdi
callq 0xa8a0
movq -0x218(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x84(%rbp)
movl -0x54(%rbp), %esi
callq 0x5ed50
movq %rax, -0x240(%rbp)
jmp 0x10e9e
movq -0x240(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3c690
movq %rax, -0x248(%rbp)
jmp 0x10ec5
movq -0x248(%rbp), %rdi
leaq -0x84(%rbp), %rsi
callq 0x3c770
movq %rax, -0x250(%rbp)
jmp 0x10ee1
movl -0x54(%rbp), %edi
callq 0x3c5d0
movl %eax, -0x254(%rbp)
jmp 0x10ef1
movq -0x250(%rbp), %rdi
movl -0x254(%rbp), %eax
movl %eax, -0x94(%rbp)
leaq -0x94(%rbp), %rsi
callq 0x3c850
jmp 0x10f12
jmp 0x10f14
leaq -0x78(%rbp), %rdi
callq 0xa930
jmp 0x10e5f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x12546
movl -0x54(%rbp), %edi
callq 0x3c5d0
movl %eax, -0x258(%rbp)
jmp 0x10f43
movl -0x258(%rbp), %eax
movl %eax, -0x98(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x3c850
jmp 0x10f61
jmp 0x10f63
jmp 0x1113d
movq -0x218(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x268(%rbp)
movl -0x54(%rbp), %edi
callq 0x3c5d0
movl %eax, -0x25c(%rbp)
jmp 0x10f8a
movq -0x268(%rbp), %rdi
movl -0x25c(%rbp), %eax
movslq %eax, %rsi
callq 0xaab0
movq %rax, %rdi
callq 0xf940
cmpq $0x1, %rax
jne 0x1113b
movq -0x218(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x278(%rbp)
movl -0x54(%rbp), %edi
callq 0x3c5d0
movl %eax, -0x26c(%rbp)
jmp 0x10fd3
movq -0x278(%rbp), %rdi
movl -0x26c(%rbp), %eax
movslq %eax, %rsi
callq 0xaab0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa7c0
movq -0x218(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x9c(%rbp)
movslq -0x9c(%rbp), %rsi
callq 0x3c600
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rdi
callq 0xa800
movq %rax, -0xb0(%rbp)
movq -0xa8(%rbp), %rdi
callq 0xa830
movq %rax, -0xb8(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x11058
jmp 0x1110b
leaq -0xb0(%rbp), %rdi
callq 0xa8a0
movq -0x218(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0xbc(%rbp)
movl -0x54(%rbp), %esi
callq 0x5ed50
movq %rax, -0x280(%rbp)
jmp 0x11084
movq -0x280(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x3c690
movq %rax, -0x288(%rbp)
jmp 0x110ab
movq -0x288(%rbp), %rdi
leaq -0xbc(%rbp), %rsi
callq 0x3c770
movq %rax, -0x290(%rbp)
jmp 0x110c7
movl -0x54(%rbp), %edi
callq 0x3c5e0
movl %eax, -0x294(%rbp)
jmp 0x110d7
movq -0x290(%rbp), %rdi
movl -0x294(%rbp), %eax
movl %eax, -0xcc(%rbp)
leaq -0xcc(%rbp), %rsi
callq 0x3c850
jmp 0x110f8
jmp 0x110fa
leaq -0xb0(%rbp), %rdi
callq 0xa930
jmp 0x1103c
movl -0x54(%rbp), %edi
callq 0x3c5e0
movl %eax, -0x298(%rbp)
jmp 0x1111b
movl -0x298(%rbp), %eax
movl %eax, -0xd0(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x3c850
jmp 0x11139
jmp 0x1113b
jmp 0x1113d
jmp 0x1113f
jmp 0x11141
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x10d53
movq -0x218(%rbp), %rax
movslq 0x60(%rax), %rax
movq %rax, -0x2a8(%rbp)
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x2a0(%rbp)
callq 0xa710
movq -0x2a8(%rbp), %rsi
movq -0x2a0(%rbp), %rdx
leaq -0xe8(%rbp), %rdi
callq 0xa730
jmp 0x11190
leaq -0xe9(%rbp), %rdi
callq 0xa7a0
movl $0x0, -0xf0(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rdi
callq 0xa800
movq %rax, -0x100(%rbp)
movq -0xf8(%rbp), %rdi
callq 0xa830
movq %rax, -0x108(%rbp)
leaq -0x100(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x111f3
jmp 0x11bfc
leaq -0x100(%rbp), %rdi
callq 0xa8a0
movl (%rax), %eax
movl %eax, -0x10c(%rbp)
movl -0x10c(%rbp), %edi
callq 0x3c880
movl %eax, -0x2ac(%rbp)
jmp 0x1121a
movl -0x2ac(%rbp), %eax
movslq %eax, %rsi
leaq -0xe8(%rbp), %rdi
callq 0xa7c0
cmpl $0x0, (%rax)
je 0x11267
jmp 0x11bda
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xe9(%rbp), %rdi
callq 0xa7a0
jmp 0x12546
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x1253a
movq -0x218(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x2b8(%rbp)
movl -0x10c(%rbp), %edi
callq 0x3c5a0
movl %eax, -0x2b0(%rbp)
jmp 0x1128c
movq -0x2b8(%rbp), %rdi
movl -0x2b0(%rbp), %eax
movslq %eax, %rsi
callq 0xaab0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa7c0
movq -0x218(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x110(%rbp)
movslq -0x110(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
callq 0xf940
cmpq $0x3, %rax
je 0x112db
jmp 0x11bda
leaq -0x128(%rbp), %rdi
callq 0xa7e0
movq -0x218(%rbp), %rdi
movslq -0x110(%rbp), %rsi
callq 0x3c600
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rdi
callq 0xa800
movq %rax, -0x138(%rbp)
movq -0x130(%rbp), %rdi
callq 0xa830
movq %rax, -0x140(%rbp)
leaq -0x138(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x11343
jmp 0x113f3
leaq -0x138(%rbp), %rdi
callq 0xa8a0
movq %rax, %rcx
movq -0x218(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, -0x144(%rbp)
addq $0x48, %rax
movq %rax, -0x2c8(%rbp)
movl -0x144(%rbp), %edi
callq 0x3c880
movl %eax, -0x2bc(%rbp)
jmp 0x1137f
movq -0x2c8(%rbp), %rdi
movl -0x2bc(%rbp), %eax
movslq %eax, %rsi
callq 0xa7c0
cmpl $0x0, (%rax)
jne 0x113e0
movl -0x144(%rbp), %edi
callq 0x3c5a0
movl %eax, -0x2cc(%rbp)
jmp 0x113ac
movl -0x2cc(%rbp), %eax
movl %eax, -0x148(%rbp)
leaq -0x128(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x3c850
jmp 0x113cd
jmp 0x113e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x11beb
jmp 0x113e2
leaq -0x138(%rbp), %rdi
callq 0xa930
jmp 0x11327
leaq -0x128(%rbp), %rdi
callq 0xf940
cmpq $0x2, %rax
je 0x11414
movl $0xa, -0x14c(%rbp)
jmp 0x11bbe
leaq -0x128(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa7c0
movq %rax, %rcx
movq -0x218(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, -0x150(%rbp)
addq $0x18, %rax
movq %rax, -0x2e0(%rbp)
leaq -0x128(%rbp), %rdi
movl $0x1, %esi
callq 0xa7c0
movq -0x2e0(%rbp), %rdi
movslq (%rax), %rsi
callq 0xaab0
movq %rax, %rdi
callq 0xf940
movq -0x218(%rbp), %rdi
movq %rax, -0x2d8(%rbp)
addq $0x18, %rdi
movslq -0x150(%rbp), %rsi
callq 0xaab0
movq %rax, %rdi
callq 0xf940
movq %rax, %rcx
movq -0x2d8(%rbp), %rax
cmpq %rcx, %rax
jae 0x114b7
leaq -0x128(%rbp), %rdi
movl $0x1, %esi
callq 0xa7c0
movl (%rax), %eax
movl %eax, -0x150(%rbp)
movq -0x218(%rbp), %rdi
addq $0x18, %rdi
movslq -0x150(%rbp), %rsi
callq 0xaab0
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rdi
callq 0xa800
movq %rax, -0x160(%rbp)
movq -0x158(%rbp), %rdi
callq 0xa830
movq %rax, -0x168(%rbp)
leaq -0x160(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x11517
jmp 0x11bb4
leaq -0x160(%rbp), %rdi
callq 0xa8a0
movq -0x218(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x16c(%rbp)
movslq -0x16c(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
callq 0xf940
cmpq $0x3, %rax
je 0x11551
jmp 0x11ba3
movl $0xffffffff, -0x170(%rbp) # imm = 0xFFFFFFFF
leaq -0x188(%rbp), %rdi
callq 0xa7e0
movq -0x218(%rbp), %rdi
movslq -0x16c(%rbp), %rsi
callq 0x3c600
movq %rax, -0x190(%rbp)
movq -0x190(%rbp), %rdi
callq 0xa800
movq %rax, -0x198(%rbp)
movq -0x190(%rbp), %rdi
callq 0xa830
movq %rax, -0x1a0(%rbp)
leaq -0x198(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x115c3
jmp 0x1167f
leaq -0x198(%rbp), %rdi
callq 0xa8a0
movq %rax, %rcx
movq -0x218(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, -0x1a4(%rbp)
addq $0x48, %rax
movq %rax, -0x2f0(%rbp)
movl -0x1a4(%rbp), %edi
callq 0x3c880
movl %eax, -0x2e4(%rbp)
jmp 0x115ff
movq -0x2f0(%rbp), %rdi
movl -0x2e4(%rbp), %eax
movslq %eax, %rsi
callq 0xa7c0
cmpl $0x0, (%rax)
jne 0x1164d
leaq -0x188(%rbp), %rdi
leaq -0x1a4(%rbp), %rsi
callq 0xa8c0
jmp 0x1162e
jmp 0x1166c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x188(%rbp), %rdi
callq 0xab00
jmp 0x11beb
movl -0x1a4(%rbp), %edi
callq 0x3c5a0
movl %eax, -0x2f4(%rbp)
jmp 0x11660
movl -0x2f4(%rbp), %eax
movl %eax, -0x170(%rbp)
jmp 0x1166e
leaq -0x198(%rbp), %rdi
callq 0xa930
jmp 0x115a7
leaq -0x188(%rbp), %rdi
callq 0xf940
cmpq $0x2, %rax
je 0x116a0
movl $0xe, -0x14c(%rbp)
jmp 0x11b74
cmpl $-0x1, -0x170(%rbp)
jne 0x116b8
movl $0xe, -0x14c(%rbp)
jmp 0x11b74
movl -0x170(%rbp), %eax
cmpl -0x10c(%rbp), %eax
jne 0x116d5
movl $0xe, -0x14c(%rbp)
jmp 0x11b74
movq -0x218(%rbp), %rax
movq %rax, -0x300(%rbp)
movl -0x10c(%rbp), %edi
callq 0x3c880
movl %eax, -0x2f8(%rbp)
jmp 0x116f6
movl -0x2f8(%rbp), %esi
movq -0x300(%rbp), %rdi
callq 0x5ed50
movq %rax, -0x308(%rbp)
jmp 0x11711
movq -0x218(%rbp), %rax
movq %rax, -0x318(%rbp)
movl -0x170(%rbp), %edi
callq 0x3c880
movl %eax, -0x30c(%rbp)
jmp 0x11732
movl -0x30c(%rbp), %esi
movq -0x318(%rbp), %rdi
callq 0x5ed50
movq %rax, -0x320(%rbp)
jmp 0x1174d
movq -0x308(%rbp), %rax
movq -0x320(%rbp), %rcx
cmpq %rcx, %rax
je 0x1176f
movl $0xe, -0x14c(%rbp)
jmp 0x11b74
movl -0x170(%rbp), %edi
callq 0x3c880
movl %eax, -0x324(%rbp)
jmp 0x11782
movl -0x324(%rbp), %eax
movslq %eax, %rsi
leaq -0xe8(%rbp), %rdi
callq 0xa7c0
cmpl $0x0, (%rax)
je 0x117ab
movl $0xe, -0x14c(%rbp)
jmp 0x11b74
movq -0x218(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x330(%rbp)
movl -0x170(%rbp), %edi
callq 0x3c5a0
movl %eax, -0x328(%rbp)
jmp 0x117d0
movq -0x330(%rbp), %rdi
movl -0x328(%rbp), %eax
movslq %eax, %rsi
callq 0xaab0
movq %rax, %rdi
callq 0xf940
cmpq $0x1, %rax
jbe 0x11802
movl $0xe, -0x14c(%rbp)
jmp 0x11b74
leaq -0x128(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa7c0
movl (%rax), %eax
movl %eax, -0x334(%rbp)
leaq -0x188(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa7c0
movq %rax, %rcx
movl -0x334(%rbp), %eax
cmpl (%rcx), %eax
jne 0x1186e
leaq -0x128(%rbp), %rdi
movl $0x1, %esi
callq 0xa7c0
movl (%rax), %eax
movl %eax, -0x338(%rbp)
leaq -0x188(%rbp), %rdi
movl $0x1, %esi
callq 0xa7c0
movq %rax, %rcx
movl -0x338(%rbp), %eax
cmpl (%rcx), %eax
je 0x118e2
leaq -0x128(%rbp), %rdi
movl $0x1, %esi
callq 0xa7c0
movl (%rax), %eax
movl %eax, -0x33c(%rbp)
leaq -0x188(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa7c0
movq %rax, %rcx
movl -0x33c(%rbp), %eax
cmpl (%rcx), %eax
jne 0x11b6a
leaq -0x128(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa7c0
movl (%rax), %eax
movl %eax, -0x340(%rbp)
leaq -0x188(%rbp), %rdi
movl $0x1, %esi
callq 0xa7c0
movq %rax, %rcx
movl -0x340(%rbp), %eax
cmpl (%rcx), %eax
jne 0x11b6a
movl -0xf0(%rbp), %eax
incl %eax
movl %eax, -0xf0(%rbp)
movl -0x10c(%rbp), %edi
callq 0x3c880
movl %eax, -0x344(%rbp)
jmp 0x11903
movl -0x344(%rbp), %eax
movslq %eax, %rsi
leaq -0xe8(%rbp), %rdi
callq 0xa7c0
movl $0x1, (%rax)
movl -0x170(%rbp), %edi
callq 0x3c880
movl %eax, -0x348(%rbp)
jmp 0x11931
movl -0x348(%rbp), %eax
movslq %eax, %rsi
leaq -0xe8(%rbp), %rdi
callq 0xa7c0
movq %rax, %rcx
movq -0x218(%rbp), %rax
movl $0x1, (%rcx)
movq %rax, -0x358(%rbp)
movl -0x170(%rbp), %edi
callq 0x3c5a0
movl %eax, -0x34c(%rbp)
jmp 0x11970
movl -0x34c(%rbp), %esi
movq -0x358(%rbp), %rdi
movl -0x16c(%rbp), %edx
movl $0x1, %ecx
callq 0x5fb90
jmp 0x1198f
movq -0x218(%rbp), %rax
movq %rax, -0x368(%rbp)
movl -0x10c(%rbp), %edi
callq 0x3c5a0
movl %eax, -0x35c(%rbp)
jmp 0x119b0
movl -0x35c(%rbp), %esi
movq -0x368(%rbp), %rdi
movl -0x16c(%rbp), %edx
movl $0x1, %ecx
callq 0x5fa80
jmp 0x119cf
movq -0x218(%rbp), %rdi
addq $0x18, %rdi
movslq -0x170(%rbp), %rsi
callq 0xaab0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa7c0
movq -0x218(%rbp), %rdi
movl (%rax), %esi
callq 0x5f7f0
jmp 0x11a02
movq -0x218(%rbp), %rax
movq %rax, -0x378(%rbp)
movl -0x170(%rbp), %edi
callq 0x3c880
movl %eax, -0x36c(%rbp)
jmp 0x11a23
movl -0x36c(%rbp), %esi
movq -0x378(%rbp), %rdi
callq 0x5ecc0
movb %al, -0x379(%rbp)
jmp 0x11a3d
movb -0x379(%rbp), %al
testb $0x1, %al
jne 0x11a49
jmp 0x11a4b
jmp 0x11a6a
leaq 0x74853(%rip), %rdi     # 0x862a5
leaq 0x7486e(%rip), %rsi     # 0x862c7
movl $0x8f, %edx
leaq 0x74873(%rip), %rcx     # 0x862d8
callq 0x4260
movq -0x218(%rbp), %rax
addq $0x2f0, %rax            # imm = 0x2F0
movq %rax, -0x390(%rbp)
movl -0x10c(%rbp), %eax
movl %eax, -0x384(%rbp)
movl -0x170(%rbp), %eax
movl %eax, -0x380(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x188(%rbp), %rdi
callq 0xa7c0
movq -0x390(%rbp), %rdi
movl -0x384(%rbp), %esi
movl -0x380(%rbp), %edx
movl (%rax), %ecx
callq 0x5c9f0
jmp 0x11ac2
movq -0x218(%rbp), %rax
addq $0x2f0, %rax            # imm = 0x2F0
movq %rax, -0x3a0(%rbp)
movl -0x170(%rbp), %edi
callq 0x3c880
movl %eax, -0x394(%rbp)
jmp 0x11ae9
movl -0x170(%rbp), %edi
callq 0x3c890
movl %eax, -0x3a4(%rbp)
jmp 0x11afc
movl -0x394(%rbp), %esi
movq -0x3a0(%rbp), %rdi
movl -0x3a4(%rbp), %eax
testl %eax, %eax
setne %al
movzbl %al, %edx
callq 0x5c160
jmp 0x11b1e
movq -0x218(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x3b0(%rbp)
movl -0x170(%rbp), %edi
callq 0x3c880
movl %eax, -0x3a8(%rbp)
jmp 0x11b43
movq -0x3b0(%rbp), %rdi
movl -0x3a8(%rbp), %eax
movslq %eax, %rsi
callq 0xa7c0
movl $0x0, (%rax)
movl $0xd, -0x14c(%rbp)
jmp 0x11b74
movl $0x0, -0x14c(%rbp)
leaq -0x188(%rbp), %rdi
callq 0xab00
movl -0x14c(%rbp), %eax
movl %eax, -0x3b4(%rbp)
testl %eax, %eax
je 0x11ba1
jmp 0x11b92
movl -0x3b4(%rbp), %eax
subl $0xd, %eax
je 0x11bb4
jmp 0x11b9f
jmp 0x11ba3
jmp 0x11ba3
leaq -0x160(%rbp), %rdi
callq 0xa930
jmp 0x114fb
movl $0x0, -0x14c(%rbp)
leaq -0x128(%rbp), %rdi
callq 0xab00
movl -0x14c(%rbp), %eax
testl %eax, %eax
je 0x11bd8
jmp 0x11bd6
jmp 0x11bda
jmp 0x11bda
leaq -0x100(%rbp), %rdi
callq 0xa930
jmp 0x111d7
leaq -0x128(%rbp), %rdi
callq 0xab00
jmp 0x1253a
movl $0x0, -0x1a8(%rbp)
movl -0x1a8(%rbp), %eax
movq %rax, -0x3c0(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xf940
movq %rax, %rcx
movq -0x3c0(%rbp), %rax
cmpq %rcx, %rax
jae 0x124f7
movl -0x1a8(%rbp), %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdi
callq 0xa7c0
movl (%rax), %edi
callq 0x3c880
movl %eax, -0x3c4(%rbp)
jmp 0x11c4f
movl -0x3c4(%rbp), %eax
movslq %eax, %rsi
leaq -0xe8(%rbp), %rdi
callq 0xa7c0
cmpl $0x0, (%rax)
je 0x11c6e
jmp 0x124e3
movq -0x218(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x3d0(%rbp)
movl -0x1a8(%rbp), %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdi
callq 0xa7c0
movl (%rax), %edi
callq 0x3c5a0
movl %eax, -0x3c8(%rbp)
jmp 0x11ca0
movq -0x3d0(%rbp), %rdi
movl -0x3c8(%rbp), %eax
movslq %eax, %rsi
callq 0xaab0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa7c0
movq -0x218(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x1ac(%rbp)
movslq -0x1ac(%rbp), %rsi
callq 0x3c600
movq %rax, -0x1b8(%rbp)
movq -0x1b8(%rbp), %rdi
callq 0xa800
movq %rax, -0x1c0(%rbp)
movq -0x1b8(%rbp), %rdi
callq 0xa830
movq %rax, -0x1c8(%rbp)
leaq -0x1c0(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x11d25
jmp 0x124e1
leaq -0x1c0(%rbp), %rdi
callq 0xa8a0
movq %rax, %rcx
movq -0x218(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, -0x1cc(%rbp)
addq $0x48, %rax
movq %rax, -0x3e0(%rbp)
movl -0x1cc(%rbp), %edi
callq 0x3c880
movl %eax, -0x3d4(%rbp)
jmp 0x11d61
movq -0x3e0(%rbp), %rdi
movl -0x3d4(%rbp), %eax
movslq %eax, %rsi
callq 0xa7c0
cmpl $0x0, (%rax)
je 0x11d80
jmp 0x124d0
movq -0x218(%rbp), %rax
movq %rax, -0x3f0(%rbp)
movl -0x1a8(%rbp), %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdi
callq 0xa7c0
movl (%rax), %edi
callq 0x3c880
movl %eax, -0x3e4(%rbp)
jmp 0x11dae
movl -0x3e4(%rbp), %esi
movq -0x3f0(%rbp), %rdi
callq 0x5ed50
movq %rax, -0x3f8(%rbp)
jmp 0x11dc9
movq -0x3f8(%rbp), %rax
movq %rax, -0x1e0(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x3c690
movq %rax, -0x400(%rbp)
jmp 0x11df0
movl -0x1cc(%rbp), %edi
callq 0x3c5a0
movl %eax, -0x404(%rbp)
jmp 0x11e03
movq -0x400(%rbp), %rdi
movl -0x404(%rbp), %eax
movl %eax, -0x1e4(%rbp)
leaq -0x1e4(%rbp), %rsi
callq 0x3c8b0
movq %rax, -0x410(%rbp)
jmp 0x11e2b
movq -0x410(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0x1d8(%rbp), %rdi
callq 0xa800
movq %rax, -0x1f0(%rbp)
movq -0x1d8(%rbp), %rdi
callq 0xa830
movq %rax, -0x1f8(%rbp)
leaq -0x1f0(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x11e7b
jmp 0x12492
leaq -0x1f0(%rbp), %rdi
callq 0xa8a0
movl (%rax), %eax
movl %eax, -0x1fc(%rbp)
movl -0x1fc(%rbp), %edi
callq 0x3c880
movl %eax, -0x414(%rbp)
jmp 0x11ea2
movl -0x414(%rbp), %eax
movslq %eax, %rsi
leaq -0xe8(%rbp), %rdi
callq 0xa7c0
cmpl $0x0, (%rax)
je 0x11ec1
jmp 0x12481
movq -0x218(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x420(%rbp)
movl -0x1fc(%rbp), %edi
callq 0x3c5a0
movl %eax, -0x418(%rbp)
jmp 0x11ee6
movq -0x420(%rbp), %rdi
movl -0x418(%rbp), %eax
movslq %eax, %rsi
callq 0xaab0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa7c0
movl (%rax), %eax
movl %eax, -0x200(%rbp)
movb $0x0, -0x201(%rbp)
movl $0x0, -0x208(%rbp)
movl $0x0, -0x20c(%rbp)
movl $0x0, -0x210(%rbp)
movq -0x218(%rbp), %rdi
movl -0x210(%rbp), %eax
movq %rax, -0x428(%rbp)
movslq -0x1ac(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
callq 0xf940
movq %rax, %rcx
movq -0x428(%rbp), %rax
cmpq %rcx, %rax
jae 0x121cf
jmp 0x11f71
movq -0x218(%rbp), %rdi
movl -0x20c(%rbp), %eax
movq %rax, -0x438(%rbp)
movslq -0x200(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
callq 0xf940
movq -0x438(%rbp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x429(%rbp)
jae 0x12012
movq -0x218(%rbp), %rdi
movslq -0x200(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
movl -0x20c(%rbp), %eax
movl %eax, %esi
callq 0xa7c0
movq -0x218(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x43c(%rbp)
movslq -0x1ac(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
movl -0x210(%rbp), %eax
movl %eax, %esi
callq 0xa7c0
movq %rax, %rcx
movl -0x43c(%rbp), %eax
cmpl (%rcx), %eax
setl %al
movb %al, -0x429(%rbp)
movb -0x429(%rbp), %al
testb $0x1, %al
jne 0x12021
jmp 0x120d4
movq -0x218(%rbp), %rdi
movslq -0x200(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
movl -0x20c(%rbp), %eax
movl %eax, %esi
callq 0xa7c0
movq -0x218(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x444(%rbp)
movslq -0x1ac(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
movl -0x210(%rbp), %eax
movl %eax, %esi
callq 0xa7c0
movl (%rax), %edi
callq 0x3c5a0
movl %eax, -0x440(%rbp)
jmp 0x1207e
movl -0x444(%rbp), %eax
movl -0x440(%rbp), %ecx
cmpl %ecx, %eax
jne 0x120c0
movq -0x218(%rbp), %rdi
movslq -0x200(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
movl -0x20c(%rbp), %eax
movl %eax, %esi
callq 0xa7c0
movl (%rax), %eax
movl %eax, -0x208(%rbp)
movb $0x1, -0x201(%rbp)
movl -0x20c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20c(%rbp)
jmp 0x11f71
movq -0x218(%rbp), %rdi
movl -0x20c(%rbp), %eax
movq %rax, -0x450(%rbp)
movslq -0x200(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
callq 0xf940
movq %rax, %rcx
movq -0x450(%rbp), %rax
cmpq %rcx, %rax
jae 0x121ae
movq -0x218(%rbp), %rdi
movslq -0x200(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
movl -0x20c(%rbp), %eax
movl %eax, %esi
callq 0xa7c0
movq -0x218(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x458(%rbp)
movslq -0x1ac(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
movl -0x210(%rbp), %eax
movl %eax, %esi
callq 0xa7c0
movl (%rax), %edi
callq 0x3c5a0
movl %eax, -0x454(%rbp)
jmp 0x1216c
movl -0x458(%rbp), %eax
movl -0x454(%rbp), %ecx
cmpl %ecx, %eax
jne 0x121ae
movq -0x218(%rbp), %rdi
movslq -0x200(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
movl -0x20c(%rbp), %eax
movl %eax, %esi
callq 0xa7c0
movl (%rax), %eax
movl %eax, -0x208(%rbp)
movb $0x1, -0x201(%rbp)
testb $0x1, -0x201(%rbp)
je 0x121b9
jmp 0x121cf
jmp 0x121bb
movl -0x210(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x210(%rbp)
jmp 0x11f34
movb -0x201(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x121e1
jmp 0x12200
leaq 0x7412e(%rip), %rdi     # 0x86316
leaq 0x740d8(%rip), %rsi     # 0x862c7
movl $0xb1, %edx
leaq 0x740dd(%rip), %rcx     # 0x862d8
callq 0x4260
movl -0xf0(%rbp), %eax
incl %eax
movl %eax, -0xf0(%rbp)
movl -0x1a8(%rbp), %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdi
callq 0xa7c0
movl (%rax), %edi
callq 0x3c880
movl %eax, -0x45c(%rbp)
jmp 0x1222e
movl -0x45c(%rbp), %eax
movslq %eax, %rsi
leaq -0xe8(%rbp), %rdi
callq 0xa7c0
movl $0x1, (%rax)
movl -0x1fc(%rbp), %edi
callq 0x3c880
movl %eax, -0x460(%rbp)
jmp 0x1225c
movl -0x460(%rbp), %eax
movslq %eax, %rsi
leaq -0xe8(%rbp), %rdi
callq 0xa7c0
movq %rax, %rcx
movq -0x218(%rbp), %rax
movl $0x1, (%rcx)
movq %rax, -0x470(%rbp)
movl -0x1fc(%rbp), %edi
callq 0x3c5a0
movl %eax, -0x464(%rbp)
jmp 0x1229b
movl -0x464(%rbp), %esi
movq -0x470(%rbp), %rdi
movl -0x200(%rbp), %edx
movl $0x1, %ecx
callq 0x5fb90
jmp 0x122ba
movq -0x218(%rbp), %rax
movq %rax, -0x480(%rbp)
movl -0x1a8(%rbp), %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdi
callq 0xa7c0
movl (%rax), %edi
callq 0x3c5a0
movl %eax, -0x474(%rbp)
jmp 0x122e8
movl -0x474(%rbp), %esi
movq -0x480(%rbp), %rdi
movl -0x200(%rbp), %edx
movl $0x1, %ecx
callq 0x5fa80
jmp 0x12307
movq -0x218(%rbp), %rdi
addq $0x18, %rdi
movslq -0x1fc(%rbp), %rsi
callq 0xaab0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa7c0
movq -0x218(%rbp), %rdi
movl (%rax), %esi
callq 0x5f7f0
jmp 0x1233a
movq -0x218(%rbp), %rax
movq %rax, -0x490(%rbp)
movl -0x1fc(%rbp), %edi
callq 0x3c880
movl %eax, -0x484(%rbp)
jmp 0x1235b
movl -0x484(%rbp), %esi
movq -0x490(%rbp), %rdi
callq 0x5ecc0
movb %al, -0x491(%rbp)
jmp 0x12375
movb -0x491(%rbp), %al
testb $0x1, %al
jne 0x12381
jmp 0x12383
jmp 0x123a2
leaq 0x73f99(%rip), %rdi     # 0x86323
leaq 0x73f36(%rip), %rsi     # 0x862c7
movl $0xb8, %edx
leaq 0x73f3b(%rip), %rcx     # 0x862d8
callq 0x4260
movq -0x218(%rbp), %rax
addq $0x2f0, %rax            # imm = 0x2F0
movq %rax, -0x4a0(%rbp)
movl -0x1a8(%rbp), %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdi
callq 0xa7c0
movq -0x4a0(%rbp), %rdi
movl (%rax), %esi
movl -0x1fc(%rbp), %edx
movl -0x208(%rbp), %ecx
callq 0x5c9f0
jmp 0x123e3
movq -0x218(%rbp), %rax
addq $0x2f0, %rax            # imm = 0x2F0
movq %rax, -0x4b0(%rbp)
movl -0x1fc(%rbp), %edi
callq 0x3c880
movl %eax, -0x4a4(%rbp)
jmp 0x1240a
movl -0x1fc(%rbp), %edi
callq 0x3c890
movl %eax, -0x4b4(%rbp)
jmp 0x1241d
movl -0x4a4(%rbp), %esi
movq -0x4b0(%rbp), %rdi
movl -0x4b4(%rbp), %eax
testl %eax, %eax
setne %al
movzbl %al, %edx
callq 0x5c160
jmp 0x1243f
movq -0x218(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x4c0(%rbp)
movl -0x1fc(%rbp), %edi
callq 0x3c880
movl %eax, -0x4b8(%rbp)
jmp 0x12464
movq -0x4c0(%rbp), %rdi
movl -0x4b8(%rbp), %eax
movslq %eax, %rsi
callq 0xa7c0
movl $0x0, (%rax)
jmp 0x12492
leaq -0x1f0(%rbp), %rdi
callq 0xa930
jmp 0x11e5f
movl -0x1a8(%rbp), %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdi
callq 0xa7c0
movl (%rax), %edi
callq 0x3c880
movl %eax, -0x4c4(%rbp)
jmp 0x124b2
movl -0x4c4(%rbp), %eax
movslq %eax, %rsi
leaq -0xe8(%rbp), %rdi
callq 0xa7c0
cmpl $0x0, (%rax)
je 0x124ce
jmp 0x124e1
jmp 0x124d0
leaq -0x1c0(%rbp), %rdi
callq 0xa930
jmp 0x11d09
jmp 0x124e3
movl -0x1a8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1a8(%rbp)
jmp 0x11c06
movl -0xf0(%rbp), %eax
movl %eax, -0x4c8(%rbp)
movl $0x1, -0x14c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0xab00
leaq -0x50(%rbp), %rdi
callq 0xab00
leaq -0x38(%rbp), %rdi
callq 0x3c990
movl -0x4c8(%rbp), %eax
addq $0x4d0, %rsp            # imm = 0x4D0
popq %rbp
retq
leaq -0xe8(%rbp), %rdi
callq 0xab00
leaq -0x50(%rbp), %rdi
callq 0xab00
leaq -0x38(%rbp), %rdi
callq 0x3c990
movq -0x60(%rbp), %rdi
callq 0x4610
nopw %cs:(%rax,%rax)