// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, 0x60(%rdi)
jle 0x135b6
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x48(%rbx), %rax
cmpl $0x0, (%rax,%r14,4)
je 0x135a6
movq %rbx, %rdi
movl %r14d, %esi
callq 0x2859c
testb %al, %al
jne 0x135a6
movq 0x48(%rbx), %rax
movl (%rax,%r14,4), %eax
cmpl $0x2, %eax
je 0x134cc
cmpl $0x1, %eax
jne 0x135dc
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 0x135fb
leaq 0x1(,%r14,2), %r15
movslq %r15d, %rcx
leaq (%rcx,%rcx,2), %rcx
movq (%rax,%rcx,8), %r12
movq 0x8(%rax,%rcx,8), %r13
cmpq %r13, %r12
je 0x135a6
movslq (%r12), %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 0x134c3
movslq (%rdx), %rcx
movl %ecx, %edi
sarl %edi
movslq %edi, %r8
movq 0x48(%rbx), %rdi
cmpl $0x0, (%rdi,%r8,4)
je 0x134c3
movslq 0x4(%rdx), %rdx
movl %edx, %r8d
sarl %r8d
movslq %r8d, %r8
cmpl $0x0, (%rdi,%r8,4)
je 0x134c3
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 0x134c3
movq %rbx, %rdi
movl %r15d, %edx
callq 0x127d4
testb %al, %al
jne 0x135c5
addq $0x4, %r12
jmp 0x1342b
movq %r14, %rax
shlq $0x21, %rax
sarq $0x20, %rax
leaq 0x1(%rax), %rdx
movq 0x18(%rbx), %rcx
leaq (%rdx,%rdx,2), %rdx
movq 0x8(%rcx,%rdx,8), %rsi
subq (%rcx,%rdx,8), %rsi
cmpq $0x4, %rsi
jne 0x1361a
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %r15
movq 0x8(%rcx,%rax,8), %r12
cmpq %r12, %r15
je 0x135a6
leal (%r14,%r14), %ebp
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 0x13599
movslq (%rdx), %rcx
movl %ecx, %edi
sarl %edi
movslq %edi, %r8
movq 0x48(%rbx), %rdi
cmpl $0x0, (%rdi,%r8,4)
je 0x13599
movslq 0x4(%rdx), %rdx
movl %edx, %r8d
sarl %r8d
movslq %r8d, %r8
cmpl $0x0, (%rdi,%r8,4)
je 0x13599
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 0x13599
movq %rbx, %rdi
movl %ebp, %edx
callq 0x127d4
testb %al, %al
jne 0x135c5
addq $0x4, %r15
cmpq %r12, %r15
jne 0x13510
incq %r14
movslq 0x60(%rbx), %rax
cmpq %rax, %r14
jl 0x133b1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x264a4(%rip), %rsi     # 0x39a70
movq %rbx, %rdi
movl %r14d, %edx
callq 0x1f71e
callq 0x3180
leaq 0x2766a(%rip), %rdi     # 0x3ac4d
leaq 0x2630f(%rip), %rsi     # 0x398f9
leaq 0x26452(%rip), %rcx     # 0x39a43
movl $0xa9, %edx
callq 0x31b0
leaq 0x2641c(%rip), %rdi     # 0x39a1e
leaq 0x262f0(%rip), %rsi     # 0x398f9
leaq 0x26433(%rip), %rcx     # 0x39a43
movl $0x8b, %edx
callq 0x31b0
leaq 0x26459(%rip), %rdi     # 0x39a7a
leaq 0x262d1(%rip), %rsi     # 0x398f9
leaq 0x26414(%rip), %rcx     # 0x39a43
movl $0x9a, %edx
callq 0x31b0
nop