// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x10, %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
leaq 0x50f9(%rip), %rax      # 0x8d08
movq %rax, (%rbx)
callq 0x4e5a
movq 0x10(%rbx), %r15
movq 0x18(%rbx), %r12
cmpq %r12, %r15
je 0x3c5b
movq %r12, %rax
subq %r15, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x4f40
movq %r15, %rdi
movq %r12, %rsi
callq 0x5021
movq 0x10(%rbx), %r15
movq 0x18(%rbx), %rax
jmp 0x3c5e
movq %r15, %rax
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
movq %rax, %rcx
subq %r15, %rcx
cmpq $0x5, %rcx
jb 0x3d13
movl $0x1, %r12d
leaq -0x2c(%rbp), %r13
movl $0x0, -0x2c(%rbp)
movq (%r14), %rcx
movq 0x8(%r14), %rdx
subq %rcx, %rdx
shrq $0x2, %rdx
movl %edx, %esi
decq %rsi
xorl %edx, %edx
testl %esi, %esi
js 0x3cd3
movl %esi, %r9d
andl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
movl (%rcx,%r9,4), %edi
movl (%r15,%r12,4), %r8d
cmpl %r8d, %edi
jge 0x3ccb
incl %edx
movl %edx, -0x2c(%rbp)
movl (%rcx,%r9,4), %edi
movl (%r15,%r12,4), %r8d
decq %rsi
cmpl %r8d, %edi
jne 0x3ca3
movq -0x48(%rbp), %rsi
cmpq -0x40(%rbp), %rsi
je 0x3ce9
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x48(%rbp)
jmp 0x3cfd
leaq -0x50(%rbp), %rdi
movq %r13, %rdx
callq 0x2d22
movq 0x10(%rbx), %r15
movq 0x18(%rbx), %rax
incq %r12
movq %rax, %rcx
subq %r15, %rcx
sarq $0x2, %rcx
cmpq %r12, %rcx
ja 0x3c87
movl $0x30, %edi
callq 0x20e0
movq %rax, %r15
leaq -0x68(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x2c56
leaq -0x68(%rbp), %rsi
movq %r15, %rdi
callq 0x29a2
movq %r15, 0x8(%rbx)
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x3d4b
callq 0x20c0
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x3d59
callq 0x20c0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x3d7e
callq 0x20c0
jmp 0x3d7e
movq %rax, %r14
movq %r15, %rdi
callq 0x20c0
jmp 0x3d92
jmp 0x3d8f
movq %rax, %r14
jmp 0x3da0
movq %rax, %r14
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x3da0
callq 0x20c0
movq %rbx, %rdi
callq 0x4d84
movq %r14, %rdi
callq 0x2140