// File: /workspace/github_cpp_makefile_star2_O1/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 0x14b10
movl %r9d, %ebp
movl %r8d, %r12d
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, (%rax,%rbx,4)
movq (%rcx), %rax
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)
movq $0x0, 0x10(%rdi)
movq (%r15), %rax
leaq (,%rbx,8), %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x8(%rax,%rcx), %rdx
subq (%rax,%rcx), %rdx
sarq $0x2, %rdx
movq (%r14), %rax
movq 0x8(%rax,%rcx), %rsi
subq (%rax,%rcx), %rsi
sarq $0x2, %rsi
addq %rdx, %rsi
callq 0x1fe7a
movl %r12d, 0x38(%rsp)
movl %ebp, 0x3c(%rsp)
movl 0xa8(%rsp), %eax
cmpl $0x1, %eax
movq %rbx, 0x30(%rsp)
jne 0x14717
movq (%r14), %rax
leaq (%rbx,%rbx,2), %rcx
movq (%rax,%rcx,8), %rbp
movq %rcx, 0x28(%rsp)
movq 0x8(%rax,%rcx,8), %r12
cmpq %r12, %rbp
je 0x146cb
leaq 0x10(%rsp), %r13
leaq 0x8(%rsp), %rbx
movl (%rbp), %eax
movl %eax, 0x8(%rsp)
movl $0x2, 0xc(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x23a38
addq $0x4, %rbp
cmpq %r12, %rbp
jne 0x146a8
movq (%r15), %rax
movq 0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rbp
movq 0x8(%rax,%rcx,8), %r12
cmpq %r12, %rbp
je 0x147a1
leaq 0x10(%rsp), %r13
leaq 0x8(%rsp), %rbx
movl (%rbp), %eax
movl %eax, 0x8(%rsp)
movl $0x1, 0xc(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x23a38
addq $0x4, %rbp
cmpq %r12, %rbp
jne 0x146ef
jmp 0x147a1
movq (%r15), %rax
leaq (%rbx,%rbx,2), %rcx
movq (%rax,%rcx,8), %rbp
movq %rcx, 0x28(%rsp)
movq 0x8(%rax,%rcx,8), %r12
cmpq %r12, %rbp
je 0x1475e
leaq 0x10(%rsp), %r13
leaq 0x8(%rsp), %rbx
movl (%rbp), %eax
movl %eax, 0x8(%rsp)
movl $0x1, 0xc(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x23a38
addq $0x4, %rbp
cmpq %r12, %rbp
jne 0x1473b
movq (%r14), %rax
movq 0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rbp
movq 0x8(%rax,%rcx,8), %r12
cmpq %r12, %rbp
je 0x147a1
leaq 0x10(%rsp), %r13
leaq 0x8(%rsp), %rbx
movl (%rbp), %eax
movl %eax, 0x8(%rsp)
movl $0x2, 0xc(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x23a38
addq $0x4, %rbp
cmpq %r12, %rbp
jne 0x1477e
movl 0xa8(%rsp), %eax
cmpl $0x2, %eax
je 0x14a00
cmpl $0x1, %eax
movq 0x30(%rsp), %r12
je 0x148e6
testl %eax, %eax
jne 0x14b1f
movq (%r15), %rax
leaq (%r12,%r12,2), %rcx
movq 0x8(%rax,%rcx,8), %r13
movq %rcx, 0x28(%rsp)
subq (%rax,%rcx,8), %r13
sete %al
cmpq $0x4, %r13
sete %cl
orb %al, %cl
jne 0x14848
movq 0x10(%rsp), %rbp
addq %r13, %r13
movl $0x8, %ebx
callq 0x3090
cltq
movq %rbx, %rcx
sarq $0x3, %rcx
incq %rcx
cqto
idivq %rcx
leaq (,%rdx,8), %rax
cmpq %rax, %rbx
je 0x1483f
leaq (,%rdx,8), %rax
addq %rbp, %rax
movl (%rbp,%rbx), %ecx
movl (%rax), %edx
movl %edx, (%rbp,%rbx)
movl %ecx, (%rax)
movl 0x4(%rbp,%rbx), %ecx
movl 0x4(%rax), %edx
movl %edx, 0x4(%rbp,%rbx)
movl %ecx, 0x4(%rax)
addq $0x8, %rbx
cmpq %rbx, %r13
jne 0x147f7
movq (%r15), %rax
movq 0x28(%rsp), %rcx
movq 0x8(%rax,%rcx,8), %r13
subq (%rax,%rcx,8), %r13
addq %r13, %r13
addq 0x10(%rsp), %r13
movq 0x18(%rsp), %rbx
cmpq %rbx, %r13
je 0x14a72
leaq 0x8(%r13), %rax
cmpq %rbx, %rax
je 0x14a72
movl $0x8, %ebp
callq 0x3090
cltq
movq %rbp, %rcx
sarq $0x3, %rcx
incq %rcx
cqto
idivq %rcx
leaq (,%rdx,8), %rax
cmpq %rax, %rbp
je 0x148cd
leaq (,%rdx,8), %rax
addq %r13, %rax
movl (%r13,%rbp), %ecx
movl (%rax), %edx
movl %edx, (%r13,%rbp)
movl %ecx, (%rax)
movl 0x4(%r13,%rbp), %ecx
movl 0x4(%rax), %edx
movl %edx, 0x4(%r13,%rbp)
movl %ecx, 0x4(%rax)
leaq 0x8(,%rbp), %rax
addq %r13, %rax
addq $0x8, %rbp
cmpq %rbx, %rax
jne 0x14881
jmp 0x14a72
movq (%r14), %rax
leaq (%r12,%r12,2), %rcx
movq 0x8(%rax,%rcx,8), %r13
movq %rcx, %r12
subq (%rax,%rcx,8), %r13
sete %al
cmpq $0x4, %r13
sete %cl
orb %al, %cl
jne 0x14965
movq 0x10(%rsp), %rbp
addq %r13, %r13
movl $0x8, %ebx
callq 0x3090
cltq
movq %rbx, %rcx
sarq $0x3, %rcx
incq %rcx
cqto
idivq %rcx
leaq (,%rdx,8), %rax
cmpq %rax, %rbx
je 0x1495c
leaq (,%rdx,8), %rax
addq %rbp, %rax
movl (%rbp,%rbx), %ecx
movl (%rax), %edx
movl %edx, (%rbp,%rbx)
movl %ecx, (%rax)
movl 0x4(%rbp,%rbx), %ecx
movl 0x4(%rax), %edx
movl %edx, 0x4(%rbp,%rbx)
movl %ecx, 0x4(%rax)
addq $0x8, %rbx
cmpq %rbx, %r13
jne 0x14914
movq (%r14), %rax
movq 0x8(%rax,%r12,8), %r13
subq (%rax,%r12,8), %r13
addq %r13, %r13
addq 0x10(%rsp), %r13
movq 0x18(%rsp), %rbx
cmpq %rbx, %r13
movq 0x30(%rsp), %r12
je 0x14a72
leaq 0x8(%r13), %rax
cmpq %rbx, %rax
je 0x14a72
movl $0x8, %ebp
callq 0x3090
cltq
movq %rbp, %rcx
sarq $0x3, %rcx
incq %rcx
cqto
idivq %rcx
leaq (,%rdx,8), %rax
cmpq %rax, %rbp
je 0x149ea
leaq (,%rdx,8), %rax
addq %r13, %rax
movl (%r13,%rbp), %ecx
movl (%rax), %edx
movl %edx, (%r13,%rbp)
movl %ecx, (%rax)
movl 0x4(%r13,%rbp), %ecx
movl 0x4(%rax), %edx
movl %edx, 0x4(%r13,%rbp)
movl %ecx, 0x4(%rax)
leaq 0x8(,%rbp), %rax
addq %r13, %rax
addq $0x8, %rbp
cmpq %rbx, %rax
jne 0x1499e
jmp 0x14a72
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r13
cmpq %r13, %rbx
movq 0x30(%rsp), %r12
je 0x14a72
leaq 0x8(%rbx), %rax
cmpq %r13, %rax
je 0x14a72
movl $0x8, %ebp
callq 0x3090
cltq
movq %rbp, %rcx
sarq $0x3, %rcx
incq %rcx
cqto
idivq %rcx
leaq (,%rdx,8), %rax
cmpq %rax, %rbp
je 0x14a61
leaq (%rbx,%rdx,8), %rax
movl (%rbx,%rbp), %ecx
movl (%rax), %edx
movl %edx, (%rbx,%rbp)
movl %ecx, (%rax)
movl 0x4(%rbx,%rbp), %ecx
movl 0x4(%rax), %edx
movl %edx, 0x4(%rbx,%rbp)
movl %ecx, 0x4(%rax)
leaq (%rbx,%rbp), %rax
addq $0x8, %rax
addq $0x8, %rbp
cmpq %r13, %rax
jne 0x14a22
movq 0x90(%rsp), %rbx
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %rbp
cmpq %rbp, %r13
je 0x14ae3
cmpl $0x1, 0x4(%r13)
movl (%r13), %ecx
movl 0x38(%rsp), %r8d
cmovel %ecx, %r8d
movl %ecx, %r9d
cmovel 0x3c(%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 0x145aa
addq $0x30, %rsp
addq $0x8, %r13
jmp 0x14a84
movq 0x80(%rsp), %rdx
movl (%rdx), %eax
leal 0x1(%rax), %ecx
movl %ecx, (%rdx)
movq (%rbx), %rcx
movl %eax, (%rcx,%r12,4)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x14b10
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x26127(%rip), %rdi     # 0x3ac4d
leaq 0x2506c(%rip), %rsi     # 0x39b99
leaq 0x2506f(%rip), %rcx     # 0x39ba3
movl $0x74, %edx
callq 0x31b0
jmp 0x14b48
jmp 0x14b48
jmp 0x14b48
jmp 0x14b48
jmp 0x14b48
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x14b62
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq %rbx, %rdi
callq 0x34a0