// File: EverybodyHops[P]Permutations/./permutations.hpp
// Function: increase_carry_order<int>::increase_carry_order(std::vector<int, std::allocator<int>>)
increase_carry_order(vector<T> init_per){
        this->ordered_element = init_per;
        sort(this->ordered_element.begin(), this->ordered_element.end());

        //permutation to media number
        vector<int> t;
        int temp;
        for(int i = 1; i < this->ordered_element.size(); i++){
            temp = 0;
            for(int j = init_per.size() - 1; j >= 0; j--){
                if(init_per[j] < this->ordered_element[i]){
                    temp += 1;
                }
                if(init_per[j] == this->ordered_element[i]){
                    break;
                }
            }
            t.push_back(temp);
        }
        this->media_num = new increase_carry(t);

        #ifdef DEBUG
            this->media_num->print_num();
        #endif
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rsi, -0x80(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x7cf0
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
leaq 0xd1e7(%rip), %rax      # 0x12d00
movq %rax, (%rdi)
addq $0x10, %rdi
callq 0x7d20
jmp 0x5b27
movq -0x88(%rbp), %rdi
addq $0x10, %rdi
movq %rdi, -0x90(%rbp)
callq 0x3290
movq -0x90(%rbp), %rdi
movq %rax, -0x28(%rbp)
callq 0x32c0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x7f70
jmp 0x5b61
leaq -0x48(%rbp), %rdi
callq 0x3130
movl $0x1, -0x50(%rbp)
movq -0x88(%rbp), %rdi
movslq -0x50(%rbp), %rax
movq %rax, -0x98(%rbp)
addq $0x10, %rdi
callq 0x30f0
movq %rax, %rcx
movq -0x98(%rbp), %rax
cmpq %rcx, %rax
jae 0x5c8a
movq -0x80(%rbp), %rdi
movl $0x0, -0x4c(%rbp)
callq 0x30f0
subq $0x1, %rax
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
jl 0x5c5a
movq -0x80(%rbp), %rdi
movslq -0x54(%rbp), %rsi
callq 0x3110
movq -0x88(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x9c(%rbp)
addq $0x10, %rdi
movslq -0x50(%rbp), %rsi
callq 0x3110
movq %rax, %rcx
movl -0x9c(%rbp), %eax
cmpl (%rcx), %eax
jge 0x5c12
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x5c12
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x5d35
movq -0x80(%rbp), %rdi
movslq -0x54(%rbp), %rsi
callq 0x3110
movq -0x88(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0xa0(%rbp)
addq $0x10, %rdi
movslq -0x50(%rbp), %rsi
callq 0x3110
movq %rax, %rcx
movl -0xa0(%rbp), %eax
cmpl (%rcx), %eax
jne 0x5c4a
jmp 0x5c5a
jmp 0x5c4c
movl -0x54(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x5bb6
leaq -0x48(%rbp), %rdi
leaq -0x4c(%rbp), %rsi
callq 0x3150
jmp 0x5c69
jmp 0x5c6b
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x5b71
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x5d2c
movl $0x30, %edi
callq 0x20f0
movq %rax, -0xa8(%rbp)
jmp 0x5c9d
movb $0x1, -0x71(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x2f70
jmp 0x5cb0
movq -0xa8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x2cf0
jmp 0x5cc2
movq -0x88(%rbp), %rax
movq -0xa8(%rbp), %rcx
movb $0x0, -0x71(%rbp)
movq %rcx, 0x8(%rax)
leaq -0x70(%rbp), %rdi
callq 0x3090
leaq -0x48(%rbp), %rdi
callq 0x3090
addq $0xb0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x5d16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x3090
testb $0x1, -0x71(%rbp)
jne 0x5d1e
jmp 0x5d2a
movq -0xa8(%rbp), %rdi
callq 0x20d0
jmp 0x5d2c
leaq -0x48(%rbp), %rdi
callq 0x3090
movq -0x88(%rbp), %rdi
callq 0x7970
movq -0x18(%rbp), %rdi
callq 0x21b0
nopw (%rax,%rax)