// File: /workspace/github_cpp_makefile_star2_O3/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 0x142b4
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 0x1f2bc
movl %r12d, 0x30(%rsp)
movl %ebp, 0x34(%rsp)
movl 0xa8(%rsp), %eax
cmpl $0x1, %eax
movq %rbx, 0x38(%rsp)
jne 0x13ee9
movq (%r14), %rax
leaq (%rbx,%rbx,2), %rcx
movq (%rax,%rcx,8), %rbp
movq %rcx, 0x8(%rsp)
movq 0x8(%rax,%rcx,8), %r12
cmpq %r12, %rbp
je 0x13ea0
leaq 0x10(%rsp), %r13
movq %rsp, %rbx
movl (%rbp), %eax
movl %eax, (%rsp)
movl $0x2, 0x4(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x22d46
addq $0x4, %rbp
cmpq %r12, %rbp
jne 0x13e7e
movq (%r15), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rbp
movq 0x8(%rax,%rcx,8), %r12
cmpq %r12, %rbp
je 0x13f6d
leaq 0x10(%rsp), %r13
movq %rsp, %rbx
movl (%rbp), %eax
movl %eax, (%rsp)
movl $0x1, 0x4(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x22d46
addq $0x4, %rbp
cmpq %r12, %rbp
jne 0x13ec2
jmp 0x13f6d
movq (%r15), %rax
leaq (%rbx,%rbx,2), %rcx
movq (%rax,%rcx,8), %rbp
movq %rcx, 0x8(%rsp)
movq 0x8(%rax,%rcx,8), %r12
cmpq %r12, %rbp
je 0x13f2d
leaq 0x10(%rsp), %r13
movq %rsp, %rbx
movl (%rbp), %eax
movl %eax, (%rsp)
movl $0x1, 0x4(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x22d46
addq $0x4, %rbp
cmpq %r12, %rbp
jne 0x13f0b
movq (%r14), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rbp
movq 0x8(%rax,%rcx,8), %r12
cmpq %r12, %rbp
je 0x13f6d
leaq 0x10(%rsp), %r13
movq %rsp, %rbx
movl (%rbp), %eax
movl %eax, (%rsp)
movl $0x2, 0x4(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x22d46
addq $0x4, %rbp
cmpq %r12, %rbp
jne 0x13f4b
movl 0xa8(%rsp), %eax
cmpl $0x2, %eax
je 0x1419e
cmpl $0x1, %eax
movq 0x38(%rsp), %r12
je 0x1409a
testl %eax, %eax
jne 0x142c3
movq 0x10(%rsp), %rbx
movq (%r15), %rax
leaq (%r12,%r12,2), %rdx
movq 0x8(%rax,%rdx,8), %r13
subq (%rax,%rdx,8), %r13
sete %al
cmpq $0x4, %r13
sete %cl
orb %al, %cl
jne 0x14021
movq %rdx, 0x8(%rsp)
addq %r13, %r13
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 0x14002
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)
addq $0x8, %rbp
cmpq %rbp, %r13
jne 0x13fc3
movq 0x10(%rsp), %rbx
movq (%r15), %rax
movq 0x8(%rsp), %rcx
movq 0x8(%rax,%rcx,8), %r13
subq (%rax,%rcx,8), %r13
leaq (%rbx,%r13,2), %rbx
movq 0x18(%rsp), %r13
cmpq %r13, %rbx
je 0x14210
leaq 0x8(%rbx), %rax
cmpq %r13, %rax
je 0x14210
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 0x14084
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 0x14045
jmp 0x14210
movq 0x10(%rsp), %rbx
movq (%r14), %rax
leaq (%r12,%r12,2), %rdx
movq 0x8(%rax,%rdx,8), %r13
subq (%rax,%rdx,8), %r13
sete %al
cmpq $0x4, %r13
sete %cl
orb %al, %cl
jne 0x14128
movq %rdx, 0x8(%rsp)
addq %r13, %r13
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 0x14109
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)
addq $0x8, %rbp
cmpq %rbp, %r13
jne 0x140ca
movq 0x10(%rsp), %rbx
movq (%r14), %rax
movq 0x8(%rsp), %rcx
movq 0x8(%rax,%rcx,8), %r13
subq (%rax,%rcx,8), %r13
leaq (%rbx,%r13,2), %rbx
movq 0x18(%rsp), %r13
cmpq %r13, %rbx
je 0x14210
leaq 0x8(%rbx), %rax
cmpq %r13, %rax
je 0x14210
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 0x1418b
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 0x1414c
jmp 0x14210
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r13
cmpq %r13, %rbx
movq 0x38(%rsp), %r12
je 0x14210
leaq 0x8(%rbx), %rax
cmpq %r13, %rax
je 0x14210
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 0x141ff
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 0x141c0
movq 0x90(%rsp), %rbx
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %rbp
cmpq %rbp, %r13
je 0x14289
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 0x13d82
addq $0x30, %rsp
addq $0x8, %r13
cmpq %rbp, %r13
jne 0x14227
movq 0x10(%rsp), %r13
movq 0x80(%rsp), %rdx
movl (%rdx), %eax
leal 0x1(%rax), %ecx
movl %ecx, (%rdx)
movq (%rbx), %rcx
movl %eax, (%rcx,%r12,4)
testq %r13, %r13
je 0x142b4
movq 0x20(%rsp), %rsi
subq %r13, %rsi
movq %r13, %rdi
callq 0x32b0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x25a97(%rip), %rdi     # 0x39d61
leaq 0x24978(%rip), %rsi     # 0x38c49
leaq 0x2497b(%rip), %rcx     # 0x38c53
movl $0x74, %edx
callq 0x31b0
jmp 0x142ec
jmp 0x142ec
jmp 0x142ec
jmp 0x142ec
jmp 0x142ec
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x14306
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x32b0
movq %rbx, %rdi
callq 0x34a0