// File: /workspace/github_cpp_makefile_star2_O2/Laakeri[P]maxpre/src/./BIG.cpp
// Function: maxPreprocessor::Preprocessor::genIndex(std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&, int, int, int, int&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, int)
void Preprocessor::genIndex(vector<vector<int> >& g, vector<vector<int> >& rg, int x, int u1, int u2, int& stamp, vector<int>& le, vector<int>& ri, vector<int>& up1, vector<int>& up2, int order) {
	if (BIGu2[x] == 4) return;
	BIGu2[x] = 4;
	up1[x] = u1;
	up2[x] = u2;
	le[x] = stamp++;
	vector<pair<int, int> > ne;
	ne.reserve(g[x].size() + rg[x].size());
	if (order != 1) {
		for (int nx : g[x]) {
			ne.push_back({nx, 1});
		}
		for (int nx : rg[x]) {
			ne.push_back({nx, 2});
		}
	}
	else {
		for (int nx : rg[x]) {
			ne.push_back({nx, 2});
		}
		for (int nx : g[x]) {
			ne.push_back({nx, 1});
		}
	}
	if (order == 0) {
		random_shuffle(ne.begin(), ne.begin() + g[x].size());
		random_shuffle(ne.begin() + g[x].size(), ne.end());
	}
	else if (order == 1) {
		random_shuffle(ne.begin(), ne.begin() + rg[x].size());
		random_shuffle(ne.begin() + rg[x].size(), ne.end());
	}
	else if (order == 2) {
		random_shuffle(ne.begin(), ne.end());
	}
	else {
		assert(0);
	}
	for (auto nx : ne) {
		if (nx.S == 1) genIndex(g, rg, nx.F, nx.F, u2, stamp, le, ri, up1, up2, order);
		else genIndex(g, rg, nx.F, u1, nx.F, stamp, le, ri, up1, up2, order);
	}
	ri[x] = stamp++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movslq %ecx, %rbx
movq %rdi, 0x40(%rsp)
movq 0x3c8(%rdi), %rax
cmpl $0x4, (%rax,%rbx,4)
je 0x10358
movq %rdx, %r14
movq %rsi, %r15
movq 0xa0(%rsp), %rcx
movq 0x98(%rsp), %rsi
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rdx
movl $0x4, (%rax,%rbx,4)
movq (%rsi), %rax
movl %r8d, 0x30(%rsp)
movl %r8d, (%rax,%rbx,4)
movq (%rcx), %rax
movl %r9d, 0x34(%rsp)
movl %r9d, (%rax,%rbx,4)
movl (%rdx), %eax
leal 0x1(%rax), %ecx
movl %ecx, (%rdx)
movq (%rdi), %rcx
movl %eax, (%rcx,%rbx,4)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq (%r15), %rax
imulq $0x18, %rbx, %r13
movq 0x8(%rax,%r13), %rcx
subq (%rax,%r13), %rcx
sarq $0x2, %rcx
movq (%r14), %rax
movq 0x8(%rax,%r13), %rsi
subq (%rax,%r13), %rsi
sarq $0x2, %rsi
addq %rcx, %rsi
callq 0x19128
movq %rbx, 0x38(%rsp)
movl 0xa8(%rsp), %eax
cmpl $0x1, %eax
movq %r13, 0x28(%rsp)
jne 0x10157
movq (%r14), %rax
movq (%rax,%r13), %r12
movq 0x8(%rax,%r13), %rbp
leaq 0x10(%rsp), %rbx
leaq 0x8(%rsp), %r13
cmpq %rbp, %r12
je 0x10193
movl (%r12), %eax
movl %eax, 0x8(%rsp)
movl $0x2, 0xc(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1d392
addq $0x4, %r12
jmp 0x10131
movq (%r15), %rax
movq (%rax,%r13), %r12
movq 0x8(%rax,%r13), %rbp
leaq 0x10(%rsp), %r13
leaq 0x8(%rsp), %rbx
cmpq %rbp, %r12
je 0x101d3
movl (%r12), %eax
movl %eax, 0x8(%rsp)
movl $0x1, 0xc(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1d392
addq $0x4, %r12
jmp 0x1016d
movq (%r15), %rax
movq 0x28(%rsp), %rcx
movq (%rax,%rcx), %rbp
movq 0x8(%rax,%rcx), %r12
leaq 0x10(%rsp), %r13
leaq 0x8(%rsp), %rbx
cmpq %r12, %rbp
je 0x10213
movl (%rbp), %eax
movl %eax, 0x8(%rsp)
movl $0x1, 0xc(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1d392
addq $0x4, %rbp
jmp 0x101ae
movq (%r14), %rax
movq 0x28(%rsp), %rcx
movq (%rax,%rcx), %rbp
movq 0x8(%rax,%rcx), %r12
leaq 0x10(%rsp), %r13
leaq 0x8(%rsp), %rbx
cmpq %r12, %rbp
je 0x10213
movl (%rbp), %eax
movl %eax, 0x8(%rsp)
movl $0x2, 0xc(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1d392
addq $0x4, %rbp
jmp 0x101ee
movl 0xa8(%rsp), %eax
cmpl $0x2, %eax
je 0x102b3
cmpl $0x1, %eax
movq 0x38(%rsp), %r12
je 0x10274
testl %eax, %eax
movq 0x28(%rsp), %rbx
jne 0x10367
movq 0x10(%rsp), %rdi
movq (%r15), %rax
movq 0x8(%rax,%rbx), %rcx
subq (%rax,%rbx), %rcx
leaq (%rdi,%rcx,2), %rsi
callq 0x191c5
movq (%r15), %rax
movq 0x8(%rax,%rbx), %rdi
subq (%rax,%rbx), %rdi
addq %rdi, %rdi
addq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x191c5
jmp 0x102c7
movq 0x10(%rsp), %rdi
movq (%r14), %rax
movq 0x28(%rsp), %rbx
movq 0x8(%rax,%rbx), %rcx
subq (%rax,%rbx), %rcx
leaq (%rdi,%rcx,2), %rsi
callq 0x191c5
movq (%r14), %rax
movq 0x8(%rax,%rbx), %rdi
subq (%rax,%rbx), %rdi
addq %rdi, %rdi
addq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x191c5
jmp 0x102c7
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x191c5
movq 0x38(%rsp), %r12
movq 0x90(%rsp), %rbx
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %rbp
cmpq %rbp, %r13
je 0x10338
cmpl $0x1, 0x4(%r13)
movl (%r13), %ecx
movl 0x30(%rsp), %r8d
cmovel %ecx, %r8d
movl %ecx, %r9d
cmovel 0x34(%rsp), %r9d
movq 0x40(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movl 0xa8(%rsp), %eax
pushq %rax
pushq 0xa8(%rsp)
pushq 0xa8(%rsp)
pushq %rbx
pushq 0xa8(%rsp)
pushq 0xa8(%rsp)
callq 0x10050
addq $0x30, %rsp
addq $0x8, %r13
jmp 0x102d9
movq 0x80(%rsp), %rdx
movl (%rdx), %eax
leal 0x1(%rax), %ecx
movl %ecx, (%rdx)
movq (%rbx), %rcx
movl %eax, (%rcx,%r12,4)
leaq 0x10(%rsp), %rdi
callq 0x1d322
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20957(%rip), %rdi     # 0x30cc5
leaq 0x1f854(%rip), %rsi     # 0x2fbc9
leaq 0x1f857(%rip), %rcx     # 0x2fbd3
pushq $0x74
popq %rdx
callq 0x31c0
jmp 0x10396
jmp 0x10396
jmp 0x10396
jmp 0x10396
jmp 0x10396
jmp 0x10396
jmp 0x10396
jmp 0x10396
jmp 0x10396
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1d322
movq %rbx, %rdi
callq 0x3490
nop