// File: xiangzejun[P]Optimizing_Implementations_of_Linear_Layers/reduce.cpp
// Function: get_equivalent_seq(std::vector<xpair, std::allocator<xpair>>&, int, int)
void get_equivalent_seq(vector<xpair> &seq, int gap, int start)
{

	vector<ROW> m;
	bitset<SIZE> tmp;
	for (int i = 0; i < SIZE; i++)
	{
		tmp = 0;
		tmp[SIZE - 1 - i]=1;
		m.push_back(tmp);
	}
	for(int i = start + gap - 1; i >= start; i--)
	{
		m[seq[i].dst] ^= m[seq[i].src];
	}

	vector<xpair> seq_here(strgy3(m));
 	seq.erase(seq.begin() + start, seq.begin() + start + gap);
 	seq.insert(seq.begin() + start, seq_here.begin(), seq_here.end());
 	int tab[SIZE] = {0};
 	build_table(m, tab);
 	update_seq(seq, tab, start + seq_here.size());
}

// Assembly:
subq $0x1e8, %rsp            # imm = 0x1E8
movq %rdi, 0x1e0(%rsp)
movl %esi, 0x1dc(%rsp)
movl %edx, 0x1d8(%rsp)
leaq 0x1c0(%rsp), %rdi
callq 0x5e50
leaq 0x1b8(%rsp), %rdi
callq 0xcac0
movl $0x0, 0x1b4(%rsp)
cmpl $0x20, 0x1b4(%rsp)
jge 0xbd32
xorl %eax, %eax
movl %eax, %esi
leaq 0x1a8(%rsp), %rdi
callq 0x60e0
movq 0x1a8(%rsp), %rax
movq %rax, 0x1b8(%rsp)
movl 0x1b4(%rsp), %ecx
movl $0x1f, %eax
subl %ecx, %eax
movslq %eax, %rdx
leaq 0x198(%rsp), %rdi
leaq 0x1b8(%rsp), %rsi
callq 0x5d50
jmp 0xbcc9
leaq 0x198(%rsp), %rdi
movq %rdi, 0x60(%rsp)
movl $0x1, %esi
callq 0xc7c0
movq 0x60(%rsp), %rdi
callq 0x5dd0
leaq 0x1c0(%rsp), %rdi
leaq 0x1b8(%rsp), %rsi
callq 0x61d0
jmp 0xbd01
jmp 0xbd03
movl 0x1b4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1b4(%rsp)
jmp 0xbc72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x190(%rsp)
movl %eax, 0x18c(%rsp)
jmp 0xc09a
movl 0x1d8(%rsp), %eax
addl 0x1dc(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x188(%rsp)
movl 0x188(%rsp), %eax
cmpl 0x1d8(%rsp), %eax
jl 0xbdca
movq 0x1e0(%rsp), %rdi
movslq 0x188(%rsp), %rsi
callq 0x3430
movslq (%rax), %rsi
leaq 0x1c0(%rsp), %rdi
callq 0x33d0
movq %rax, 0x58(%rsp)
movq 0x1e0(%rsp), %rdi
movslq 0x188(%rsp), %rsi
callq 0x3430
movslq 0x4(%rax), %rsi
leaq 0x1c0(%rsp), %rdi
callq 0x33d0
movq 0x58(%rsp), %rsi
movq %rax, %rdi
callq 0x3450
movl 0x188(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x188(%rsp)
jmp 0xbd4a
leaq 0x170(%rsp), %rdi
leaq 0x1c0(%rsp), %rsi
callq 0x5030
jmp 0xbde1
movq 0x1e0(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x6080
movq %rax, 0x158(%rsp)
movslq 0x1d8(%rsp), %rsi
leaq 0x158(%rsp), %rdi
callq 0x6e80
movq %rax, 0x160(%rsp)
leaq 0x168(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0x6040
movq 0x1e0(%rsp), %rdi
callq 0x6080
movq %rax, 0x138(%rsp)
movslq 0x1d8(%rsp), %rsi
leaq 0x138(%rsp), %rdi
callq 0x6e80
movq %rax, 0x140(%rsp)
movslq 0x1dc(%rsp), %rsi
leaq 0x140(%rsp), %rdi
callq 0x6e80
movq %rax, 0x148(%rsp)
leaq 0x150(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x6040
movq 0x48(%rsp), %rdi
movq 0x168(%rsp), %rsi
movq 0x150(%rsp), %rdx
callq 0xcad0
movq %rax, 0x50(%rsp)
jmp 0xbeb2
movq 0x50(%rsp), %rax
movq %rax, 0x130(%rsp)
movq 0x1e0(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x6080
movq %rax, 0x118(%rsp)
movslq 0x1d8(%rsp), %rsi
leaq 0x118(%rsp), %rdi
callq 0x6e80
movq %rax, 0x120(%rsp)
leaq 0x128(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0x6040
leaq 0x170(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x6080
movq 0x30(%rsp), %rdi
movq %rax, 0x110(%rsp)
callq 0x6010
movq 0x38(%rsp), %rdi
movq %rax, 0x108(%rsp)
movq 0x128(%rsp), %rsi
movq 0x110(%rsp), %rdx
movq 0x108(%rsp), %rcx
callq 0x5f50
movq %rax, 0x40(%rsp)
jmp 0xbf60
movq 0x40(%rsp), %rax
movq %rax, 0x100(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0xf0(%rsp)
movaps %xmm0, 0xe0(%rsp)
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0xc0(%rsp)
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x1c0(%rsp), %rsi
callq 0x2fc0
jmp 0xbfc9
leaq 0x68(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x4da0
jmp 0xbfdd
leaq 0x68(%rsp), %rdi
callq 0x30c0
movq 0x1e0(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x80(%rsp), %rax
movq %rax, 0x10(%rsp)
movslq 0x1d8(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x170(%rsp), %rdi
callq 0x3280
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rax, %rcx
movq 0x18(%rsp), %rax
addq %rcx, %rax
movl %eax, %edx
callq 0xbb50
leaq 0x170(%rsp), %rdi
callq 0x3220
leaq 0x1c0(%rsp), %rdi
callq 0x30c0
addq $0x1e8, %rsp            # imm = 0x1E8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x190(%rsp)
movl %eax, 0x18c(%rsp)
jmp 0xc08d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x190(%rsp)
movl %eax, 0x18c(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x30c0
leaq 0x170(%rsp), %rdi
callq 0x3220
leaq 0x1c0(%rsp), %rdi
callq 0x30c0
movq 0x190(%rsp), %rdi
callq 0x22a0
nopw %cs:(%rax,%rax)