// File: Laakeri[P]maxpre/src/preprocessorinterface.cpp
// Function: maxPreprocessor::PreprocessorInterface::labelToVar(int)
bool PreprocessorInterface::labelToVar(int lbl) {
		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 true;
		}
		preprocessor.pi.isLabel[iVar] = 0;
		preprocessor.pi.removeClause(softClause);
		return true;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
testb $0x1, 0x1850(%rax)
jne 0x78af9
movb $0x0, -0x1(%rbp)
jmp 0x78ce1
cmpl $0x1, -0x14(%rbp)
jge 0x78b08
movb $0x0, -0x1(%rbp)
jmp 0x78ce1
movq -0x28(%rbp), %rdi
addq $0x1868, %rdi           # imm = 0x1868
movl -0x14(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xa7c0
movl (%rax), %eax
subl $0x1, %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jl 0x78b31
jmp 0x78b50
leaq 0xf1ee(%rip), %rdi      # 0x87d26
leaq 0xf0e5(%rip), %rsi      # 0x87c24
movl $0xc6, %edx
leaq 0xf364(%rip), %rcx      # 0x87eaf
callq 0x4260
movq -0x28(%rbp), %rdi
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
addq $0x8, %rdi
addq $0x48, %rdi
movslq -0x18(%rbp), %rsi
callq 0xa7c0
cmpl $0x1, (%rax)
jne 0x78c02
movq -0x28(%rbp), %rax
addq $0x8, %rax
addq $0x18, %rax
movq %rax, -0x30(%rbp)
movl -0x18(%rbp), %edi
callq 0x3c5d0
movq -0x30(%rbp), %rdi
movslq %eax, %rsi
callq 0xaab0
movq %rax, %rdi
callq 0xf940
cmpq $0x1, %rax
jb 0x78ba9
jmp 0x78bc8
leaq 0xf33c(%rip), %rdi      # 0x87eec
leaq 0xf06d(%rip), %rsi      # 0x87c24
movl $0xc9, %edx
leaq 0xf2ec(%rip), %rcx      # 0x87eaf
callq 0x4260
movq -0x28(%rbp), %rax
addq $0x8, %rax
addq $0x18, %rax
movq %rax, -0x38(%rbp)
movl -0x18(%rbp), %edi
callq 0x3c5d0
movq -0x38(%rbp), %rdi
movslq %eax, %rsi
callq 0xaab0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa7c0
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
jmp 0x78cb2
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
addq $0x48, %rdi
movslq -0x18(%rbp), %rsi
callq 0xa7c0
cmpl $0x2, (%rax)
jne 0x78caa
movq -0x28(%rbp), %rax
addq $0x8, %rax
addq $0x18, %rax
movq %rax, -0x40(%rbp)
movl -0x18(%rbp), %edi
callq 0x3c5e0
movq -0x40(%rbp), %rdi
movslq %eax, %rsi
callq 0xaab0
movq %rax, %rdi
callq 0xf940
cmpq $0x1, %rax
jb 0x78c54
jmp 0x78c73
leaq 0xf2c6(%rip), %rdi      # 0x87f21
leaq 0xefc2(%rip), %rsi      # 0x87c24
movl $0xcd, %edx
leaq 0xf241(%rip), %rcx      # 0x87eaf
callq 0x4260
movq -0x28(%rbp), %rax
addq $0x8, %rax
addq $0x18, %rax
movq %rax, -0x48(%rbp)
movl -0x18(%rbp), %edi
callq 0x3c5e0
movq -0x48(%rbp), %rdi
movslq %eax, %rsi
callq 0xaab0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa7c0
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
jmp 0x78cb0
movb $0x1, -0x1(%rbp)
jmp 0x78ce1
jmp 0x78cb2
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
addq $0x48, %rdi
movslq -0x18(%rbp), %rsi
callq 0xa7c0
movq -0x28(%rbp), %rdi
movl $0x0, (%rax)
addq $0x8, %rdi
movl -0x1c(%rbp), %esi
callq 0x5f7f0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)