// File: /workspace/github_cpp_makefile_star2_O3/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
subq $0x18, %rsp
movq %rdi, %rbx
movq 0xe0(%rdi), %rax
cmpq %rax, 0xe8(%rdi)
je 0x3908e
movq %rax, 0xe8(%rbx)
movq 0x80(%rbx), %r15
movq 0x88(%rbx), %r12
cmpq %r12, %r15
je 0x390e4
movq (%r15), %r14
movq 0x128(%rbx), %rax
cmpq %rax, 0x130(%rbx)
je 0x390bb
movq %rax, 0x130(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x393fe
testl %eax, %eax
jne 0x390de
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3978e
cmpl $0x1, %eax
je 0x393e8
addq $0x8, %r15
jmp 0x3909c
movq 0x20(%rbx), %r15
movq 0x28(%rbx), %r12
cmpq %r12, %r15
je 0x39213
movq (%r15), %r14
movq 0x128(%rbx), %rax
cmpq %rax, 0x130(%rbx)
je 0x3910f
movq %rax, 0x130(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x39b22
testl %eax, %eax
jne 0x3912b
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x39b7c
addq $0x8, %r15
cmpq %r12, %r15
jne 0x390f5
movq 0x20(%rbx), %r13
movq 0x28(%rbx), %rbp
cmpq %rbp, %r13
je 0x39213
leaq 0xf8(%rbx), %r14
leaq 0x8(%rsp), %r15
leaq 0x10(%rsp), %r12
movq (%r13), %rax
movq %rax, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movq 0xf8(%rbx), %rdi
movq 0x100(%rbx), %rsi
movq %r15, %rdx
callq 0x388d5
movq 0x100(%rbx), %rsi
movq 0x10(%rsp), %rcx
movq 0x8(%rcx), %rdx
movslq (%rcx), %rdi
movq 0x148(%rbx), %r8
movq (%r8,%rdi,8), %rdi
cmpq %rsi, %rax
je 0x391e0
cmpq %rdi, %rdx
je 0x39206
movq 0xf8(%rbx), %rdi
movq %r12, %rdx
callq 0x388d5
leaq 0x8(%rax), %rsi
movq 0x100(%rbx), %rdx
cmpq %rdx, %rsi
je 0x391d3
subq %rsi, %rdx
movq %rax, %rdi
callq 0x65b0
movq 0x100(%rbx), %rdx
addq $-0x8, %rdx
movq %rdx, 0x100(%rbx)
jmp 0x39206
cmpq %rdi, %rdx
jne 0x39206
cmpq 0x108(%rbx), %rax
je 0x391fb
movq %rcx, (%rsi)
addq $0x8, 0x100(%rbx)
jmp 0x39206
movq %r14, %rdi
movq %r12, %rdx
callq 0x18f28
addq $0x8, %r13
cmpq %rbp, %r13
jne 0x39156
movq 0x98(%rbx), %r15
movq 0xa0(%rbx), %r12
cmpq %r12, %r15
je 0x3928f
movq 0x70(%rbx), %rdx
leaq 0x8(%rsp), %r14
movq (%r15), %rax
movq %rax, 0x8(%rsp)
movq 0x68(%rbx), %rdi
movq %rdx, %rsi
movq %r14, %rdx
callq 0x388d5
movq 0x70(%rbx), %rdx
cmpq %rdx, %rax
je 0x3926f
leaq 0x8(%rax), %rsi
cmpq %rdx, %rsi
je 0x39267
subq %rsi, %rdx
movq %rax, %rdi
callq 0x65b0
movq 0x70(%rbx), %rdx
addq $-0x8, %rdx
movq %rdx, 0x70(%rbx)
addq $0x8, %r15
cmpq %r12, %r15
jne 0x3922f
movq 0x98(%rbx), %rax
cmpq %rax, 0xa0(%rbx)
je 0x3928f
movq %rax, 0xa0(%rbx)
movq 0xb0(%rbx), %r12
movq 0xb8(%rbx), %r13
cmpq %r13, %r12
je 0x39304
leaq 0x68(%rbx), %r14
leaq 0x8(%rsp), %r15
movq (%r12), %rsi
movq %rsi, 0x8(%rsp)
movq %rbx, %rdi
callq 0x39bf2
testb %al, %al
jne 0x392e4
movq 0x70(%rbx), %rsi
cmpq 0x78(%rbx), %rsi
je 0x392d9
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x70(%rbx)
jmp 0x392e4
movq %r14, %rdi
movq %r15, %rdx
callq 0x18f28
addq $0x8, %r12
cmpq %r13, %r12
jne 0x392ab
movq 0xb0(%rbx), %rax
cmpq %rax, 0xb8(%rbx)
je 0x39304
movq %rax, 0xb8(%rbx)
movq 0xc8(%rbx), %r12
movq 0xd0(%rbx), %r13
cmpq %r13, %r12
je 0x393ef
leaq 0x8(%rsp), %r14
movq (%r12), %rax
movq %rax, 0x8(%rsp)
movq 0x80(%rbx), %rdi
movq 0x88(%rbx), %rsi
movq %r14, %rdx
callq 0x3da56
leaq 0x8(%rax), %rsi
movq 0x88(%rbx), %rdx
cmpq %rdx, %rsi
je 0x39361
subq %rsi, %rdx
movq %rax, %rdi
callq 0x65b0
movq 0x88(%rbx), %rdx
addq $-0x8, %rdx
movq %rdx, 0x88(%rbx)
movq 0x8(%rsp), %r15
testq %r15, %r15
je 0x393b5
movq 0x60(%r15), %rdi
testq %rdi, %rdi
je 0x3938b
movq 0x70(%r15), %rsi
subq %rdi, %rsi
callq 0x6380
movq 0x28(%r15), %rdi
testq %rdi, %rdi
je 0x393a0
movq 0x38(%r15), %rsi
subq %rdi, %rsi
callq 0x6380
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x393b5
movq 0x18(%r15), %rsi
subq %rdi, %rsi
callq 0x6380
movl $0x80, %esi
movq %r15, %rdi
callq 0x6380
addq $0x8, %r12
cmpq %r13, %r12
jne 0x39320
movq 0xc8(%rbx), %rax
cmpq %rax, 0xd0(%rbx)
je 0x393ef
movq %rax, 0xd0(%rbx)
jmp 0x393ef
movb $0x0, 0x140(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq