// File: Laakeri[P]maxpre/src/./BIG.cpp
// Function: maxPreprocessor::Preprocessor::BIGdfs1(int, std::vector<int, std::allocator<int>>&)
void Preprocessor::BIGdfs1(int x, vector<int>& ns) {
	// we do actually bfs to avoid stack overflow
	queue<int> bfs;
	bfs.push(x);
	while (!bfs.empty()) {
		int v = bfs.front();
		bfs.pop();
		if (BIGu[v] == BIGIt) continue;
		BIGu[v] = BIGIt;
		BIGu2[v] = 0;
		BIGu2[litVariable(v)] = 0;
		ns.push_back(v);
		// backward edges
		for (int c : pi.litClauses[v]) {
			if (pi.clauses[c].lit.size() == 2) {
				for (int nx : pi.clauses[c].lit) {
					if (nx != v && pi.isLabel[litVariable(nx)] == VAR_UNDEFINED) {
						bfs.push(litNegation(nx));
					}
				}
			}
		}
		// forward edges
		for (int c : pi.litClauses[litNegation(v)]) {
			if (pi.clauses[c].lit.size() == 2) {
				for (int nx : pi.clauses[c].lit) {
					if (nx != litNegation(v) && pi.isLabel[litVariable(nx)] == VAR_UNDEFINED) {
						bfs.push(nx);
					}
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq -0x68(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x3e780
movq -0x100(%rbp), %rdi
leaq -0xc(%rbp), %rsi
callq 0x3e7b0
jmp 0x22b63
jmp 0x22b65
leaq -0x68(%rbp), %rdi
callq 0x3e7e0
movb %al, -0x109(%rbp)
jmp 0x22b76
movb -0x109(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x22b87
jmp 0x22ff4
leaq -0x68(%rbp), %rdi
callq 0x3e800
movq %rax, -0x118(%rbp)
jmp 0x22b99
movq -0x118(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x78(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x3e820
jmp 0x22bb0
movq -0x108(%rbp), %rdi
addq $0x3b0, %rdi            # imm = 0x3B0
movslq -0x78(%rbp), %rsi
callq 0xa7c0
movq -0x108(%rbp), %rcx
movl (%rax), %eax
cmpl 0x3ac(%rcx), %eax
jne 0x22bf4
jmp 0x22b65
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x3e870
jmp 0x23006
movq -0x108(%rbp), %rdi
movl 0x3ac(%rdi), %eax
movl %eax, -0x12c(%rbp)
addq $0x3b0, %rdi            # imm = 0x3B0
movslq -0x78(%rbp), %rsi
callq 0xa7c0
movl -0x12c(%rbp), %ecx
movq -0x108(%rbp), %rdi
movl %ecx, (%rax)
addq $0x3c8, %rdi            # imm = 0x3C8
movq %rdi, -0x128(%rbp)
movslq -0x78(%rbp), %rsi
callq 0xa7c0
movl $0x0, (%rax)
movl -0x78(%rbp), %edi
callq 0x3c880
movl %eax, -0x11c(%rbp)
jmp 0x22c53
movq -0x128(%rbp), %rdi
movl -0x11c(%rbp), %eax
movslq %eax, %rsi
callq 0xa7c0
movl $0x0, (%rax)
movq -0x18(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0xa8c0
jmp 0x22c7d
movq -0x108(%rbp), %rdi
addq $0x18, %rdi
movslq -0x78(%rbp), %rsi
callq 0xaab0
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rdi
callq 0xa800
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rdi
callq 0xa830
movq %rax, -0x90(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x22cd1
jmp 0x22e1f
leaq -0x88(%rbp), %rdi
callq 0xa8a0
movq -0x108(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x94(%rbp)
movslq -0x94(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
callq 0xf940
cmpq $0x2, %rax
jne 0x22e0c
movq -0x108(%rbp), %rdi
movslq -0x94(%rbp), %rsi
callq 0x3c600
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rdi
callq 0xa800
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rdi
callq 0xa830
movq %rax, -0xb0(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x22d66
jmp 0x22e0a
leaq -0xa8(%rbp), %rdi
callq 0xa8a0
movl (%rax), %eax
movl %eax, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
cmpl -0x78(%rbp), %eax
je 0x22df7
movq -0x108(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x138(%rbp)
movl -0xb4(%rbp), %edi
callq 0x3c880
movl %eax, -0x130(%rbp)
jmp 0x22daa
movq -0x138(%rbp), %rdi
movl -0x130(%rbp), %eax
movslq %eax, %rsi
callq 0xa7c0
cmpl $0x0, (%rax)
jne 0x22df7
movl -0xb4(%rbp), %edi
callq 0x3c5a0
movl %eax, -0x13c(%rbp)
jmp 0x22dd7
movl -0x13c(%rbp), %eax
movl %eax, -0xb8(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x3e840
jmp 0x22df5
jmp 0x22df7
jmp 0x22df9
leaq -0xa8(%rbp), %rdi
callq 0xa930
jmp 0x22d4a
jmp 0x22e0c
jmp 0x22e0e
leaq -0x88(%rbp), %rdi
callq 0xa930
jmp 0x22cb5
movq -0x108(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x148(%rbp)
movl -0x78(%rbp), %edi
callq 0x3c5a0
movl %eax, -0x140(%rbp)
jmp 0x22e41
movq -0x148(%rbp), %rdi
movl -0x140(%rbp), %eax
movslq %eax, %rsi
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 0x22e9f
jmp 0x22fef
leaq -0xc8(%rbp), %rdi
callq 0xa8a0
movq -0x108(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0xd4(%rbp)
movslq -0xd4(%rbp), %rsi
callq 0x3c600
movq %rax, %rdi
callq 0xf940
cmpq $0x2, %rax
jne 0x22fdc
movq -0x108(%rbp), %rdi
movslq -0xd4(%rbp), %rsi
callq 0x3c600
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rdi
callq 0xa800
movq %rax, -0xe8(%rbp)
movq -0xe0(%rbp), %rdi
callq 0xa830
movq %rax, -0xf0(%rbp)
leaq -0xe8(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0xa860
testb $0x1, %al
jne 0x22f34
jmp 0x22fda
leaq -0xe8(%rbp), %rdi
callq 0xa8a0
movl (%rax), %eax
movl %eax, -0xf4(%rbp)
movl -0xf4(%rbp), %eax
movl %eax, -0x150(%rbp)
movl -0x78(%rbp), %edi
callq 0x3c5a0
movl %eax, -0x14c(%rbp)
jmp 0x22f64
movl -0x150(%rbp), %eax
movl -0x14c(%rbp), %ecx
cmpl %ecx, %eax
je 0x22fc7
movq -0x108(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x160(%rbp)
movl -0xf4(%rbp), %edi
callq 0x3c880
movl %eax, -0x154(%rbp)
jmp 0x22f99
movq -0x160(%rbp), %rdi
movl -0x154(%rbp), %eax
movslq %eax, %rsi
callq 0xa7c0
cmpl $0x0, (%rax)
jne 0x22fc7
leaq -0x68(%rbp), %rdi
leaq -0xf4(%rbp), %rsi
callq 0x3e7b0
jmp 0x22fc5
jmp 0x22fc7
jmp 0x22fc9
leaq -0xe8(%rbp), %rdi
callq 0xa930
jmp 0x22f18
jmp 0x22fdc
jmp 0x22fde
leaq -0xc8(%rbp), %rdi
callq 0xa930
jmp 0x22e83
jmp 0x22b65
leaq -0x68(%rbp), %rdi
callq 0x3e870
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x4610
nop