// File: manschga[P]M5GB/other_fct.cpp
// Function: Subtract(std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, int)
vector<int> Subtract(const vector<int>& f, const vector<int>& g,int p)//computes f-g over F_p
{
  int max_size = max(f.size(),g.size());
  int min_size = max(f.size(),g.size());
  vector<int> result(max_size,0);
  for (int i = 0; i < min_size; ++i)
    {
      result[i] = (p+f[i] - g[i]) % p;
    }
  if (f.size() > g.size())
    {
      for (int i = g.size(); i < max_size; ++i)
	{
	  result[i] = f[i];
	} 
    }
  else
    {
       for (int i = g.size(); i < max_size; ++i)
	{
	  result[i] = (p-g[i]) % p;
	} 
    }
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x88(%rbp)
movq %rdi, %rax
movq %rax, -0x90(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3260
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3260
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x5ef0
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3260
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3260
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x5ef0
movl (%rax), %eax
movl %eax, -0x34(%rbp)
movb $0x0, -0x49(%rbp)
movslq -0x20(%rbp), %rax
movq %rax, -0x80(%rbp)
movl $0x0, -0x50(%rbp)
leaq -0x51(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x5f30
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rcx
leaq -0x50(%rbp), %rdx
callq 0x5f50
jmp 0x4a8d
leaq -0x51(%rbp), %rdi
callq 0x3d50
movl $0x0, -0x68(%rbp)
movl -0x68(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x4b2f
movl -0x1c(%rbp), %eax
movl %eax, -0x9c(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x68(%rbp), %rsi
callq 0x5fd0
movq %rax, %rcx
movl -0x9c(%rbp), %eax
addl (%rcx), %eax
movl %eax, -0x98(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x68(%rbp), %rsi
callq 0x5fd0
movq -0x88(%rbp), %rdi
movq %rax, %rcx
movl -0x98(%rbp), %eax
subl (%rcx), %eax
cltd
idivl -0x1c(%rbp)
movl %edx, -0x94(%rbp)
movslq -0x68(%rbp), %rsi
callq 0x3280
movl -0x94(%rbp), %edx
movl %edx, (%rax)
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x4a9d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x51(%rbp), %rdi
callq 0x3d50
jmp 0x4c2f
movq -0x10(%rbp), %rdi
callq 0x3260
movq %rax, -0xa8(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3260
movq %rax, %rcx
movq -0xa8(%rbp), %rax
cmpq %rcx, %rax
jbe 0x4ba5
movq -0x18(%rbp), %rdi
callq 0x3260
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x4ba3
movq -0x10(%rbp), %rdi
movslq -0x6c(%rbp), %rsi
callq 0x5fd0
movq -0x88(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0xac(%rbp)
movslq -0x6c(%rbp), %rsi
callq 0x3280
movl -0xac(%rbp), %ecx
movl %ecx, (%rax)
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x4b63
jmp 0x4c09
movq -0x18(%rbp), %rdi
callq 0x3260
movl %eax, -0x70(%rbp)
movl -0x70(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x4c07
movl -0x1c(%rbp), %eax
movl %eax, -0xb4(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x70(%rbp), %rsi
callq 0x5fd0
movq -0x88(%rbp), %rdi
movq %rax, %rcx
movl -0xb4(%rbp), %eax
subl (%rcx), %eax
cltd
idivl -0x1c(%rbp)
movl %edx, -0xb0(%rbp)
movslq -0x70(%rbp), %rsi
callq 0x3280
movl -0xb0(%rbp), %edx
movl %edx, (%rax)
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
jmp 0x4bb1
jmp 0x4c09
movb $0x1, -0x49(%rbp)
testb $0x1, -0x49(%rbp)
jne 0x4c1f
movq -0x88(%rbp), %rdi
callq 0x3b70
movq -0x90(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x2300
nopl (%rax,%rax)