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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x320, %rsp            # imm = 0x320
movq %rsi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x2f8(%rbp)
movq 0x78(%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
leaq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x1f530
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x1f150
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0x3d1bc
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x44(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x3d0a5
movq -0x2f8(%rbp), %rsi
addq $0x58, %rsi
leaq -0x110(%rbp), %rdi
movq %rdi, -0x300(%rbp)
callq 0x1e810
movq -0x2f8(%rbp), %rax
movq -0x300(%rbp), %rdx
movq %rax, %rcx
subq $-0x80, %rcx
movups -0x10(%rbp), %xmm0
movaps %xmm0, -0x120(%rbp)
movq 0x78(%rax), %rsi
movq -0x120(%rbp), %r8
movq -0x118(%rbp), %r9
movq %rsp, %rax
movq %rsi, (%rax)
leaq 0x67b8(%rip), %rsi      # 0x437da
leaq -0xf0(%rbp), %rdi
callq 0x1e730
jmp 0x3d030
movq -0x2f8(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x1fb30
jmp 0x3d045
leaq -0xf0(%rbp), %rdi
callq 0x1e0e0
leaq -0x110(%rbp), %rdi
callq 0x1eba0
jmp 0x3d2a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0x3d094
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x1e0e0
leaq -0x110(%rbp), %rdi
callq 0x1eba0
jmp 0x3d2aa
movq -0x20(%rbp), %rax
movl (%rax), %eax
cmpl -0x44(%rbp), %eax
je 0x3d194
movq -0x2f8(%rbp), %rsi
addq $0x58, %rsi
leaq -0x1f8(%rbp), %rdi
movq %rdi, -0x308(%rbp)
callq 0x1e810
movq -0x2f8(%rbp), %rax
movq -0x308(%rbp), %rdx
movq %rax, %rcx
subq $-0x80, %rcx
movups -0x10(%rbp), %xmm0
movaps %xmm0, -0x210(%rbp)
movq 0x78(%rax), %rsi
movq -0x210(%rbp), %r8
movq -0x208(%rbp), %r9
movq %rsp, %rax
movq %rsi, (%rax)
leaq 0x66e8(%rip), %rsi      # 0x437f9
leaq -0x1d8(%rbp), %rdi
callq 0x1e730
jmp 0x3d11f
movq -0x2f8(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x1fb30
jmp 0x3d134
leaq -0x1d8(%rbp), %rdi
callq 0x1e0e0
leaq -0x1f8(%rbp), %rdi
callq 0x1eba0
jmp 0x3d2a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0x3d183
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x1e0e0
leaq -0x1f8(%rbp), %rdi
callq 0x1eba0
jmp 0x3d2aa
jmp 0x3d196
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x38(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x38(%rbp)
jmp 0x3cfa3
cmpq $0x0, -0x20(%rbp)
je 0x3d2a1
movq -0x2f8(%rbp), %rsi
addq $0x58, %rsi
leaq -0x2d8(%rbp), %rdi
movq %rdi, -0x310(%rbp)
callq 0x1e810
movq -0x2f8(%rbp), %rax
movq -0x310(%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 0x65c6(%rip), %rsi      # 0x437ea
leaq -0x2b8(%rbp), %rdi
callq 0x1e730
jmp 0x3d232
movq -0x2f8(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
callq 0x1fb30
jmp 0x3d247
leaq -0x2b8(%rbp), %rdi
callq 0x1e0e0
leaq -0x2d8(%rbp), %rdi
callq 0x1eba0
jmp 0x3d2a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0x3d293
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x2b8(%rbp), %rdi
callq 0x1e0e0
leaq -0x2d8(%rbp), %rdi
callq 0x1eba0
jmp 0x3d2aa
addq $0x320, %rsp            # imm = 0x320
popq %rbp
retq
movq -0x128(%rbp), %rdi
callq 0x20540
nopw %cs:(%rax,%rax)