// File: /workspace/github_cpp_makefile_star2_O3/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 $0x2a8, %rsp            # imm = 0x2A8
movups 0x3041(%rip), %xmm0     # 0x6078
leaq -0x130(%rbp), %rsi
movaps %xmm0, 0x10(%rsi)
movups 0x301f(%rip), %xmm0     # 0x6068
movaps %xmm0, (%rsi)
leaq -0xe8(%rbp), %rbx
leaq -0x2c0(%rbp), %rcx
movl $0x8, %edx
movq %rbx, %rdi
callq 0x374e
leaq -0x268(%rbp), %rdi
movq %rbx, %rsi
callq 0x2c56
leaq -0xd0(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0x378c
movq -0x268(%rbp), %rdi
testq %rdi, %rdi
je 0x309a
callq 0x20c0
movq -0xc8(%rbp), %rdi
callq 0x23bc
movq -0xc8(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x2824
movq -0xc8(%rbp), %rdi
callq 0x2316
leaq -0x250(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x3a5a
leaq -0x250(%rbp), %rdi
xorl %esi, %esi
callq 0x39a1
movq -0x250(%rbp), %rdi
testq %rdi, %rdi
je 0x30f5
callq 0x20c0
movq -0xc8(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x27c6
movq -0xc8(%rbp), %rdi
callq 0x2316
leaq -0x238(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x3a5a
leaq -0x238(%rbp), %rdi
xorl %esi, %esi
callq 0x39a1
movq -0x238(%rbp), %rdi
testq %rdi, %rdi
je 0x3144
callq 0x20c0
leaq -0x220(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x2c56
leaq -0xa8(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0x3bde
movq -0x220(%rbp), %rdi
testq %rdi, %rdi
je 0x317b
callq 0x20c0
movq -0xa0(%rbp), %rdi
callq 0x23bc
movq -0xa0(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x2824
movq -0xa0(%rbp), %rdi
callq 0x2316
leaq -0x208(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x3db0
leaq -0x208(%rbp), %rdi
xorl %esi, %esi
callq 0x39a1
movq -0x208(%rbp), %rdi
testq %rdi, %rdi
je 0x31d6
callq 0x20c0
movq -0xa0(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x27c6
movq -0xa0(%rbp), %rdi
callq 0x2316
leaq -0x1f0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x3db0
leaq -0x1f0(%rbp), %rdi
xorl %esi, %esi
callq 0x39a1
movq -0x1f0(%rbp), %rdi
testq %rdi, %rdi
je 0x3225
callq 0x20c0
leaq -0x1d8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x2c56
leaq -0x80(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x3f3c
movq -0x1d8(%rbp), %rdi
testq %rdi, %rdi
je 0x3259
callq 0x20c0
movq -0x78(%rbp), %rdi
callq 0x23bc
movq -0x78(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x2824
movq -0x78(%rbp), %rdi
callq 0x2316
leaq -0x1c0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x414e
leaq -0x1c0(%rbp), %rdi
xorl %esi, %esi
callq 0x39a1
movq -0x1c0(%rbp), %rdi
testq %rdi, %rdi
je 0x32a8
callq 0x20c0
movq -0x78(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x27c6
movq -0x78(%rbp), %rdi
callq 0x2316
leaq -0x1a8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x414e
leaq -0x1a8(%rbp), %rdi
xorl %esi, %esi
callq 0x39a1
movq -0x1a8(%rbp), %rdi
testq %rdi, %rdi
je 0x32ee
callq 0x20c0
leaq -0x190(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x2c56
leaq -0x130(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x4318
movq -0x190(%rbp), %rdi
testq %rdi, %rdi
je 0x3325
callq 0x20c0
movq -0x128(%rbp), %rdi
callq 0x23bc
movq -0x128(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x2824
movq -0x128(%rbp), %rdi
callq 0x2316
leaq -0x178(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x4570
leaq -0x178(%rbp), %rdi
xorl %esi, %esi
callq 0x39a1
movq -0x178(%rbp), %rdi
testq %rdi, %rdi
je 0x3380
callq 0x20c0
movq -0x128(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x27c6
movq -0x128(%rbp), %rdi
callq 0x2316
leaq -0x160(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x4570
leaq -0x160(%rbp), %rdi
xorl %esi, %esi
callq 0x39a1
movq -0x160(%rbp), %rdi
testq %rdi, %rdi
je 0x33cf
callq 0x20c0
leaq -0x2c0(%rbp), %rsi
movl $0x64636261, (%rsi)     # imm = 0x64636261
leaq -0x58(%rbp), %rdi
leaq -0x19(%rbp), %rcx
movl $0x4, %edx
callq 0x479a
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rax
movq %rax, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
subq %rsi, %rbx
je 0x342e
js 0x3597
movq %rbx, %rdi
callq 0x20e0
movq %rax, %r14
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rax
movq %rax, %r15
subq %rsi, %r15
jmp 0x3434
xorl %r14d, %r14d
movq %rbx, %r15
movq %r14, -0x40(%rbp)
movq %r14, -0x38(%rbp)
addq %r14, %rbx
movq %rbx, -0x30(%rbp)
cmpq %rsi, %rax
je 0x3453
movq %r14, %rdi
movq %r15, %rdx
callq 0x2120
addq %r15, %r14
leaq -0x40(%rbp), %rsi
movq %r14, 0x8(%rsi)
leaq -0x2c0(%rbp), %rdi
callq 0x47d8
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x3478
callq 0x20c0
leaq -0x148(%rbp), %rdi
leaq -0x2c0(%rbp), %rsi
callq 0x4afe
leaq -0x148(%rbp), %rdi
xorl %esi, %esi
callq 0x4a24
movq -0x148(%rbp), %rdi
testq %rdi, %rdi
je 0x34aa
callq 0x20c0
movl $0x1, %ebx
leaq -0x280(%rbp), %r14
leaq -0x2c0(%rbp), %r15
movq -0x2b8(%rbp), %rdi
callq 0x2882
testb %al, %al
je 0x34f7
movq %r14, %rdi
movq %r15, %rsi
callq 0x4afe
movq %r14, %rdi
xorl %esi, %esi
callq 0x4a24
movq -0x280(%rbp), %rdi
testq %rdi, %rdi
je 0x34f3
callq 0x20c0
incl %ebx
jmp 0x34bd
movq 0x5ada(%rip), %rdi      # 0x8fd8
movl %ebx, %esi
callq 0x2130
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x20d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2080
leaq -0x2c0(%rbp), %rdi
callq 0x4d2c
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x3549
callq 0x20c0
leaq -0x130(%rbp), %rdi
callq 0x4d84
leaq -0x80(%rbp), %rdi
callq 0x4d84
leaq -0xa8(%rbp), %rdi
callq 0x4d84
leaq -0xd0(%rbp), %rdi
callq 0x4d84
movq -0xe8(%rbp), %rdi
testq %rdi, %rdi
je 0x3587
callq 0x20c0
xorl %eax, %eax
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2050
movq %rax, %rbx
movq -0x148(%rbp), %rdi
jmp 0x36da
jmp 0x36e6
movq %rax, %rbx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x36fa
callq 0x20c0
jmp 0x36fa
jmp 0x36bc
movq %rax, %rbx
movq -0x160(%rbp), %rdi
jmp 0x36fe
movq %rax, %rbx
movq -0x178(%rbp), %rdi
jmp 0x36fe
movq %rax, %rbx
movq -0x190(%rbp), %rdi
jmp 0x3614
jmp 0x36c1
movq %rax, %rbx
movq -0x1a8(%rbp), %rdi
jmp 0x3614
movq %rax, %rbx
movq -0x1c0(%rbp), %rdi
testq %rdi, %rdi
je 0x3714
callq 0x20c0
jmp 0x3714
movq %rax, %rbx
movq -0x1d8(%rbp), %rdi
jmp 0x364e
jmp 0x36c6
movq %rax, %rbx
movq -0x1f0(%rbp), %rdi
jmp 0x364e
movq %rax, %rbx
movq -0x208(%rbp), %rdi
testq %rdi, %rdi
je 0x371d
callq 0x20c0
jmp 0x371d
movq %rax, %rbx
movq -0x220(%rbp), %rdi
jmp 0x3685
jmp 0x36cb
movq %rax, %rbx
movq -0x238(%rbp), %rdi
jmp 0x3685
movq %rax, %rbx
movq -0x250(%rbp), %rdi
testq %rdi, %rdi
je 0x3729
callq 0x20c0
jmp 0x3729
movq %rax, %rbx
movq -0x268(%rbp), %rdi
testq %rdi, %rdi
je 0x3735
callq 0x20c0
jmp 0x3735
movq %rax, %rbx
jmp 0x3735
jmp 0x36e6
movq %rax, %rbx
jmp 0x3708
movq %rax, %rbx
jmp 0x3714
movq %rax, %rbx
jmp 0x371d
movq %rax, %rbx
jmp 0x3729
movq %rax, %rbx
movq -0x280(%rbp), %rdi
testq %rdi, %rdi
je 0x36e9
callq 0x20c0
jmp 0x36e9
movq %rax, %rbx
leaq -0x2c0(%rbp), %rdi
callq 0x4d2c
jmp 0x36fa
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x3708
callq 0x20c0
leaq -0x130(%rbp), %rdi
callq 0x4d84
leaq -0x80(%rbp), %rdi
callq 0x4d84
leaq -0xa8(%rbp), %rdi
callq 0x4d84
leaq -0xd0(%rbp), %rdi
callq 0x4d84
movq -0xe8(%rbp), %rdi
testq %rdi, %rdi
je 0x3746
callq 0x20c0
movq %rbx, %rdi
callq 0x2140