// File: /workspace/github_cpp_makefile_star2_O2/dustin[P]kvtest/tests.cc
// Function: WriteTest::run(kvtest::KVStore*)
bool WriteTest::run(KVStore *tut) {
    int i = 0;
    setup_alarm(5);
    CountingCallback cb;
    time_t start = time(NULL);

    for(i = 0 ; !alarmed; i++) {
        std::stringstream kStream;
        std::stringstream vStream;
        kStream << "testKey" << i;
        vStream << "testValue" << i;

        std::string key = kStream.str();
        std::string value = vStream.str();

        tut->set(key, value, cb);
    }

    // Last one to wait for a commit.
    RememberingCallback<bool> cbLast;
    tut->noop(cbLast);
    cbLast.waitForValue();
    time_t end = time(NULL);

    assertEquals(i, cb.num_calls());

    int delta = (int)(end - start);
    std::cout << "Ran " << i << " operations in "
              << delta << "s ("
              << (i/delta) << " ops/s)"
              << std::endl;
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x398, %rsp            # imm = 0x398
movq %rsi, %r12
movq %rdi, 0x8(%rsp)
pushq $0x5
popq %rdi
callq 0x4812
leaq 0x10(%rsp), %rdi
callq 0x4f12
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x3220
movq %rax, (%rsp)
leaq 0x88(%rsp), %rbp
leaq 0x210(%rsp), %r14
leaq 0x68(%rsp), %r15
leaq 0x48(%rsp), %r13
cmpb $0x0, 0x8c3a(%rip)      # 0xd243
jne 0x46b7
movq %rbp, %rdi
callq 0x3180
movq %r14, %rdi
callq 0x3180
leaq 0x98(%rsp), %rdi
leaq 0x3b0c(%rip), %rsi      # 0x813a
callq 0x3240
movq %rax, %rdi
movl %ebx, %esi
callq 0x33b0
leaq 0x220(%rsp), %rdi
leaq 0x3af6(%rip), %rsi      # 0x8142
callq 0x3240
movq %rax, %rdi
movl %ebx, %esi
callq 0x33b0
movq %r15, %rdi
leaq 0xa0(%rsp), %rsi
callq 0x3360
movq %r13, %rdi
leaq 0x228(%rsp), %rsi
callq 0x3360
movq (%r12), %rax
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
leaq 0x10(%rsp), %rcx
callq *0x20(%rax)
movq %r13, %rdi
callq 0x30d0
movq %r15, %rdi
callq 0x30d0
movq %r14, %rdi
callq 0x31b0
movq %rbp, %rdi
callq 0x31b0
incl %ebx
jmp 0x4602
leaq 0x88(%rsp), %rdi
callq 0x4aba
movq (%r12), %rax
leaq 0x88(%rsp), %rsi
movq %r12, %rdi
callq *0x18(%rax)
leaq 0x88(%rsp), %rdi
callq 0x4ba8
xorl %edi, %edi
callq 0x3220
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x503a
movq 0x8(%rsp), %rdi
movl %ebx, %esi
movl %eax, %edx
callq 0x4f7e
movq 0x88bc(%rip), %rdi      # 0xcfc8
leaq 0x3a39(%rip), %rsi      # 0x814c
callq 0x3240
movq %rax, %rdi
movl %ebx, %esi
callq 0x33b0
leaq 0x3a28(%rip), %rsi      # 0x8151
movq %rax, %rdi
callq 0x3240
subl (%rsp), %r14d
movq %rax, %rdi
movl %r14d, %esi
callq 0x33b0
leaq 0x3a1a(%rip), %rsi      # 0x8161
movq %rax, %rdi
callq 0x3240
movq %rax, %rdi
movl %ebx, %eax
cltd
idivl %r14d
movl %eax, %esi
callq 0x33b0
leaq 0x39ff(%rip), %rsi      # 0x8165
movq %rax, %rdi
callq 0x3240
movq %rax, %rdi
callq 0x30e0
leaq 0x88(%rsp), %rdi
callq 0x4eee
leaq 0x10(%rsp), %rdi
callq 0x506a
movb $0x1, %al
addq $0x398, %rsp            # imm = 0x398
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x47d9
jmp 0x47a7
jmp 0x47a7
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x4eee
jmp 0x4800
jmp 0x47e3
movq %rax, %rbx
jmp 0x47cd
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x30d0
leaq 0x68(%rsp), %rdi
callq 0x30d0
jmp 0x47e6
movq %rax, %rbx
jmp 0x4800
movq %rax, %rbx
jmp 0x47f3
movq %rax, %rbx
leaq 0x210(%rsp), %rdi
callq 0x31b0
leaq 0x88(%rsp), %rdi
callq 0x31b0
leaq 0x10(%rsp), %rdi
callq 0x506a
movq %rbx, %rdi
callq 0x33c0