// File: /workspace/github_cpp_makefile_star2_O2/chuckwolber[P]Cube/test/test_algorithm.cpp
// Function: test_sequences()
void test_sequences() {
    std::cout << "Testing sequences... ";

    Algorithm alg;
    std::vector<Turn> results;
    std::vector<Turn> expected = {
       {Layer::F, true}, {Layer::F, false}, {Layer::U, true}, {Layer::U, false},
       {Layer::R, true}, {Layer::R, false}, {Layer::D, true}, {Layer::D, false},
       {Layer::L, true}, {Layer::L, false}, {Layer::B, true}, {Layer::B, false},

       {Layer::F, true}, {Layer::F,  true}, {Layer::F, true}, {Layer::F, false},
       {Layer::F, true}, {Layer::U,  true}, {Layer::F, true}, {Layer::U, false},
       {Layer::F, true}, {Layer::R,  true}, {Layer::F, true}, {Layer::R, false},
       {Layer::F, true}, {Layer::D,  true}, {Layer::F, true}, {Layer::D, false},
       {Layer::F, true}, {Layer::L,  true}, {Layer::F, true}, {Layer::L, false},
       {Layer::F, true}, {Layer::B,  true}, {Layer::F, true}, {Layer::B, false}
    };

    std::cout << " t1 ";
    for (int i = 0; i < 24; i++) {
        for (Turn t : alg.getAlgorithm())
            results.push_back(t);
        alg++;
    }
    verify_turns(results, expected);
    results.clear();
    alg.reset();

    std::cout << " t2 ";
    for (int i = 0; i < 24; i++) {
        for (Turn t : alg.getAlgorithm())
            results.push_back(t);
        ++alg;
    }
    verify_turns(results, expected);
    results.clear();
    alg.reset();

    std::cout << " t3 ";
    for (int i = 0; i < 24; i++) {
        for (Turn t : alg.getAlgorithm())
            results.push_back(t);
        alg += 1;
    }
    verify_turns(results, expected);
    results.clear();
    alg.reset();
   
    std::cout << "Passed" << std::endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq 0x900d(%rip), %rdi      # 0xdfd8
leaq 0x4444(%rip), %rsi      # 0x9416
callq 0x2140
leaq 0x48(%rsp), %rdi
callq 0x231c
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
leaq 0x49e6(%rip), %rsi      # 0x99dc
leaq 0x100(%rsp), %rbx
movl $0x120, %edx            # imm = 0x120
movq %rbx, %rdi
callq 0x2110
leaq 0x30(%rsp), %rdi
pushq $0x24
popq %rdx
leaq 0x8(%rsp), %rcx
movq %rbx, %rsi
callq 0x7e30
movq 0x8fb1(%rip), %rdi      # 0xdfd8
leaq 0x43fe(%rip), %rsi      # 0x942c
callq 0x2140
xorl %eax, %eax
leaq 0x100(%rsp), %rbx
leaq 0x48(%rsp), %r14
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %r13
movl %eax, 0x4(%rsp)
cmpl $0x18, %eax
je 0x50c7
movq %rbx, %r15
movq %rbx, %rdi
movq %r14, %rbp
movq %r14, %rsi
callq 0x2a0c
movq 0x100(%rsp), %rbx
movq 0x108(%rsp), %r14
cmpq %r14, %rbx
je 0x5094
movq (%rbx), %rax
movq %rax, 0x8(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x7e66
addq $0x8, %rbx
jmp 0x5076
movq %r15, %rbx
movq %r15, %rdi
callq 0x358c
leaq 0x220(%rsp), %r15
movq %r15, %rdi
movq %rbp, %r14
movq %rbp, %rsi
xorl %edx, %edx
callq 0x270a
movq %r15, %rdi
callq 0x3558
movl 0x4(%rsp), %eax
incl %eax
jmp 0x504c
leaq 0xe8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3382
leaq 0xd0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x3382
leaq 0xe8(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x7afb
leaq 0xd0(%rsp), %rdi
callq 0x358c
leaq 0xe8(%rsp), %rdi
callq 0x358c
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x512b
movq %rax, 0x18(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x28d8
movq 0x8e9c(%rip), %rdi      # 0xdfd8
leaq 0x42ee(%rip), %rsi      # 0x9431
callq 0x2140
xorl %eax, %eax
leaq 0x100(%rsp), %rbx
leaq 0x48(%rsp), %r13
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
movl %eax, 0x4(%rsp)
cmpl $0x18, %eax
je 0x51c8
movq %rbx, %r14
movq %rbx, %rdi
movq %r13, %rbp
movq %r13, %rsi
callq 0x2a0c
movq 0x100(%rsp), %r13
movq 0x108(%rsp), %rbx
cmpq %rbx, %r13
je 0x51aa
movq (%r13), %rax
movq %rax, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x7e66
addq $0x8, %r13
jmp 0x518b
movq %r14, %rbx
movq %r14, %rdi
callq 0x358c
movq %rbp, %r13
movq %rbp, %rdi
callq 0x2630
movl 0x4(%rsp), %eax
incl %eax
jmp 0x5161
leaq 0xb8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3382
leaq 0xa0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x3382
leaq 0xb8(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x7afb
leaq 0xa0(%rsp), %rdi
callq 0x358c
leaq 0xb8(%rsp), %rdi
callq 0x358c
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x522c
movq %rax, 0x18(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x28d8
movq 0x8d9b(%rip), %rdi      # 0xdfd8
leaq 0x41f2(%rip), %rsi      # 0x9436
callq 0x2140
xorl %eax, %eax
leaq 0x100(%rsp), %rbx
leaq 0x48(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %r13
movl %eax, 0x4(%rsp)
cmpl $0x18, %eax
je 0x52cb
movq %rbx, %r14
movq %rbx, %rdi
movq %r15, %rbp
movq %r15, %rsi
callq 0x2a0c
movq 0x100(%rsp), %r15
movq 0x108(%rsp), %rbx
cmpq %rbx, %r15
je 0x52aa
movq (%r15), %rax
movq %rax, 0x8(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x7e66
addq $0x8, %r15
jmp 0x528c
movq %r14, %rbx
movq %r14, %rdi
callq 0x358c
movq %rbp, %r15
movq %rbp, %rdi
pushq $0x1
popq %rsi
callq 0x2740
movl 0x4(%rsp), %eax
incl %eax
jmp 0x5262
leaq 0x88(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3382
leaq 0x70(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x3382
leaq 0x88(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x7afb
leaq 0x70(%rsp), %rdi
callq 0x358c
leaq 0x88(%rsp), %rdi
callq 0x358c
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x5326
movq %rax, 0x18(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x28d8
movq 0x8ca1(%rip), %rdi      # 0xdfd8
leaq 0x402c(%rip), %rsi      # 0x936a
callq 0x2140
movq %rax, %rdi
callq 0x20b0
leaq 0x30(%rsp), %rdi
callq 0x358c
leaq 0x10(%rsp), %rdi
callq 0x358c
leaq 0x48(%rsp), %rdi
callq 0x3558
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x358c
jmp 0x538d
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
jmp 0x53fa
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x358c
jmp 0x53ac
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
jmp 0x53fa
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x358c
jmp 0x53cb
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
jmp 0x53fa
movq %rax, %rbx
jmp 0x5409
jmp 0x53e6
jmp 0x53e6
jmp 0x53e6
jmp 0x53e6
jmp 0x53e6
jmp 0x53e6
movq %rax, %rbx
jmp 0x53ff
jmp 0x53ef
jmp 0x53ef
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0x358c
leaq 0x30(%rsp), %rdi
callq 0x358c
leaq 0x10(%rsp), %rdi
callq 0x358c
leaq 0x48(%rsp), %rdi
callq 0x3558
movq %rbx, %rdi
callq 0x21c0