// File: bonetblai[P]mdp-engine/ctp3/../engine/bdd_priority_queue.h
// Function: std::bdd_priority_queue<Online::Policy::AOT::node_t<state_t>*, Online::Policy::AOT::min_priority_t<state_t>, Online::Policy::AOT::max_priority_t<state_t>>::remove_from_min(unsigned int)
void remove_from_min(unsigned index) {
        if( !is_leaf_in_min(index) ) {
            unsigned leaf = min_subtree_leaf(index);
            assert(is_leaf_in_min(leaf));
            assert(!max_cmpfn_(max_array_[min_array_[index]]->element_, max_array_[min_array_[leaf]]->element_));
            assert(!min_cmpfn_(max_array_[min_array_[index]]->element_, max_array_[min_array_[leaf]]->element_));
            max_array_[min_array_[index]]->xref_ = leaf;
            max_array_[min_array_[leaf]]->xref_ = index;
            unsigned aux_index = min_array_[index];
            min_array_[index] = min_array_[leaf];
            min_array_[leaf] = aux_index;
            index = leaf;
        }

        if( index != min_size_ ) {
            push_min(index, min_array_[min_size_]);
        }
        --min_size_;
        assert(check_min());
    }

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movl %esi, 0x7c(%rsp)
movq 0x80(%rsp), %rdi
movq %rdi, 0x68(%rsp)
movl 0x7c(%rsp), %esi
callq 0x48dd0
testb $0x1, %al
jne 0x48ad6
movq 0x68(%rsp), %rdi
movl 0x7c(%rsp), %esi
callq 0x48df0
movq 0x68(%rsp), %rdi
movl %eax, 0x78(%rsp)
movl 0x78(%rsp), %esi
callq 0x48dd0
testb $0x1, %al
jne 0x48867
jmp 0x48869
jmp 0x48888
leaq 0x16a0e(%rip), %rdi     # 0x5f27e
leaq 0x15ed3(%rip), %rsi     # 0x5e74a
movl $0xe4, %edx
leaq 0x16a10(%rip), %rcx     # 0x5f293
callq 0x6220
movq 0x68(%rsp), %rdi
movq %rdi, %rax
addq $0x20, %rax
movq %rax, 0x50(%rsp)
addq $0x40, %rdi
movl 0x7c(%rsp), %eax
movl %eax, %esi
callq 0x465b0
movq 0x50(%rsp), %rdi
movl (%rax), %eax
movl %eax, %esi
callq 0x46590
movq 0x68(%rsp), %rdi
movq (%rax), %rax
movq (%rax), %rax
movq %rax, 0x60(%rsp)
movq %rdi, %rax
addq $0x20, %rax
movq %rax, 0x58(%rsp)
addq $0x40, %rdi
movl 0x78(%rsp), %eax
movl %eax, %esi
callq 0x465b0
movq 0x58(%rsp), %rdi
movl (%rax), %eax
movl %eax, %esi
callq 0x46590
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq (%rax), %rax
movq (%rax), %rdx
callq 0x47a60
xorb $-0x1, %al
testb $0x1, %al
jne 0x4890c
jmp 0x4890e
jmp 0x4892d
leaq 0x16ae1(%rip), %rdi     # 0x5f3f6
leaq 0x15e2e(%rip), %rsi     # 0x5e74a
movl $0xe5, %edx
leaq 0x1696b(%rip), %rcx     # 0x5f293
callq 0x6220
movq 0x68(%rsp), %rdi
movq %rdi, %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
movq %rdi, %rax
addq $0x20, %rax
movq %rax, 0x30(%rsp)
addq $0x40, %rdi
movl 0x7c(%rsp), %eax
movl %eax, %esi
callq 0x465b0
movq 0x30(%rsp), %rdi
movl (%rax), %eax
movl %eax, %esi
callq 0x46590
movq 0x68(%rsp), %rdi
movq (%rax), %rax
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq %rdi, %rax
addq $0x20, %rax
movq %rax, 0x38(%rsp)
addq $0x40, %rdi
movl 0x78(%rsp), %eax
movl %eax, %esi
callq 0x465b0
movq 0x38(%rsp), %rdi
movl (%rax), %eax
movl %eax, %esi
callq 0x46590
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq (%rax), %rax
movq (%rax), %rdx
callq 0x46a40
xorb $-0x1, %al
testb $0x1, %al
jne 0x489bd
jmp 0x489bf
jmp 0x489de
leaq 0x16a8d(%rip), %rdi     # 0x5f453
leaq 0x15d7d(%rip), %rsi     # 0x5e74a
movl $0xe6, %edx
leaq 0x168ba(%rip), %rcx     # 0x5f293
callq 0x6220
movq 0x68(%rsp), %rdi
movl 0x78(%rsp), %eax
movl %eax, 0x14(%rsp)
movq %rdi, %rax
addq $0x20, %rax
movq %rax, 0x8(%rsp)
addq $0x40, %rdi
movl 0x7c(%rsp), %eax
movl %eax, %esi
callq 0x465b0
movq 0x8(%rsp), %rdi
movl (%rax), %eax
movl %eax, %esi
callq 0x46590
movl 0x14(%rsp), %ecx
movq 0x68(%rsp), %rdi
movq (%rax), %rax
movl %ecx, 0x8(%rax)
movl 0x7c(%rsp), %eax
movl %eax, 0x24(%rsp)
movq %rdi, %rax
addq $0x20, %rax
movq %rax, 0x18(%rsp)
addq $0x40, %rdi
movl 0x78(%rsp), %eax
movl %eax, %esi
callq 0x465b0
movq 0x18(%rsp), %rdi
movl (%rax), %eax
movl %eax, %esi
callq 0x46590
movl 0x24(%rsp), %ecx
movq 0x68(%rsp), %rdi
movq (%rax), %rax
movl %ecx, 0x8(%rax)
addq $0x40, %rdi
movl 0x7c(%rsp), %eax
movl %eax, %esi
callq 0x465b0
movq 0x68(%rsp), %rdi
movl (%rax), %eax
movl %eax, 0x74(%rsp)
addq $0x40, %rdi
movl 0x78(%rsp), %eax
movl %eax, %esi
callq 0x465b0
movq 0x68(%rsp), %rdi
movl (%rax), %eax
movl %eax, 0x28(%rsp)
addq $0x40, %rdi
movl 0x7c(%rsp), %eax
movl %eax, %esi
callq 0x465b0
movl 0x28(%rsp), %ecx
movq 0x68(%rsp), %rdi
movl %ecx, (%rax)
movl 0x74(%rsp), %eax
movl %eax, 0x2c(%rsp)
addq $0x40, %rdi
movl 0x78(%rsp), %eax
movl %eax, %esi
callq 0x465b0
movl 0x2c(%rsp), %ecx
movl %ecx, (%rax)
movl 0x78(%rsp), %eax
movl %eax, 0x7c(%rsp)
movq 0x68(%rsp), %rcx
movl 0x7c(%rsp), %eax
cmpl 0x38(%rcx), %eax
je 0x48b12
movq 0x68(%rsp), %rax
movl 0x7c(%rsp), %ecx
movl %ecx, 0x4(%rsp)
movq %rax, %rdi
addq $0x40, %rdi
movl 0x38(%rax), %eax
movl %eax, %esi
callq 0x465b0
movq 0x68(%rsp), %rdi
movl 0x4(%rsp), %esi
movl (%rax), %edx
callq 0x48130
movq 0x68(%rsp), %rdi
movl 0x38(%rdi), %eax
addl $-0x1, %eax
movl %eax, 0x38(%rdi)
callq 0x46730
testb $0x1, %al
jne 0x48b2b
jmp 0x48b2d
jmp 0x48b4c
leaq 0x1697c(%rip), %rdi     # 0x5f4b0
leaq 0x15c0f(%rip), %rsi     # 0x5e74a
movl $0xf3, %edx
leaq 0x1674c(%rip), %rcx     # 0x5f293
callq 0x6220
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
nop