// File: /workspace/github_cpp_makefile_star2_O3/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 0x31794
cmpb $0x0, 0x1850(%rdi)
je 0x31794
movq 0x1868(%rdi), %rax
movl %esi, %ecx
movl -0x4(%rax,%rcx,4), %r14d
testl %r14d, %r14d
jle 0x3179e
movq %rdx, %rbx
decl %r14d
movl %r14d, %eax
movq 0x50(%rdi), %rcx
movl (%rcx,%rax,4), %edx
cmpl $0x2, %edx
je 0x316d9
cmpl $0x1, %edx
jne 0x3177b
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 0x31702
leaq 0x87f6(%rip), %rdi      # 0x39eb7
leaq 0x869b(%rip), %rsi      # 0x39d63
leaq 0x87a0(%rip), %rcx      # 0x39e6f
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 0x317dc
leaq 0x8(%rdi), %r15
movabsq $-0x8000000000000000, %r12 # imm = 0x8000000000000000
movslq (%rdx), %rdx
cmpq %rbx, 0x1848(%rdi)
ja 0x31726
movl $0x0, (%rcx,%rax,4)
movq %r12, %rbx
leaq (%rdx,%rdx,4), %r13
leaq (,%r13,8), %rdi
addq (%r15), %rdi
callq 0x2883e
testb %al, %al
jne 0x317bd
movq (%r15), %rax
movq %rbx, 0x18(%rax,%r13,8)
cmpq %r12, %rbx
jne 0x3177f
leaq (%rax,%r13,8), %rdi
callq 0x2883e
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x31794
leaq 0x87bf(%rip), %rdi      # 0x39f22
leaq 0x85f9(%rip), %rsi      # 0x39d63
leaq 0x86fe(%rip), %rcx      # 0x39e6f
movl $0xa3, %edx
callq 0x31b0
xorl %eax, %eax
jmp 0x31794
movq %r15, %rdi
movl %r14d, %esi
callq 0x278de
movq %rax, %rcx
movb $0x1, %al
cmpq %rbx, %rcx
jne 0x317fb
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x86c0(%rip), %rdi      # 0x39e65
leaq 0x85b7(%rip), %rsi      # 0x39d63
leaq 0x86bc(%rip), %rcx      # 0x39e6f
movl $0x8f, %edx
callq 0x31b0
leaq 0x875d(%rip), %rdi      # 0x39f21
leaq 0x8598(%rip), %rsi      # 0x39d63
leaq 0x869d(%rip), %rcx      # 0x39e6f
movl $0xa0, %edx
callq 0x31b0
leaq 0x8709(%rip), %rdi      # 0x39eec
leaq 0x8579(%rip), %rsi      # 0x39d63
leaq 0x867e(%rip), %rcx      # 0x39e6f
movl $0x96, %edx
callq 0x31b0
leaq 0x874d(%rip), %rdi      # 0x39f4f
leaq 0x855a(%rip), %rsi      # 0x39d63
leaq 0x865f(%rip), %rcx      # 0x39e6f
movl $0xa6, %edx
callq 0x31b0