// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/other_fct.cpp
// Function: Create_table(int, int)
vector<pair<term_vec,vector<term_int>>> Create_table(int n, int d)//multiplication table
{
  vector<pair<term_vec,vector<term_int>>> table = {};
  term_int max_size = binom(n+d-1,n)+1;
  table.reserve(max_size);
  term_vec term(n,0);
  vector<term_int> multis(n,0);
  for (int j = 0; j < n; ++j)
    {
      multis[j] = n-j;
    }
  table.emplace_back(make_pair(term,multis));
  for (term_int i = 1; i < max_size; ++i)
    {
      next_term(term);
      for (int j = 1; j <= n; ++j)
	{
	  term_vec term_xj = vector_add(term,j); //new term = term*x_j
	  multis[j-1] = term_to_int(term_xj,n)-1; //might be too slow!,
	  //check for over size!
	}
      table.emplace_back(make_pair(term,multis));
    }
  return table;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %esi, %r14d
leal (%r14,%rdx), %ecx
decl %ecx
testl %edx, %edx
setle %al
movl %ecx, %edx
orl %esi, %edx
sets %dl
pxor %xmm0, %xmm0
movdqu %xmm0, (%rdi)
movq %rdi, 0x8(%rsp)
movq $0x0, 0x10(%rdi)
xorl %r12d, %r12d
orb %al, %dl
jne 0x3cc3
movl %ecx, %esi
subl %r14d, %esi
cmpl %r14d, %esi
cmovgel %r14d, %esi
testl %esi, %esi
jle 0x3cbd
negl %esi
movl $0x1, %edi
movl $0x1, %r12d
imull %ecx, %r12d
movl %r12d, %eax
cltd
idivl %edi
leal (%rsi,%rdi), %edx
incl %edx
incl %edi
decl %ecx
movl %eax, %r12d
cmpl $0x1, %edx
jne 0x3ca0
jmp 0x3cc3
movl $0x1, %r12d
leal 0x1(%r12), %eax
movslq %eax, %rsi
movq 0x8(%rsp), %rdi
movq %rsi, 0x70(%rsp)
callq 0x42c0
movslq %r14d, %rbx
leaq 0x10(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x58(%rsp), %rdi
leaq 0x40(%rsp), %rcx
movq %rbx, %rsi
callq 0x4098
leaq 0x10(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x40(%rsp), %rdi
leaq 0x7(%rsp), %rcx
movq %rbx, %rsi
callq 0x4370
testl %r14d, %r14d
jle 0x3dc1
movq 0x40(%rsp), %rax
movl %r14d, %edx
leal 0x1(%r14), %ecx
decq %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shrl %ecx
shlq $0x4, %rcx
movdqa 0xf378(%rip), %xmm1     # 0x130c0
xorl %edx, %edx
movdqa 0xf37e(%rip), %xmm2     # 0x130d0
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0xf37e(%rip), %xmm4     # 0x130e0
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %esi
notl %esi
testb $0x1, %sil
je 0x3d98
movq %rbx, (%rax,%rdx)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0x3db0
leaq -0x1(%rbx), %rsi
movq %rsi, 0x8(%rax,%rdx)
paddq %xmm4, %xmm1
addq $0x10, %rdx
addq $-0x2, %rbx
cmpq %rdx, %rcx
jne 0x3d62
leaq 0x10(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x4524
leaq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x4490
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x3dfb
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3e12
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
testl %r12d, %r12d
jle 0x3f1f
leal 0x1(%r14), %ebp
decq %rbp
movl $0x1, %r15d
leaq 0x58(%rsp), %r12
leaq 0x10(%rsp), %r13
leaq 0x80(%rsp), %rbx
movq %r15, 0x78(%rsp)
movq %r12, %rdi
callq 0x3fe4
testl %r14d, %r14d
jle 0x3ec1
xorl %r15d, %r15d
movq %r13, %rdi
movq %r12, %rsi
callq 0x4214
movq 0x10(%rsp), %rax
incl (%rax,%r15,4)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4214
movq %rbx, %rdi
movl %r14d, %esi
callq 0x375f
decq %rax
movq 0x40(%rsp), %rcx
movq %rax, (%rcx,%r15,8)
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x3ea2
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3eb9
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
incq %r15
cmpq %r15, %rbp
jne 0x3e4f
movq %r13, %rdi
movq %r12, %rsi
leaq 0x40(%rsp), %rdx
callq 0x4524
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x4490
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x3ef5
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
movq 0x78(%rsp), %r15
je 0x3f11
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
incq %r15
cmpq 0x70(%rsp), %r15
jne 0x3e3a
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x3f36
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x3f4d
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x8(%rsp), %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3f76
jmp 0x3fa1
movq %rax, %rbx
jmp 0x3fbb
jmp 0x3f6f
movq %rax, %rbx
jmp 0x3fd2
jmp 0x3fa1
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x44f4
jmp 0x3fa4
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3fa4
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
jmp 0x3fa4
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x3fbb
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x3fd2
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x8(%rsp), %rdi
callq 0x30a8
movq %rbx, %rdi
callq 0x2240