// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/M5GB.cpp
// Function: Initialize(std::vector<polynomial, std::allocator<polynomial>>&, int)
void Initialize(vector<polynomial>& system, int n) //table might overflow -> need to redefine inside
{
  //sort(system); //test if this speeds up
  p = system[0].Get_p();
  Add_field_eq(system,n);
  //m = system.size();
  Interreduce(system);
  sort(system.begin()+n, system.end());
  m = system.size();
  cout << "n: " << n << endl;
  cout << "p: " << p << endl;
  cout << "m: " << m << endl;

  vector<Lab_poly> F = Basic_poly(system,n);
  Init_LT_G(F);
  G_ = Init_G(F);
  M = G_;
  LT_M = LT_G;
  P = Init_Spairs(F,Spol_sign,Spairs_map,n);//check that, error source? comparison?
  H = Init_Syzygies(F); //create trivial syzygy signatures
  Init_generations(F);
  
  #ifdef NUMBER
  //Numbers = Init_numbers(F);
  #endif
  
  #ifdef PRECISE_DEBUG
  cout << "Trivial syzygies: " << endl;
  for (auto it = H.begin(); it != H.end(); ++it)
    {
      for (auto it2 = it->begin(); it2 != it->end(); ++it2)
	cout << *it2 << endl;
    }
#endif
    cout << "Initialization done!" << endl;
    return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %esi, %ebx
movq %rdi, %r14
movq (%rdi), %rax
movq (%rax), %rax
movl 0xc(%rax), %eax
movl %eax, 0x11d85(%rip)     # 0x1a1b4
callq 0xb8ea
movq %r14, %rdi
callq 0xa11b
movq (%r14), %rax
movq 0x8(%r14), %r12
movslq %ebx, %r15
shlq $0x5, %r15
addq %rax, %r15
cmpq %r12, %r15
je 0x8486
movq %r12, %rax
subq %r15, %rax
sarq $0x5, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0xf2aa
movq %r15, %rdi
movq %r12, %rsi
callq 0xf360
movq (%r14), %rax
movq 0x8(%r14), %r15
subq %rax, %r15
shrq $0x5, %r15
movl %r15d, 0x11d24(%rip)    # 0x1a1b8
movq 0x11b3d(%rip), %r15     # 0x19fd8
leaq 0xadd8(%rip), %rsi      # 0x1327a
movl $0x3, %edx
movq %r15, %rdi
callq 0x21a0
movq %r15, %rdi
movl %ebx, %esi
callq 0x2230
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
leaq 0xaf66(%rip), %rsi      # 0x13450
movl $0x3, %edx
movq %r15, %rdi
callq 0x21a0
movl 0x11cb7(%rip), %esi     # 0x1a1b4
movq %r15, %rdi
callq 0x2230
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
leaq 0xaef4(%rip), %rsi      # 0x1342a
movl $0x3, %edx
movq %r15, %rdi
callq 0x21a0
movl 0x11c6f(%rip), %esi     # 0x1a1b8
movq %r15, %rdi
callq 0x2230
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xbb2e
movq %r15, %rdi
callq 0xbc68
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xbe50
leaq 0x11d1f(%rip), %rdi     # 0x1a2c8
leaq 0x20(%rsp), %rsi
callq 0x233a
leaq 0x20(%rsp), %rdi
callq 0xd18e
leaq 0x11d3c(%rip), %rdi     # 0x1a300
leaq 0x11cfd(%rip), %rsi     # 0x1a2c8
callq 0xd4de
leaq 0x11cb9(%rip), %rdi     # 0x1a290
leaq 0x11c7a(%rip), %rsi     # 0x1a258
callq 0xd906
leaq 0x11e7e(%rip), %rdx     # 0x1a468
leaq 0x11ea7(%rip), %rcx     # 0x1a498
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl %ebx, %r8d
callq 0xbef8
leaq 0x11ebe(%rip), %rdi     # 0x1a4c8
callq 0xdc38
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x8660
leaq 0x28(%rsp), %rcx
movl (%rcx), %edx
movl %edx, 0x11eaa(%rip)     # 0x1a4d0
leaq 0x11ea3(%rip), %rdx     # 0x1a4d0
movq %rax, 0x11ea4(%rip)     # 0x1a4d8
movups 0x10(%rcx), %xmm0
movups %xmm0, 0x11ea1(%rip)    # 0x1a4e0
movq %rdx, 0x8(%rax)
movq 0x20(%rcx), %rax
movq %rax, 0x11ea2(%rip)     # 0x1a4f0
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq 0x20(%rsp), %rdi
callq 0xd360
leaq 0x60(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xc345
movq 0x11de0(%rip), %rax     # 0x1a460
leaq 0x60(%rsp), %rbx
movaps (%rbx), %xmm0
movq 0x10(%rbx), %rcx
movq %rcx, 0x11dcd(%rip)     # 0x1a460
movaps 0x11db6(%rip), %xmm1    # 0x1a450
movaps %xmm0, 0x11daf(%rip)    # 0x1a450
leaq 0x20(%rsp), %rdi
movaps %xmm1, (%rdi)
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
callq 0x3054
movq %rbx, %rdi
callq 0x3054
leaq 0x8(%rsp), %rdi
callq 0xc530
movq 0x118ff(%rip), %rbx     # 0x19fd8
leaq 0xad4e(%rip), %rsi      # 0x1342e
movl $0x14, %edx
movq %rbx, %rdi
callq 0x21a0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq 0x118cd(%rip), %rdi     # 0x19fd8
callq 0x2030
movq %rax, %rdi
callq 0x20f0
leaq 0x8(%rsp), %rdi
callq 0xcc40
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x873c
jmp 0x873c
movq %rax, %rdi
callq 0x317f
jmp 0x873c
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xcc40
movq %rbx, %rdi
callq 0x2240