// File: /workspace/github_cpp_makefile_star2_O2/Kei18[P]pibt/./src/solver/pps.cpp
// Function: PPS::update()
void PPS::update() {
  M.clear();  // l.3

  for (auto s : swapers) {  // l.4
    H.clear();
    if (CHECK_SWAPER(s) == CHECK::VALID) {  // check valid s
      if (SWAP(s) == RES::FAIL) {  // l.5
        status = false;
        return;
      }
    }
  }

  for (auto p : A) {  // l.6, push
    H.clear();
    if (CHECK_PUSHER(p) == CHECK::VALID) {
      PUSH(p, false);  // l.8
    }
  }

  // goal check
  for (auto a : A) {
    if (inArray(a, U)) {
      if (CHECK_GOAL(a) == CHECK::INVALID) {
        auto itrU = std::find(U.begin(), U.end(), a);
        U.erase(itrU);
      }
    } else {
      if (CHECK_GOAL(a) == CHECK::VALID) {
        U.push_back(a);  //l.9
      }
    }
  }

  // change pushers & swapers
  for (auto a : pusherToSwaper) {
    auto itr = std::find(pushers.begin(), pushers.end(), a);
    if (itr != pushers.end()) pushers.erase(itr);
  }
  pusherToSwaper.clear();

  for (auto a : swaperToPusher) {
    if (!inS(a)) pushers.push_back(a);  // check other's registration
  }
  swaperToPusher.clear();

  for (auto s : doneSwapers) {
    auto itr = std::find(swapers.begin(), swapers.end(), s);
    swapers.erase(itr);
    delete s;
  }
  doneSwapers.clear();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xe0(%rdi), %rax
cmpq %rax, 0xe8(%rdi)
je 0x2e277
movq %rax, 0xe8(%rbx)
leaq 0x80(%rbx), %r14
movq 0x80(%rbx), %r12
movq 0x88(%rbx), %r13
cmpq %r13, %r12
je 0x2e2d5
movq (%r12), %r15
movq 0x128(%rbx), %rax
cmpq %rax, 0x130(%rbx)
je 0x2e2ac
movq %rax, 0x130(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2e4e2
testl %eax, %eax
jne 0x2e2cf
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2e74e
cmpl $0x1, %eax
je 0x2e4cc
addq $0x8, %r12
jmp 0x2e28c
movq 0x20(%rbx), %r12
movq 0x28(%rbx), %r13
cmpq %r13, %r12
je 0x2e31f
movq (%r12), %r15
movq 0x128(%rbx), %rax
cmpq %rax, 0x130(%rbx)
je 0x2e2fd
movq %rax, 0x130(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2e9d4
testl %eax, %eax
jne 0x2e319
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x2ea10
addq $0x8, %r12
jmp 0x2e2dd
movq 0x20(%rbx), %r13
movq 0x28(%rbx), %rbp
leaq 0xf8(%rbx), %r15
movq %rsp, %r12
cmpq %rbp, %r13
je 0x2e39e
movq (%r13), %rdi
movq %rdi, (%rsp)
movq %r15, %rsi
callq 0x2ea4f
movq (%rsp), %rdx
movq 0x8(%rdx), %rcx
movslq (%rdx), %rdx
movq 0x148(%rbx), %rsi
movq (%rsi,%rdx,8), %rdx
testb %al, %al
je 0x2e388
cmpq %rdx, %rcx
je 0x2e398
movq 0xf8(%rbx), %rdi
movq 0x100(%rbx), %rsi
movq %r12, %rdx
callq 0x2dcba
movq %r15, %rdi
movq %rax, %rsi
callq 0x2d97c
jmp 0x2e398
cmpq %rdx, %rcx
jne 0x2e398
movq %r15, %rdi
movq %r12, %rsi
callq 0x930e
addq $0x8, %r13
jmp 0x2e331
movq 0x98(%rbx), %r13
movq 0xa0(%rbx), %rbp
leaq 0x68(%rbx), %r15
movq %rsp, %r12
cmpq %rbp, %r13
je 0x2e3e7
movq (%r13), %rax
movq %rax, (%rsp)
movq 0x68(%rbx), %rdi
movq 0x70(%rbx), %rsi
movq %r12, %rdx
callq 0x2dcba
cmpq 0x70(%rbx), %rax
je 0x2e3e1
movq %r15, %rdi
movq %rax, %rsi
callq 0x2d97c
addq $0x8, %r13
jmp 0x2e3b3
movq 0x98(%rbx), %rax
cmpq %rax, 0xa0(%rbx)
je 0x2e3fe
movq %rax, 0xa0(%rbx)
movq 0xb0(%rbx), %r13
movq 0xb8(%rbx), %rbp
movq %rsp, %r12
cmpq %rbp, %r13
je 0x2e439
movq (%r13), %rsi
movq %rsi, (%rsp)
movq %rbx, %rdi
callq 0x2ea90
testb %al, %al
jne 0x2e433
movq %r15, %rdi
movq %r12, %rsi
callq 0x930e
addq $0x8, %r13
jmp 0x2e40f
movq 0xb0(%rbx), %rax
cmpq %rax, 0xb8(%rbx)
je 0x2e450
movq %rax, 0xb8(%rbx)
movq 0xc8(%rbx), %r13
movq 0xd0(%rbx), %rbp
movq %rsp, %r15
cmpq %rbp, %r13
je 0x2e4b3
movq (%r13), %rax
movq %rax, (%rsp)
movq 0x80(%rbx), %rdi
movq 0x88(%rbx), %rsi
movq %r15, %rdx
callq 0x31b96
movq %r14, %rdi
movq %rax, %rsi
callq 0x3158a
movq (%rsp), %r12
testq %r12, %r12
je 0x2e4a0
movq %r12, %rdi
callq 0x315c4
movl $0x80, %esi
movq %r12, %rdi
callq 0x63c0
addq $0x8, %r13
jmp 0x2e461
movq 0xc8(%rbx), %rax
cmpq %rax, 0xd0(%rbx)
je 0x2e4d3
movq %rax, 0xd0(%rbx)
jmp 0x2e4d3
movb $0x0, 0x140(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq