// File: /workspace/github_cpp_makefile_star2_O1/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 0x307d(%rip), %xmm0     # 0x6078
leaq -0x130(%rbp), %rsi
movaps %xmm0, 0x10(%rsi)
movups 0x305b(%rip), %xmm0     # 0x6068
movaps %xmm0, (%rsi)
leaq -0xe8(%rbp), %rbx
leaq -0x2c0(%rbp), %rcx
movl $0x8, %edx
movq %rbx, %rdi
callq 0x3704
leaq -0x268(%rbp), %rdi
movq %rbx, %rsi
callq 0x2c2c
leaq -0xd0(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0x3742
movq -0x268(%rbp), %rdi
testq %rdi, %rdi
je 0x305e
callq 0x20c0
movq -0xc8(%rbp), %rdi
callq 0x23c0
movq -0xc8(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x2822
movq -0xc8(%rbp), %rdi
callq 0x2316
leaq -0x250(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x3a02
leaq -0x250(%rbp), %rdi
xorl %esi, %esi
callq 0x3940
movq -0x250(%rbp), %rdi
testq %rdi, %rdi
je 0x30b9
callq 0x20c0
movq -0xc8(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x27c4
movq -0xc8(%rbp), %rdi
callq 0x2316
leaq -0x238(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x3a02
leaq -0x238(%rbp), %rdi
xorl %esi, %esi
callq 0x3940
movq -0x238(%rbp), %rdi
testq %rdi, %rdi
je 0x3108
callq 0x20c0
leaq -0x220(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x2c2c
leaq -0xa8(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0x3b86
movq -0x220(%rbp), %rdi
testq %rdi, %rdi
je 0x313f
callq 0x20c0
movq -0xa0(%rbp), %rdi
callq 0x23c0
movq -0xa0(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x2822
movq -0xa0(%rbp), %rdi
callq 0x2316
leaq -0x208(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x3d46
leaq -0x208(%rbp), %rdi
xorl %esi, %esi
callq 0x3940
movq -0x208(%rbp), %rdi
testq %rdi, %rdi
je 0x319a
callq 0x20c0
movq -0xa0(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x27c4
movq -0xa0(%rbp), %rdi
callq 0x2316
leaq -0x1f0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x3d46
leaq -0x1f0(%rbp), %rdi
xorl %esi, %esi
callq 0x3940
movq -0x1f0(%rbp), %rdi
testq %rdi, %rdi
je 0x31e9
callq 0x20c0
leaq -0x1d8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x2c2c
leaq -0x80(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x3ed2
movq -0x1d8(%rbp), %rdi
testq %rdi, %rdi
je 0x321d
callq 0x20c0
movq -0x78(%rbp), %rdi
callq 0x23c0
movq -0x78(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x2822
movq -0x78(%rbp), %rdi
callq 0x2316
leaq -0x1c0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x40d2
leaq -0x1c0(%rbp), %rdi
xorl %esi, %esi
callq 0x3940
movq -0x1c0(%rbp), %rdi
testq %rdi, %rdi
je 0x326c
callq 0x20c0
movq -0x78(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x27c4
movq -0x78(%rbp), %rdi
callq 0x2316
leaq -0x1a8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x40d2
leaq -0x1a8(%rbp), %rdi
xorl %esi, %esi
callq 0x3940
movq -0x1a8(%rbp), %rdi
testq %rdi, %rdi
je 0x32b2
callq 0x20c0
leaq -0x190(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x2c2c
leaq -0x130(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x429c
movq -0x190(%rbp), %rdi
testq %rdi, %rdi
je 0x32e9
callq 0x20c0
movq -0x128(%rbp), %rdi
callq 0x23c0
movq -0x128(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x2822
movq -0x128(%rbp), %rdi
callq 0x2316
leaq -0x178(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x44f0
leaq -0x178(%rbp), %rdi
xorl %esi, %esi
callq 0x3940
movq -0x178(%rbp), %rdi
testq %rdi, %rdi
je 0x3344
callq 0x20c0
movq -0x128(%rbp), %rdi
movl $0x7e4, %esi            # imm = 0x7E4
callq 0x27c4
movq -0x128(%rbp), %rdi
callq 0x2316
leaq -0x160(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x44f0
leaq -0x160(%rbp), %rdi
xorl %esi, %esi
callq 0x3940
movq -0x160(%rbp), %rdi
testq %rdi, %rdi
je 0x3393
callq 0x20c0
leaq -0x2c0(%rbp), %rsi
movl $0x64636261, (%rsi)     # imm = 0x64636261
leaq -0x58(%rbp), %rdi
leaq -0x19(%rbp), %rcx
movl $0x4, %edx
callq 0x471e
movq -0x50(%rbp), %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
subq -0x58(%rbp), %rbx
je 0x33de
js 0x354c
movq %rbx, %rdi
callq 0x20e0
movq %rax, %r14
jmp 0x33e1
xorl %r14d, %r14d
movq %r14, -0x40(%rbp)
movq %r14, -0x38(%rbp)
addq %r14, %rbx
movq %rbx, -0x30(%rbp)
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rbx
subq %rsi, %rbx
je 0x3408
movq %r14, %rdi
movq %rbx, %rdx
callq 0x2120
addq %rbx, %r14
leaq -0x40(%rbp), %rsi
movq %r14, 0x8(%rsi)
leaq -0x2c0(%rbp), %rdi
callq 0x475c
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x342d
callq 0x20c0
leaq -0x148(%rbp), %rdi
leaq -0x2c0(%rbp), %rsi
callq 0x4a7e
leaq -0x148(%rbp), %rdi
xorl %esi, %esi
callq 0x49a3
movq -0x148(%rbp), %rdi
testq %rdi, %rdi
je 0x345f
callq 0x20c0
movl $0x1, %ebx
leaq -0x280(%rbp), %r14
leaq -0x2c0(%rbp), %r15
movq -0x2b8(%rbp), %rdi
callq 0x2880
testb %al, %al
je 0x34ac
movq %r14, %rdi
movq %r15, %rsi
callq 0x4a7e
movq %r14, %rdi
xorl %esi, %esi
callq 0x49a3
movq -0x280(%rbp), %rdi
testq %rdi, %rdi
je 0x34a8
callq 0x20c0
incl %ebx
jmp 0x3472
movq 0x5b25(%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 0x4c9a
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x34fe
callq 0x20c0
leaq -0x130(%rbp), %rdi
callq 0x4cf2
leaq -0x80(%rbp), %rdi
callq 0x4cf2
leaq -0xa8(%rbp), %rdi
callq 0x4cf2
leaq -0xd0(%rbp), %rdi
callq 0x4cf2
movq -0xe8(%rbp), %rdi
testq %rdi, %rdi
je 0x353c
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 0x368f
jmp 0x369b
movq %rax, %rbx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x36af
callq 0x20c0
jmp 0x36af
jmp 0x3671
movq %rax, %rbx
movq -0x160(%rbp), %rdi
jmp 0x36b3
movq %rax, %rbx
movq -0x178(%rbp), %rdi
jmp 0x36b3
movq %rax, %rbx
movq -0x190(%rbp), %rdi
jmp 0x35c9
jmp 0x3676
movq %rax, %rbx
movq -0x1a8(%rbp), %rdi
jmp 0x35c9
movq %rax, %rbx
movq -0x1c0(%rbp), %rdi
testq %rdi, %rdi
je 0x36c9
callq 0x20c0
jmp 0x36c9
movq %rax, %rbx
movq -0x1d8(%rbp), %rdi
jmp 0x3603
jmp 0x367b
movq %rax, %rbx
movq -0x1f0(%rbp), %rdi
jmp 0x3603
movq %rax, %rbx
movq -0x208(%rbp), %rdi
testq %rdi, %rdi
je 0x36d2
callq 0x20c0
jmp 0x36d2
movq %rax, %rbx
movq -0x220(%rbp), %rdi
jmp 0x363a
jmp 0x3680
movq %rax, %rbx
movq -0x238(%rbp), %rdi
jmp 0x363a
movq %rax, %rbx
movq -0x250(%rbp), %rdi
testq %rdi, %rdi
je 0x36de
callq 0x20c0
jmp 0x36de
movq %rax, %rbx
movq -0x268(%rbp), %rdi
testq %rdi, %rdi
je 0x36ea
callq 0x20c0
jmp 0x36ea
movq %rax, %rbx
jmp 0x36ea
jmp 0x369b
movq %rax, %rbx
jmp 0x36bd
movq %rax, %rbx
jmp 0x36c9
movq %rax, %rbx
jmp 0x36d2
movq %rax, %rbx
jmp 0x36de
movq %rax, %rbx
movq -0x280(%rbp), %rdi
testq %rdi, %rdi
je 0x369e
callq 0x20c0
jmp 0x369e
movq %rax, %rbx
leaq -0x2c0(%rbp), %rdi
callq 0x4c9a
jmp 0x36af
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x36bd
callq 0x20c0
leaq -0x130(%rbp), %rdi
callq 0x4cf2
leaq -0x80(%rbp), %rdi
callq 0x4cf2
leaq -0xa8(%rbp), %rdi
callq 0x4cf2
leaq -0xd0(%rbp), %rdi
callq 0x4cf2
movq -0xe8(%rbp), %rdi
testq %rdi, %rdi
je 0x36fb
callq 0x20c0
movq %rbx, %rdi
callq 0x2140
nop