// File: Laakeri[P]maxpre/src/preprocessorinterface.cpp
// Function: maxPreprocessor::PreprocessorInterface::printInstance(std::ostream&, int)
void PreprocessorInterface::printInstance(ostream& output, int outputFormat) {
		std::vector<std::vector<int> > clauses;
		std::vector<uint64_t> weights;
		std::vector<int> labels;
		getInstance(clauses, weights, labels);
		
		assert(outputFormat == INPUT_FORMAT_WPMS || outputFormat == INPUT_FORMAT_SAT);
		
		if (clauses.size() == 0) {
			clauses.push_back({-1, 1});
			weights.push_back(topWeight);
		}
		
		if (outputFormat == INPUT_FORMAT_WPMS) {
			output<<"c assumptions ";
			for (unsigned i = 0; i < labels.size(); i++) {
				output<<labels[i];
				if (i + 1 < labels.size()) {
					output<<" ";
				}
			}
			output<<"\n";
		}
		
		if (outputFormat == INPUT_FORMAT_WPMS) {
			output<<"p wcnf "<<max((int)solverVarToPPVar.size(), 1)<<" "<<clauses.size()<<" "<<topWeight<< '\n';
			for (unsigned i = 0; i < clauses.size(); i++) {
				output<<weights[i]<<" ";
				for (int lit : clauses[i]) {
					output<<lit<<" ";
				}
				output<<"0\n";
			}
		}
		else if (outputFormat == INPUT_FORMAT_SAT) {
			output<<"p cnf "<<max((int)solverVarToPPVar.size(), 1)<<" "<<clauses.size()<<'\n';
			for (unsigned i = 0; i < clauses.size(); i++) {
				for (int lit : clauses[i]) {
					output<<lit<<" ";
				}
				output<<"0\n";
			}
		}
		else {
			abort();
		}
		output.flush();
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0xb2e0
leaq -0x48(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0xb620
leaq -0x60(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0xa7e0
movq -0x120(%rbp), %rdi
movq -0x118(%rbp), %rsi
movq -0x110(%rbp), %rdx
movq -0x108(%rbp), %rcx
callq 0x77a50
jmp 0x78e94
movb $0x1, %al
cmpl $0x1, -0x14(%rbp)
movb %al, -0x121(%rbp)
je 0x78eaf
cmpl $0x3, -0x14(%rbp)
sete %al
movb %al, -0x121(%rbp)
movb -0x121(%rbp), %al
testb $0x1, %al
jne 0x78ebb
jmp 0x78ebd
jmp 0x78eed
leaq 0xf092(%rip), %rdi      # 0x87f56
leaq 0xed59(%rip), %rsi      # 0x87c24
movl $0x10a, %edx            # imm = 0x10A
leaq 0xf0c5(%rip), %rcx      # 0x87f9c
callq 0x4260
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x7952d
leaq -0x30(%rbp), %rdi
callq 0xfd70
cmpq $0x0, %rax
jne 0x78fdf
movl $0xffffffff, -0xa0(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x9c(%rbp)
leaq -0xa0(%rbp), %rax
movq %rax, -0x98(%rbp)
movq $0x2, -0x90(%rbp)
leaq -0xa1(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0xa710
movq -0x130(%rbp), %rcx
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
leaq -0x88(%rbp), %rdi
callq 0x3c9b0
jmp 0x78f63
leaq -0x30(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x3e200
jmp 0x78f75
leaq -0x88(%rbp), %rdi
callq 0xab00
leaq -0xa1(%rbp), %rdi
callq 0xa7a0
movq -0x120(%rbp), %rsi
addq $0x1848, %rsi           # imm = 0x1848
leaq -0x48(%rbp), %rdi
callq 0x3f530
jmp 0x78fa6
jmp 0x78fdf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x78fce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0xab00
leaq -0xa1(%rbp), %rdi
callq 0xa7a0
jmp 0x7952d
cmpl $0x1, -0x14(%rbp)
jne 0x790c2
movq -0x10(%rbp), %rdi
leaq 0xeff3(%rip), %rsi      # 0x87fe7
callq 0x4380
jmp 0x78ffb
movl $0x0, -0xa8(%rbp)
movl -0xa8(%rbp), %eax
movq %rax, -0x138(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xf940
movq %rax, %rcx
movq -0x138(%rbp), %rax
cmpq %rcx, %rax
jae 0x790ae
movq -0x10(%rbp), %rax
movq %rax, -0x140(%rbp)
movl -0xa8(%rbp), %eax
movl %eax, %esi
leaq -0x60(%rbp), %rdi
callq 0xa7c0
movq -0x140(%rbp), %rdi
movl (%rax), %esi
callq 0x4600
jmp 0x7905a
movl -0xa8(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, -0x148(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xf940
movq %rax, %rcx
movq -0x148(%rbp), %rax
cmpq %rcx, %rax
jae 0x79098
movq -0x10(%rbp), %rdi
leaq 0xe0c5(%rip), %rsi      # 0x87154
callq 0x4380
jmp 0x79096
jmp 0x79098
jmp 0x7909a
movl -0xa8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa8(%rbp)
jmp 0x79005
movq -0x10(%rbp), %rdi
leaq 0xef46(%rip), %rsi      # 0x87fff
callq 0x4380
jmp 0x790c0
jmp 0x790c2
cmpl $0x1, -0x14(%rbp)
jne 0x79322
movq -0x10(%rbp), %rdi
leaq 0xef1f(%rip), %rsi      # 0x87ff6
callq 0x4380
movq %rax, -0x150(%rbp)
jmp 0x790e5
movq -0x120(%rbp), %rdi
addq $0x1868, %rdi           # imm = 0x1868
callq 0xf940
movl %eax, -0xac(%rbp)
movl $0x1, -0xb0(%rbp)
leaq -0xac(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x3e430
movq %rax, -0x158(%rbp)
jmp 0x79124
movq -0x150(%rbp), %rdi
movq -0x158(%rbp), %rax
movl (%rax), %esi
callq 0x4600
movq %rax, -0x160(%rbp)
jmp 0x79142
movq -0x160(%rbp), %rdi
leaq 0xe004(%rip), %rsi      # 0x87154
callq 0x4380
movq %rax, -0x168(%rbp)
jmp 0x7915e
leaq -0x30(%rbp), %rdi
callq 0xfd70
movq -0x168(%rbp), %rdi
movq %rax, %rsi
callq 0x40c0
movq %rax, -0x170(%rbp)
jmp 0x7917f
movq -0x170(%rbp), %rdi
leaq 0xdfc7(%rip), %rsi      # 0x87154
callq 0x4380
movq %rax, -0x178(%rbp)
jmp 0x7919b
movq -0x178(%rbp), %rdi
movq -0x120(%rbp), %rax
movq 0x1848(%rax), %rsi
callq 0x40c0
movq %rax, -0x180(%rbp)
jmp 0x791be
movq -0x180(%rbp), %rdi
movl $0xa, %esi
callq 0x4460
jmp 0x791d1
movl $0x0, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
movq %rax, -0x188(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xfd70
movq %rax, %rcx
movq -0x188(%rbp), %rax
cmpq %rcx, %rax
jae 0x7931d
movq -0x10(%rbp), %rax
movq %rax, -0x198(%rbp)
movl -0xb4(%rbp), %eax
movl %eax, %esi
leaq -0x48(%rbp), %rdi
callq 0x3d140
movq -0x198(%rbp), %rdi
movq (%rax), %rsi
callq 0x40c0
movq %rax, -0x190(%rbp)
jmp 0x79238
movq -0x190(%rbp), %rdi
leaq 0xdf0e(%rip), %rsi      # 0x87154
callq 0x4380
jmp 0x7924d
movl -0xb4(%rbp), %eax
movl %eax, %esi
leaq -0x30(%rbp), %rdi
callq 0xaab0
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rdi
callq 0xa800
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rdi
callq 0xa830
movq %rax, -0xd0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x792a4
jmp 0x792f5
leaq -0xc8(%rbp), %rdi
callq 0xa8a0
movl (%rax), %eax
movl %eax, -0xd4(%rbp)
movq -0x10(%rbp), %rdi
movl -0xd4(%rbp), %esi
callq 0x4600
movq %rax, -0x1a0(%rbp)
jmp 0x792d0
movq -0x1a0(%rbp), %rdi
leaq 0xde76(%rip), %rsi      # 0x87154
callq 0x4380
jmp 0x792e5
jmp 0x792e7
leaq -0xc8(%rbp), %rdi
callq 0xa930
jmp 0x7928b
movq -0x10(%rbp), %rdi
leaq 0xecfe(%rip), %rsi      # 0x87ffe
callq 0x4380
jmp 0x79307
jmp 0x79309
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb4(%rbp)
jmp 0x791db
jmp 0x794fe
cmpl $0x3, -0x14(%rbp)
jne 0x794f7
movq -0x10(%rbp), %rdi
leaq 0xecca(%rip), %rsi      # 0x88001
callq 0x4380
movq %rax, -0x1a8(%rbp)
jmp 0x79345
movq -0x120(%rbp), %rdi
addq $0x1868, %rdi           # imm = 0x1868
callq 0xf940
movl %eax, -0xd8(%rbp)
movl $0x1, -0xdc(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0xdc(%rbp), %rsi
callq 0x3e430
movq %rax, -0x1b0(%rbp)
jmp 0x79384
movq -0x1a8(%rbp), %rdi
movq -0x1b0(%rbp), %rax
movl (%rax), %esi
callq 0x4600
movq %rax, -0x1b8(%rbp)
jmp 0x793a2
movq -0x1b8(%rbp), %rdi
leaq 0xdda4(%rip), %rsi      # 0x87154
callq 0x4380
movq %rax, -0x1c0(%rbp)
jmp 0x793be
leaq -0x30(%rbp), %rdi
callq 0xfd70
movq -0x1c0(%rbp), %rdi
movq %rax, %rsi
callq 0x40c0
movq %rax, -0x1c8(%rbp)
jmp 0x793df
movq -0x1c8(%rbp), %rdi
movl $0xa, %esi
callq 0x4460
jmp 0x793f2
movl $0x0, -0xe0(%rbp)
movl -0xe0(%rbp), %eax
movq %rax, -0x1d0(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xfd70
movq %rax, %rcx
movq -0x1d0(%rbp), %rax
cmpq %rcx, %rax
jae 0x794f5
movl -0xe0(%rbp), %eax
movl %eax, %esi
leaq -0x30(%rbp), %rdi
callq 0xaab0
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rdi
callq 0xa800
movq %rax, -0xf0(%rbp)
movq -0xe8(%rbp), %rdi
callq 0xa830
movq %rax, -0xf8(%rbp)
leaq -0xf0(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x7947c
jmp 0x794cd
leaq -0xf0(%rbp), %rdi
callq 0xa8a0
movl (%rax), %eax
movl %eax, -0xfc(%rbp)
movq -0x10(%rbp), %rdi
movl -0xfc(%rbp), %esi
callq 0x4600
movq %rax, -0x1d8(%rbp)
jmp 0x794a8
movq -0x1d8(%rbp), %rdi
leaq 0xdc9e(%rip), %rsi      # 0x87154
callq 0x4380
jmp 0x794bd
jmp 0x794bf
leaq -0xf0(%rbp), %rdi
callq 0xa930
jmp 0x79463
movq -0x10(%rbp), %rdi
leaq 0xeb26(%rip), %rsi      # 0x87ffe
callq 0x4380
jmp 0x794df
jmp 0x794e1
movl -0xe0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe0(%rbp)
jmp 0x793fc
jmp 0x794fc
callq 0x41f0
jmp 0x794fe
movq -0x10(%rbp), %rdi
callq 0x4270
jmp 0x79509
leaq -0x60(%rbp), %rdi
callq 0xab00
leaq -0x48(%rbp), %rdi
callq 0xb910
leaq -0x30(%rbp), %rdi
callq 0xb3b0
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
leaq -0x60(%rbp), %rdi
callq 0xab00
leaq -0x48(%rbp), %rdi
callq 0xb910
leaq -0x30(%rbp), %rdi
callq 0xb3b0
movq -0x68(%rbp), %rdi
callq 0x4610
nopw %cs:(%rax,%rax)