// File: chuckwolber[P]Cube/test/test_algorithm.cpp
// Function: test_setAlgorithm()
void test_setAlgorithm() {
    std::cout << "Testing set algorithm... ";

    std::vector<Turn> algorithm = {
        {Layer::L, true},  {Layer::F, false}, 
        {Layer::U, false}, {Layer::F, false}
    };

    Algorithm alg_1(algorithm);
    Algorithm alg_2;

    alg_2.setAlgorithm("L F' U' F'");
    verify_turns(alg_1.getAlgorithm(), algorithm);
    verify_turns(alg_2.getAlgorithm(), alg_1.getAlgorithm());

    std::cout << "Passed" << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq 0xaa06(%rip), %rdi      # 0x15fd8
leaq 0x4ed9(%rip), %rsi      # 0x104b2
callq 0x2190
movups 0x5703(%rip), %xmm0     # 0x10ce8
movaps %xmm0, -0x40(%rbp)
movups 0x56e8(%rip), %xmm0     # 0x10cd8
movaps %xmm0, -0x50(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x4, -0x20(%rbp)
leaq -0x51(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x51f0
movq -0x138(%rbp), %rcx
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x18(%rbp), %rdi
callq 0xf130
jmp 0xb62e
leaq -0x51(%rbp), %rdi
callq 0x54d0
leaq -0xa8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x4830
jmp 0xb649
leaq -0x90(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x2630
jmp 0xb65e
leaq -0xa8(%rbp), %rdi
callq 0x4920
leaq -0xd0(%rbp), %rdi
callq 0x2420
jmp 0xb678
leaq 0x4e4d(%rip), %rsi      # 0x104cc
leaq -0xd0(%rbp), %rdi
callq 0x2850
jmp 0xb68d
leaq -0xe8(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x33e0
jmp 0xb6a2
leaq -0x100(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x4830
jmp 0xb6b4
leaq -0xe8(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0xecb0
jmp 0xb6c9
leaq -0x100(%rbp), %rdi
callq 0x4920
leaq -0xe8(%rbp), %rdi
callq 0x4920
leaq -0x118(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x33e0
jmp 0xb6f6
leaq -0x130(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x33e0
jmp 0xb70b
leaq -0x118(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0xecb0
jmp 0xb720
leaq -0x130(%rbp), %rdi
callq 0x4920
leaq -0x118(%rbp), %rdi
callq 0x4920
movq 0xa899(%rip), %rdi      # 0x15fd8
leaq 0x4c70(%rip), %rsi      # 0x103b6
callq 0x2190
movq %rax, -0x140(%rbp)
jmp 0xb754
movq -0x140(%rbp), %rdi
movq 0xa866(%rip), %rsi      # 0x15fc8
callq 0x21c0
jmp 0xb769
leaq -0xd0(%rbp), %rdi
callq 0x4bd0
leaq -0x90(%rbp), %rdi
callq 0x4bd0
leaq -0x18(%rbp), %rdi
callq 0x4920
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x51(%rbp), %rdi
callq 0x54d0
jmp 0xb881
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xb878
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x4920
jmp 0xb878
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xb86c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xb860
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xb820
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x4920
leaq -0xe8(%rbp), %rdi
callq 0x4920
jmp 0xb860
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xb854
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x4920
leaq -0x118(%rbp), %rdi
callq 0x4920
leaq -0xd0(%rbp), %rdi
callq 0x4bd0
leaq -0x90(%rbp), %rdi
callq 0x4bd0
leaq -0x18(%rbp), %rdi
callq 0x4920
movq -0x60(%rbp), %rdi
callq 0x22a0
nopw (%rax,%rax)