// File: /workspace/github_cpp_makefile_star2_O3/Laakeri[P]maxpre/src/./BCR.cpp
// Function: maxPreprocessor::Preprocessor::doBCR2()
void Preprocessor::doBCR2() {
	for (int i = 0; i < pi.vars; i++) {
		if (pi.isLabel[i] && !pi.isVarRemoved(i)) {
			if (pi.isLabel[i] == VAR_TRUE) {
				assert(pi.litClauses[posLit(i)].size() == 1);
				for (int c : pi.litClauses[negLit(i)]) {
					if (pi.clauses[c].lit.size() == 2) {
						if (pi.isLabel[litVariable(pi.clauses[c].lit[0])] && pi.isLabel[litVariable(pi.clauses[c].lit[1])]) {
							if (pi.clauses[pi.litClauses[litNegation(pi.clauses[c].lit[0])][0]].weight == pi.clauses[pi.litClauses[litNegation(pi.clauses[c].lit[1])][0]].weight) {
								if (tryBCR(c, negLit(i))) {
									print("FAIL BCR ", i);
									abort();
								}
							}
						}
					}
				}
			}
			else if(pi.isLabel[i] == VAR_FALSE) {
				assert(pi.litClauses[negLit(i)].size() == 1);
				for (int c : pi.litClauses[posLit(i)]) {
					if (pi.clauses[c].lit.size() == 2) {
						if (pi.isLabel[litVariable(pi.clauses[c].lit[0])] && pi.isLabel[litVariable(pi.clauses[c].lit[1])]) {
							if (pi.clauses[pi.litClauses[litNegation(pi.clauses[c].lit[0])][0]].weight == pi.clauses[pi.litClauses[litNegation(pi.clauses[c].lit[1])][0]].weight) {
								if (tryBCR(c, posLit(i))) {
									print("FAIL BCR ", i);
									abort();
								}
							}
						}
					}
				}
			}
			else{
				assert(0);
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpl $0x0, 0x60(%rdi)
jle 0x12df2
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x48(%rbx), %rax
cmpl $0x0, (%rax,%r14,4)
je 0x12c16
movq %rbx, %rdi
movl %r14d, %esi
callq 0x278a0
testb %al, %al
je 0x12c27
incq %r14
movslq 0x60(%rbx), %rax
cmpq %rax, %r14
jl 0x12bfc
jmp 0x12df2
movq 0x48(%rbx), %rax
movl (%rax,%r14,4), %eax
cmpl $0x2, %eax
je 0x12d1a
cmpl $0x1, %eax
jne 0x12e12
movq %r14, %rcx
shlq $0x21, %rcx
sarq $0x20, %rcx
movq 0x18(%rbx), %rax
leaq (%rcx,%rcx,2), %rcx
movq 0x8(%rax,%rcx,8), %rdx
subq (%rax,%rcx,8), %rdx
cmpq $0x4, %rdx
jne 0x12e31
leal 0x1(,%r14,2), %ebp
movslq %ebp, %rcx
leaq (%rcx,%rcx,2), %rcx
movq (%rax,%rcx,8), %r15
movq 0x8(%rax,%rcx,8), %r12
cmpq %r12, %r15
je 0x12c16
movslq (%r15), %rsi
movq (%rbx), %rax
leaq (%rsi,%rsi,4), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x8(%rax,%rcx,8), %rcx
subq %rdx, %rcx
cmpq $0x8, %rcx
jne 0x12d11
movslq (%rdx), %rcx
movl %ecx, %edi
sarl %edi
movslq %edi, %r8
movq 0x48(%rbx), %rdi
cmpl $0x0, (%rdi,%r8,4)
je 0x12d11
movslq 0x4(%rdx), %rdx
movl %edx, %r8d
sarl %r8d
movslq %r8d, %r8
cmpl $0x0, (%rdi,%r8,4)
je 0x12d11
xorq $0x1, %rcx
movq 0x18(%rbx), %rdi
leaq (%rcx,%rcx,2), %rcx
movq (%rdi,%rcx,8), %rcx
movslq (%rcx), %rcx
leaq (%rcx,%rcx,4), %rcx
movq 0x18(%rax,%rcx,8), %rcx
xorq $0x1, %rdx
leaq (%rdx,%rdx,2), %rdx
movq (%rdi,%rdx,8), %rdx
movslq (%rdx), %rdx
leaq (%rdx,%rdx,4), %rdx
cmpq 0x18(%rax,%rdx,8), %rcx
jne 0x12d11
movq %rbx, %rdi
movl %ebp, %edx
callq 0x120b0
testb %al, %al
jne 0x12dfb
addq $0x4, %r15
jmp 0x12c7f
movq %r14, %rcx
shlq $0x21, %rcx
sarq $0x20, %rcx
incq %rcx
movq 0x18(%rbx), %rax
leaq (%rcx,%rcx,2), %rcx
movq 0x8(%rax,%rcx,8), %rdx
subq (%rax,%rcx,8), %rdx
cmpq $0x4, %rdx
jne 0x12e50
leal (%r14,%r14), %ebp
movslq %ebp, %rcx
leaq (%rcx,%rcx,2), %rcx
movq (%rax,%rcx,8), %r15
movq 0x8(%rax,%rcx,8), %r12
cmpq %r12, %r15
je 0x12c16
movslq (%r15), %rsi
movq (%rbx), %rax
leaq (%rsi,%rsi,4), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x8(%rax,%rcx,8), %rcx
subq %rdx, %rcx
cmpq $0x8, %rcx
jne 0x12de9
movslq (%rdx), %rcx
movl %ecx, %edi
sarl %edi
movslq %edi, %r8
movq 0x48(%rbx), %rdi
cmpl $0x0, (%rdi,%r8,4)
je 0x12de9
movslq 0x4(%rdx), %rdx
movl %edx, %r8d
sarl %r8d
movslq %r8d, %r8
cmpl $0x0, (%rdi,%r8,4)
je 0x12de9
xorq $0x1, %rcx
movq 0x18(%rbx), %rdi
leaq (%rcx,%rcx,2), %rcx
movq (%rdi,%rcx,8), %rcx
movslq (%rcx), %rcx
leaq (%rcx,%rcx,4), %rcx
movq 0x18(%rax,%rcx,8), %rcx
xorq $0x1, %rdx
leaq (%rdx,%rdx,2), %rdx
movq (%rdi,%rdx,8), %rdx
movslq (%rdx), %rdx
leaq (%rdx,%rdx,4), %rdx
cmpq 0x18(%rax,%rdx,8), %rcx
jne 0x12de9
movq %rbx, %rdi
movl %ebp, %edx
callq 0x120b0
testb %al, %al
jne 0x12dfb
addq $0x4, %r15
jmp 0x12d57
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x25d1e(%rip), %rsi     # 0x38b20
movq %rbx, %rdi
movl %r14d, %edx
callq 0x1eb3c
callq 0x3180
leaq 0x26f48(%rip), %rdi     # 0x39d61
leaq 0x25b89(%rip), %rsi     # 0x389a9
leaq 0x25ccc(%rip), %rcx     # 0x38af3
movl $0xa9, %edx
callq 0x31b0
leaq 0x25c96(%rip), %rdi     # 0x38ace
leaq 0x25b6a(%rip), %rsi     # 0x389a9
leaq 0x25cad(%rip), %rcx     # 0x38af3
movl $0x8b, %edx
callq 0x31b0
leaq 0x25cd3(%rip), %rdi     # 0x38b2a
leaq 0x25b4b(%rip), %rsi     # 0x389a9
leaq 0x25c8e(%rip), %rcx     # 0x38af3
movl $0x9a, %edx
callq 0x31b0
nop