// File: chuckwolber[P]Cube/test/test_algorithm.cpp
// Function: test_addTurn()
void test_addTurn() {
    std::cout << "Testing add turn... ";

    Turn init = {Layer::F, true};
    Turn t1 = {Layer::D, true};
    Turn t2 = {Layer::F, true};
    Turn t3 = {Layer::L, true};
    Algorithm alg;

    std::cout << " t0 ";
    verify_turns(alg.getAlgorithm(), {init});

    std::cout << " t1 ";
    alg.addTurn(t1);
    verify_turns(alg.getAlgorithm(), {init, t1});

    std::cout << " t2 ";
    alg.addTurn(t2);
    verify_turns(alg.getAlgorithm(), {init, t1, t2});

    std::cout << " t3 ";
    alg.addTurn(t3);
    verify_turns(alg.getAlgorithm(), {init, t1, t2, t3});

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq 0xaf46(%rip), %rdi      # 0x15fd8
movq %rdi, -0x1e8(%rbp)
leaq 0x53f8(%rip), %rsi      # 0x10498
callq 0x2190
movabsq $0x100000005, %rax      # imm = 0x100000005
movq %rax, -0x8(%rbp)
movabsq $0x100000009, %rcx      # imm = 0x100000009
movq %rcx, -0x10(%rbp)
movq %rax, -0x18(%rbp)
movabsq $0x100000004, %rax      # imm = 0x100000004
movq %rax, -0x20(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x2420
movq -0x1e8(%rbp), %rdi
leaq 0x53c3(%rip), %rsi      # 0x104ad
callq 0x2190
jmp 0xb0f1
leaq -0x70(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x33e0
jmp 0xb100
movq -0x8(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0xa0(%rbp), %rax
movq %rax, -0x98(%rbp)
movq $0x1, -0x90(%rbp)
leaq -0xa1(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
callq 0x51f0
movq -0x1f0(%rbp), %rcx
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
leaq -0x88(%rbp), %rdi
callq 0xf130
jmp 0xb15a
leaq -0x70(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xecb0
jmp 0xb16c
leaq -0x88(%rbp), %rdi
callq 0x4920
leaq -0xa1(%rbp), %rdi
callq 0x54d0
leaq -0x70(%rbp), %rdi
callq 0x4920
movq 0xae44(%rip), %rdi      # 0x15fd8
leaq 0x52dd(%rip), %rsi      # 0x10478
callq 0x2190
jmp 0xb1a2
movq -0x10(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x2490
jmp 0xb1bf
leaq -0xc8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x33e0
jmp 0xb1d1
movq -0x8(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq -0x100(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq $0x2, -0xe8(%rbp)
leaq -0x101(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0x51f0
movq -0x1f8(%rbp), %rcx
movq -0xf0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
leaq -0xe0(%rbp), %rdi
callq 0xf130
jmp 0xb236
leaq -0xc8(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0xecb0
jmp 0xb24b
leaq -0xe0(%rbp), %rdi
callq 0x4920
leaq -0x101(%rbp), %rdi
callq 0x54d0
leaq -0xc8(%rbp), %rdi
callq 0x4920
movq 0xad62(%rip), %rdi      # 0x15fd8
leaq 0x5200(%rip), %rsi      # 0x1047d
callq 0x2190
jmp 0xb284
movq -0x18(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x2490
jmp 0xb2a1
leaq -0x128(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x33e0
jmp 0xb2b3
movq -0x8(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x158(%rbp)
leaq -0x168(%rbp), %rax
movq %rax, -0x150(%rbp)
movq $0x3, -0x148(%rbp)
leaq -0x169(%rbp), %rdi
movq %rdi, -0x200(%rbp)
callq 0x51f0
movq -0x200(%rbp), %rcx
movq -0x150(%rbp), %rsi
movq -0x148(%rbp), %rdx
leaq -0x140(%rbp), %rdi
callq 0xf130
jmp 0xb323
leaq -0x128(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0xecb0
jmp 0xb338
leaq -0x140(%rbp), %rdi
callq 0x4920
leaq -0x169(%rbp), %rdi
callq 0x54d0
leaq -0x128(%rbp), %rdi
callq 0x4920
movq 0xac75(%rip), %rdi      # 0x15fd8
leaq 0x5118(%rip), %rsi      # 0x10482
callq 0x2190
jmp 0xb371
movq -0x20(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x178(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x2490
jmp 0xb38e
leaq -0x190(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x33e0
jmp 0xb3a0
movq -0x8(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x1c0(%rbp)
leaq -0x1d8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq $0x4, -0x1b0(%rbp)
leaq -0x1d9(%rbp), %rdi
movq %rdi, -0x208(%rbp)
callq 0x51f0
movq -0x208(%rbp), %rcx
movq -0x1b8(%rbp), %rsi
movq -0x1b0(%rbp), %rdx
leaq -0x1a8(%rbp), %rdi
callq 0xf130
jmp 0xb41b
leaq -0x190(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0xecb0
jmp 0xb430
leaq -0x1a8(%rbp), %rdi
callq 0x4920
leaq -0x1d9(%rbp), %rdi
callq 0x54d0
leaq -0x190(%rbp), %rdi
callq 0x4920
movq 0xab7d(%rip), %rdi      # 0x15fd8
leaq 0x4f54(%rip), %rsi      # 0x103b6
callq 0x2190
movq %rax, -0x210(%rbp)
jmp 0xb470
movq -0x210(%rbp), %rdi
movq 0xab4a(%rip), %rsi      # 0x15fc8
callq 0x21c0
jmp 0xb485
leaq -0x48(%rbp), %rdi
callq 0x4bd0
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0xb5a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0xb4ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x4920
leaq -0xa1(%rbp), %rdi
callq 0x54d0
leaq -0x70(%rbp), %rdi
callq 0x4920
jmp 0xb5a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0xb50e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x4920
leaq -0x101(%rbp), %rdi
callq 0x54d0
leaq -0xc8(%rbp), %rdi
callq 0x4920
jmp 0xb5a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0xb54e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x4920
leaq -0x169(%rbp), %rdi
callq 0x54d0
leaq -0x128(%rbp), %rdi
callq 0x4920
jmp 0xb5a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0xb58e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x4920
leaq -0x1d9(%rbp), %rdi
callq 0x54d0
leaq -0x190(%rbp), %rdi
callq 0x4920
leaq -0x48(%rbp), %rdi
callq 0x4bd0
movq -0x50(%rbp), %rdi
callq 0x22a0
nopl (%rax,%rax)