// File: /workspace/github_cpp_makefile_star2_O1/biotomas[P]ipasir/app/genipafolio/genipafolio.cpp
// Function: loadFormula(std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&, char const*)
bool loadFormula(vector<vector<int> >& clauses, const char* filename) {
	FILE* f = fopen(filename, "r");
	if (f == NULL) {
		return false;
	}
	int c = 0;
	bool neg = false;
	vector<int> cls;
	while (c != EOF) {
		c = fgetc(f);
		// comment or problem definition line
		if (c == 'c' || c == 'p') {
			// skip this line
			while(c != '\n') {
				c = fgetc(f);
			}
			continue;
		}
		// whitespace
		if (isspace(c)) {
			continue;
		}
		// negative
		if (c == '-') {
			neg = true;
			continue;
		}
		// number
		if (isdigit(c)) {
			int num = c - '0';
			c = fgetc(f);
			while (isdigit(c)) {
				num = num*10 + (c-'0');
				c = fgetc(f);
			}
			if (neg) {
				num *= -1;
			}
			neg = false;
			if (num != 0) {
				cls.push_back(num);
			} else {
				clauses.push_back(vector<int>(cls));
				cls.clear();
			}
		}
	}
	fclose(f);
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rax
movq %rdi, %r14
leaq 0x11286(%rip), %rsi     # 0x12a1d
movq %rax, %rdi
callq 0x1180
movq %rax, %rbx
testq %rax, %rax
je 0x18f2
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
xorl %r13d, %r13d
leaq 0x30(%rsp), %r12
movq %rbx, %rdi
callq 0x1210
cmpl $0x70, %eax
je 0x17db
movl %eax, %ebp
cmpl $0x63, %eax
jne 0x17ef
movq %rbx, %rdi
callq 0x1210
cmpl $0xa, %eax
jne 0x17db
movl $0xa, %ebp
jmp 0x17fa
movl %ebp, %edi
callq 0x1040
testl %eax, %eax
je 0x1804
cmpl $-0x1, %ebp
jne 0x17c7
jmp 0x18d3
cmpl $0x2d, %ebp
jne 0x1813
movb $0x1, %r13b
movl $0x2d, %ebp
jmp 0x17fa
movl %ebp, %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x17fa
movl %eax, 0xc(%rsp)
movq %rbx, %rdi
callq 0x1210
movl %eax, %ebp
leal -0x30(%rbp), %eax
cmpl $0x9, %eax
ja 0x1853
movl 0xc(%rsp), %ecx
leal (%rcx,%rcx,4), %ecx
leal (%rax,%rcx,2), %eax
movl %eax, 0xc(%rsp)
movq %rbx, %rdi
callq 0x1210
movl %eax, %ebp
leal -0x30(%rbp), %eax
cmpl $0xa, %eax
jb 0x1833
testb $0x1, %r13b
je 0x185d
negl 0xc(%rsp)
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x187e
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x18be
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x18cb
movq %r12, %rdi
movq %r15, %rsi
callq 0x1c2e
movq %r14, %rdi
movq %r12, %rsi
callq 0x1e38
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x18ab
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x1140
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x18cb
movq %rax, 0x18(%rsp)
jmp 0x18cb
movq %r15, %rdi
leaq 0xc(%rsp), %rdx
callq 0x1cfc
xorl %r13d, %r13d
jmp 0x17fa
movq %rbx, %rdi
callq 0x1120
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x18f2
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1140
testq %rbx, %rbx
setne %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1925
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1928
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x1140
jmp 0x1928
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x193f
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1140
movq %rbx, %rdi
callq 0x1240