// File: /workspace/github_cpp_makefile_star2_O1/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
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, 0x8(%rsp)
movq $0x0, 0x10(%rdi)
xorl %r12d, %r12d
orb %al, %dl
jne 0x3c9c
movl %ecx, %esi
subl %r14d, %esi
cmpl %r14d, %esi
cmovgel %r14d, %esi
testl %esi, %esi
jle 0x3c96
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 0x3c79
jmp 0x3c9c
movl $0x1, %r12d
leal 0x1(%r12), %eax
movslq %eax, %rsi
movq 0x8(%rsp), %rdi
movq %rsi, 0x70(%rsp)
callq 0x410a
movslq %r14d, %rbx
leaq 0x10(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x58(%rsp), %rdi
leaq 0x40(%rsp), %rcx
movq %rbx, %rsi
callq 0x3fe0
leaq 0x10(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x40(%rsp), %rdi
leaq 0x7(%rsp), %rcx
movq %rbx, %rsi
callq 0x41ba
testl %r14d, %r14d
jle 0x3d0a
movq 0x40(%rsp), %rax
movl %r14d, %ecx
movq %rcx, (%rax)
addq $0x8, %rax
decq %rcx
jne 0x3cfe
leaq 0x10(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x42d4
leaq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x4238
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x3d44
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3d5b
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
testl %r12d, %r12d
jle 0x3e68
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 0x3f2d
testl %r14d, %r14d
jle 0x3e0a
xorl %r15d, %r15d
movq %r13, %rdi
movq %r12, %rsi
callq 0x405e
movq 0x10(%rsp), %rax
incl (%rax,%r15,4)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x405e
movq %rbx, %rdi
movl %r14d, %esi
callq 0x373a
decq %rax
movq 0x40(%rsp), %rcx
movq %rax, (%rcx,%r15,8)
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x3deb
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3e02
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
incq %r15
cmpq %r15, %rbp
jne 0x3d98
movq %r13, %rdi
movq %r12, %rsi
leaq 0x40(%rsp), %rdx
callq 0x42d4
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x4238
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x3e3e
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
movq 0x78(%rsp), %r15
je 0x3e5a
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
incq %r15
cmpq 0x70(%rsp), %r15
jne 0x3d83
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x3e7f
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x3e96
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 0x3ebf
jmp 0x3eea
movq %rax, %rbx
jmp 0x3f04
jmp 0x3eb8
movq %rax, %rbx
jmp 0x3f1b
jmp 0x3eea
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x42a4
jmp 0x3eed
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3eed
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
jmp 0x3eed
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x3f04
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x3f1b
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x8(%rsp), %rdi
callq 0x3088
movq %rbx, %rdi
callq 0x2240