// File: /workspace/github_cpp_makefile_star2_O1/Laakeri[P]maxpre/src/./SLE.cpp
// Function: maxPreprocessor::Preprocessor::trySLESlow(int, int)
int Preprocessor::trySLESlow(int lb1, int lb2) {
	vector<int> cs1;
	vector<int> cs2;
	uint64_t w1, w2;
	if (pi.isLabel[lb1] == VAR_TRUE) {
		cs1 = pi.litClauses[negLit(lb1)];
		w1 = pi.clauses[pi.litClauses[posLit(lb1)][0]].weight;
	}
	else {
		cs1 = pi.litClauses[posLit(lb1)];
		w1 = pi.clauses[pi.litClauses[negLit(lb1)][0]].weight;
	}
	if (pi.isLabel[lb2] == VAR_FALSE) {
		cs2 = pi.litClauses[posLit(lb2)];
		w2 = pi.clauses[pi.litClauses[negLit(lb2)][0]].weight;
	}
	else {
		cs2 = pi.litClauses[negLit(lb2)];
		w2 = pi.clauses[pi.litClauses[posLit(lb2)][0]].weight;
	}
	assert(w1 < HARDWEIGHT);
	assert(w2 < HARDWEIGHT);
	
	bool s1 = vSubsumed(cs1, cs2);
	bool s2 = vSubsumed(cs2, cs1);
	
	int rmClauses = 0;
	
	if (s1 && w2 <= w1) {
		if (pi.isLabel[lb1] == VAR_TRUE) {
			rmClauses = setVariable(lb1, true);
		}
		else {
			rmClauses = setVariable(lb1, false);
		}
		assert(pi.isVarRemoved(lb1));
		rLog.removeClause(rmClauses);
		rLog.removeLabel(1);
		return 1;
	}
	else if(s2 && w1 <= w2) {
		if (pi.isLabel[lb2] == VAR_TRUE) {
			rmClauses = setVariable(lb2, true);
		}
		else {
			rmClauses = setVariable(lb2, false);
		}
		assert(pi.isVarRemoved(lb2));
		rLog.removeClause(rmClauses);
		rLog.removeLabel(1);
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
xorl %eax, %eax
movq %rax, 0x30(%rsp)
movq %rax, 0x10(%rsp)
movaps %xmm0, (%rsp)
movslq %esi, %rcx
movq 0x48(%rdi), %rax
leal (%rcx,%rcx), %ebp
movq %rcx, 0x40(%rsp)
cmpl $0x1, (%rax,%rcx,4)
jne 0x11f31
movl %ebp, %eax
orl $0x1, %eax
cltq
leaq (%rax,%rax,2), %rsi
shlq $0x3, %rsi
addq 0x18(%rbx), %rsi
leaq 0x20(%rsp), %rdi
callq 0x1fb22
jmp 0x11f4d
movslq %ebp, %rax
leaq (%rax,%rax,2), %rsi
shlq $0x3, %rsi
addq 0x18(%rbx), %rsi
leaq 0x20(%rsp), %rdi
callq 0x1fb22
orl $0x1, %ebp
movslq %ebp, %rax
movq (%rbx), %rcx
movq 0x18(%rbx), %rdx
leaq (%rax,%rax,2), %rax
movq (%rdx,%rax,8), %rax
movslq (%rax), %rax
leaq (%rax,%rax,4), %rax
movq 0x18(%rcx,%rax,8), %r13
movslq %r14d, %rcx
movq 0x48(%rbx), %rax
leal (%rcx,%rcx), %ebp
movq %rcx, 0x38(%rsp)
cmpl $0x2, (%rax,%rcx,4)
jne 0x11f9c
movslq %ebp, %rax
leaq (%rax,%rax,2), %rsi
shlq $0x3, %rsi
addq 0x18(%rbx), %rsi
movq %rsp, %rdi
callq 0x1fb22
orl $0x1, %ebp
jmp 0x11fb7
movl %ebp, %eax
orl $0x1, %eax
cltq
leaq (%rax,%rax,2), %rsi
shlq $0x3, %rsi
addq 0x18(%rbx), %rsi
movq %rsp, %rdi
callq 0x1fb22
testq %r13, %r13
js 0x121ce
movl %r15d, 0x1c(%rsp)
movl %r14d, 0x18(%rsp)
movslq %ebp, %rax
movq (%rbx), %rcx
movq 0x18(%rbx), %rdx
leaq (%rax,%rax,2), %rax
movq (%rdx,%rax,8), %rax
movslq (%rax), %rax
leaq (%rax,%rax,4), %rax
movq 0x18(%rcx,%rax,8), %rax
testq %rax, %rax
js 0x121ed
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rdx
cmpq %rdx, %rcx
sete %sil
je 0x1205f
movq (%rsp), %rdi
movq 0x8(%rsp), %r8
cmpq %r8, %rdi
je 0x1205d
leaq 0x4(%rdi), %r15
xorl %esi, %esi
movl $0x1, %r10d
movq %rcx, %r11
movl (%r11), %r14d
xorl %ebp, %ebp
movq %r15, %r9
movzbl %bpl, %ebp
cmpl -0x4(%r9), %r14d
cmovel %r10d, %ebp
je 0x12043
leaq 0x4(%r9), %r12
cmpq %r8, %r9
movq %r12, %r9
jne 0x12029
testb $0x1, %bpl
je 0x1205f
addq $0x4, %r11
cmpq %rdx, %r11
sete %sil
je 0x1205f
cmpq %r8, %rdi
jne 0x12021
jmp 0x1205f
xorl %esi, %esi
cmpq %rdx, %rcx
sete %r10b
movq (%rsp), %r8
movq 0x8(%rsp), %r9
cmpq %r9, %r8
sete %dil
orb %dil, %r10b
je 0x120d4
cmpq %r13, %rax
setbe %cl
andb %cl, %sil
cmpb $0x1, %sil
jne 0x12127
movq 0x48(%rbx), %rax
xorl %edx, %edx
movq 0x40(%rsp), %rsi
cmpl $0x1, (%rax,%rsi,4)
sete %dl
movq %rbx, %rdi
callq 0xa016
movl %eax, %ebp
movq %rbx, %rdi
movl 0x1c(%rsp), %esi
callq 0x2859c
testb %al, %al
je 0x1220c
addq $0x218, %rbx            # imm = 0x218
movq %rbx, %rdi
movl %ebp, %esi
callq 0x29970
jmp 0x1217c
leaq 0x4(%rcx), %r10
xorl %edi, %edi
movl $0x1, %r11d
movl (%r8), %r14d
xorl %ebp, %ebp
movq %r10, %r15
movzbl %bpl, %ebp
cmpl -0x4(%r15), %r14d
cmovel %r11d, %ebp
je 0x12102
leaq 0x4(%r15), %r12
cmpq %rdx, %r15
movq %r12, %r15
jne 0x120e8
testb $0x1, %bpl
je 0x1207b
addq $0x4, %r8
cmpq %r9, %r8
sete %dil
je 0x1207b
cmpq %rdx, %rcx
jne 0x120e0
jmp 0x1207b
cmpq %rax, %r13
setbe %al
andb %al, %dil
xorl %r14d, %r14d
cmpb $0x1, %dil
jne 0x1218f
movq 0x48(%rbx), %rax
xorl %edx, %edx
movq 0x38(%rsp), %rsi
cmpl $0x1, (%rax,%rsi,4)
sete %dl
movq %rbx, %rdi
callq 0xa016
movl %eax, %r14d
movq %rbx, %rdi
movl 0x18(%rsp), %esi
callq 0x2859c
testb %al, %al
je 0x1222b
addq $0x218, %rbx            # imm = 0x218
movq %rbx, %rdi
movl %r14d, %esi
callq 0x29970
movl $0x1, %r14d
movq %rbx, %rdi
movl $0x1, %esi
callq 0x29a24
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x121a5
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x121bc
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movl %r14d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2766e(%rip), %rdi     # 0x39843
leaq 0x27677(%rip), %rsi     # 0x39853
leaq 0x2767a(%rip), %rcx     # 0x3985d
movl $0x26, %edx
callq 0x31b0
leaq 0x276a1(%rip), %rdi     # 0x39895
leaq 0x27658(%rip), %rsi     # 0x39853
leaq 0x2765b(%rip), %rcx     # 0x3985d
movl $0x27, %edx
callq 0x31b0
leaq 0x27692(%rip), %rdi     # 0x398a5
leaq 0x27639(%rip), %rsi     # 0x39853
leaq 0x2763c(%rip), %rcx     # 0x3985d
movl $0x35, %edx
callq 0x31b0
leaq 0x27688(%rip), %rdi     # 0x398ba
leaq 0x2761a(%rip), %rsi     # 0x39853
leaq 0x2761d(%rip), %rcx     # 0x3985d
movl $0x41, %edx
callq 0x31b0
jmp 0x1224c
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x12265
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1227c
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq %rbx, %rdi
callq 0x34a0