// 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>>::heapify_min(unsigned int)
void heapify_min(unsigned index) {
        assert((index > 0) && (index <= min_size_));
        unsigned left = index << 1, right = 1 + left, largest = 0;

        if( (left <= min_size_) &&
            min_cmpfn_(max_array_[min_array_[index]]->element_, max_array_[min_array_[left]]->element_) ) {
            largest = left;
        } else {
            largest = index;
        }
        if( (right <= min_size_) &&
            min_cmpfn_(max_array_[min_array_[largest]]->element_, max_array_[min_array_[right]]->element_) ) {
            largest = right;
        }

        if( largest != index ) {
            unsigned tmp = min_array_[largest];
            min_array_[largest] = min_array_[index];
            min_array_[index] = tmp;
            max_array_[min_array_[largest]]->xref_ = largest;
            max_array_[min_array_[index]]->xref_ = index;
            heapify_min(largest);
        }
    }

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movl %esi, 0x8c(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x70(%rsp)
xorl %eax, %eax
cmpl $0x0, 0x8c(%rsp)
movb %al, 0x7b(%rsp)
jbe 0x47b09
movq 0x70(%rsp), %rcx
movl 0x8c(%rsp), %eax
cmpl 0x38(%rcx), %eax
setbe %al
movb %al, 0x7b(%rsp)
movb 0x7b(%rsp), %al
testb $0x1, %al
jne 0x47b13
jmp 0x47b15
jmp 0x47b34
leaq 0x1718c(%rip), %rdi     # 0x5eca8
leaq 0x16c27(%rip), %rsi     # 0x5e74a
movl $0xf7, %edx
leaq 0x1719d(%rip), %rcx     # 0x5eccc
callq 0x6220
movq 0x70(%rsp), %rcx
movl 0x8c(%rsp), %eax
shll %eax
movl %eax, 0x88(%rsp)
movl 0x88(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x84(%rsp)
movl $0x0, 0x80(%rsp)
movl 0x88(%rsp), %eax
cmpl 0x38(%rcx), %eax
ja 0x47c19
movq 0x70(%rsp), %rdi
movq %rdi, %rax
addq $0x1, %rax
movq %rax, 0x60(%rsp)
movq %rdi, %rax
addq $0x20, %rax
movq %rax, 0x50(%rsp)
addq $0x40, %rdi
movl 0x8c(%rsp), %eax
movl %eax, %esi
callq 0x465b0
movq 0x50(%rsp), %rdi
movl (%rax), %eax
movl %eax, %esi
callq 0x46590
movq 0x70(%rsp), %rdi
movq (%rax), %rax
movq (%rax), %rax
movq %rax, 0x68(%rsp)
movq %rdi, %rax
addq $0x20, %rax
movq %rax, 0x58(%rsp)
addq $0x40, %rdi
movl 0x88(%rsp), %eax
movl %eax, %esi
callq 0x465b0
movq 0x58(%rsp), %rdi
movl (%rax), %eax
movl %eax, %esi
callq 0x46590
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq (%rax), %rax
movq (%rax), %rdx
callq 0x46a40
testb $0x1, %al
jne 0x47c09
jmp 0x47c19
movl 0x88(%rsp), %eax
movl %eax, 0x80(%rsp)
jmp 0x47c27
movl 0x8c(%rsp), %eax
movl %eax, 0x80(%rsp)
movq 0x70(%rsp), %rcx
movl 0x84(%rsp), %eax
cmpl 0x38(%rcx), %eax
ja 0x47cde
movq 0x70(%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 0x80(%rsp), %eax
movl %eax, %esi
callq 0x465b0
movq 0x30(%rsp), %rdi
movl (%rax), %eax
movl %eax, %esi
callq 0x46590
movq 0x70(%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 0x84(%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
testb $0x1, %al
jne 0x47cd0
jmp 0x47cde
movl 0x84(%rsp), %eax
movl %eax, 0x80(%rsp)
movl 0x80(%rsp), %eax
cmpl 0x8c(%rsp), %eax
je 0x47e0b
movq 0x70(%rsp), %rdi
addq $0x40, %rdi
movl 0x80(%rsp), %eax
movl %eax, %esi
callq 0x465b0
movq 0x70(%rsp), %rdi
movl (%rax), %eax
movl %eax, 0x7c(%rsp)
addq $0x40, %rdi
movl 0x8c(%rsp), %eax
movl %eax, %esi
callq 0x465b0
movq 0x70(%rsp), %rdi
movl (%rax), %eax
movl %eax, 0x8(%rsp)
addq $0x40, %rdi
movl 0x80(%rsp), %eax
movl %eax, %esi
callq 0x465b0
movl 0x8(%rsp), %ecx
movq 0x70(%rsp), %rdi
movl %ecx, (%rax)
movl 0x7c(%rsp), %eax
movl %eax, 0xc(%rsp)
addq $0x40, %rdi
movl 0x8c(%rsp), %eax
movl %eax, %esi
callq 0x465b0
movl 0xc(%rsp), %ecx
movq 0x70(%rsp), %rdi
movl %ecx, (%rax)
movl 0x80(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq %rdi, %rax
addq $0x20, %rax
movq %rax, 0x10(%rsp)
addq $0x40, %rdi
movl 0x80(%rsp), %eax
movl %eax, %esi
callq 0x465b0
movq 0x10(%rsp), %rdi
movl (%rax), %eax
movl %eax, %esi
callq 0x46590
movl 0x1c(%rsp), %ecx
movq 0x70(%rsp), %rdi
movq (%rax), %rax
movl %ecx, 0x8(%rax)
movl 0x8c(%rsp), %eax
movl %eax, 0x2c(%rsp)
movq %rdi, %rax
addq $0x20, %rax
movq %rax, 0x20(%rsp)
addq $0x40, %rdi
movl 0x8c(%rsp), %eax
movl %eax, %esi
callq 0x465b0
movq 0x20(%rsp), %rdi
movl (%rax), %eax
movl %eax, %esi
callq 0x46590
movl 0x2c(%rsp), %ecx
movq 0x70(%rsp), %rdi
movq (%rax), %rax
movl %ecx, 0x8(%rax)
movl 0x80(%rsp), %esi
callq 0x47ac0
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)