// File: Laakeri[P]maxpre/src/touchedlist.cpp
// Function: maxPreprocessor::TouchedList::shrink(bool)
void TouchedList::shrink(bool log) {
	uint64_t mi = 1e18;
	for (auto t : techniqueItr) {
		mi = min(mi, t.S);
	}
	if (mi <= frontItr) return;
	if (mi - frontItr < (uint64_t)vars) return;
	frontItr = mi;
	int rm = 0;
	while (!touchedLiterals.empty() && touchedLiterals.front().F < frontItr) {
		touchedLiterals.pop_front();
		rm++;
	}
	touchedLiterals.shrink_to_fit();
	while (!touchedClauses.empty() && touchedClauses.front().F < frontItr) {
		touchedClauses.pop_front();
		rm++;
	}
	touchedClauses.shrink_to_fit();
	while (!modLiterals.empty() && modLiterals.front().F < frontItr) {
		modLiterals.pop_front();
		rm++;
	}
	modLiterals.shrink_to_fit();
	while (!modClauses.empty() && modClauses.front().F < frontItr) {
		modClauses.pop_front();
		rm++;
	}
	modClauses.shrink_to_fit();
	if (log) cerr<<"shrinked "<<rm<<endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movabsq $0xde0b6b3a7640000, %rcx # imm = 0xDE0B6B3A7640000
movq %rcx, -0x18(%rbp)
addq $0x140, %rax            # imm = 0x140
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x74100
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x74130
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x74160
testb $0x1, %al
jne 0x722f4
jmp 0x72355
leaq -0x28(%rbp), %rdi
callq 0x74190
movq %rax, %rsi
leaq -0x58(%rbp), %rdi
callq 0x741b0
leaq -0x38(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0xf190
movq %rax, -0x78(%rbp)
jmp 0x7231c
movq -0x78(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xcf60
leaq -0x28(%rbp), %rdi
callq 0x741f0
jmp 0x722e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xcf60
jmp 0x72585
movq -0x70(%rbp), %rcx
movq -0x18(%rbp), %rax
cmpq 0x190(%rcx), %rax
ja 0x7236b
jmp 0x7257c
movq -0x70(%rbp), %rcx
movq -0x18(%rbp), %rax
subq 0x190(%rcx), %rax
movslq 0x19c(%rcx), %rcx
cmpq %rcx, %rax
jae 0x7238b
jmp 0x7257c
movq -0x70(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x190(%rax)
movl $0x0, -0x68(%rbp)
movq -0x70(%rbp), %rdi
callq 0x74220
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x79(%rbp)
jne 0x723d3
movq -0x70(%rbp), %rdi
callq 0x74250
movq -0x70(%rbp), %rcx
movq (%rax), %rax
cmpq 0x190(%rcx), %rax
setb %al
movb %al, -0x79(%rbp)
movb -0x79(%rbp), %al
testb $0x1, %al
jne 0x723dc
jmp 0x723f0
movq -0x70(%rbp), %rdi
callq 0x74280
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x723a1
movq -0x70(%rbp), %rdi
callq 0x742f0
movq -0x70(%rbp), %rdi
addq $0xa0, %rdi
callq 0x74220
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x7a(%rbp)
jne 0x72439
movq -0x70(%rbp), %rdi
addq $0xa0, %rdi
callq 0x74250
movq -0x70(%rbp), %rcx
movq (%rax), %rax
cmpq 0x190(%rcx), %rax
setb %al
movb %al, -0x7a(%rbp)
movb -0x7a(%rbp), %al
testb $0x1, %al
jne 0x72442
jmp 0x7245d
movq -0x70(%rbp), %rdi
addq $0xa0, %rdi
callq 0x74280
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x723f9
movq -0x70(%rbp), %rdi
addq $0xa0, %rdi
callq 0x742f0
movq -0x70(%rbp), %rdi
addq $0x50, %rdi
callq 0x74220
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x7b(%rbp)
jne 0x724a7
movq -0x70(%rbp), %rdi
addq $0x50, %rdi
callq 0x74250
movq -0x70(%rbp), %rcx
movq (%rax), %rax
cmpq 0x190(%rcx), %rax
setb %al
movb %al, -0x7b(%rbp)
movb -0x7b(%rbp), %al
testb $0x1, %al
jne 0x724b0
jmp 0x724c8
movq -0x70(%rbp), %rdi
addq $0x50, %rdi
callq 0x74280
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x7246d
movq -0x70(%rbp), %rdi
addq $0x50, %rdi
callq 0x742f0
movq -0x70(%rbp), %rdi
addq $0xf0, %rdi
callq 0x74220
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x7c(%rbp)
jne 0x72515
movq -0x70(%rbp), %rdi
addq $0xf0, %rdi
callq 0x74250
movq -0x70(%rbp), %rcx
movq (%rax), %rax
cmpq 0x190(%rcx), %rax
setb %al
movb %al, -0x7c(%rbp)
movb -0x7c(%rbp), %al
testb $0x1, %al
jne 0x7251e
jmp 0x72539
movq -0x70(%rbp), %rdi
addq $0xf0, %rdi
callq 0x74280
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x724d5
movq -0x70(%rbp), %rdi
addq $0xf0, %rdi
callq 0x742f0
testb $0x1, -0x9(%rbp)
je 0x7257c
movq 0x3ca9a(%rip), %rdi     # 0xaeff0
leaq 0x156b4(%rip), %rsi     # 0x87c11
callq 0x4380
movq %rax, %rdi
movl -0x68(%rbp), %esi
callq 0x4600
movq %rax, %rdi
movq 0x3ca39(%rip), %rsi     # 0xaefb0
callq 0x43d0
addq $0x80, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x4610
nop