// File: /workspace/github_cpp_makefile_star2_O3/manschga[P]M5GB/M5GB.cpp
// Function: Check_TGFT(long, signature const&, int)
bool Check_TGFT(const term_int t_, const signature& T, const int generation)//check only from generation to end
{
  for (auto& it : G_conv) 
    {
      //*
      if (t_ == it.first)
	{
	  signature test = it.second.second;//if divisor divides term, then term = divisor*remainderv);//check: needed whole multiple?
	  if (Smaller_sign(test,T)) //check if S(vG) < T
	    {
	      return true;
	    }
	}
    }
  for (auto& it : G_conv)
    {
      if (t_ > it.first && Generations_G.find(t_)->second > generation)
	{
	  if (isDivisible(table[t_].first,it.second.first))
	    {
	      signature test = it.second.second.Multiply(get_remainder(table[t_].first, it.second.first));//if divisor divides term, then term = divisor*remainderv);//check: needed whole multiple?
	      if (Smaller_sign(test,T)) //check if S(vG) < T
		{
		  return true;
		}
	    }
	}
    }
  return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, 0x8(%rsp)
movq 0xd906(%rip), %r13      # 0x1a1f8
testq %r13, %r13
je 0xca57
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x10(%rsp), %r12
cmpq %r15, 0x8(%r13)
jne 0xc92b
movups 0x28(%r13), %xmm0
movaps %xmm0, 0x10(%rsp)
movq %r12, %rdi
movq %r14, %rsi
callq 0x12797
testb %al, %al
jne 0xca5b
movq (%r13), %r13
testq %r13, %r13
jne 0xc908
movq 0xd8bd(%rip), %r13      # 0x1a1f8
testq %r13, %r13
je 0xca57
leaq 0x28(%rsp), %r12
movq 0x8(%rsp), %rax
cmpq 0x8(%r13), %rax
jle 0xca4a
leaq 0xda49(%rip), %rdi      # 0x1a3a8
leaq 0x8(%rsp), %rsi
callq 0xedd2
cmpl %ebx, 0x10(%rax)
jle 0xca4a
movq 0x8(%rsp), %rax
leaq (%rax,%rax,2), %rdi
shlq $0x4, %rdi
leaq 0xd7ea(%rip), %rax      # 0x1a170
addq (%rax), %rdi
leaq 0x10(%r13), %rbp
movq %rbp, %rsi
callq 0x3bf9
testb %al, %al
je 0xca4a
movq 0x8(%rsp), %rax
leaq (%rax,%rax,2), %rsi
shlq $0x4, %rsi
leaq 0xd7bf(%rip), %rax      # 0x1a170
addq (%rax), %rsi
leaq 0x40(%rsp), %r15
movq %r15, %rdi
callq 0x4214
movq %r12, %rdi
movq %rbp, %rsi
callq 0x4214
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x10d0f
leaq 0x28(%r13), %rdi
movq %rbp, %rsi
callq 0x6832
movl %eax, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xca0b
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xca22
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xca39
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
leaq 0x58(%rsp), %rdi
movq %r14, %rsi
callq 0x12797
testb %al, %al
jne 0xca5b
movq (%r13), %r13
testq %r13, %r13
jne 0xc949
xorl %eax, %eax
jmp 0xca5d
movb $0x1, %al
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xca8b
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
jmp 0xca8b
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xcaa7
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
jmp 0xcaa7
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xcabe
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2240