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

    std::vector<Turn> init_alg = {{Layer::D,  true}, 
                                  {Layer::F, false}, 
                                  {Layer::R, false}};

    Algorithm alg1;
    assert(alg1.getAlgorithm().size() == 1);

    Algorithm alg2(init_alg);
    assert(alg2.getAlgorithm().size() == init_alg.size());
    verify_turns(init_alg, alg2.getAlgorithm());

    Algorithm alg3(alg2);
    assert(alg3.getAlgorithm().size() == init_alg.size());
    verify_turns(init_alg, alg3.getAlgorithm());

    alg2.reset();
    assert(alg3 != alg2);

    Algorithm alg4 = alg3;
    assert(alg4.getAlgorithm().size() == init_alg.size());
    verify_turns(init_alg, alg4.getAlgorithm());

    alg3.reset();
    assert(alg4 != alg3);

    alg3 = alg2;
    assert(alg3 == alg2);

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

// Assembly:
pushq %rbx
subq $0x180, %rsp            # imm = 0x180
movq 0x9531(%rip), %rdi      # 0xdfd8
leaq 0x47a6(%rip), %rsi      # 0x9254
callq 0x2140
movups 0x4f0a(%rip), %xmm0     # 0x99c4
leaq 0x150(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x6, 0x10(%rsi)
movq %rsp, %rdi
pushq $0x3
popq %rdx
leaq 0x40(%rsp), %rcx
callq 0x7e30
leaq 0x150(%rsp), %rdi
callq 0x231c
leaq 0x40(%rsp), %rdi
leaq 0x150(%rsp), %rsi
callq 0x2a0c
movq 0x48(%rsp), %rax
subq 0x40(%rsp), %rax
cmpq $0x8, %rax
jne 0x4dc4
leaq 0x40(%rsp), %rdi
callq 0x358c
leaq 0x138(%rsp), %rdi
movq %rsp, %rsi
callq 0x3382
leaq 0x40(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0x242a
leaq 0x138(%rsp), %rdi
callq 0x358c
leaq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x2a0c
movq 0x20(%rsp), %rax
subq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
subq (%rsp), %rcx
cmpq %rcx, %rax
jne 0x4de0
leaq 0x18(%rsp), %rdi
callq 0x358c
leaq 0x120(%rsp), %rdi
movq %rsp, %rsi
callq 0x3382
leaq 0x108(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x2a0c
leaq 0x120(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x7afb
leaq 0x108(%rsp), %rdi
callq 0x358c
leaq 0x120(%rsp), %rdi
callq 0x358c
leaq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x24c4
leaq 0x68(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x2a0c
movq 0x70(%rsp), %rax
subq 0x68(%rsp), %rax
movq 0x8(%rsp), %rcx
subq (%rsp), %rcx
cmpq %rcx, %rax
jne 0x4df9
leaq 0x68(%rsp), %rdi
callq 0x358c
leaq 0xf0(%rsp), %rdi
movq %rsp, %rsi
callq 0x3382
leaq 0xd8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x2a0c
leaq 0xf0(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x7afb
leaq 0xd8(%rsp), %rdi
callq 0x358c
leaq 0xf0(%rsp), %rdi
callq 0x358c
leaq 0x40(%rsp), %rdi
callq 0x28d8
leaq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x2754
testb %al, %al
je 0x4e12
leaq 0x68(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x24c4
leaq 0xc0(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x2a0c
movq 0xc8(%rsp), %rax
subq 0xc0(%rsp), %rax
movq 0x8(%rsp), %rcx
subq (%rsp), %rcx
cmpq %rcx, %rax
jne 0x4e2b
leaq 0xc0(%rsp), %rdi
callq 0x358c
leaq 0xa8(%rsp), %rdi
movq %rsp, %rsi
callq 0x3382
leaq 0x90(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x2a0c
leaq 0xa8(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x7afb
leaq 0x90(%rsp), %rdi
callq 0x358c
leaq 0xa8(%rsp), %rdi
callq 0x358c
leaq 0x18(%rsp), %rdi
callq 0x28d8
leaq 0x68(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x2754
testb %al, %al
je 0x4e44
leaq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x25fe
leaq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x274e
testb %al, %al
je 0x4e5d
movq 0x9264(%rip), %rdi      # 0xdfd8
leaq 0x45ef(%rip), %rsi      # 0x936a
callq 0x2140
movq %rax, %rdi
callq 0x20b0
leaq 0x68(%rsp), %rdi
callq 0x3558
leaq 0x18(%rsp), %rdi
callq 0x3558
leaq 0x40(%rsp), %rdi
callq 0x3558
leaq 0x150(%rsp), %rdi
callq 0x3558
movq %rsp, %rdi
callq 0x358c
addq $0x180, %rsp            # imm = 0x180
popq %rbx
retq
leaq 0x44a2(%rip), %rdi      # 0x926d
leaq 0x44bb(%rip), %rsi      # 0x928d
leaq 0x44c7(%rip), %rcx      # 0x92a0
pushq $0x45
jmp 0x4e74
leaq 0x44d2(%rip), %rdi      # 0x92b9
leaq 0x449f(%rip), %rsi      # 0x928d
leaq 0x44ab(%rip), %rcx      # 0x92a0
pushq $0x48
jmp 0x4e74
leaq 0x44e7(%rip), %rdi      # 0x92e7
leaq 0x4486(%rip), %rsi      # 0x928d
leaq 0x4492(%rip), %rcx      # 0x92a0
pushq $0x4c
jmp 0x4e74
leaq 0x44fc(%rip), %rdi      # 0x9315
leaq 0x446d(%rip), %rsi      # 0x928d
leaq 0x4479(%rip), %rcx      # 0x92a0
pushq $0x50
jmp 0x4e74
leaq 0x44f0(%rip), %rdi      # 0x9322
leaq 0x4454(%rip), %rsi      # 0x928d
leaq 0x4460(%rip), %rcx      # 0x92a0
pushq $0x53
jmp 0x4e74
leaq 0x4505(%rip), %rdi      # 0x9350
leaq 0x443b(%rip), %rsi      # 0x928d
leaq 0x4447(%rip), %rcx      # 0x92a0
pushq $0x57
jmp 0x4e74
leaq 0x44f9(%rip), %rdi      # 0x935d
leaq 0x4422(%rip), %rsi      # 0x928d
leaq 0x442e(%rip), %rcx      # 0x92a0
pushq $0x5a
popq %rdx
callq 0x20e0
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x358c
jmp 0x4e8f
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x358c
jmp 0x4f1b
jmp 0x4f18
jmp 0x4f13
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x358c
jmp 0x4eb7
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x358c
jmp 0x4f25
jmp 0x4f13
jmp 0x4ef0
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x358c
jmp 0x4edf
movq %rax, %rbx
leaq 0x120(%rsp), %rdi
callq 0x358c
jmp 0x4f2f
jmp 0x4ef0
movq %rax, %rbx
jmp 0x4f2f
movq %rax, %rbx
leaq 0x138(%rsp), %rdi
callq 0x358c
jmp 0x4f39
jmp 0x4f09
movq %rax, %rbx
jmp 0x4f39
movq %rax, %rbx
jmp 0x4f46
movq %rax, %rbx
jmp 0x4f25
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x3558
leaq 0x18(%rsp), %rdi
callq 0x3558
leaq 0x40(%rsp), %rdi
callq 0x3558
leaq 0x150(%rsp), %rdi
callq 0x3558
movq %rsp, %rdi
callq 0x358c
movq %rbx, %rdi
callq 0x21c0