// File: Laakeri[P]maxpre/src/./SSR.cpp
// Function: maxPreprocessor::Preprocessor::trySSRAmsLex(int)
int Preprocessor::trySSRAmsLex(int var) {
	pair<vector<int>, vector<int> > cand = amsLex.amsLexSSR(pi.litClauses[posLit(var)], pi.litClauses[negLit(var)], var);
	int removed = 0;
	for (int c1 : cand.F) {
		if (pi.isClauseRemoved(c1)) continue;
		for (int c2 : pi.litClauses[negLit(var)]) {
			if (pi.isClauseRemoved(c2)) continue;
			if (!binary_search(pi.clauses[c1].lit.begin(), pi.clauses[c1].lit.end(), posLit(var))) continue;
			if (!binary_search(pi.clauses[c2].lit.begin(), pi.clauses[c2].lit.end(), negLit(var))) continue;
			if (SSRC(c1, c2, var)) {
				removed++;
			}
		}
	}
	for (int c1 : pi.litClauses[posLit(var)]) {
		if (pi.isClauseRemoved(c1)) continue;
		for (int c2 : cand.S) {
			if (pi.isClauseRemoved(c2)) continue;
			if (!binary_search(pi.clauses[c1].lit.begin(), pi.clauses[c1].lit.end(), posLit(var))) continue;
			if (!binary_search(pi.clauses[c2].lit.begin(), pi.clauses[c2].lit.end(), negLit(var))) continue;
			if (SSRC(c1, c2, var)) {
				removed++;
			}
		}
	}
	return removed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x158(%rbp)
movq %rax, %rcx
addq $0x330, %rcx            # imm = 0x330
movq %rcx, -0x148(%rbp)
addq $0x18, %rax
movq %rax, -0x160(%rbp)
movl -0xc(%rbp), %edi
callq 0x3c5d0
movq -0x160(%rbp), %rdi
movslq %eax, %rsi
callq 0xaab0
movq %rax, %rcx
movq -0x158(%rbp), %rax
movq %rcx, -0x140(%rbp)
addq $0x18, %rax
movq %rax, -0x150(%rbp)
movl -0xc(%rbp), %edi
callq 0x3c5e0
movq -0x150(%rbp), %rdi
movslq %eax, %rsi
callq 0xaab0
movq -0x148(%rbp), %rsi
movq -0x140(%rbp), %rdx
movq %rax, %rcx
movl -0xc(%rbp), %r8d
leaq -0x40(%rbp), %rdi
callq 0x6ba70
movl $0x0, -0x44(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0xa800
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rdi
callq 0xa830
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x1c0c0
jmp 0x1c33f
leaq -0x58(%rbp), %rdi
callq 0xa8a0
movq -0x158(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %esi
callq 0x5eb70
movb %al, -0x161(%rbp)
jmp 0x1c0e5
movb -0x161(%rbp), %al
testb $0x1, %al
jne 0x1c0f1
jmp 0x1c110
jmp 0x1c331
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x3e400
jmp 0x1c634
movq -0x158(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x170(%rbp)
movl -0xc(%rbp), %edi
callq 0x3c5e0
movl %eax, -0x168(%rbp)
jmp 0x1c132
movq -0x170(%rbp), %rdi
movl -0x168(%rbp), %eax
movslq %eax, %rsi
callq 0xaab0
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rdi
callq 0xa800
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rdi
callq 0xa830
movq %rax, -0x90(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x1c187
jmp 0x1c32f
leaq -0x88(%rbp), %rdi
callq 0xa8a0
movq -0x158(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x94(%rbp)
movl -0x94(%rbp), %esi
callq 0x5eb70
movb %al, -0x171(%rbp)
jmp 0x1c1b5
movb -0x171(%rbp), %al
testb $0x1, %al
jne 0x1c1c1
jmp 0x1c1c6
jmp 0x1c31e
movq -0x158(%rbp), %rdi
movslq -0x64(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
callq 0xa800
movq -0x158(%rbp), %rdi
movq %rax, -0xa0(%rbp)
movslq -0x64(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
callq 0xa830
movq %rax, -0xa8(%rbp)
movl -0xc(%rbp), %edi
callq 0x3c5d0
movl %eax, -0x178(%rbp)
jmp 0x1c214
movl -0x178(%rbp), %eax
movl %eax, -0xac(%rbp)
movq -0xa0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
leaq -0xac(%rbp), %rdx
callq 0x3e170
movb %al, -0x179(%rbp)
jmp 0x1c242
movb -0x179(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1c250
jmp 0x1c255
jmp 0x1c31e
movq -0x158(%rbp), %rdi
movslq -0x94(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
callq 0xa800
movq -0x158(%rbp), %rdi
movq %rax, -0xb8(%rbp)
movslq -0x94(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
callq 0xa830
movq %rax, -0xc0(%rbp)
movl -0xc(%rbp), %edi
callq 0x3c5e0
movl %eax, -0x180(%rbp)
jmp 0x1c2a9
movl -0x180(%rbp), %eax
movl %eax, -0xc4(%rbp)
movq -0xb8(%rbp), %rdi
movq -0xc0(%rbp), %rsi
leaq -0xc4(%rbp), %rdx
callq 0x3e170
movb %al, -0x181(%rbp)
jmp 0x1c2d7
movb -0x181(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1c2e5
jmp 0x1c2e7
jmp 0x1c31e
movq -0x158(%rbp), %rdi
movl -0x64(%rbp), %esi
movl -0x94(%rbp), %edx
movl -0xc(%rbp), %ecx
callq 0x1bd40
movb %al, -0x182(%rbp)
jmp 0x1c307
movb -0x182(%rbp), %al
testb $0x1, %al
jne 0x1c313
jmp 0x1c31c
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x1c31e
leaq -0x88(%rbp), %rdi
callq 0xa930
jmp 0x1c16b
jmp 0x1c331
leaq -0x58(%rbp), %rdi
callq 0xa930
jmp 0x1c0aa
movq -0x158(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x190(%rbp)
movl -0xc(%rbp), %edi
callq 0x3c5d0
movl %eax, -0x188(%rbp)
jmp 0x1c361
movq -0x190(%rbp), %rdi
movl -0x188(%rbp), %eax
movslq %eax, %rsi
callq 0xaab0
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rdi
callq 0xa800
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rdi
callq 0xa830
movq %rax, -0xe0(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x1c3bf
jmp 0x1c613
leaq -0xd8(%rbp), %rdi
callq 0xa8a0
movq -0x158(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0xe4(%rbp)
movl -0xe4(%rbp), %esi
callq 0x5eb70
movb %al, -0x191(%rbp)
jmp 0x1c3ed
movb -0x191(%rbp), %al
testb $0x1, %al
jne 0x1c3f9
jmp 0x1c3fe
jmp 0x1c602
leaq -0x40(%rbp), %rax
addq $0x18, %rax
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rdi
callq 0xa800
movq %rax, -0xf8(%rbp)
movq -0xf0(%rbp), %rdi
callq 0xa830
movq %rax, -0x100(%rbp)
leaq -0xf8(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x1c44f
jmp 0x1c600
leaq -0xf8(%rbp), %rdi
callq 0xa8a0
movq -0x158(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x104(%rbp)
movl -0x104(%rbp), %esi
callq 0x5eb70
movb %al, -0x192(%rbp)
jmp 0x1c47d
movb -0x192(%rbp), %al
testb $0x1, %al
jne 0x1c489
jmp 0x1c48e
jmp 0x1c5ef
movq -0x158(%rbp), %rdi
movslq -0xe4(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
callq 0xa800
movq -0x158(%rbp), %rdi
movq %rax, -0x110(%rbp)
movslq -0xe4(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
callq 0xa830
movq %rax, -0x118(%rbp)
movl -0xc(%rbp), %edi
callq 0x3c5d0
movl %eax, -0x198(%rbp)
jmp 0x1c4e2
movl -0x198(%rbp), %eax
movl %eax, -0x11c(%rbp)
movq -0x110(%rbp), %rdi
movq -0x118(%rbp), %rsi
leaq -0x11c(%rbp), %rdx
callq 0x3e170
movb %al, -0x199(%rbp)
jmp 0x1c510
movb -0x199(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1c51e
jmp 0x1c523
jmp 0x1c5ef
movq -0x158(%rbp), %rdi
movslq -0x104(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
callq 0xa800
movq -0x158(%rbp), %rdi
movq %rax, -0x128(%rbp)
movslq -0x104(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
callq 0xa830
movq %rax, -0x130(%rbp)
movl -0xc(%rbp), %edi
callq 0x3c5e0
movl %eax, -0x1a0(%rbp)
jmp 0x1c577
movl -0x1a0(%rbp), %eax
movl %eax, -0x134(%rbp)
movq -0x128(%rbp), %rdi
movq -0x130(%rbp), %rsi
leaq -0x134(%rbp), %rdx
callq 0x3e170
movb %al, -0x1a1(%rbp)
jmp 0x1c5a5
movb -0x1a1(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1c5b3
jmp 0x1c5b5
jmp 0x1c5ef
movq -0x158(%rbp), %rdi
movl -0xe4(%rbp), %esi
movl -0x104(%rbp), %edx
movl -0xc(%rbp), %ecx
callq 0x1bd40
movb %al, -0x1a2(%rbp)
jmp 0x1c5d8
movb -0x1a2(%rbp), %al
testb $0x1, %al
jne 0x1c5e4
jmp 0x1c5ed
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x1c5ef
leaq -0xf8(%rbp), %rdi
callq 0xa930
jmp 0x1c433
jmp 0x1c602
leaq -0xd8(%rbp), %rdi
callq 0xa930
jmp 0x1c3a3
movl -0x44(%rbp), %eax
movl %eax, -0x1a8(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x3e400
movl -0x1a8(%rbp), %eax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x4610
nopl (%rax)