// File: /workspace/github_cpp_makefile_star2_O1/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, 0x12351(%rip)     # 0x1a1a4
callq 0xb3f0
movq %r14, %rdi
callq 0x9b67
movslq %ebx, %r15
shlq $0x5, %r15
addq (%r14), %r15
movq 0x8(%r14), %r12
cmpq %r12, %r15
je 0x7ea0
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 0xed90
movq %r15, %rdi
movq %r12, %rsi
callq 0xee46
movq 0x8(%r14), %rax
subq (%r14), %rax
shrq $0x5, %rax
movl %eax, 0x122f7(%rip)     # 0x1a1a8
movq 0x12120(%rip), %r15     # 0x19fd8
leaq 0xb35e(%rip), %rsi      # 0x1321d
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 0xb4ec(%rip), %rsi      # 0x133f3
movl $0x3, %edx
movq %r15, %rdi
callq 0x21a0
movl 0x1228a(%rip), %esi     # 0x1a1a4
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 0xb47a(%rip), %rsi      # 0x133cd
movl $0x3, %edx
movq %r15, %rdi
callq 0x21a0
movl 0x12242(%rip), %esi     # 0x1a1a8
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 0xb63a
movq %r15, %rdi
callq 0xb774
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xb8fa
leaq 0x122f2(%rip), %rdi     # 0x1a2b8
leaq 0x20(%rsp), %rsi
callq 0x230a
leaq 0x20(%rsp), %rdi
callq 0xccb6
leaq 0x1230f(%rip), %rdi     # 0x1a2f0
leaq 0x122d0(%rip), %rsi     # 0x1a2b8
callq 0xd006
leaq 0x1228c(%rip), %rdi     # 0x1a280
leaq 0x1224d(%rip), %rsi     # 0x1a248
callq 0xd420
leaq 0x12451(%rip), %rdx     # 0x1a458
leaq 0x1247a(%rip), %rcx     # 0x1a488
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl %ebx, %r8d
callq 0xb9a9
leaq 0x12491(%rip), %rdi     # 0x1a4b8
callq 0xd744
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x807d
leaq 0x28(%rsp), %rcx
movl (%rcx), %edx
movl %edx, 0x1247d(%rip)     # 0x1a4c0
leaq 0x12476(%rip), %rdx     # 0x1a4c0
movq %rax, 0x12477(%rip)     # 0x1a4c8
movups 0x10(%rcx), %xmm0
movups %xmm0, 0x12474(%rip)    # 0x1a4d0
movq %rdx, 0x8(%rax)
movq 0x20(%rcx), %rax
movq %rax, 0x12475(%rip)     # 0x1a4e0
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq 0x20(%rsp), %rdi
callq 0xce88
leaq 0x60(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xbe74
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rdi
movaps %xmm0, (%rdi)
movups 0x12398(%rip), %xmm0    # 0x1a440
movq 0x123a1(%rip), %rax     # 0x1a450
leaq 0x60(%rsp), %rbx
movups (%rbx), %xmm1
movups %xmm1, 0x12382(%rip)    # 0x1a440
movq 0x10(%rbx), %rcx
movq %rcx, 0x12387(%rip)     # 0x1a450
movaps (%rdi), %xmm1
movaps %xmm0, (%rdi)
movq %rax, 0x10(%rdi)
movups %xmm1, (%rbx)
movq $0x0, 0x10(%rbx)
callq 0x303a
movq %rbx, %rdi
callq 0x303a
leaq 0x8(%rsp), %rdi
callq 0xc073
movq 0x11edc(%rip), %rbx     # 0x19fd8
leaq 0xb2ce(%rip), %rsi      # 0x133d1
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 0x11eaa(%rip), %rdi     # 0x19fd8
callq 0x2030
movq %rax, %rdi
callq 0x20f0
leaq 0x8(%rsp), %rdi
callq 0xc7ba
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x815f
jmp 0x815f
movq %rax, %rdi
callq 0x3153
jmp 0x815f
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xc7ba
movq %rbx, %rdi
callq 0x2240