// File: /workspace/github_cpp_makefile_star2_O1/Kei18[P]pibt/./src/problem/imapf.cpp
// Function: IMAPF::update()
void IMAPF::update() {
  ++timestep;

  for (auto a : A) {
    auto tau = a->getTask();
    if (tau) {
      tau->update(a->getNode());

      if (tau->completed()) {
        ++taskSum;
        tau->setEndTime(timestep);
        a->releaseTask();
        openToClose(tau, T_OPEN, T_CLOSE);
        allocate(a);
        a->goalUpdated(true);
      } else {
        a->goalUpdated(false);
      }
    } else {
      allocate(a);
    }
    a->updateHist();
  }

  taskSumStr += std::to_string(taskSum) + ",";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
incl 0x8(%rdi)
movq 0x18(%rdi), %r14
movq 0x20(%rdi), %r15
cmpq %r15, %r14
je 0x220bb
leaq 0x48(%rbx), %rax
movq %rax, 0x20(%rsp)
movq (%r14), %r12
movq 0x18(%r12), %r13
testq %r13, %r13
je 0x22053
movq 0x8(%r12), %rsi
movq %r13, %rdi
callq 0x4756c
movq %r13, %rdi
callq 0x475e6
testb %al, %al
je 0x22060
incl 0x90(%rbx)
movl 0x8(%rbx), %esi
movq %r13, %rdi
callq 0x475f2
movq %r12, %rdi
callq 0x1934a
movq %r13, (%rsp)
movq 0x30(%rbx), %rdi
movq 0x38(%rbx), %rsi
movq %rsp, %rdx
callq 0x228dc
cmpq 0x38(%rbx), %rax
je 0x22095
movq %rax, %r13
movq %rax, %rbp
movq 0x50(%rbx), %rsi
cmpq 0x58(%rbx), %rsi
je 0x22068
movq (%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x50(%rbx)
jmp 0x22075
movq %rbx, %rdi
movq %r12, %rsi
callq 0x21dec
jmp 0x220a6
movb $0x0, 0x38(%r12)
jmp 0x220a6
movq 0x20(%rsp), %rdi
movq %rbp, %rdx
callq 0x18ffc
addq $0x8, %r13
movq 0x38(%rbx), %rdx
cmpq %rdx, %r13
je 0x22090
subq %r13, %rdx
movq %rbp, %rdi
movq %r13, %rsi
callq 0x65b0
addq $-0x8, 0x38(%rbx)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x21dec
movb $0x1, 0x38(%r12)
movq %r12, %rdi
callq 0x192f0
addq $0x8, %r14
cmpq %r15, %r14
jne 0x21fdc
movl 0x90(%rbx), %r13d
movl %r13d, %ebp
negl %ebp
cmovsl %r13d, %ebp
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0x2211f
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x22116
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x2211c
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x2211f
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x220e3
addl $-0x3, %r14d
jmp 0x2211f
addl $-0x2, %r14d
jmp 0x2211f
decl %r14d
shrl $0x1f, %r13d
movl %r13d, %esi
addl %r14d, %esi
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movl $0x2d, %edx
callq 0x6410
movq (%r15), %rdi
addq %r13, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0xb762
leaq 0x27374(%rip), %rsi     # 0x494d0
movq %r15, %rdi
callq 0x6690
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2218a
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x22191
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
addq $0xb0, %rbx
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x6120
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x221d7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6380
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x221ee
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6380
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x2221b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6380
jmp 0x2221b
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x22232
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6380
movq %rbx, %rdi
callq 0x6620