// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/M5GB.cpp
// Function: Add_field_eq(std::vector<polynomial, std::allocator<polynomial>>&, int)
void Add_field_eq(vector<polynomial>& system,int n)
{
  //assume field_eq are not in system yet!
  for (int i = 0; i < n; ++i)
    {
      //add x_i^p - x_i
      vector<int> x_p(n,0);
      x_p[i] = p;
      monomial one(0,1,p); //one-polynomial
      monomial mon_xp = one.Multiply(x_p);//multiply with x^p
      monomial minus_one(0,p-1,p); //-1-polynomial
      vector<int> x_1(n,0);//or n+1?
      x_1[i] = 1;
      monomial mon_x1 = minus_one.Multiply(x_1);

      //cout << "field_eq_i: "<< polynomial({mon_xp,mon_x1}) << endl;
      system.emplace_back(polynomial({mon_xp,mon_x1}));
    }
  //reverse(system.begin(),system.end());
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, 0x38(%rsp)
testl %esi, %esi
jle 0xba98
movl %esi, %esi
xorl %ebp, %ebp
leaq 0x58(%rsp), %rbx
leaq 0x18(%rsp), %rdx
leaq 0xb8(%rsp), %r15
movq %rsi, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
movq %rbx, %rdi
leaq 0x70(%rsp), %rcx
callq 0x4098
movl 0xe876(%rip), %ecx      # 0x1a1b4
movq 0x58(%rsp), %rax
movl %ecx, (%rax,%rbp,4)
movq %r15, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x10848
movq %r15, %r12
movq %r15, %rdi
movq %rbx, %r13
movq %rbx, %rsi
callq 0x691c
movq %rax, %rbx
movq %rdx, %r15
movl 0xe842(%rip), %ecx      # 0x1a1b4
leal -0x1(%rcx), %edx
leaq 0xa8(%rsp), %rdi
xorl %esi, %esi
callq 0x10848
movl $0x0, 0x18(%rsp)
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movq 0x10(%rsp), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x70(%rsp), %rcx
callq 0x4098
movq 0x40(%rsp), %rax
movl $0x1, (%rax,%rbp,4)
leaq 0xa8(%rsp), %rdi
movq %r14, %rsi
callq 0x691c
movq %rbx, 0x70(%rsp)
movq %r15, 0x78(%rsp)
movq %rax, 0x80(%rsp)
movq %rdx, 0x88(%rsp)
movl $0x2, %edx
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
leaq 0x70(%rsp), %rsi
leaq 0xf(%rsp), %rcx
callq 0x7392
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x10944
movq %r13, %rbx
movq %r12, %r15
movq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0xcc94
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0xba37
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0xba54
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xba6b
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0xba82
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
incq %rbp
movq 0x10(%rsp), %rsi
cmpq %rbp, %rsi
leaq 0x18(%rsp), %rdx
jne 0xb923
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xbab0
jmp 0xbab0
jmp 0xbab0
movq %rax, %rbx
jmp 0xbb0f
jmp 0xbab7
movq %rax, %rbx
jmp 0xbaf8
movq %rax, %rbx
jmp 0xbadb
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0xbadb
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0xbaf8
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xbb0f
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0xbb26
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2240