// File: /workspace/github_cpp_makefile_star2_O3/Laakeri[P]maxpre/src/./SIE.cpp
// Function: maxPreprocessor::Preprocessor::try2SIE(int, int)
int Preprocessor::try2SIE(int litX, int litY) {
	for (int c : pi.litClauses[litNegation(litX)]) {
		if (pi.clauses[c].lit.size() > 10) { // magic constant
			if (!binary_search(pi.clauses[c].lit.begin(), pi.clauses[c].lit.end(), litNegation(litY))) {
				return 0;
			}
		}
		else {
			bool f = false;
			for (int l : pi.clauses[c].lit) {
				if (l == litNegation(litY)) {
					f = true;
					break;
				}
			}
			if (!f) {
				return 0;
			}
		}
	}
	for (int c : pi.litClauses[litY]) {
		if (!binary_search(pi.clauses[c].lit.begin(), pi.clauses[c].lit.end(), litX)) {
			return 0;
		}
	}
	int rmC = 0;
	rmC += setVariable(litVariable(litX), litValue(litX));
	rmC += setVariable(litVariable(litY), !litValue(litY));
	rLog.removeClause(rmC);
	rLog.removeVariable(2);
	assert(pi.isVarRemoved(litVariable(litX)));
	assert(pi.isVarRemoved(litVariable(litY)));
	return rmC;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %rbx
movl %esi, %eax
xorl $0x1, %eax
movslq %eax, %rcx
movq 0x18(%rdi), %rax
leaq (%rcx,%rcx,2), %rdx
movq (%rax,%rdx,8), %rcx
movq 0x8(%rax,%rdx,8), %rdx
cmpq %rdx, %rcx
je 0x12fcc
movq (%rbx), %rdi
movl %ebp, %r8d
xorl $0x1, %r8d
movslq (%rcx), %r9
leaq (%r9,%r9,4), %r10
movq (%rdi,%r10,8), %r9
movq 0x8(%rdi,%r10,8), %r10
movq %r10, %r11
subq %r9, %r11
sarq $0x2, %r11
cmpq $0xa, %r11
jbe 0x12fae
testq %r11, %r11
jle 0x12f8e
movq %r11, %r14
shrq %r14
movq %r14, %r15
notq %r15
addq %r11, %r15
leaq (%r9,%r14,4), %r11
addq $0x4, %r11
cmpl %r8d, -0x4(%r11)
cmovlq %r11, %r9
cmovgeq %r14, %r15
movq %r15, %r11
testq %r15, %r15
jg 0x12f63
xorl %r14d, %r14d
cmpq %r10, %r9
je 0x130bd
cmpl (%r9), %r8d
jl 0x130bd
addq $0x4, %rcx
cmpq %rdx, %rcx
jne 0x12f3e
jmp 0x12fcc
xorl %r14d, %r14d
cmpq %r10, %r9
je 0x130bd
movl (%r9), %r11d
xorl %ebp, %r11d
cmpl $0x1, %r11d
je 0x12fa3
addq $0x4, %r9
jmp 0x12fb1
movslq %ebp, %rcx
leaq (%rcx,%rcx,2), %rdx
movq (%rax,%rdx,8), %rcx
movq 0x8(%rax,%rdx,8), %rax
cmpq %rax, %rcx
je 0x13047
movq (%rbx), %rdx
xorl %r14d, %r14d
movslq (%rcx), %rdi
leaq (%rdi,%rdi,4), %r8
movq (%rdx,%r8,8), %rdi
movq 0x8(%rdx,%r8,8), %r8
movq %r8, %r9
subq %rdi, %r9
sarq $0x2, %r9
testq %r9, %r9
jle 0x13031
movq %r9, %r10
shrq %r10
movq %r10, %r11
notq %r11
addq %r9, %r11
leaq (%rdi,%r10,4), %r9
addq $0x4, %r9
cmpl %esi, -0x4(%r9)
cmovlq %r9, %rdi
cmovgeq %r10, %r11
movq %r11, %r9
testq %r11, %r11
jg 0x13006
cmpq %r8, %rdi
je 0x130bd
cmpl %esi, (%rdi)
jg 0x130bd
addq $0x4, %rcx
cmpq %rax, %rcx
jne 0x12fe7
movl %esi, %r15d
sarl %r15d
xorl %edx, %edx
testb $0x1, %sil
sete %dl
movq %rbx, %rdi
movl %r15d, %esi
callq 0xa026
movl %eax, %r13d
movl %ebp, %r12d
sarl %r12d
andl $0x1, %ebp
movq %rbx, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0xa026
movl %eax, %r14d
addl %r13d, %r14d
leaq 0x218(%rbx), %r13
movq %r13, %rdi
movl %r14d, %esi
callq 0x28c28
movq %r13, %rdi
movl $0x2, %esi
callq 0x28c64
movq %rbx, %rdi
movl %r15d, %esi
callq 0x278a0
testb %al, %al
je 0x130cf
movq %rbx, %rdi
movl %r12d, %esi
callq 0x278a0
testb %al, %al
je 0x130ee
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x25a79(%rip), %rdi     # 0x38b4f
leaq 0x25a95(%rip), %rsi     # 0x38b72
leaq 0x25a98(%rip), %rcx     # 0x38b7c
movl $0x36, %edx
callq 0x31b0
leaq 0x25abc(%rip), %rdi     # 0x38bb1
leaq 0x25a76(%rip), %rsi     # 0x38b72
leaq 0x25a79(%rip), %rcx     # 0x38b7c
movl $0x37, %edx
callq 0x31b0
nop