// File: /workspace/github_cpp_makefile_star2_O3/dustin[P]kvtest/ep.cc
// Function: kvtest::EventuallyPersistentStore::flushSome(std::queue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::deque<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*, kvtest::Callback<bool>&)
void EventuallyPersistentStore::flushSome(std::queue<std::string> *q,
                                             Callback<bool> &cb) {

        std::string key = q->front();
        q->pop();

        int bucket_num = storage.bucket(key);
        LockHolder lh(storage.getMutex(bucket_num));
        StoredValue *v = storage.unlocked_find(key, bucket_num);

        bool found = v != NULL;
        bool isDirty = (found && v->isDirty());
        const char *val = NULL;
        if (isDirty) {
            v->markClean();
            // Copy it for the duration.
            val = strdup(v->getValue());
        }
        lh.unlock();

        if (found && isDirty) {
            underlying->set(key, val, cb);
        } else if (!found) {
            underlying->del(key, cb);
        }

        free((void*)val);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x10(%rsi), %rax
leaq 0x28(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x18(%rsp), %rdi
callq 0x3cd2
movq %r15, %rdi
callq 0x7ec0
cmpb $0x0, 0x30(%r14)
je 0x7192
movq 0x18(%rsp), %rax
movb (%rax), %dl
testb %dl, %dl
je 0x704f
incq %rax
movl $0x1505, %esi           # imm = 0x1505
movl %esi, %ecx
movsbl %dl, %edx
shll $0x5, %ecx
addl %esi, %ecx
xorl %edx, %ecx
movb (%rax), %dl
incq %rax
movl %ecx, %esi
testb %dl, %dl
jne 0x7038
jmp 0x7054
movl $0x1505, %ecx           # imm = 0x1505
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
movl 0x20(%r14), %ecx
cltd
idivl %ecx
testl %ecx, %ecx
js 0x71b1
movl 0x28(%r14), %ecx
testl %ecx, %ecx
js 0x71d0
movl %edx, %ebp
movl %edx, %eax
xorl %edx, %edx
divl %ecx
leaq (%rdx,%rdx,4), %rsi
shlq $0x3, %rsi
addq 0x40(%r14), %rsi
leaq 0x8(%rsp), %rdi
callq 0x5c1e
movq 0x38(%r14), %rax
movl %ebp, %ecx
movq (%rax,%rcx,8), %r13
movb $0x1, %bpl
testq %r13, %r13
je 0x70cd
leaq 0x18(%rsp), %r12
xorl %r15d, %r15d
leaq 0x8(%r13), %rsi
movq %r12, %rdi
callq 0x3050
testl %eax, %eax
je 0x7165
movq 0x30(%r13), %r13
testq %r13, %r13
jne 0x70ae
jmp 0x70d0
xorl %r15d, %r15d
movb $0x1, %r12b
cmpb $0x0, 0x10(%rsp)
jne 0x70e9
movq 0x8(%rsp), %rdi
callq 0x31e0
movb $0x1, 0x10(%rsp)
orb %r12b, %bpl
je 0x710c
testb %r12b, %r12b
leaq 0x28(%rsp), %r12
je 0x7126
movq 0x8(%r14), %rdi
movq (%rdi), %rax
leaq 0x18(%rsp), %rsi
movq %rbx, %rdx
callq *0x38(%rax)
jmp 0x7126
movq 0x8(%r14), %rdi
movq (%rdi), %rax
leaq 0x18(%rsp), %rsi
movq %r15, %rdx
movq %rbx, %rcx
leaq 0x28(%rsp), %r12
callq *0x28(%rax)
movq %r15, %rdi
callq 0x32d0
cmpb $0x0, 0x10(%rsp)
jne 0x713f
movq 0x8(%rsp), %rdi
callq 0x31e0
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x7156
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3280
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x1, (%r13)
jne 0x7187
movb $0x0, (%r13)
movq 0x28(%r13), %rdi
callq 0x3410
movq %rax, %r15
xorl %ebp, %ebp
xorl %r12d, %r12d
jmp 0x70d3
xorl %r12d, %r12d
xorl %r15d, %r15d
jmp 0x70d3
leaq 0x1604(%rip), %rdi      # 0x879d
leaq 0x15d9(%rip), %rsi      # 0x8779
leaq 0x1661(%rip), %rcx      # 0x8808
movl $0x9c, %edx
callq 0x3160
leaq 0x16af(%rip), %rdi      # 0x8867
leaq 0x15ba(%rip), %rsi      # 0x8779
leaq 0x166f(%rip), %rcx      # 0x8835
movl $0xab, %edx
callq 0x3160
leaq 0x16a7(%rip), %rdi      # 0x887e
leaq 0x159b(%rip), %rsi      # 0x8779
leaq 0x1650(%rip), %rcx      # 0x8835
movl $0xae, %edx
callq 0x3160
jmp 0x71f6
movq %rax, %r14
jmp 0x720a
movq %rax, %r14
cmpb $0x0, 0x10(%rsp)
jne 0x720a
movq 0x8(%rsp), %rdi
callq 0x31e0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x7226
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3280
movq %r14, %rdi
callq 0x33e0