// File: /workspace/github_cpp_makefile_star2_O1/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 $0x78, %rsp
movl %edx, 0xc(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdi, %r15
movq 0xdda6(%rip), %rbx      # 0x1a1e8
testq %rbx, %rbx
sete %r13b
je 0xc48b
leaq 0x20(%rsp), %r12
cmpq %r15, 0x8(%rbx)
jne 0xc470
movups 0x28(%rbx), %xmm0
movaps %xmm0, 0x20(%rsp)
movq %r12, %rdi
movq 0x18(%rsp), %rsi
callq 0x12163
testb %al, %al
jne 0xc47e
movq (%rbx), %rbx
testq %rbx, %rbx
sete %r13b
jne 0xc450
jmp 0xc48b
movb $0x1, %bpl
testb $0x1, %r13b
je 0xc5d1
movq 0xdd56(%rip), %r12      # 0x1a1e8
testq %r12, %r12
setne %bpl
je 0xc5d1
leaq (%r15,%r15,2), %rax
shlq $0x4, %rax
movq %rax, 0x10(%rsp)
leaq 0x38(%rsp), %r14
cmpq %r15, 0x8(%r12)
jge 0xc5c0
movq %r15, %rax
xorl %edx, %edx
divq 0xded8(%rip)            # 0x1a3a0
movq 0xdec9(%rip), %rax      # 0x1a398
movq (%rax,%rdx,8), %rax
movq (%rax), %rcx
cmpq %r15, 0x8(%rcx)
je 0xc4e4
movq %rcx, %rax
movq (%rcx), %rcx
jmp 0xc4d6
movq (%rax), %rax
movl 0xc(%rsp), %ecx
cmpl %ecx, 0x10(%rax)
jle 0xc5c0
leaq 0xdc6d(%rip), %rax      # 0x1a168
movq (%rax), %rdi
addq 0x10(%rsp), %rdi
leaq 0x10(%r12), %r13
movq %r13, %rsi
callq 0x3bd6
testb %al, %al
je 0xc5c0
leaq 0xdc49(%rip), %rax      # 0x1a168
movq (%rax), %rsi
addq 0x10(%rsp), %rsi
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
callq 0x405e
movq %r14, %rdi
movq %r13, %rsi
callq 0x405e
leaq 0x20(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1074e
leaq 0x28(%r12), %rdi
movq %r13, %rsi
callq 0x62a2
movl %eax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xc57f
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0xc596
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0xc5ad
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
leaq 0x68(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x12163
testb %al, %al
jne 0xc5d1
movq (%r12), %r12
testq %r12, %r12
setne %bpl
jne 0xc4b1
andb $0x1, %bpl
movl %ebp, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xc605
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
jmp 0xc605
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0xc621
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
jmp 0xc621
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0xc638
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2240