// File: pdx-cs-tutors[P]pdp/tests/cll/cll_test.cpp
// Function: CLLTestSuite::expectList(std::initializer_list<int>)
void CLLTestSuite::expectList(std::initializer_list<int> values) {
    if (!rear && values.size() > 0) {
        addFailure(CLLFailure(
            "Missing item(s)",
            call,
            initial,
            values,
            rear
        ));
        return;
    }
    if (values.size() == 0) {
        if (rear) {
            addFailure(CLLFailure(
                "Too many items",
                call,
                initial,
                values,
                rear
            ));
        } else return;
    }
    cll::node* curr = rear->next;
    int count = 0;
    for (auto value : values) {
        if (curr->data != value) {
            addFailure(CLLFailure(
                "Incorrect value(s)",
                call,
                initial,
                values,
                rear
            ));
            return;
        }
        ++count;
        curr = curr->next;
    }
    if (curr != rear->next) {
        addFailure(CLLFailure(
            "Too many items",
            call,
            initial,
            values,
            rear
        ));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x400, %rsp            # imm = 0x400
movq %rsi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x3d8(%rbp)
cmpq $0x0, 0x78(%rax)
jne 0x30f00
leaq -0x10(%rbp), %rdi
callq 0x1fab0
cmpq $0x0, %rax
jbe 0x30f00
movq -0x3d8(%rbp), %rsi
addq $0x58, %rsi
leaq -0xe0(%rbp), %rdi
movq %rdi, -0x3e0(%rbp)
callq 0x1e810
movq -0x3d8(%rbp), %rax
movq -0x3e0(%rbp), %rdx
movq %rax, %rcx
subq $-0x80, %rcx
movups -0x10(%rbp), %xmm0
movaps %xmm0, -0xf0(%rbp)
movq 0x78(%rax), %rsi
movq -0xf0(%rbp), %r8
movq -0xe8(%rbp), %r9
movq %rsp, %rax
movq %rsi, (%rax)
leaq 0x1295d(%rip), %rsi     # 0x437da
leaq -0xc0(%rbp), %rdi
callq 0x1f260
jmp 0x30e8b
movq -0x3d8(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x1fcd0
jmp 0x30ea0
leaq -0xc0(%rbp), %rdi
callq 0x20440
leaq -0xe0(%rbp), %rdi
callq 0x1eba0
jmp 0x312a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x30eef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x20440
leaq -0xe0(%rbp), %rdi
callq 0x1eba0
jmp 0x312a9
leaq -0x10(%rbp), %rdi
callq 0x1fab0
cmpq $0x0, %rax
jne 0x31009
movq -0x3d8(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x31002
movq -0x3d8(%rbp), %rsi
addq $0x58, %rsi
leaq -0x1c8(%rbp), %rdi
movq %rdi, -0x3e8(%rbp)
callq 0x1e810
movq -0x3d8(%rbp), %rax
movq -0x3e8(%rbp), %rdx
movq %rax, %rcx
subq $-0x80, %rcx
movups -0x10(%rbp), %xmm0
movaps %xmm0, -0x1e0(%rbp)
movq 0x78(%rax), %rsi
movq -0x1e0(%rbp), %r8
movq -0x1d8(%rbp), %r9
movq %rsp, %rax
movq %rsi, (%rax)
leaq 0x12868(%rip), %rsi     # 0x437ea
leaq -0x1a8(%rbp), %rdi
callq 0x1f260
jmp 0x30f90
movq -0x3d8(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x1fcd0
jmp 0x30fa5
leaq -0x1a8(%rbp), %rdi
callq 0x20440
leaq -0x1c8(%rbp), %rdi
callq 0x1eba0
jmp 0x31007
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x30ff1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x20440
leaq -0x1c8(%rbp), %rdi
callq 0x1eba0
jmp 0x312a9
jmp 0x312a0
jmp 0x31009
movq -0x3d8(%rbp), %rax
movq 0x78(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x1e8(%rbp)
movl $0x0, -0x1ec(%rbp)
leaq -0x10(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movq -0x1f8(%rbp), %rdi
callq 0x1f530
movq %rax, -0x200(%rbp)
movq -0x1f8(%rbp), %rdi
callq 0x1f150
movq %rax, -0x208(%rbp)
movq -0x200(%rbp), %rax
cmpq -0x208(%rbp), %rax
je 0x311aa
movq -0x200(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x20c(%rbp)
movq -0x1e8(%rbp), %rax
movl (%rax), %eax
cmpl -0x20c(%rbp), %eax
je 0x31172
movq -0x3d8(%rbp), %rsi
addq $0x58, %rsi
leaq -0x2d8(%rbp), %rdi
movq %rdi, -0x3f0(%rbp)
callq 0x1e810
movq -0x3d8(%rbp), %rax
movq -0x3f0(%rbp), %rdx
movq %rax, %rcx
subq $-0x80, %rcx
movups -0x10(%rbp), %xmm0
movaps %xmm0, -0x2f0(%rbp)
movq 0x78(%rax), %rsi
movq -0x2f0(%rbp), %r8
movq -0x2e8(%rbp), %r9
movq %rsp, %rax
movq %rsi, (%rax)
leaq 0x1270a(%rip), %rsi     # 0x437f9
leaq -0x2b8(%rbp), %rdi
callq 0x1f260
jmp 0x310fd
movq -0x3d8(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
callq 0x1fcd0
jmp 0x31112
leaq -0x2b8(%rbp), %rdi
callq 0x20440
leaq -0x2d8(%rbp), %rdi
callq 0x1eba0
jmp 0x312a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x31161
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x2b8(%rbp), %rdi
callq 0x20440
leaq -0x2d8(%rbp), %rdi
callq 0x1eba0
jmp 0x312a9
movl -0x1ec(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1ec(%rbp)
movq -0x1e8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x1e8(%rbp)
movq -0x200(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x200(%rbp)
jmp 0x3105a
movq -0x3d8(%rbp), %rcx
movq -0x1e8(%rbp), %rax
movq 0x78(%rcx), %rcx
cmpq 0x8(%rcx), %rax
je 0x312a0
movq -0x3d8(%rbp), %rsi
addq $0x58, %rsi
leaq -0x3b8(%rbp), %rdi
movq %rdi, -0x3f8(%rbp)
callq 0x1e810
movq -0x3d8(%rbp), %rax
movq -0x3f8(%rbp), %rdx
movq %rax, %rcx
subq $-0x80, %rcx
movups -0x10(%rbp), %xmm0
movaps %xmm0, -0x3d0(%rbp)
movq 0x78(%rax), %rsi
movq -0x3d0(%rbp), %r8
movq -0x3c8(%rbp), %r9
movq %rsp, %rax
movq %rsi, (%rax)
leaq 0x125c7(%rip), %rsi     # 0x437ea
leaq -0x398(%rbp), %rdi
callq 0x1f260
jmp 0x31231
movq -0x3d8(%rbp), %rdi
leaq -0x398(%rbp), %rsi
callq 0x1fcd0
jmp 0x31246
leaq -0x398(%rbp), %rdi
callq 0x20440
leaq -0x3b8(%rbp), %rdi
callq 0x1eba0
jmp 0x312a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x31292
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x398(%rbp), %rdi
callq 0x20440
leaq -0x3b8(%rbp), %rdi
callq 0x1eba0
jmp 0x312a9
addq $0x400, %rsp            # imm = 0x400
popq %rbp
retq
movq -0xf8(%rbp), %rdi
callq 0x20540
nopw %cs:(%rax,%rax)