// File: /workspace/github_cpp_makefile_star2_O1/Laakeri[P]maxpre/src/preprocessorinterface.cpp
// Function: maxPreprocessor::PreprocessorInterface::alterWeight(int, unsigned long)
bool PreprocessorInterface::alterWeight(int lbl, uint64_t weight) {
		if (!inProcessMode) return false;
		if (lbl < 1) return false;
		int iVar = solverVarToPPVar[lbl-1]-1;
		assert(iVar >= 0);
		int softClause = -1;
		if (preprocessor.pi.isLabel[iVar] == VAR_TRUE) {
			assert(preprocessor.pi.litClauses[posLit(iVar)].size() == 1);
			softClause = preprocessor.pi.litClauses[posLit(iVar)][0];
		}
		else if (preprocessor.pi.isLabel[iVar] == VAR_FALSE) {
			assert(preprocessor.pi.litClauses[negLit(iVar)].size() == 1);
			softClause = preprocessor.pi.litClauses[negLit(iVar)][0];
		}
		else {
			return false;
		}
		if (weight >= topWeight) {
			preprocessor.pi.isLabel[iVar] = 0;
			weight = HARDWEIGHT;
		}
		assert(!preprocessor.pi.clauses[softClause].isHard());
		preprocessor.pi.clauses[softClause].weight = weight;
		if (weight == HARDWEIGHT) {
			assert(preprocessor.pi.clauses[softClause].isHard());
		}
		else {
			assert(preprocessor.pi.labelWeight(iVar) == weight);
		}
		return true;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
xorl %eax, %eax
testl %esi, %esi
jle 0x32728
cmpb $0x0, 0x1850(%rdi)
je 0x32728
movq 0x1868(%rdi), %rax
movl %esi, %ecx
movl -0x4(%rax,%rcx,4), %r14d
testl %r14d, %r14d
jle 0x32732
movq %rdx, %rbx
decl %r14d
movl %r14d, %eax
movq 0x50(%rdi), %rcx
movl (%rcx,%rax,4), %edx
cmpl $0x2, %edx
je 0x3266d
cmpl $0x1, %edx
jne 0x3270f
leal (%r14,%r14), %edx
movslq %edx, %rdx
movq 0x20(%rdi), %rsi
leaq (%rdx,%rdx,2), %r8
movq (%rsi,%r8,8), %rdx
movq 0x8(%rsi,%r8,8), %rsi
subq %rdx, %rsi
cmpq $0x4, %rsi
je 0x32696
leaq 0x874e(%rip), %rdi      # 0x3ada3
leaq 0x85f3(%rip), %rsi      # 0x3ac4f
leaq 0x86f8(%rip), %rcx      # 0x3ad5b
movl $0x92, %edx
callq 0x31b0
leal 0x1(,%r14,2), %edx
movslq %edx, %rdx
movq 0x20(%rdi), %rsi
leaq (%rdx,%rdx,2), %r8
movq (%rsi,%r8,8), %rdx
movq 0x8(%rsi,%r8,8), %rsi
subq %rdx, %rsi
cmpq $0x4, %rsi
jne 0x32770
leaq 0x8(%rdi), %r15
movabsq $-0x8000000000000000, %r12 # imm = 0x8000000000000000
movslq (%rdx), %rdx
cmpq %rbx, 0x1848(%rdi)
ja 0x326ba
movl $0x0, (%rcx,%rax,4)
movq %r12, %rbx
leaq (%rdx,%rdx,4), %r13
leaq (,%r13,8), %rdi
addq (%r15), %rdi
callq 0x29586
testb %al, %al
jne 0x32751
movq (%r15), %rax
movq %rbx, 0x18(%rax,%r13,8)
cmpq %r12, %rbx
jne 0x32713
leaq (%rax,%r13,8), %rdi
callq 0x29586
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x32728
leaq 0x8717(%rip), %rdi      # 0x3ae0e
leaq 0x8551(%rip), %rsi      # 0x3ac4f
leaq 0x8656(%rip), %rcx      # 0x3ad5b
movl $0xa3, %edx
callq 0x31b0
xorl %eax, %eax
jmp 0x32728
movq %r15, %rdi
movl %r14d, %esi
callq 0x285da
movq %rax, %rcx
movb $0x1, %al
cmpq %rbx, %rcx
jne 0x3278f
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x8618(%rip), %rdi      # 0x3ad51
leaq 0x850f(%rip), %rsi      # 0x3ac4f
leaq 0x8614(%rip), %rcx      # 0x3ad5b
movl $0x8f, %edx
callq 0x31b0
leaq 0x86b5(%rip), %rdi      # 0x3ae0d
leaq 0x84f0(%rip), %rsi      # 0x3ac4f
leaq 0x85f5(%rip), %rcx      # 0x3ad5b
movl $0xa0, %edx
callq 0x31b0
leaq 0x8661(%rip), %rdi      # 0x3add8
leaq 0x84d1(%rip), %rsi      # 0x3ac4f
leaq 0x85d6(%rip), %rcx      # 0x3ad5b
movl $0x96, %edx
callq 0x31b0
leaq 0x86a5(%rip), %rdi      # 0x3ae3b
leaq 0x84b2(%rip), %rsi      # 0x3ac4f
leaq 0x85b7(%rip), %rcx      # 0x3ad5b
movl $0xa6, %edx
callq 0x31b0