// File: Laakeri[P]maxpre/src/./BCE.cpp
// Function: maxPreprocessor::Preprocessor::tryBCE(int)
int Preprocessor::tryBCE(int lit) {
	vector<int> toRemove;
	for (int c1i : pi.litClauses[lit]) {
		const vector<int>& c1 = pi.clauses[c1i].lit;
		bool f = false;
		for (int c2i : pi.litClauses[litNegation(lit)]) {
			const vector<int>& c2 = pi.clauses[c2i].lit;
			bool ff = false;
			for (int c1l : c1) {
				for (int c2l : c2) {
					if (litNegation(c1l) == c2l && c1l != lit) {
						ff = true;
						break;
					}
				}
				if (ff) break;
			}
			if (!ff) {
				f = true;
				break;
			}
		}
		if (!f) {
			toRemove.push_back(c1i);
		}
	}
	for (int c : toRemove) {
		trace.BCE(lit, pi.clauses[c].lit);
		pi.removeClause(c);
	}
	rLog.removeClause((int)toRemove.size());
	return toRemove.size();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x100(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xa7e0
movq -0x100(%rbp), %rdi
addq $0x18, %rdi
movslq -0xc(%rbp), %rsi
callq 0xaab0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0xa800
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0xa830
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x1e40e
jmp 0x1e65c
leaq -0x38(%rbp), %rdi
callq 0xa8a0
movq -0x100(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x44(%rbp)
movslq -0x44(%rbp), %rsi
callq 0x3c600
movq %rax, %rcx
movq -0x100(%rbp), %rax
movq %rcx, -0x50(%rbp)
movb $0x0, -0x51(%rbp)
addq $0x18, %rax
movq %rax, -0x110(%rbp)
movl -0xc(%rbp), %edi
callq 0x3c5a0
movl %eax, -0x104(%rbp)
jmp 0x1e459
movq -0x110(%rbp), %rdi
movl -0x104(%rbp), %eax
movslq %eax, %rsi
callq 0xaab0
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0xa800
movq %rax, -0x78(%rbp)
movq -0x60(%rbp), %rdi
callq 0xa830
movq %rax, -0x80(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x1e4a2
jmp 0x1e635
leaq -0x78(%rbp), %rdi
callq 0xa8a0
movq -0x100(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x84(%rbp)
movslq -0x84(%rbp), %rsi
callq 0x3c600
movq %rax, -0x90(%rbp)
movb $0x0, -0x91(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rdi
callq 0x3d080
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rdi
callq 0x3d0b0
movq %rax, -0xb0(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x3d0e0
testb $0x1, %al
jne 0x1e521
jmp 0x1e616
leaq -0xa8(%rbp), %rdi
callq 0x3d120
movl (%rax), %eax
movl %eax, -0xb4(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x3d080
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x3d0b0
movq %rax, -0xd0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x3d0e0
testb $0x1, %al
jne 0x1e582
jmp 0x1e5f8
leaq -0xc8(%rbp), %rdi
callq 0x3d120
movl (%rax), %eax
movl %eax, -0xd4(%rbp)
movl -0xb4(%rbp), %edi
callq 0x3c5a0
movl %eax, -0x114(%rbp)
jmp 0x1e5a9
movl -0x114(%rbp), %eax
cmpl -0xd4(%rbp), %eax
jne 0x1e5e5
movl -0xb4(%rbp), %eax
cmpl -0xc(%rbp), %eax
je 0x1e5e5
movb $0x1, -0x91(%rbp)
jmp 0x1e5f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xab00
jmp 0x1e778
jmp 0x1e5e7
leaq -0xc8(%rbp), %rdi
callq 0x3d160
jmp 0x1e569
testb $0x1, -0x91(%rbp)
je 0x1e603
jmp 0x1e616
jmp 0x1e605
leaq -0xa8(%rbp), %rdi
callq 0x3d160
jmp 0x1e505
testb $0x1, -0x91(%rbp)
jne 0x1e625
movb $0x1, -0x51(%rbp)
jmp 0x1e635
jmp 0x1e627
leaq -0x78(%rbp), %rdi
callq 0xa930
jmp 0x1e48c
testb $0x1, -0x51(%rbp)
jne 0x1e64c
leaq -0x28(%rbp), %rdi
leaq -0x44(%rbp), %rsi
callq 0xa8c0
jmp 0x1e64a
jmp 0x1e64c
jmp 0x1e64e
leaq -0x38(%rbp), %rdi
callq 0xa930
jmp 0x1e3f8
leaq -0x28(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rdi
callq 0xa800
movq %rax, -0xe8(%rbp)
movq -0xe0(%rbp), %rdi
callq 0xa830
movq %rax, -0xf0(%rbp)
leaq -0xe8(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x1e6a6
jmp 0x1e724
leaq -0xe8(%rbp), %rdi
callq 0xa8a0
movq -0x100(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0xf4(%rbp)
movq %rdi, %rax
addq $0x2f0, %rax            # imm = 0x2F0
movq %rax, -0x120(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x118(%rbp)
movslq -0xf4(%rbp), %rsi
callq 0x3c600
movq -0x120(%rbp), %rdi
movl -0x118(%rbp), %esi
movq %rax, %rdx
callq 0x5c420
jmp 0x1e6fd
movq -0x100(%rbp), %rdi
movl -0xf4(%rbp), %esi
callq 0x5f7f0
jmp 0x1e711
jmp 0x1e713
leaq -0xe8(%rbp), %rdi
callq 0xa930
jmp 0x1e68d
movq -0x100(%rbp), %rax
addq $0x218, %rax            # imm = 0x218
movq %rax, -0x128(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xf940
movq -0x128(%rbp), %rdi
movl %eax, %esi
callq 0x61410
jmp 0x1e751
leaq -0x28(%rbp), %rdi
callq 0xf940
movl %eax, -0x12c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xab00
movl -0x12c(%rbp), %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x4610
nopw %cs:(%rax,%rax)