// File: EverybodyHops[P]Permutations/./permutations.hpp
// Function: dic_order<int>::get_permutation()
vector<T> get_permutation() override{
        int len = this->ordered_element.size();
        bool *can_use = new bool[len];
        for(int i = 0; i < this->ordered_element.size(); i++){
            can_use[i] = true;
        }

        vector<int> m_num = this->media_num->get_num();
        m_num.insert(m_num.begin(), 0);
        
        vector<T> res;
        int temp;
        for(int i = m_num.size() - 1; i >= 0; i--){
            temp = m_num[i];
            for(int j = 0; j < len; j++){
                if(can_use[j]){
                    if(temp == 0){
                        res.push_back(this->ordered_element[j]);
                        can_use[j] = false;
                        break; 
                    }else{
                        temp -= 1;
                    }
                }
            }
        }
        delete[] can_use;
        return res;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x98(%rbp)
movq %rdi, %rax
movq %rax, -0x90(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x88(%rbp)
addq $0x10, %rdi
callq 0x30f0
movl %eax, -0x14(%rbp)
movslq -0x14(%rbp), %rdi
movq $-0x1, %rax
cmpq $0x0, %rdi
cmovlq %rax, %rdi
callq 0x2030
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x88(%rbp), %rdi
movslq -0x24(%rbp), %rax
movq %rax, -0xa0(%rbp)
addq $0x10, %rdi
callq 0x30f0
movq %rax, %rcx
movq -0xa0(%rbp), %rax
cmpq %rcx, %rax
jae 0x58ff
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movb $0x1, (%rax,%rcx)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x58be
movq -0x88(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x2350
movq -0xb0(%rbp), %rdi
callq 0x3290
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x9680
movq -0xb0(%rbp), %rdi
movl $0x0, -0x54(%rbp)
movq -0x48(%rbp), %rsi
leaq -0x54(%rbp), %rdx
callq 0x9640
movq %rax, -0xa8(%rbp)
jmp 0x595b
movq -0x98(%rbp), %rdi
movq -0xa8(%rbp), %rax
movq %rax, -0x70(%rbp)
movb $0x0, -0x71(%rbp)
callq 0x3130
leaq -0x40(%rbp), %rdi
callq 0x30f0
subq $0x1, %rax
movl %eax, -0x7c(%rbp)
cmpl $0x0, -0x7c(%rbp)
jl 0x5a52
movslq -0x7c(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x3110
movl (%rax), %eax
movl %eax, -0x78(%rbp)
movl $0x0, -0x80(%rbp)
movl -0x80(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x5a42
movq -0x20(%rbp), %rax
movslq -0x80(%rbp), %rcx
testb $0x1, (%rax,%rcx)
je 0x5a32
cmpl $0x0, -0x78(%rbp)
jne 0x5a27
movq -0x88(%rbp), %rdi
addq $0x10, %rdi
movslq -0x80(%rbp), %rsi
callq 0x3110
movq -0x98(%rbp), %rdi
movq %rax, %rsi
callq 0x3150
jmp 0x59ee
movq -0x20(%rbp), %rax
movslq -0x80(%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x5a42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5a9e
movq -0x98(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
callq 0x3090
jmp 0x5a9e
movl -0x78(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x5a32
jmp 0x5a34
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x59a9
jmp 0x5a44
movl -0x7c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x5986
movq -0x20(%rbp), %rax
movq %rax, -0xb8(%rbp)
cmpq $0x0, %rax
je 0x5a6f
movq -0xb8(%rbp), %rdi
callq 0x2130
movb $0x1, -0x71(%rbp)
testb $0x1, -0x71(%rbp)
jne 0x5a85
movq -0x98(%rbp), %rdi
callq 0x3090
leaq -0x40(%rbp), %rdi
callq 0x3090
movq -0x90(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
leaq -0x40(%rbp), %rdi
callq 0x3090
movq -0x60(%rbp), %rdi
callq 0x21b0