// File: /workspace/github_cpp_makefile_star2_O2/EverybodyHops[P]Permutations/test.cpp
// Function: main
int main(){
    vector<int> now_per = {8,3,6,7,4,5,2,1};
    //vector<int> now_per = {1,2,3,4,5,6,7,8};
    dic_order<int> a(now_per);
    a.print_media_carry();
    a.pre_n(2020);
    a.print_media_num();
    print_vector<int>(a.get_permutation());
    a.next_n(2020);
    a.print_media_num();
    print_vector<int>(a.get_permutation());

    increase_carry_order<int> b(now_per);
    b.print_media_carry();
    b.pre_n(2020);
    b.print_media_num();
    print_vector<int>(b.get_permutation());
    b.next_n(2020);
    b.print_media_num();
    print_vector<int>(b.get_permutation());

    decrease_carry_order<int> c(now_per);
    c.print_media_carry();
    c.pre_n(2020);
    c.print_media_num();
    print_vector<int>(c.get_permutation());
    c.next_n(2020);
    c.print_media_num();
    print_vector<int>(c.get_permutation());

    ortho_transposition<int> d(now_per);
    d.print_media_carry();
    d.pre_n(2020);
    d.print_media_num();
    print_vector<int>(d.get_permutation());
    d.next_n(2020);
    d.print_media_num();
    print_vector<int>(d.get_permutation());
    
    vector<char> cp = {'a', 'b', 'c', 'd'};
    ortho_transposition<char> e(cp);
    print_vector<char>(e.get_permutation());
    int t = 1;
    while(e.next_one())
    {
        //e.print_media_num();
        print_vector<char>(e.get_permutation());
        t += 1;
    }
    cout << t << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
movups 0x3249(%rip), %xmm0     # 0x5078
leaq -0xf0(%rbp), %rsi
movaps %xmm0, 0x10(%rsi)
movups 0x3227(%rip), %xmm0     # 0x5068
movaps %xmm0, (%rsi)
leaq -0xb0(%rbp), %rbx
pushq $0x8
popq %rdx
leaq -0x298(%rbp), %rcx
movq %rbx, %rdi
callq 0x241c
leaq -0x258(%rbp), %rdi
movq %rbx, %rsi
callq 0x19d0
leaq -0x98(%rbp), %rdi
leaq -0x258(%rbp), %rsi
callq 0x2452
leaq -0x258(%rbp), %rdi
callq 0x1a6e
movq -0x90(%rbp), %rdi
callq 0x1352
movq -0x90(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x16fa
movq -0x90(%rbp), %rdi
callq 0x12d6
leaq -0x240(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x25fe
leaq -0x240(%rbp), %rdi
xorl %esi, %esi
callq 0x2596
leaq -0x240(%rbp), %rdi
callq 0x1a6e
movq -0x90(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x16a6
movq -0x90(%rbp), %rdi
callq 0x12d6
leaq -0x228(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x25fe
leaq -0x228(%rbp), %rdi
xorl %esi, %esi
callq 0x2596
leaq -0x228(%rbp), %rdi
callq 0x1a6e
leaq -0x210(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x19d0
leaq -0x70(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x2730
leaq -0x210(%rbp), %rdi
callq 0x1a6e
movq -0x68(%rbp), %rdi
callq 0x1352
movq -0x68(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x16fa
movq -0x68(%rbp), %rdi
callq 0x12d6
leaq -0x1f8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x2880
leaq -0x1f8(%rbp), %rdi
xorl %esi, %esi
callq 0x2596
leaq -0x1f8(%rbp), %rdi
callq 0x1a6e
movq -0x68(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x16a6
movq -0x68(%rbp), %rdi
callq 0x12d6
leaq -0x1e0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x2880
leaq -0x1e0(%rbp), %rdi
xorl %esi, %esi
callq 0x2596
leaq -0x1e0(%rbp), %rdi
callq 0x1a6e
leaq -0x1c8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x19d0
leaq -0x48(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x29ae
leaq -0x1c8(%rbp), %rdi
callq 0x1a6e
movq -0x40(%rbp), %rdi
callq 0x1352
movq -0x40(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x16fa
movq -0x40(%rbp), %rdi
callq 0x12d6
leaq -0x1b0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x2b0a
leaq -0x1b0(%rbp), %rdi
xorl %esi, %esi
callq 0x2596
leaq -0x1b0(%rbp), %rdi
callq 0x1a6e
movq -0x40(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x16a6
movq -0x40(%rbp), %rdi
callq 0x12d6
leaq -0x198(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x2b0a
leaq -0x198(%rbp), %rdi
xorl %esi, %esi
callq 0x2596
leaq -0x198(%rbp), %rdi
callq 0x1a6e
leaq -0x180(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x19d0
leaq -0xf0(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x2c44
leaq -0x180(%rbp), %rdi
callq 0x1a6e
movq -0xe8(%rbp), %rdi
callq 0x1352
movq -0xe8(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x16fa
movq -0xe8(%rbp), %rdi
callq 0x12d6
leaq -0x168(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x2de4
leaq -0x168(%rbp), %rdi
xorl %esi, %esi
callq 0x2596
leaq -0x168(%rbp), %rdi
callq 0x1a6e
movq -0xe8(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x16a6
movq -0xe8(%rbp), %rdi
callq 0x12d6
leaq -0x150(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x2de4
leaq -0x150(%rbp), %rdi
xorl %esi, %esi
callq 0x2596
leaq -0x150(%rbp), %rdi
callq 0x1a6e
leaq -0x298(%rbp), %rsi
movl $0x64636261, (%rsi)     # imm = 0x64636261
leaq -0x138(%rbp), %rdi
pushq $0x4
popq %rdx
leaq -0x19(%rbp), %rcx
callq 0x2f70
leaq -0x120(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x2fa6
leaq -0x298(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x2ffa
leaq -0x120(%rbp), %rdi
callq 0x3b58
leaq -0x108(%rbp), %rdi
leaq -0x298(%rbp), %rsi
callq 0x31fa
leaq -0x108(%rbp), %rdi
xorl %esi, %esi
callq 0x3191
leaq -0x108(%rbp), %rdi
callq 0x3b58
pushq $0x1
popq %rbx
leaq -0x2b0(%rbp), %r14
leaq -0x298(%rbp), %r15
movq -0x290(%rbp), %rdi
callq 0x174e
testb %al, %al
je 0x2232
movq %r14, %rdi
movq %r15, %rsi
callq 0x31fa
movq %r14, %rdi
xorl %esi, %esi
callq 0x3191
movq %r14, %rdi
callq 0x3b58
incl %ebx
jmp 0x2201
movq 0x5d9f(%rip), %rdi      # 0x7fd8
movl %ebx, %esi
callq 0x1110
movq %rax, %rdi
callq 0x1050
leaq -0x298(%rbp), %rdi
callq 0x336c
leaq -0x138(%rbp), %rdi
callq 0x3b58
leaq -0xf0(%rbp), %rdi
callq 0x33aa
leaq -0x48(%rbp), %rdi
callq 0x33aa
leaq -0x70(%rbp), %rdi
callq 0x33aa
leaq -0x98(%rbp), %rdi
callq 0x33aa
leaq -0xb0(%rbp), %rdi
callq 0x1a6e
xorl %eax, %eax
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x108(%rbp), %rdi
jmp 0x23bb
jmp 0x23c2
movq %rax, %rbx
leaq -0x120(%rbp), %rdi
callq 0x3b58
jmp 0x23d1
movq %rax, %rbx
jmp 0x23d1
jmp 0x239d
movq %rax, %rbx
leaq -0x150(%rbp), %rdi
jmp 0x22f1
movq %rax, %rbx
leaq -0x168(%rbp), %rdi
callq 0x1a6e
jmp 0x23dd
movq %rax, %rbx
leaq -0x180(%rbp), %rdi
jmp 0x2322
jmp 0x23a2
movq %rax, %rbx
leaq -0x198(%rbp), %rdi
jmp 0x2322
movq %rax, %rbx
leaq -0x1b0(%rbp), %rdi
callq 0x1a6e
jmp 0x23e9
movq %rax, %rbx
leaq -0x1c8(%rbp), %rdi
jmp 0x2350
jmp 0x23a7
movq %rax, %rbx
leaq -0x1e0(%rbp), %rdi
jmp 0x2350
movq %rax, %rbx
leaq -0x1f8(%rbp), %rdi
callq 0x1a6e
jmp 0x23f2
movq %rax, %rbx
leaq -0x210(%rbp), %rdi
jmp 0x237e
jmp 0x23ac
movq %rax, %rbx
leaq -0x228(%rbp), %rdi
jmp 0x237e
movq %rax, %rbx
leaq -0x240(%rbp), %rdi
callq 0x1a6e
jmp 0x23fb
movq %rax, %rbx
leaq -0x258(%rbp), %rdi
callq 0x1a6e
jmp 0x2407
movq %rax, %rbx
jmp 0x2407
jmp 0x23c2
movq %rax, %rbx
jmp 0x23dd
movq %rax, %rbx
jmp 0x23e9
movq %rax, %rbx
jmp 0x23f2
movq %rax, %rbx
jmp 0x23fb
movq %rax, %rbx
leaq -0x2b0(%rbp), %rdi
callq 0x3b58
jmp 0x23c5
movq %rax, %rbx
leaq -0x298(%rbp), %rdi
callq 0x336c
leaq -0x138(%rbp), %rdi
callq 0x3b58
leaq -0xf0(%rbp), %rdi
callq 0x33aa
leaq -0x48(%rbp), %rdi
callq 0x33aa
leaq -0x70(%rbp), %rdi
callq 0x33aa
leaq -0x98(%rbp), %rdi
callq 0x33aa
leaq -0xb0(%rbp), %rdi
callq 0x1a6e
movq %rbx, %rdi
callq 0x1120
nop