// File: Laakeri[P]maxpre/src/outputreader.cpp
// Function: maxPreprocessor::OutputReader::readSolution(std::istream&)
int OutputReader::readSolution(istream& input) {
	status = 0;
	string line;
	while (getline(input, line)) {
		if (line[0] == 'o') {
			stringstream ss;
			ss<<line;
			string temp;
			ss>>temp;
			ss>>ansW;
		}
		if (line[0] == 's') {
			stringstream ss;
			ss<<line;
			string s;
			while (ss>>s) {
				if (s == "UNSATISFIABLE") {
					status = 2;
				}
				if (s == "OPTIMUM") {
					status = 1;
				}
			}
		}
		if (line[0] == 'v') {
			stringstream ss;
			ss<<line;
			string temp;
			ss>>temp;
			int lit;
			trueLits.clear();
			while (ss>>lit) {
				trueLits.push_back(lit);
			}
		}
	}
	if (status == 0) return 1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x5b0, %rsp            # imm = 0x5B0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x550(%rbp)
movl $0x0, (%rax)
leaq -0x38(%rbp), %rdi
callq 0x4500
movq -0x18(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x40a0
movq %rax, -0x558(%rbp)
jmp 0x5bd53
movq -0x558(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x44b0
movb %al, -0x559(%rbp)
jmp 0x5bd71
movb -0x559(%rbp), %al
testb $0x1, %al
jne 0x5bd80
jmp 0x5c103
xorl %eax, %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x46b0
movq %rax, -0x568(%rbp)
jmp 0x5bd96
movq -0x568(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x6f, %eax
jne 0x5be6c
leaq -0x1d0(%rbp), %rdi
callq 0x42b0
jmp 0x5bdb7
leaq -0x1c0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x4370
jmp 0x5bdc9
leaq -0x1f0(%rbp), %rdi
movq %rdi, -0x570(%rbp)
callq 0x4500
movq -0x570(%rbp), %rsi
leaq -0x1d0(%rbp), %rdi
callq 0x44c0
jmp 0x5bdf1
movq -0x550(%rbp), %rsi
addq $0x20, %rsi
leaq -0x1d0(%rbp), %rdi
callq 0x4510
jmp 0x5be0a
leaq -0x1f0(%rbp), %rdi
callq 0x4240
leaq -0x1d0(%rbp), %rdi
callq 0x42e0
jmp 0x5be6c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x5c148
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x5be5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x4240
leaq -0x1d0(%rbp), %rdi
callq 0x42e0
jmp 0x5c148
xorl %eax, %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x46b0
movq %rax, -0x578(%rbp)
jmp 0x5be82
movq -0x578(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x73, %eax
jne 0x5bfcc
leaq -0x378(%rbp), %rdi
callq 0x42b0
jmp 0x5bea3
leaq -0x368(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x4370
jmp 0x5beb5
leaq -0x398(%rbp), %rdi
callq 0x4500
leaq -0x378(%rbp), %rdi
leaq -0x398(%rbp), %rsi
callq 0x44c0
movq %rax, -0x580(%rbp)
jmp 0x5bedd
movq -0x580(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x44b0
movb %al, -0x581(%rbp)
jmp 0x5befb
movb -0x581(%rbp), %al
testb $0x1, %al
jne 0x5bf0a
jmp 0x5bfa1
leaq 0x2a159(%rip), %rsi     # 0x8606a
leaq -0x398(%rbp), %rdi
callq 0xa640
movb %al, -0x582(%rbp)
jmp 0x5bf25
movb -0x582(%rbp), %al
testb $0x1, %al
jne 0x5bf31
jmp 0x5bf68
movq -0x550(%rbp), %rax
movl $0x2, (%rax)
jmp 0x5bf68
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x5bfbb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x398(%rbp), %rdi
callq 0x4240
jmp 0x5bfbb
leaq 0x2b57a(%rip), %rsi     # 0x874e9
leaq -0x398(%rbp), %rdi
callq 0xa640
movb %al, -0x583(%rbp)
jmp 0x5bf83
movb -0x583(%rbp), %al
testb $0x1, %al
jne 0x5bf8f
jmp 0x5bf9c
movq -0x550(%rbp), %rax
movl $0x1, (%rax)
jmp 0x5bec1
leaq -0x398(%rbp), %rdi
callq 0x4240
leaq -0x378(%rbp), %rdi
callq 0x42e0
jmp 0x5bfcc
leaq -0x378(%rbp), %rdi
callq 0x42e0
jmp 0x5c148
xorl %eax, %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x46b0
movq %rax, -0x590(%rbp)
jmp 0x5bfe2
movq -0x590(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x76, %eax
jne 0x5c0fe
leaq -0x520(%rbp), %rdi
callq 0x42b0
jmp 0x5c003
leaq -0x510(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x4370
jmp 0x5c015
leaq -0x540(%rbp), %rdi
movq %rdi, -0x598(%rbp)
callq 0x4500
movq -0x598(%rbp), %rsi
leaq -0x520(%rbp), %rdi
callq 0x44c0
jmp 0x5c03d
movq -0x550(%rbp), %rdi
addq $0x8, %rdi
callq 0x3d200
leaq -0x520(%rbp), %rdi
leaq -0x544(%rbp), %rsi
callq 0x4230
movq %rax, -0x5a0(%rbp)
jmp 0x5c069
movq -0x5a0(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x44b0
movb %al, -0x5a1(%rbp)
jmp 0x5c087
movb -0x5a1(%rbp), %al
testb $0x1, %al
jne 0x5c093
jmp 0x5c0d6
movq -0x550(%rbp), %rdi
addq $0x8, %rdi
leaq -0x544(%rbp), %rsi
callq 0xa8c0
jmp 0x5c0ac
jmp 0x5c04d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x5c0f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x540(%rbp), %rdi
callq 0x4240
jmp 0x5c0f0
leaq -0x540(%rbp), %rdi
callq 0x4240
leaq -0x520(%rbp), %rdi
callq 0x42e0
jmp 0x5c0fe
leaq -0x520(%rbp), %rdi
callq 0x42e0
jmp 0x5c148
jmp 0x5bd3d
movq -0x550(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x5c122
movl $0x1, -0x4(%rbp)
movl $0x1, -0x548(%rbp)
jmp 0x5c133
movl $0x0, -0x4(%rbp)
movl $0x1, -0x548(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4240
movl -0x4(%rbp), %eax
addq $0x5b0, %rsp            # imm = 0x5B0
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x4240
movq -0x40(%rbp), %rdi
callq 0x4610
nop
nopl (%rax)