// File: /workspace/github_cpp_makefile_star2_O3/Kei18[P]pibt/./src/solver/tp.cpp
// Function: TP::getExecutableTask(Agent*, int)
std::vector<Task*> TP::getExecutableTask(Agent* a, int timestep) {
  std::vector<Task*> tasks;
  Nodes gs;
  bool notContained;
  Node* v = a->getNode();
  Node* u;

  for (auto tau : P->getT()) {
    notContained = true;
    for (auto path : paths) {
      u = path[path.size() - 1];  // end of the path
      if (u == v) continue;
      gs = tau->getG();
      notContained &= std::none_of(gs.begin(), gs.end(),
                                   [u] (Node* k) { return u == k; });
      if (!notContained) break;
    }
    if (notContained) tasks.push_back(tau);
  }

  return tasks;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbp
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x8(%rdx), %rax
movq %rax, 0x80(%rsp)
movq %rsi, 0x70(%rsp)
movq 0x10(%rsi), %rsi
addq $0x30, %rsi
leaq 0x50(%rsp), %rdi
callq 0xb5dc
movq 0x50(%rsp), %r14
movq 0x58(%rsp), %rax
movq %rax, 0x68(%rsp)
cmpq %rax, %r14
je 0x405ce
xorl %ebx, %ebx
xorl %r13d, %r13d
movq %rbp, 0x18(%rsp)
movq (%r14), %rax
movq %rax, 0x10(%rsp)
movq 0x70(%rsp), %rax
movq 0x88(%rax), %r15
movq 0x90(%rax), %rax
movq %rax, 0x88(%rsp)
cmpq %rax, %r15
je 0x40592
movq %r14, 0x78(%rsp)
movb $0x1, 0xf(%rsp)
movq %rbx, %r12
leaq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0x19aae
movq 0x40(%rsp), %rax
movq -0x8(%rax), %r14
cmpq 0x80(%rsp), %r14
je 0x404c8
movq 0x10(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x19aae
movq 0x20(%rsp), %rbx
movq 0x28(%rsp), %rbp
movq 0x30(%rsp), %rax
movq %rax, 0x90(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
testq %r12, %r12
je 0x40479
subq %r12, %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x6380
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x40479
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x6380
movq %rbp, %rsi
subq %rbx, %rsi
movq %rsi, %rdx
sarq $0x5, %rdx
testq %rdx, %rdx
jle 0x404da
andq $-0x20, %rsi
movq %rsi, %rax
addq %rbx, %rax
incq %rdx
leaq 0x10(%rbx), %rcx
cmpq %r14, -0x10(%rcx)
je 0x40514
cmpq %r14, -0x8(%rcx)
je 0x4051a
cmpq %r14, (%rcx)
je 0x40524
cmpq %r14, 0x8(%rcx)
je 0x40520
decq %rdx
addq $0x20, %rcx
cmpq $0x1, %rdx
jg 0x4049c
movq %rbp, %rsi
subq %rax, %rsi
jmp 0x404dd
movq 0x38(%rsp), %rdi
movl $0x5, %ebp
movq %r12, %rbx
movq %r13, %r14
jmp 0x40550
movq %rbx, %rax
sarq $0x3, %rsi
cmpq $0x1, %rsi
je 0x40508
cmpq $0x2, %rsi
je 0x404ff
movq %rbp, %rcx
cmpq $0x3, %rsi
jne 0x40524
cmpq %r14, (%rax)
je 0x4050f
addq $0x8, %rax
cmpq %r14, (%rax)
je 0x4050f
addq $0x8, %rax
cmpq %r14, (%rax)
cmovneq %rbp, %rax
movq %rax, %rcx
jmp 0x40524
addq $-0x10, %rcx
jmp 0x40524
addq $-0x8, %rcx
jmp 0x40524
addq $0x8, %rcx
cmpq %rbp, %rcx
sete %al
movb 0xf(%rsp), %cl
andb %al, %cl
movb %cl, 0xf(%rsp)
movl %ecx, %eax
xorb $0x1, %al
movzbl %al, %ebp
shll $0x2, %ebp
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
movq 0x90(%rsp), %r14
je 0x4055d
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x6380
cmpl $0x5, %ebp
je 0x40566
testl %ebp, %ebp
jne 0x4057e
addq $0x18, %r15
movq %rbx, %r12
movq %r14, %r13
cmpq 0x88(%rsp), %r15
jne 0x403f4
movq %r14, %r13
testb $0x1, 0xf(%rsp)
movq 0x18(%rsp), %rbp
movq 0x78(%rsp), %r14
je 0x405b8
movq 0x8(%rbp), %rsi
cmpq 0x10(%rbp), %rsi
je 0x405ab
movq 0x10(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rbp)
jmp 0x405b8
movq %rbp, %rdi
leaq 0x10(%rsp), %rdx
callq 0x19048
addq $0x8, %r14
cmpq 0x68(%rsp), %r14
jne 0x403bb
movq 0x50(%rsp), %r14
jmp 0x405d3
xorl %r13d, %r13d
xorl %ebx, %ebx
testq %r14, %r14
je 0x405e8
movq 0x60(%rsp), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x6380
testq %rbx, %rbx
je 0x405fb
subq %rbx, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6380
movq %rbp, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x4066b
movq %rax, %r14
movq %rbx, %r12
jmp 0x4063c
movq %rax, %r14
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x4063c
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x6380
jmp 0x4063c
movq %rax, %r14
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
movq 0x18(%rsp), %rbp
je 0x40658
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x6380
testq %r12, %r12
je 0x4066b
subq %r12, %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x6380
movq (%rbp), %rdi
testq %rdi, %rdi
je 0x40680
movq 0x10(%rbp), %rsi
subq %rdi, %rsi
callq 0x6380
movq %r14, %rdi
callq 0x6620