// File: /workspace/github_cpp_makefile_star2_O2/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 $0x58, %rsp
movl %esi, %ebx
movq %rdi, %r14
movq (%rdi), %rax
movq (%rax), %rax
movl 0xc(%rax), %eax
movl %eax, 0x1190d(%rip)     # 0x181ac
callq 0x8acb
movq %r14, %rdi
callq 0x7ad1
movslq %ebx, %r12
movq %r12, %rdi
shlq $0x5, %rdi
addq (%r14), %rdi
movq 0x8(%r14), %rsi
callq 0xc16d
movq 0x8(%r14), %rax
subq (%r14), %rax
shrq $0x5, %rax
movl %eax, 0x118dd(%rip)     # 0x181b0
movq 0x116fe(%rip), %r15     # 0x17fd8
leaq 0x8949(%rip), %rsi      # 0xf22a
movq %r15, %rdi
callq 0x2180
movq %rax, %rdi
movl %r12d, %esi
callq 0x2250
movq %rax, %rdi
callq 0x20d0
leaq 0x8afd(%rip), %rsi      # 0xf400
movq %r15, %rdi
callq 0x2180
movl 0x1189b(%rip), %esi     # 0x181ac
movq %rax, %rdi
callq 0x2250
movq %rax, %rdi
callq 0x20d0
leaq 0x8ab2(%rip), %rsi      # 0xf3da
movq %r15, %rdi
callq 0x2180
movl 0x1187a(%rip), %esi     # 0x181b0
movq %rax, %rdi
callq 0x2250
movq %rax, %rdi
callq 0x20d0
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x8c96
movq %r15, %rdi
callq 0x8d74
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x8ea5
leaq 0x1194c(%rip), %r14     # 0x182c0
leaq 0x20(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xa128
movq %r15, %rdi
callq 0x9d76
leaq 0x11965(%rip), %rdi     # 0x182f8
movq %r14, %rsi
callq 0xa1de
leaq 0x118e6(%rip), %rdi     # 0x18288
leaq 0x118a7(%rip), %rsi     # 0x18250
callq 0xa57c
leaq 0x11aab(%rip), %rdx     # 0x18460
leaq 0x11ad4(%rip), %rcx     # 0x18490
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl %ebx, %r8d
callq 0x8f31
leaq 0x11aeb(%rip), %rdi     # 0x184c0
leaq 0x20(%rsp), %rbx
movq %rbx, %rsi
callq 0xa872
movq %rbx, %rdi
callq 0x9f98
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x91b9
leaq 0x11a48(%rip), %rdi     # 0x18448
leaq 0x20(%rsp), %rbx
movq %rbx, %rsi
callq 0x2d4a
movq %rbx, %rdi
callq 0x2be6
leaq 0x8(%rsp), %rdi
callq 0x933b
movq 0x115b2(%rip), %rdi     # 0x17fd8
leaq 0x89b1(%rip), %rsi      # 0xf3de
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x8(%rsp), %rdi
callq 0x9908
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x6a56
jmp 0x6a56
jmp 0x6a56
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x9908
movq %rbx, %rdi
callq 0x2260