LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/tanakh[P]icfpc2015/main.cpp
// Function: select(std::vector<std::pair<std::pair<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::vector<double, std::allocator<double>>>, std::allocator<std::pair<std::pair<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::vector<double, std::allocator<double>>>>>&)
vector<double> select(vector<pair<pair<int, string>, vector<double>>> &ord)
{
  double total_adapt = 0;
  for (auto &c: ord)
    total_adapt += pow(log((double)c.first.first), 2);

  for (auto &c: ord) {
    double adp = pow(log((double)c.first.first), 2);
    if (genrand_real1() < (adp/total_adapt))
      return c.second;
    total_adapt -= adp;
  }

  return ord[genrand_int31() % ord.size()].second;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %r15
movq 0x8(%rsi), %r12
cmpq %r12, %r15
je 0x889a
xorpd %xmm2, %xmm2
movsd %xmm2, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl (%r15), %xmm0
callq 0x3290
movsd 0x8(%rsp), %xmm2
mulsd %xmm0, %xmm0
addsd %xmm0, %xmm2
addq $0x40, %r15
cmpq %r12, %r15
jne 0x87f5
movq (%r14), %r15
movq 0x8(%r14), %r12
cmpq %r12, %r15
je 0x889a
movsd %xmm2, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl (%r15), %xmm0
callq 0x3290
mulsd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
callq 0x3a53
movsd 0x10(%rsp), %xmm3
movsd 0x8(%rsp), %xmm2
movq %rax, %xmm0
punpckldq 0xc7aa(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0xc7b2(%rip), %xmm0     # 0x15020
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0xc81e(%rip), %xmm1     # 0x150a0
movapd %xmm3, %xmm0
divsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
ja 0x88db
subsd %xmm3, %xmm2
addq $0x40, %r15
jmp 0x8826
callq 0x3a53
shrq %rax
movq (%r14), %rcx
movq 0x8(%r14), %rsi
subq %rcx, %rsi
sarq $0x6, %rsi
xorl %edx, %edx
divq %rsi
shlq $0x6, %rdx
leaq (%rcx,%rdx), %r15
addq $0x28, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xc4a6
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
addq $0x28, %r15
jmp 0x88c1
// File: /workspace/github_cpp_makefile_star2_O3/tanakh[P]icfpc2015/./picojson.h
// Function: picojson::parse[abi:cxx11](picojson::value&, std::istream&)
inline std::string parse(value& out, std::istream& is) {
    std::string err;
    parse(out, std::istreambuf_iterator<char>(is.rdbuf()),
	  std::istreambuf_iterator<char>(), &err);
    return err;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movb %al, 0x10(%rdi)
movq (%rdx), %rcx
movq -0x18(%rcx), %rcx
movq 0xe8(%rdx,%rcx), %rcx
leaq 0x8(%rsp), %rdi
movq %rsi, (%rdi)
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, 0x8(%rsi)
movq %rax, 0x10(%rsi)
movl %ecx, 0x18(%rsi)
movl %ecx, 0x20(%rsi)
movb %al, 0x24(%rsi)
movl $0x1, 0x28(%rsi)
callq 0xd045
testb %al, %al
je 0xb96a
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl 0x38(%rsp), %ecx
leaq 0x9e2c(%rip), %rdx      # 0x157a1
leaq 0x40(%rsp), %r14
movl $0x40, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x3430
movq 0x8(%rbx), %r15
movq %r14, %rdi
callq 0x3130
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x3400
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0xd388
cmpl $-0x1, %eax
je 0xb958
cmpl $0xa, %eax
je 0xb958
cmpl $0x20, %eax
jl 0xb9ad
movsbl %al, %esi
movq %rbx, %rdi
callq 0x32c0
jmp 0xb9ad
jmp 0xb9d3
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0xb9e3
callq 0x32f0
movq %r14, %rdi
callq 0x34a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tanakh[P]icfpc2015/./picojson.h
// Function: picojson::value::operator=(picojson::value const&)
inline value& value::operator=(const value& x) {
    if (this != &x) {
      value t(x);
      swap(t);
    }
    return *this;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0xc2ab
movq %rsi, %r15
movl (%rsi), %ebp
cmpl $0x5, %ebp
je 0xc230
cmpl $0x4, %ebp
je 0xc215
cmpl $0x3, %ebp
jne 0xc24b
movl $0x20, %edi
callq 0x3310
movq %rax, %r14
movq 0x8(%r15), %rax
leaq 0x10(%r14), %rcx
movq %rcx, (%r14)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0xeed8
jmp 0xc24f
movl $0x18, %edi
callq 0x3310
movq %rax, %r14
movq 0x8(%r15), %rsi
movq %rax, %rdi
callq 0xcdd0
jmp 0xc24f
movl $0x30, %edi
callq 0x3310
movq %rax, %r14
movq 0x8(%r15), %rsi
movq %rax, %rdi
callq 0xca1c
jmp 0xc24f
movq 0x8(%r15), %r14
movl (%rbx), %eax
movl %ebp, (%rbx)
movq 0x8(%rbx), %r15
movq %r14, 0x8(%rbx)
cmpl $0x5, %eax
je 0xc291
cmpl $0x4, %eax
je 0xc282
cmpl $0x3, %eax
jne 0xc2ab
testq %r15, %r15
je 0xc2a0
movq (%r15), %rdi
leaq 0x10(%r15), %rax
cmpq %rax, %rdi
je 0xc2a3
callq 0x32f0
jmp 0xc2a3
testq %r15, %r15
je 0xc2a0
movq %r15, %rdi
callq 0xc80e
jmp 0xc2a3
testq %r15, %r15
je 0xc2a0
movq %r15, %rdi
callq 0xcfec
jmp 0xc2a3
xorl %r15d, %r15d
movq %r15, %rdi
callq 0x32f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc2bd
jmp 0xc2bd
movq %rax, %rbx
movq %r14, %rdi
callq 0x32f0
movq %rbx, %rdi
callq 0x34a0
// File: /workspace/github_cpp_makefile_star2_O3/tanakh[P]icfpc2015/./picojson.h
// Function: picojson::input<std::istreambuf_iterator<char, std::char_traits<char>>>::getc()
int getc() {
      if (ungot_) {
	ungot_ = false;
	return last_ch_;
      }
      if (cur_ == end_) {
	last_ch_ = -1;
	return -1;
      }
      if (last_ch_ == '\n') {
	line_++;
      }
      last_ch_ = *cur_ & 0xff;
      ++cur_;
      return last_ch_;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0x24(%rdi)
jne 0xd39e
movb $0x0, 0x24(%rbx)
movl 0x20(%rbx), %eax
jmp 0xd404
leaq 0x10(%rbx), %r14
movq %rbx, %rdi
callq 0xe332
cmpl $-0x1, %eax
sete %bpl
movq %r14, %rdi
callq 0xe332
cmpl $-0x1, %eax
setne %al
cmpb %al, %bpl
je 0xd3d2
movl $0xffffffff, 0x20(%rbx) # imm = 0xFFFFFFFF
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xd404
cmpl $0xa, 0x20(%rbx)
jne 0xd3db
incl 0x28(%rbx)
movq %rbx, %rdi
callq 0xe332
movzbl %al, %eax
movl %eax, 0x20(%rbx)
movq (%rbx), %rdi
movq 0x10(%rdi), %rcx
cmpq 0x18(%rdi), %rcx
jae 0xd409
incq %rcx
movq %rcx, 0x10(%rdi)
movl $0xffffffff, 0x8(%rbx)  # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %rbp
retq
movq (%rdi), %rax
callq *0x50(%rax)
movl 0x20(%rbx), %eax
jmp 0xd3fd
// File: /workspace/github_cpp_makefile_star2_O3/tanakh[P]icfpc2015/./picojson.h
// Function: picojson::input<std::istreambuf_iterator<char, std::char_traits<char>>>::skip_ws()
void skip_ws() {
      while (1) {
	int ch = getc();
	if (! (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r')) {
	  ungetc();
	  break;
	}
      }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movabsq $0x100002600, %r14      # imm = 0x100002600
movq %rbx, %rdi
callq 0xd388
cmpl $0x20, %eax
ja 0xd43a
movl %eax, %eax
btq %rax, %r14
jb 0xd425
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xd7d4
nop
// File: /workspace/github_cpp_makefile_star2_O3/tanakh[P]icfpc2015/./picojson.h
// Function: picojson::input<std::istreambuf_iterator<char, std::char_traits<char>>>::match(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool match(const std::string& pattern) {
      for (std::string::const_iterator pi(pattern.begin());
	   pi != pattern.end();
	   ++pi) {
	if (getc() != *pi) {
	  ungetc();
	  return false;
	}
      }
      return true;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movb $0x1, %bl
cmpq $0x0, 0x8(%rsi)
je 0xd490
movq %rsi, %r15
movq %rdi, %r14
movq (%rsi), %r12
movq %r14, %rdi
callq 0xd388
movsbl (%r12), %ecx
cmpl %ecx, %eax
jne 0xd486
incq %r12
movq (%r15), %rax
addq 0x8(%r15), %rax
cmpq %rax, %r12
jne 0xd464
jmp 0xd490
movq %r14, %rdi
callq 0xd7d4
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq 0x8(%rsi), %rax
subq (%rsi), %rax
sarq $0x2, %rax
movq 0x8(%rdx), %r13
subq (%rdx), %r13
sarq $0x2, %r13
cmpq %r13, %rax
cmovaq %rax, %r13
movq %rdi, %rbx
movslq %r13d, %r12
leaq 0x4(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x3(%rsp), %rcx
movq %r12, %rsi
callq 0x4098
movq (%r15), %rsi
movq (%r14), %rcx
testl %r12d, %r12d
jle 0x32ee
movq (%rbx), %rdi
movl %r13d, %r8d
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
xorl %r9d, %r9d
movl (%rsi,%r9,4), %eax
addl %ebp, %eax
subl (%rcx,%r9,4), %eax
cltd
idivl %ebp
movl %edx, (%rdi,%r9,4)
incq %r9
cmpq %r9, %r8
jne 0x32d5
movq 0x8(%r15), %rdx
subq %rsi, %rdx
movq 0x8(%r14), %rdi
subq %rcx, %rdi
movq %rdi, %rax
shrq $0x2, %rax
cmpq %rdi, %rdx
jbe 0x3325
cmpl %r13d, %eax
jge 0x3346
movq (%rbx), %rcx
cltq
movslq %r13d, %rdx
movl (%rsi,%rax,4), %edi
movl %edi, (%rcx,%rax,4)
incq %rax
cmpq %rax, %rdx
jne 0x3315
jmp 0x3346
cmpl %r13d, %eax
jge 0x3346
movq (%rbx), %rsi
movslq %eax, %rdi
movslq %r13d, %r8
movl %ebp, %eax
subl (%rcx,%rdi,4), %eax
cltd
idivl %ebp
movl %edx, (%rsi,%rdi,4)
incq %rdi
cmpq %rdi, %r8
jne 0x3333
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/other_fct.cpp
// Function: Add(std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, int)
vector<int> Add(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] = (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] = g[i];
	} 
    }
  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq 0x8(%rsi), %rax
subq (%rsi), %rax
sarq $0x2, %rax
movq 0x8(%rdx), %r13
subq (%rdx), %r13
sarq $0x2, %r13
cmpq %r13, %rax
cmovaq %rax, %r13
movq %rdi, %rbx
movslq %r13d, %r12
leaq 0x4(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x3(%rsp), %rcx
movq %r12, %rsi
callq 0x4098
movq (%r15), %rcx
movq (%r14), %rsi
testl %r12d, %r12d
jle 0x33d8
movq (%rbx), %rdi
movl %r13d, %r8d
andl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
xorl %r9d, %r9d
movl (%rsi,%r9,4), %eax
addl (%rcx,%r9,4), %eax
cltd
idivl %ebp
movl %edx, (%rdi,%r9,4)
incq %r9
cmpq %r9, %r8
jne 0x33c1
movq 0x8(%r15), %rdx
subq %rcx, %rdx
movq 0x8(%r14), %rdi
subq %rsi, %rdi
movq %rdi, %rax
shrq $0x2, %rax
cmpq %rdi, %rdx
jbe 0x340f
cmpl %r13d, %eax
jge 0x342a
movq (%rbx), %rdx
cltq
movslq %r13d, %rsi
movl (%rcx,%rax,4), %edi
movl %edi, (%rdx,%rax,4)
incq %rax
cmpq %rax, %rsi
jne 0x33ff
jmp 0x342a
cmpl %r13d, %eax
jge 0x342a
movq (%rbx), %rcx
cltq
movslq %r13d, %rdx
movl (%rsi,%rax,4), %edi
movl %edi, (%rcx,%rax,4)
incq %rax
cmpq %rax, %rdx
jne 0x341c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/other_fct.cpp
// Function: term_is_Zero(std::vector<int, std::allocator<int>>)
bool term_is_Zero(vector<int> term)
{
  for (int i = 0; i < term.size(); ++i)
    {
      if (term[i] > 0)
	{
	  return false;
	}
    }
  return true;
}

// Assembly:
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
subq %rcx, %rax
je 0x345f
sarq $0x2, %rax
cmpq $0x1, %rax
movq %rax, %rdx
adcq $0x0, %rdx
cmpl $0x0, (%rcx)
jle 0x3462
xorl %eax, %eax
retq
movb $0x1, %al
retq
movl $0x1, %edi
movq %rdi, %rsi
cmpq %rdi, %rdx
je 0x3479
leaq 0x1(%rsi), %rdi
cmpl $0x0, (%rcx,%rsi,4)
jle 0x3467
cmpq %rsi, %rax
setbe %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/other_fct.cpp
// Function: Tail(std::vector<int, std::allocator<int>> const&)
vector<int> Tail(const vector<int>& poly)
{
  vector<int> tail = poly;
  //improve this by LT extra!
  int LT_ = LT(poly);
  tail[LT_] = 0;
  return tail;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x4214
movq %r14, %rdi
callq 0x3480
cltq
movq (%rbx), %rcx
movl $0x0, (%rcx,%rax,4)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3536
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2180
movq %r14, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/other_fct.cpp
// Function: Create_binom_table(int, int)
int Inverse(int c, int p)//compute c^-1 in F_p, can do a table for large fields
{
  int c_copy = c;
  if (c == 0)
    {
      cout << "Next polynomial added to input set!" << endl;
      //cout << "Error! No inverse to 0 exists!" << endl;
      return 0;
    }
  for (int i = 1; i < p; ++i)
    {
      if (c == 1)
	{
	  return i;
	}
      else
	{
	  c = (c + c_copy)%p;
	}
    }
  cout << "Error, no inverse found! Sure that p is prime?" << endl;
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, (%rsp)
movq $0x0, 0x10(%rdi)
movl %esi, 0xc(%rsp)
testl %esi, %esi
js 0x371f
movl %edx, %ebp
xorl %r13d, %r13d
leaq 0x10(%rsp), %r15
leaq 0x30(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testl %ebp, %ebp
js 0x36ea
xorl %r14d, %r14d
movl %r13d, %ebx
cmpl %r14d, %ebx
movl %r14d, %ecx
cmovll %ebx, %ecx
movl %r13d, %eax
subl %r14d, %eax
jae 0x3677
xorl %eax, %eax
jmp 0x36ae
cmpl %r14d, %eax
cmovgel %r14d, %eax
testl %eax, %eax
jle 0x36a9
negl %ecx
movl $0x1, %edi
movl %r13d, %esi
movl $0x1, %eax
imull %esi, %eax
cltd
idivl %edi
leal (%rcx,%rdi), %edx
incl %edx
incl %edi
decl %esi
cmpl $0x1, %edx
jne 0x3691
cltq
jmp 0x36ae
movl $0x1, %eax
movq %rax, 0x30(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x36cd
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x36d8
movq %r15, %rdi
movq %r12, %rdx
callq 0x461e
leal 0x1(%r14), %eax
decl %ebx
cmpl %ebp, %r14d
movl %eax, %r14d
jne 0x3662
movq (%rsp), %rdi
movq %r15, %rsi
callq 0x4294
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x370d
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
leal 0x1(%r13), %eax
cmpl 0xc(%rsp), %r13d
movl %eax, %r13d
jne 0x3643
movq (%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3734
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x374e
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq (%rsp), %rdi
callq 0x3054
movq %r14, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/other_fct.cpp
// Function: binom(int, int)
int binom(int n, int k)   //from geeksforgeeks.org
{
  if (n < k)
    return 0;
  if (k < 0 || n < 0)
    return 0;
    int res = 1;  
  
    // Since C(n, k) = C(n, n-k)  
    if ( k > n - k )  
        k = n - k;  
  
    // Calculate value of  
    // [n * (n-1) *---* (n-k+1)] / [k * (k-1) *----* 1]  
    for (int i = 0; i < k; ++i)  
    {  
        res *= (n - i);  
        res /= (i + 1);  
    }  
  
    return res;  
}

// Assembly:
movl %edi, %ecx
subl %esi, %ecx
setl %dl
movl %esi, %eax
orl %edi, %eax
sets %r8b
xorl %eax, %eax
orb %dl, %r8b
jne 0x3601
cmpl %esi, %ecx
cmovll %ecx, %esi
testl %esi, %esi
jle 0x3602
negl %esi
movl $0x1, %ecx
movl $0x1, %eax
imull %edi, %eax
cltd
idivl %ecx
leal (%rsi,%rcx), %edx
incl %edx
incl %ecx
decl %edi
cmpl $0x1, %edx
jne 0x35ed
retq
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/other_fct.cpp
// Function: term_to_int(std::vector<int, std::allocator<int>>, int)
term_int term_to_int(term_vec term, int n) //computes entry in macaulay matrix
{
  //cout << "into term_to_int" << endl;
  //get degree first
  int d = 0;
  for (int i = 0; i < term.size(); ++i)
    {
      d += term[i];
    }
  //cout << "degree: " << d << endl;
  //int mac = binom(n+d-1,n);//get all polynomials with degrees up to d-1
  int mac = 0;
  if (n+d > 0)
    {
      mac += (binom_table[n+d-1])[n];//binom(n+d-1,n);//get all polynomials with degrees up to d-1
    }
  //cout << "after lower degrees: " << mac << endl;
  mac ++; //go to x_n^d

  for (int i = n-1; i >= 0; i--)
    {
      d -= term[i]; //get degree in x_1,...,x_i
      if (i+d > 0 && d > 0)
	{
	  mac += (binom_table[i+d-1])[d-1];//binom(i+d-1,d-1); //compute # of polynomials of degree d-1 in (x_1,...,x_i,x_i+1)
	  //mac += binom(i+d-1,d-1);
	}
    }
  //left here!
  return mac;
}

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rdx
subq %rax, %rdx
je 0x3788
sarq $0x2, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
xorl %edi, %edi
xorl %ecx, %ecx
addl (%rax,%rdi,4), %ecx
incq %rdi
cmpq %rdi, %rdx
jne 0x377b
jmp 0x378a
xorl %ecx, %ecx
movl %ecx, %edx
addl %esi, %edx
jle 0x37ad
movq 0x169f1(%rip), %rdi     # 0x1a188
movl %edx, %edx
leaq (%rdx,%rdx,2), %rdx
movslq %esi, %r8
movq -0x18(%rdi,%rdx,8), %rdx
movl (%rdx,%r8,8), %edx
incl %edx
jmp 0x37b2
movl $0x1, %edx
testl %esi, %esi
jle 0x37ed
movq 0x169cb(%rip), %rdi     # 0x1a188
addq $-0x18, %rdi
movl %esi, %esi
subl -0x4(%rax,%rsi,4), %ecx
jle 0x37e0
movl %ecx, %r8d
leal (%rsi,%rcx), %r9d
decl %r9d
leaq (%r9,%r9,2), %r9
movq (%rdi,%r9,8), %r9
addl -0x8(%r9,%r8,8), %edx
decq %rsi
leaq 0x1(%rsi), %r8
cmpq $0x1, %r8
ja 0x37c3
movslq %edx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/other_fct.cpp
// Function: create_degrees(int, int)
vector<int> create_degrees(int d, int n)
{
  vector<int> degrees = {};
  for (int i = 0; i < d; ++i)
    {
      degrees.push_back(lower_degrees(i,n));
    }
return degrees;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
testl %esi, %esi
jle 0x3856
movl %edx, %ebp
movl %esi, %r14d
xorl %r15d, %r15d
leaq 0xc(%rsp), %r12
movl %r15d, %edi
movl %ebp, %esi
callq 0x3885
movl %eax, 0xc(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3843
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x384e
movq %rbx, %rdi
movq %r12, %rdx
callq 0x4924
incl %r15d
cmpl %r15d, %r14d
jne 0x381f
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x387d
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2180
movq %r14, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/other_fct.cpp
// Function: lower_degrees(int, int)
int lower_degrees(int d, int n) //gets the number of x_1^(d-1) (largest term of degree d-1), is highly inefficient!
{
  //cout << "into lower degrees!" << endl;
  int number = 0;
  for (int i = 0; i < d; ++i)
    {
      number += binom(n+i-1,i);
    }
  return number;
}

// Assembly:
testl %edi, %edi
jle 0x38f5
pushq %rbp
pushq %rbx
leal -0x1(%rsi), %r8d
xorl %r9d, %r9d
movl %r8d, %r10d
xorl %ecx, %ecx
cmpl %r8d, %r9d
movl %r8d, %r11d
cmovll %r9d, %r11d
movl $0x0, %eax
testl %esi, %esi
jle 0x38e4
cmpl %r9d, %r8d
movl %r9d, %eax
cmovll %r8d, %eax
testl %eax, %eax
jle 0x38df
negl %r11d
movl $0x1, %ebx
movl %r10d, %ebp
movl $0x1, %eax
imull %ebp, %eax
cltd
idivl %ebx
decl %ebp
leal (%r11,%rbx), %edx
incl %edx
incl %ebx
cmpl $0x1, %edx
jne 0x38c8
jmp 0x38e4
movl $0x1, %eax
addl %eax, %ecx
incl %r9d
incl %r10d
cmpl %edi, %r9d
jne 0x3897
popq %rbx
popq %rbp
jmp 0x38f7
xorl %ecx, %ecx
movl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/other_fct.cpp
// Function: is_Smaller(std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&)
bool is_Smaller(const vector<int>& t, const vector<int>& u) //checks if t == u for t,u terms, order is degrevlex
{
  //cout << "is smaller called! " << endl;
  /*for (int i = 0; i < u.size(); ++i)
    {
      cout << u[i] << " ";
    }
  cout << endl;
  cout << "t:";
  for (int i = 0; i < t.size(); ++i)
    {
      cout << t[i] << " ";
    }
  cout << endl;
  */

  if (t.size() != u.size())
    {
      cout << "Error! wrong sizes in is_smaller" << endl;
      cout << "t.size: " << t.size() << endl;
      cout << "u.size: " << u.size() << endl;
    }
  int deg_t = 0;
  int deg_u = 0;
  for (int i = 0; i < u.size(); ++i)
    {
      deg_t += t[i];
      deg_u += u[i];
    }
   
  if (deg_t < deg_u)
    return true;
  if (deg_t > deg_u)
    return false;

  //case deg(t) = deg(u)
  int n = t.size();
  for (int i = n-1; i >= 0; --i)
    {
      if (t[i] > u[i])
	return true;
      if (t[i] < u[i])
	return false;
    }
  //case equal
  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
subq (%rdi), %rsi
movq (%r14), %rcx
movq 0x8(%r14), %rdx
movq %rdx, %rax
subq %rcx, %rax
cmpq %rax, %rsi
je 0x3a16
movq 0x166ac(%rip), %r15     # 0x19fd8
leaq 0xf831(%rip), %rsi      # 0x13164
movl $0x20, %edx
movq %r15, %rdi
callq 0x21a0
movq (%r15), %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 0xf817(%rip), %rsi      # 0x13185
movl $0x8, %edx
movq %r15, %rdi
callq 0x21a0
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq $0x2, %rsi
movq %r15, %rdi
callq 0x20e0
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 0xf7cf(%rip), %rsi      # 0x1318e
movl $0x8, %edx
movq %r15, %rdi
callq 0x21a0
movq 0x8(%r14), %rsi
subq (%r14), %rsi
sarq $0x2, %rsi
movq %r15, %rdi
callq 0x20e0
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
movq (%r14), %rcx
movq 0x8(%r14), %rdx
movq %rdx, %rax
subq %rcx, %rax
cmpq %rcx, %rdx
je 0x3a4d
sarq $0x2, %rax
cmpq $0x1, %rax
adcq $0x0, %rax
movq (%rbx), %rdx
xorl %esi, %esi
xorl %edi, %edi
xorl %r8d, %r8d
addl (%rdx,%rsi,4), %r8d
addl (%rcx,%rsi,4), %edi
incq %rsi
cmpq %rsi, %rax
jne 0x3a31
movb $0x1, %al
cmpl %edi, %r8d
jl 0x3a88
jle 0x3a4d
xorl %eax, %eax
jmp 0x3a88
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
shrq $0x2, %rdx
movl %edx, %esi
movl %esi, %edx
testl %esi, %esi
jle 0x3a80
movl -0x4(%rax,%rsi,4), %edi
movl -0x4(%rcx,%rsi,4), %r8d
cmpl %r8d, %edi
jg 0x3a7d
decq %rsi
cmpl %r8d, %edi
jge 0x3a5d
xorl %edi, %edi
jmp 0x3a80
movb $0x1, %dil
testl %edx, %edx
setle %al
orb %dil, %al
andb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/other_fct.cpp
// Function: is_Equal(std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&)
bool is_Equal(const vector<int>& t, const vector<int>& u) //checks if t < u for t,u terms, order is deglex
{
  if (t.size() != u.size())
    {
      cout << "Error! wrong sizes in is_equal!" << endl;
    }

  int n = t.size();
  for (int i = 0; i < t.size(); ++i)
    {
      if (t[i] != u[i])
	return false;
    }
  return true;//they are equal
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rdx
movq %rdx, %rcx
subq %rax, %rcx
movq 0x8(%rsi), %rsi
subq (%rbx), %rsi
cmpq %rsi, %rcx
je 0x3b09
movq %rdi, %r14
movq 0x16517(%rip), %r15     # 0x19fd8
leaq 0xf6cf(%rip), %rsi      # 0x13197
movl $0x1f, %edx
movq %r15, %rdi
callq 0x21a0
movq (%r15), %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
movq (%r14), %rax
movq 0x8(%r14), %rdx
movq %rdx, %rcx
subq %rax, %rcx
cmpq %rax, %rdx
je 0x3b4a
sarq $0x2, %rcx
cmpq $0x1, %rcx
movq %rcx, %rdx
adcq $0x0, %rdx
movq (%rbx), %rsi
movl (%rax), %edi
cmpl (%rsi), %edi
jne 0x3b4e
movl $0x1, %r8d
movq %r8, %rdi
cmpq %r8, %rdx
je 0x3b42
movl (%rax,%rdi,4), %r9d
leaq 0x1(%rdi), %r8
cmpl (%rsi,%rdi,4), %r9d
je 0x3b2c
cmpq %rdi, %rcx
setbe %al
jmp 0x3b50
movb $0x1, %al
jmp 0x3b50
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/other_fct.cpp
// Function: lcm(std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>)
void lcm(vector<int>& u, const vector<int>& LT_f, vector<int>& v, const vector<int> LT_g)
{
  int n = LT_f.size();
  u.assign(n, 0);
  v.assign(n, 0);
  for (int i = 0; i < n; ++i)
    {
      if (LT_f[i] > LT_g[i])
	{
	  v[i] = LT_f[i] - LT_g[i];
	}
      else
	{
	  u[i] = LT_g[i] - LT_f[i];
	}
    }
  return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
movq 0x8(%rsi), %rbp
subq (%rsi), %rbp
shrq $0x2, %rbp
movslq %ebp, %r13
xorl %r14d, %r14d
leaq 0x14(%rsp), %rdx
movl %r14d, (%rdx)
movq %r13, %rsi
callq 0x4a44
leaq 0x10(%rsp), %rdx
movl %r14d, (%rdx)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4a44
testl %r13d, %r13d
jle 0x3bea
movq (%r12), %rax
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
movq (%r15), %rdx
movq (%rbx), %rsi
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
xorl %edi, %edi
movl (%rax,%rdi,4), %r8d
subl (%rcx,%rdi,4), %r8d
movq %rdx, %r9
cmovgq %rsi, %r9
movl %r8d, %r10d
negl %r10d
cmovsl %r8d, %r10d
movl %r10d, (%r9,%rdi,4)
incq %rdi
cmpq %rdi, %rbp
jne 0x3bc5
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/other_fct.cpp
// Function: next_term(std::vector<int, std::allocator<int>>&)
void next_term(vector<int>& term) //degree revers lex, change if needed!
{
  //get degree
  int degree = 0;
  for (int i = 0; i < term.size(); ++i)
    {
      degree += term[i];
    }
  if (degree == 0) //term = 1
    {
      term[term.size()-1] = 1; //new term = x_n
      return;
    }
  //get frist non-zero entry which is not x_1
  int non_zero_idx = 0;
  for (int i = 1; i < term.size(); ++i)
    {
      if (term[i] > 0)
	{
	  non_zero_idx = i;
	  break;
	}
    }
  if (non_zero_idx == 0)//term = x_1^degree
    {
      term[0] = 0;
      term[term.size()-1] = degree+1; //new term = x_n^(degree+1)
      return;
    }
  int temp = term[0];
  term[0] = 0;
  term[non_zero_idx] --;
  term[non_zero_idx-1] ++;
  term[non_zero_idx-1] += temp;

      //}

  return;
}

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq %rcx, %rdx
subq %rax, %rdx
subq %rax, %rcx
je 0x4040
sarq $0x2, %rdx
cmpq $0x1, %rdx
movq %rdx, %rdi
adcq $0x0, %rdi
xorl %r8d, %r8d
xorl %esi, %esi
addl (%rax,%r8,4), %esi
incq %r8
cmpq %r8, %rdi
jne 0x400a
testl %esi, %esi
je 0x4040
cmpq $0x2, %rdx
jb 0x4033
movl $0x1, %edi
cmpl $0x0, (%rax,%rdi,4)
jg 0x4049
incq %rdi
cmpq %rdi, %rdx
jne 0x4025
movl $0x0, (%rax)
incl %esi
movl %esi, -0x4(%rax,%rcx)
retq
movl $0x1, -0x4(%rax,%rcx)
retq
movl (%rax), %ecx
movl $0x0, (%rax)
movl %edi, %edx
incl %ecx
movd %ecx, %xmm0
movq -0x4(%rax,%rdx,4), %xmm1
movaps 0xf08a(%rip), %xmm2     # 0x130f0
movss %xmm0, %xmm2            # xmm2 = xmm0[0],xmm2[1,2,3]
paddd %xmm1, %xmm2
movq %xmm2, -0x4(%rax,%rdx,4)
retq
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/lab_poly.cpp
// Function: spol(Lab_poly const&, Lab_poly const&)
Lab_poly spol(const Lab_poly& F, const Lab_poly& G)
{
  pair<int,vector<int>> u,v;
  //cout << "in spol-comp!" << endl;
  lcm(u,F.Get_LM(),v,G.Get_LM());
  return F.Multiply(u.second).Multiply(u.first,true) - G.Multiply(v.second).Multiply(v.first,true);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorl %eax, %eax
leaq 0x20(%rsp), %rdi
movl %eax, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq %rax, 0x18(%rdi)
movq %rsp, %rdx
movl %eax, (%rdx)
movups %xmm0, 0x8(%rdx)
movq %rax, 0x18(%rdx)
movq (%rsi), %rsi
movq (%r14), %rcx
callq 0x10a5e
leaq 0x28(%rsp), %rdx
leaq 0xb0(%rsp), %rdi
movq %r15, %rsi
callq 0x63c4
movl 0x20(%rsp), %edx
leaq 0xe8(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
movl $0x1, %ecx
callq 0x6442
leaq 0x8(%rsp), %rdx
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x63c4
movl (%rsp), %edx
leaq 0x78(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movl $0x1, %ecx
callq 0x6442
leaq 0xe8(%rsp), %rsi
leaq 0x78(%rsp), %rdx
movq %rbx, %rdi
callq 0x6512
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x52a4
movq 0x88(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x52bb
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x52d8
movq 0xf8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x52f5
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x530c
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x5323
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rax
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x5355
movq 0x88(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
jmp 0x5355
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x5371
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
jmp 0x5371
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x5393
movq 0xf8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
jmp 0x5393
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x53b7
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
jmp 0x53b7
jmp 0x53b4
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x53ce
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x53e5
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/lab_poly.cpp
// Function: poly(std::vector<Lab_poly, std::allocator<Lab_poly>> const&)
vector<polynomial> poly(const vector<Lab_poly>& G)
{
  vector<polynomial> basis = {};
  for (int g = 0; g < G.size(); ++g)
    {
      basis.emplace_back(G[g].Get_poly());
    }
  return basis;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %rsi
cmpq %rsi, 0x8(%r14)
je 0x5698
xorl %r15d, %r15d
movabsq $0x6db6db6db6db6db7, %r12 # imm = 0x6DB6DB6DB6DB6DB7
xorl %r13d, %r13d
addq %r15, %rsi
movq %rbx, %rdi
callq 0x65ea
incq %r13
movq (%r14), %rsi
movq 0x8(%r14), %rax
subq %rsi, %rax
sarq $0x3, %rax
imulq %r12, %rax
addq $0x38, %r15
cmpq %r13, %rax
ja 0x566f
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x312c
movq %r14, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/./lab_poly.h
// Function: Lab_poly::Multiply(std::vector<int, std::allocator<int>> const&) const
Lab_poly Multiply(const vector<int>& t) const//multiply with monomial in vector vector
  {
      /*
      cout << "multiply lab poly with term" << endl;
      cout << "polynomial:" << (this->_poly)*t;
      cout << "signature: " << (this->_signature)*t;
      */
    return Lab_poly((this->_poly).Multiply(t),(this->_signature).Multiply(t));
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x6780
addq $0x20, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6832
movq %rdx, %rcx
movq %rsp, %rsi
movq %rbx, %rdi
movl %eax, %edx
callq 0x50f8
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6413
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6439
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2240
nop
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/./lab_poly.h
// Function: Lab_poly::Multiply(int, bool) const
Lab_poly Multiply(const int t, bool is_constant) const //multiply with constant / term
  {
    if (is_constant) //mutliply with constant
      {
	return Lab_poly(this->_poly.Multiply(t,is_constant),this->_signature);
      }
    else //multiply with term
      {
	return Lab_poly(this->_poly.Multiply(t,is_constant),this->_signature.Multiply(t));
      }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
testl %ecx, %ecx
je 0x6490
leaq 0x30(%rsp), %r12
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl $0x1, %ecx
callq 0x6992
movl 0x20(%r14), %edx
movq 0x28(%r14), %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x50f8
movq 0x20(%rsp), %rdi
jmp 0x64c7
leaq 0x20(%r14), %r15
leaq 0x10(%rsp), %r12
movq %rsp, %rdi
movq %r14, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x6992
movslq %ebp, %rsi
movq %r15, %rdi
callq 0x6a5a
movq %rdx, %rcx
movq %rsp, %rsi
movq %rbx, %rdi
movl %eax, %edx
callq 0x50f8
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x64d8
movq (%r12), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
jmp 0x64f9
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x650a
movq (%r12), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/./lab_poly.h
// Function: Lab_poly::operator-(Lab_poly const&) const
Lab_poly operator-(const Lab_poly& G) const
  {
     
    //create new polynomial poly(F) - poly(G)
    polynomial new_poly = this->_poly - G._poly;
    //create new signature max(S(F),S(G))
    signature new_signature = max(this->_signature,G._signature);
    
    return Lab_poly(new_poly,new_signature);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6bd0
addq $0x20, %r15
addq $0x20, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x12773
movl (%rax), %ebp
movq 0x8(%rax), %r14
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x68a4
movl 0x20(%rsp), %eax
leaq 0x28(%rsp), %rsi
movl %eax, 0x18(%rsi)
movq %rbx, %rdi
movl %ebp, %edx
movq %r14, %rcx
callq 0x50f8
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x6587
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x659e
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x65cb
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
jmp 0x65cb
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x65e2
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/./poly.h
// Function: polynomial::Multiply(std::vector<int, std::allocator<int>> const&) const
polynomial Multiply(const term_vec& t) const//multiply with term t in vector formulation
  {
    vector<monomial> mons = this->_monomials;
    for (int i = 0; i < mons.size(); ++i)
      {
	//cout << "multiplication takes place!" << endl;
	mons[i] = mons[i].Multiply(t); //is_constant
	//determines whether term or constant multiplication
      }
    return polynomial(mons);
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq %rsp, %r15
movq %r15, %rdi
callq 0x68a4
movq (%r15), %rdi
cmpq %rdi, 0x8(%r15)
je 0x67df
xorl %r15d, %r15d
xorl %r12d, %r12d
addq %r15, %rdi
movq %r14, %rsi
callq 0x691c
movq (%rsp), %rcx
movq %rax, (%rcx,%r15)
movq %rdx, 0x8(%rcx,%r15)
incq %r12
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
subq %rdi, %rax
sarq $0x4, %rax
addq $0x10, %r15
cmpq %r12, %rax
ja 0x67ab
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x10944
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6800
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x6811
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x682a
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/./signature.h
// Function: signature::Multiply(std::vector<int, std::allocator<int>> const&) const
signature Multiply(const term_vec& t) const//multiply with term t in vector formulation
{
  term_int result = this->_term; //monomial in integer format
  for (int i = 0; i < t.size(); ++i)
	{
	  for (int j = 0; j < t[i]; ++j) //read up from mult table
	    {
	      result = table[result].second[i]; //multiply with x_i+1
	      // cout << "before term" << new_term[i] << endl;
	  //cout << "t[i]" << t[i] << endl;
	  //cout << "after term" << new_term[i] << endl;
	    }
	}
  return signature(result,this->_index);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rax
movq 0x8(%rdi), %rsi
movq (%rax), %rcx
movq 0x8(%rax), %rax
subq %rcx, %rax
je 0x688a
sarq $0x2, %rax
leaq 0x1391b(%rip), %rdx     # 0x1a170
movq (%rdx), %rdx
cmpq $0x1, %rax
adcq $0x0, %rax
xorl %r8d, %r8d
movl (%rcx,%r8,4), %r9d
testl %r9d, %r9d
jle 0x6882
leaq (%rsi,%rsi,2), %rsi
shlq $0x4, %rsi
movq 0x18(%rdx,%rsi), %rsi
movq (%rsi,%r8,8), %rsi
decl %r9d
jne 0x686c
incq %r8
cmpq %rax, %r8
jne 0x6863
movl (%rdi), %edx
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x1275c
movl (%rbx), %eax
movq 0x8(%rbx), %rdx
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/./poly.h
// Function: monomial::Multiply(std::vector<int, std::allocator<int>> const&) const
monomial Multiply(const term_vec& t) const//multiply with term t in vector formulation
{
  /*
  cout << "new multiplication!" << endl;
  cout << "t in multply: " << endl;
  for (int i = 0; i < t.size(); ++i)
    {
      cout << t[i] << ",";
    }
  cout << endl;
  */
  int result = this->_term; //monomial in integer format
  for (int i = 0; i < t.size(); ++i)
	{
	  for (int j = 0; j < t[i]; ++j) //read up from mult table
	    {
	      //cout << "result before multiplication: " << result <<  endl;
	      result = table[result].second[i]; //multiply with x_i+1
	      //cout << "result after multiplication: " << result << endl;
	  // cout << "before term" << new_term[i] << endl;
	  //cout << "t[i]" << t[i] << endl;
	      //	  new_term[i] += t_vec[i];
	  //cout << "after term" << new_term[i] << endl;
	    }
	}
  return monomial(result,this->_coeff,this->_p);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl (%rdi), %eax
movq (%rsi), %rcx
movq 0x8(%rsi), %rdx
subq %rcx, %rdx
je 0x6971
sarq $0x2, %rdx
leaq 0x13836(%rip), %rsi     # 0x1a170
movq (%rsi), %rsi
cmpq $0x1, %rdx
adcq $0x0, %rdx
xorl %r8d, %r8d
movl (%rcx,%r8,4), %r9d
testl %r9d, %r9d
jle 0x6969
cltq
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
movq 0x18(%rsi,%rax), %rax
movl (%rax,%r8,8), %eax
decl %r9d
jne 0x6951
incq %r8
cmpq %rdx, %r8
jne 0x6948
movslq %eax, %rsi
movl 0x8(%rdi), %edx
movl 0xc(%rdi), %ecx
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x10848
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/./poly.h
// Function: polynomial::Multiply(int, bool) const
polynomial Multiply(const int t, bool is_constant) const//multiply with constant / term
      {
	//if (is_constant)
	//{
	    vector<monomial> mons = this->_monomials;
	    for (int i = 0; i < mons.size(); ++i)
	      {
		mons[i] = mons[i].Multiply(t,is_constant); //is_constant
		//determines whether term or constant multiplication
	      }
	    return polynomial(mons);
	    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %ecx, %ebp
movl %edx, %r14d
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x68a4
movq (%r15), %rdi
cmpq %rdi, 0x8(%r15)
je 0x6a01
movslq %r14d, %r14
xorl %r15d, %r15d
movzbl %bpl, %ebp
xorl %r12d, %r12d
addq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x6ad6
movq 0x8(%rsp), %rcx
movq %rax, (%rcx,%r15)
movq %rdx, 0x8(%rcx,%r15)
incq %r12
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rax
subq %rdi, %rax
sarq $0x4, %rax
addq $0x10, %r15
cmpq %r12, %rax
ja 0x69c9
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x10944
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6a25
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6a37
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6a51
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2240
nop
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/./poly.h
// Function: monomial::Multiply(long, bool) const
monomial Multiply(const term_int t, bool is_constant) const//multiply with constant / term, can remove table for constant case
{
  if (is_constant)//multiply with constant
    {
      return monomial(this->_term,(this->_coeff*t) % (this->_p),this->_p);
    }
  else {
    term_vec t_vec = table[t].first; //get vector repr of t
    term_int result = this->_term; //monomial in integer format
    for (int i = 0; i < t_vec.size(); ++i)
      {
	for (int j = 0; j < t_vec[i]; ++j) //read up from mult table
	  {
	    
	    result = table[result].second[i]; //multiply with x_i+1
	  }
      }
    return monomial(result,this->_coeff,this->_p);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
testl %edx, %edx
je 0x6b0c
movq (%rbx), %r8
movslq 0x8(%rbx), %rax
imulq %rsi, %rax
movslq 0xc(%rbx), %rcx
cqto
idivq %rcx
leaq 0x8(%rsp), %rdi
movq %r8, %rsi
callq 0x10848
jmp 0x6b99
leaq 0x1365d(%rip), %r15     # 0x1a170
leaq (%rsi,%rsi,2), %rsi
shlq $0x4, %rsi
addq (%r15), %rsi
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x4214
movq (%rbx), %rsi
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
je 0x6b72
sarq $0x2, %rcx
movq (%r15), %rdx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %edi, %edi
movl (%rax,%rdi,4), %r8d
testl %r8d, %r8d
jle 0x6b6a
leaq (%rsi,%rsi,2), %rsi
shlq $0x4, %rsi
movq 0x18(%rdx,%rsi), %rsi
movq (%rsi,%rdi,8), %rsi
decl %r8d
jne 0x6b54
incq %rdi
cmpq %rcx, %rdi
jne 0x6b4b
movl 0x8(%rbx), %edx
movl 0xc(%rbx), %ecx
leaq 0x8(%rsp), %rdi
callq 0x10848
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x6b99
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rdx
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x6bc7
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2240
nop
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/./poly.h
// Function: polynomial::operator-(polynomial const&) const
polynomial operator-(const polynomial& rhs) const
  {
    
    //construct -rhs and call f + -rhs
    vector<monomial> minus_mon_rhs = {};
    for (int i = 0; i < rhs.Get_monomials().size(); ++i)
      {
	minus_mon_rhs.emplace_back(monomial(rhs.Get_monomials()[i].Get_term(),(rhs.Get_p()-rhs.Get_monomials()[i].Get_coeff()) % rhs.Get_p(),rhs.Get_monomials()[i].Get_p()));
      }
    polynomial minus_rhs(minus_mon_rhs);
    
    //cout << "succesful until subtraction!" << endl;
    return (*this + minus_rhs);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, 0x20(%rsp)
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq (%rdx), %rcx
cmpq %rcx, 0x8(%rdx)
je 0x6c6f
movq %rdx, %r15
movl $0xc, %ebp
xorl %r14d, %r14d
leaq 0x28(%rsp), %r12
movq %rsp, %r13
movq -0xc(%rcx,%rbp), %rsi
movl 0xc(%rcx), %edi
movl %edi, %eax
subl -0x4(%rcx,%rbp), %eax
cltd
idivl %edi
movl (%rcx,%rbp), %ecx
movq %r12, %rdi
callq 0x10848
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x6c4a
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x8(%rsp)
jmp 0x6c55
movq %r13, %rdi
movq %r12, %rdx
callq 0x7138
incq %r14
movq (%r15), %rcx
movq 0x8(%r15), %rax
subq %rcx, %rax
sarq $0x4, %rax
addq $0x10, %rbp
cmpq %r14, %rax
ja 0x6c12
leaq 0x28(%rsp), %rdi
movq %rsp, %rsi
callq 0x10944
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
callq 0x6d0c
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x6ca5
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6cbb
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x6cee
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
jmp 0x6cee
jmp 0x6ceb
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6d04
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/M5GB.cpp
// Function: Update_syz(Lab_poly const&)
void Update_syz(const Lab_poly& Spol)
{
  for (auto& it : LT_G) 
    {
      //cout << "update syz" << Spol.Get_sign().Multiply(it.first) << it.second.Multiply(Spol.Get_LT())<< endl;
      signature temp = max(Spol.Get_sign().Multiply(it.first),it.second.Multiply(Spol.Get_LT()));
      H[temp.Get_index()].emplace_back(temp.Get_term());
    }
  return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x10bb3(%rip), %rbp     # 0x1a268
testq %rbp, %rbp
je 0x9756
movq %rdi, %rbx
leaq 0x20(%rdi), %r14
leaq 0x8(%rsp), %r15
leaq 0x18(%rsp), %r12
movq 0x8(%rbp), %rsi
movq %r14, %rdi
callq 0x6a5a
movl %eax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
leaq 0x10(%rbp), %r13
movq %rbx, %rdi
callq 0xcb20
movslq %eax, %rsi
movq %r13, %rdi
callq 0x6a5a
movl %eax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x12773
movslq (%rax), %rcx
movq 0x8(%rax), %rax
movq 0x10d33(%rip), %rdx     # 0x1a450
leaq (%rcx,%rcx,2), %rcx
leaq (%rdx,%rcx,8), %rdi
movq %rax, 0x8(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x9741
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x9749
movq %r15, %rdx
callq 0x461e
movq (%rbp), %rbp
testq %rbp, %rbp
jne 0x96cf
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq