LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/dustin[P]kvtest/suite.cc
// Function: kvtest::TestSuite::run()
bool TestSuite::run() {
    std::list<Test*>::iterator it;
    bool success = true;
    for (it=tests.begin() ; it != tests.end(); it++ ) {
        success = false;
        Test *t = *it;
        std::cout << "Running test ``" << *t << "'' ";
        try {
            tut->reset();
            t->run(tut);
            std::cout << "PASS" << std::endl;
            success = true;
        } catch(AssertionError &e) {
            std::cout << "FAIL: " << e.what() << std::endl;
        } catch(std::runtime_error &e) {
            std::cout << "EXCEPTION: " << e.what() << std::endl;
        } catch(...) {
            std::cout << "EXCEPTION (unknown)" << std::endl;
        }
    }
    return success;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x8(%rdi), %r15
movq 0x8(%rdi), %r12
cmpq %r15, %r12
je 0x6200
movq %rdi, %rbx
movq 0x6f18(%rip), %r14      # 0xcfc8
leaq 0x33b3(%rip), %r13      # 0x946a
movq 0x10(%r12), %rbp
movl $0xf, %edx
movq %r14, %rdi
leaq 0x338b(%rip), %rsi      # 0x9456
callq 0x32a0
movq %r14, %rdi
movq %rbp, %rsi
callq 0x6240
movl $0x3, %edx
movq %rax, %rdi
leaq 0x337c(%rip), %rsi      # 0x9466
callq 0x32a0
movq (%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq (%rbx), %rsi
movq (%rbp), %rax
movq %rbp, %rdi
callq *0x10(%rax)
movl $0x4, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x32a0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movb $0x1, %bpl
movq %rax, %rdi
callq 0x3180
movq (%r12), %r12
cmpq %r15, %r12
jne 0x60b7
jmp 0x6203
movq %rdx, %rbp
movq %rax, %rdi
cmpl $0x3, %ebp
jne 0x6197
callq 0x30d0
movq %rax, %rbp
movl $0x6, %edx
movq %r14, %rdi
leaq 0x331c(%rip), %rsi      # 0x948f
callq 0x32a0
movq (%rbp), %rax
movq %rbp, %rdi
callq *0x10(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x3260
movq %rax, %rdi
callq 0x30f0
jmp 0x61f4
callq 0x30d0
movq %rax, (%rsp)
cmpl $0x2, %ebp
jne 0x61d8
movl $0xb, %edx
movq %r14, %rdi
leaq 0x32cf(%rip), %rsi      # 0x9483
callq 0x32a0
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x3260
movq %rax, %rdi
callq 0x30f0
jmp 0x61f4
movl $0x13, %edx
movq %r14, %rdi
leaq 0x3288(%rip), %rsi      # 0x946f
callq 0x32a0
movq %r14, %rdi
callq 0x30f0
callq 0x33b0
xorl %ebp, %ebp
jmp 0x613f
movb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
callq 0x33b0
jmp 0x6230
movq %rax, %rbx
callq 0x33b0
jmp 0x6230
movq %rax, %rbx
callq 0x33b0
movq %rbx, %rdi
callq 0x33e0
movq %rax, %rdi
callq 0x398f
// File: /workspace/github_cpp_makefile_star2_O1/dustin[P]kvtest/values.cc
// Function: kvtest::Values::Values(unsigned long, unsigned long, unsigned long)
Values::Values(size_t n, size_t lower, size_t upper) : values(n) {
        for (int i = 0; i < (int)n; i++) {
            values[i] = generateValue(lower, upper);
        }
        assert(values.size() == n);

        it = values.begin();
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x7(%rsp), %rdx
callq 0x643c
movq $0x0, 0x18(%r14)
movq %rbx, 0x8(%rsp)
testl %ebx, %ebx
jle 0x65e8
movq 0x10(%rsp), %rax
subq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x8(%rsp), %rax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, 0x20(%rsp)
xorl %r12d, %r12d
movabsq $0xc9714fbcda3ac11, %rbx # imm = 0xC9714FBCDA3AC11
leaq 0x2f9c(%rip), %r15      # 0x94ef
movq %r14, 0x28(%rsp)
callq 0x3110
movq %rax, %r13
andq 0x30(%rsp), %r13
addq 0x18(%rsp), %r13
jb 0x6610
cmpq 0x10(%rsp), %r13
ja 0x662f
leaq 0x1(%r13), %rdi
movl $0x1, %esi
callq 0x3170
movq %rax, %rbp
testl %r13d, %r13d
jle 0x65ce
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %r14d, %r14d
callq 0x3110
movq %rax, %rcx
mulq %rbx
movq %rcx, %rax
subq %rdx, %rax
shrq %rax
addq %rdx, %rax
shrq $0x5, %rax
imulq $0x3d, %rax, %rax
subq %rax, %rcx
movb (%r15,%rcx), %al
movb %al, (%rbp,%r14)
incq %r14
cmpq %r14, %r13
jne 0x659b
movq 0x28(%rsp), %r14
movq (%r14), %rax
movq %rbp, (%rax,%r12,8)
incq %r12
cmpq 0x20(%rsp), %r12
jne 0x6558
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq 0x8(%rsp), %rcx
jne 0x664e
movq %rax, 0x18(%r14)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2f93(%rip), %rdi      # 0x95aa
leaq 0x2f53(%rip), %rsi      # 0x9571
leaq 0x2f91(%rip), %rcx      # 0x95b6
movl $0x17, %edx
callq 0x3160
leaq 0x2fb2(%rip), %rdi      # 0x95e8
leaq 0x2f34(%rip), %rsi      # 0x9571
leaq 0x2f72(%rip), %rcx      # 0x95b6
movl $0x18, %edx
callq 0x3160
leaq 0x2f09(%rip), %rdi      # 0x955e
leaq 0x2f15(%rip), %rsi      # 0x9571
leaq 0x2f18(%rip), %rcx      # 0x957b
movl $0x29, %edx
callq 0x3160
nop
// File: /workspace/github_cpp_makefile_star2_O1/dustin[P]kvtest/ep.cc
// Function: kvtest::EventuallyPersistentStore::EventuallyPersistentStore(kvtest::KVStore*, unsigned long)
EventuallyPersistentStore::EventuallyPersistentStore(KVStore *t,
                                                         size_t est) {

        pthread_mutex_init(&mutex, NULL);
        pthread_cond_init(&cond, NULL);
        est_size = est;
        towrite = NULL;
        initQueue();
        flusher = new Flusher(this);

        // Run in a thread...
        if(pthread_create(&thread, NULL, launch_flusher_thread, flusher)
           != 0) {
            throw std::runtime_error("Error initializing queue thread");
        }

        underlying = t;
        assert(underlying);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
leaq 0x661c(%rip), %rax      # 0xcd10
movq %rax, (%rdi)
leaq 0x20(%rdi), %rbx
movl $0x30005, %esi          # imm = 0x30005
movl $0xc1, %edx
movq %rbx, %rdi
callq 0x72f0
leaq 0x48(%r15), %rdi
xorl %esi, %esi
callq 0x3350
leaq 0x70(%r15), %rdi
xorl %esi, %esi
callq 0x32e0
movq %r12, 0x10(%r15)
movq $0x0, 0xa0(%r15)
movq %r15, %rdi
callq 0x67f2
movl $0x10, %edi
callq 0x3270
movq %r15, (%rax)
movb $0x1, 0x8(%rax)
movq %rax, 0x18(%r15)
leaq 0xa8(%r15), %rdi
leaq 0x119(%rip), %rdx       # 0x6876
xorl %esi, %esi
movq %rax, %rcx
callq 0x3400
testl %eax, %eax
jne 0x6780
movq %r14, 0x8(%r15)
testq %r14, %r14
je 0x67b2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x3100
movq %rax, %r14
leaq 0x2e60(%rip), %rsi      # 0x95f4
movq %rax, %rdi
callq 0x30c0
movq 0x684d(%rip), %rsi      # 0xcff0
movq 0x680e(%rip), %rdx      # 0xcfb8
movq %r14, %rdi
callq 0x33c0
leaq 0x2e5b(%rip), %rdi      # 0x9614
leaq 0x2e5f(%rip), %rsi      # 0x961f
leaq 0x2e5e(%rip), %rcx      # 0x9625
movl $0x23, %edx
callq 0x3160
movq %rax, %r15
movq %r14, %rdi
callq 0x31c0
jmp 0x67e1
movq %rax, %r15
movq %rbx, %rdi
callq 0x735c
movq %r15, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/dustin[P]kvtest/ep.cc
// Function: kvtest::launch_flusher_thread(void*)
static void* launch_flusher_thread(void* arg) {
        Flusher *flusher = (Flusher*) arg;
        try {
            flusher->run();
        } catch(...) {
            std::cerr << "Caught a fatal exception in the thread" << std::endl;
        }
        return NULL;
    }

// Assembly:
pushq %rbx
callq 0x7852
xorl %eax, %eax
popq %rbx
retq
movq %rax, %rdi
callq 0x30d0
movq 0x6759(%rip), %rdi      # 0xcfe8
leaq 0x2e82(%rip), %rsi      # 0x9718
movl $0x26, %edx
callq 0x32a0
movq 0x6741(%rip), %rdi      # 0xcfe8
callq 0x30f0
callq 0x33b0
jmp 0x687c
movq %rax, %rbx
callq 0x33b0
movq %rbx, %rdi
callq 0x33e0
movq %rax, %rdi
callq 0x398f
nop
// File: /workspace/github_cpp_makefile_star2_O1/dustin[P]kvtest/ep.cc
// Function: kvtest::EventuallyPersistentStore::~EventuallyPersistentStore()
EventuallyPersistentStore::~EventuallyPersistentStore() {
        LockHolder lh(&mutex);
        flusher->stop();
        if(pthread_cond_signal(&cond) != 0) {
            throw std::runtime_error("Error signaling change.");
        }
        lh.unlock();
        pthread_join(thread, NULL);
        delete flusher;
        delete towrite;
        pthread_cond_destroy(&cond);
        pthread_mutex_destroy(&mutex);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x642f(%rip), %rax      # 0xcd10
movq %rax, (%rdi)
leaq 0x48(%rdi), %r14
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x5c64
movq 0x18(%rbx), %rax
movb $0x0, 0x8(%rax)
leaq 0x70(%rbx), %r15
movq %r15, %rdi
callq 0x3030
testl %eax, %eax
jne 0x69ab
cmpb $0x0, 0x10(%rsp)
jne 0x6927
movq 0x8(%rsp), %rdi
callq 0x31e0
movb $0x1, 0x10(%rsp)
movq 0xa8(%rbx), %rdi
xorl %esi, %esi
callq 0x3220
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x694c
movb $0x0, 0x8(%rdi)
movl $0x10, %esi
callq 0x3280
movq 0xa0(%rbx), %r12
testq %r12, %r12
je 0x696d
movq %r12, %rdi
callq 0x7938
movl $0x50, %esi
movq %r12, %rdi
callq 0x3280
movq %r15, %rdi
callq 0x3430
movq %r14, %rdi
callq 0x32c0
cmpb $0x0, 0x10(%rsp)
jne 0x6993
movq 0x8(%rsp), %rdi
callq 0x31e0
movb $0x1, 0x10(%rsp)
addq $0x20, %rbx
movq %rbx, %rdi
callq 0x735c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x3100
movq %rax, %rbx
leaq 0x2cb6(%rip), %rsi      # 0x9675
movq %rax, %rdi
callq 0x30c0
movq 0x6622(%rip), %rsi      # 0xcff0
movq 0x65e3(%rip), %rdx      # 0xcfb8
movq %rbx, %rdi
callq 0x33c0
movq %rax, %rdi
callq 0x398f
nop
// File: /workspace/github_cpp_makefile_star2_O1/dustin[P]kvtest/ep.cc
// Function: kvtest::EventuallyPersistentStore::set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, kvtest::Callback<bool>&)
void EventuallyPersistentStore::set(std::string &key, std::string &val,
                                        Callback<bool> &cb) {
        mutation_type_t mtype = storage.set(key, val);

        if (mtype == WAS_CLEAN || mtype == NOT_FOUND) {
            LockHolder lh(&mutex);
            queueDirty(key);
        }
        bool rv = true;
        cb.callback(rv);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
addq $0x20, %rdi
movq (%rdx), %rdx
callq 0x73bc
cmpl $0x1, %eax
ja 0x6a4d
leaq 0x48(%r15), %rsi
movq %rsp, %rdi
callq 0x5c64
movq %r15, %rdi
movq %r14, %rsi
callq 0x6a86
cmpb $0x0, 0x8(%rsp)
jne 0x6a4d
movq (%rsp), %rdi
callq 0x31e0
movb $0x1, 0x8(%rsp)
movq %rsp, %rsi
movb $0x1, (%rsi)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
cmpb $0x0, 0x8(%rsp)
jne 0x6a7e
movq (%rsp), %rdi
callq 0x31e0
movb $0x1, 0x8(%rsp)
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O1/dustin[P]kvtest/ep.cc
// Function: kvtest::EventuallyPersistentStore::queueDirty(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void EventuallyPersistentStore::queueDirty(std::string &key) {
        // Assume locked.
        towrite->push(key);
        if(pthread_cond_signal(&cond) != 0) {
            throw std::runtime_error("Error signaling change.");
        }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xa0(%rdi), %rdi
callq 0x7cf6
addq $0x70, %rbx
movq %rbx, %rdi
callq 0x3030
testl %eax, %eax
jne 0x6ab1
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x3100
movq %rax, %rbx
leaq 0x2bb0(%rip), %rsi      # 0x9675
movq %rax, %rdi
callq 0x30c0
movq 0x651c(%rip), %rsi      # 0xcff0
movq 0x64dd(%rip), %rdx      # 0xcfb8
movq %rbx, %rdi
callq 0x33c0
movq %rax, %r14
movq %rbx, %rdi
callq 0x31c0
movq %r14, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O1/dustin[P]kvtest/ep.cc
// Function: kvtest::EventuallyPersistentStore::set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char const*, kvtest::Callback<bool>&)
void EventuallyPersistentStore::set(std::string &key, const char *val,
                                        Callback<bool> &cb) {
        mutation_type_t mtype = storage.set(key, val);

        if (mtype == WAS_CLEAN || mtype == NOT_FOUND) {
            LockHolder lh(&mutex);
            queueDirty(key);
        }
        bool rv = true;
        cb.callback(rv);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
addq $0x20, %rdi
callq 0x73bc
cmpl $0x1, %eax
ja 0x6b42
leaq 0x48(%r15), %rsi
movq %rsp, %rdi
callq 0x5c64
movq %r15, %rdi
movq %r14, %rsi
callq 0x6a86
cmpb $0x0, 0x8(%rsp)
jne 0x6b42
movq (%rsp), %rdi
callq 0x31e0
movb $0x1, 0x8(%rsp)
movq %rsp, %rsi
movb $0x1, (%rsi)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
cmpb $0x0, 0x8(%rsp)
jne 0x6b73
movq (%rsp), %rdi
callq 0x31e0
movb $0x1, 0x8(%rsp)
movq %rbx, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/dustin[P]kvtest/ep.cc
// Function: kvtest::EventuallyPersistentStore::reset()
void EventuallyPersistentStore::reset() {
        flush(false);
        LockHolder lh(&mutex);
        underlying->reset();
        delete towrite;
        towrite = NULL;
        initQueue();
        storage.clear();
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorl %esi, %esi
callq 0x6c24
leaq 0x48(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0x5c64
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0xa0(%rbx), %r14
testq %r14, %r14
je 0x6bc6
movq %r14, %rdi
callq 0x7938
movl $0x50, %esi
movq %r14, %rdi
callq 0x3280
movq $0x0, 0xa0(%rbx)
movq %rbx, %rdi
callq 0x67f2
addq $0x20, %rbx
movq %rbx, %rdi
callq 0x7586
cmpb $0x0, 0x10(%rsp)
jne 0x6bfb
movq 0x8(%rsp), %rdi
callq 0x31e0
movb $0x1, 0x10(%rsp)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
cmpb $0x0, 0x10(%rsp)
jne 0x6c1c
movq 0x8(%rsp), %rdi
callq 0x31e0
movb $0x1, 0x10(%rsp)
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O1/dustin[P]kvtest/ep.cc
// Function: kvtest::EventuallyPersistentStore::flush(bool)
void EventuallyPersistentStore::flush(bool shouldWait) {
        LockHolder lh(&mutex);

        if (towrite->empty()) {
            if (shouldWait) {
                if(pthread_cond_wait(&cond, &mutex) != 0) {
                    throw std::runtime_error("Error waiting for signal.");
                }
            }
        } else {
            std::queue<std::string> *q = towrite;
            towrite = NULL;
            initQueue();
            lh.unlock();

            RememberingCallback<bool> cb;
            assert(underlying);

            underlying->begin();
            while (!q->empty()) {
                flushSome(q, cb);
            }
            underlying->commit();

            delete q;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x48(%rdi), %r15
movq %rsp, %rdi
movq %r15, %rsi
callq 0x5c64
movq 0xa0(%rbx), %r14
movq 0x30(%r14), %rax
cmpq 0x10(%r14), %rax
je 0x6cfb
movq $0x0, 0xa0(%rbx)
movq %rbx, %rdi
callq 0x67f2
cmpb $0x0, 0x8(%rsp)
jne 0x6c7f
movq (%rsp), %rdi
callq 0x31e0
movb $0x1, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x538a
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x6d33
movq (%rdi), %rax
callq *0x40(%rax)
leaq 0x10(%rsp), %r15
movq 0x30(%r14), %rax
cmpq 0x10(%r14), %rax
je 0x6cbb
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x70a8
jmp 0x6ca1
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
movq %r14, %rdi
callq 0x7938
movl $0x50, %esi
movq %r14, %rdi
callq 0x3280
leaq 0x5f9f(%rip), %rax      # 0xcc80
leaq 0x20(%rsp), %rdi
movq %rax, -0x10(%rdi)
callq 0x32c0
leaq 0x48(%rsp), %rdi
callq 0x3430
jmp 0x6d13
testb %bpl, %bpl
je 0x6d13
addq $0x70, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3360
testl %eax, %eax
jne 0x6d52
cmpb $0x0, 0x8(%rsp)
jne 0x6d28
movq (%rsp), %rdi
callq 0x31e0
movb $0x1, 0x8(%rsp)
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28da(%rip), %rdi      # 0x9614
leaq 0x28de(%rip), %rsi      # 0x961f
leaq 0x299c(%rip), %rcx      # 0x96e4
movl $0x88, %edx
callq 0x3160
movl $0x10, %edi
callq 0x3100
movq %rax, %r14
leaq 0x2964(%rip), %rsi      # 0x96ca
movq %rax, %rdi
callq 0x30c0
movq 0x627b(%rip), %rsi      # 0xcff0
movq 0x623c(%rip), %rdx      # 0xcfb8
movq %r14, %rdi
callq 0x33c0
movq %rax, %rbx
movq %r14, %rdi
callq 0x31c0
jmp 0x6dbe
jmp 0x6d95
jmp 0x6d95
movq %rax, %rbx
jmp 0x6dbe
jmp 0x6d9c
movq %rax, %rbx
leaq 0x5eda(%rip), %rax      # 0xcc80
leaq 0x20(%rsp), %rdi
movq %rax, -0x10(%rdi)
callq 0x32c0
leaq 0x48(%rsp), %rdi
callq 0x3430
cmpb $0x0, 0x8(%rsp)
jne 0x6dd3
movq (%rsp), %rdi
callq 0x31e0
movb $0x1, 0x8(%rsp)
movq %rbx, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/dustin[P]kvtest/ep.cc
// Function: kvtest::EventuallyPersistentStore::del(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, kvtest::Callback<bool>&)
void EventuallyPersistentStore::del(std::string &key, Callback<bool> &cb) {
        bool existed = storage.del(key);
        if (existed) {
            queueDirty(key);
        }
        cb.callback(existed);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
addq $0x20, %rdi
callq 0x76ac
movb %al, 0xf(%rsp)
testb %al, %al
je 0x7090
movq %r15, %rdi
movq %r14, %rsi
callq 0x6a86
movq (%rbx), %rax
leaq 0xf(%rsp), %rsi
movq %rbx, %rdi
callq *0x10(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/dustin[P]kvtest/./ep.hh
// Function: kvtest::HashTable::HashTable(unsigned long, unsigned long)
HashTable(size_t s = 196613, size_t l = 193) {
            size = s;
            n_locks = l;
            active = true;
            values = (StoredValue**)calloc(s, sizeof(StoredValue**));
            mutexes = (pthread_mutex_t*)calloc(l, sizeof(pthread_mutex_t));
            for (int i = 0; i < (int)n_locks; i++) {
                pthread_mutex_init(&mutexes[i], NULL);
            }
        }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rax
movq %rdi, %rbx
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movb $0x1, 0x10(%rdi)
movl $0x8, %esi
movq %rax, %rdi
callq 0x3170
movq %rax, 0x18(%rbx)
movl $0x28, %esi
movq %r14, %rdi
callq 0x3170
movq %rax, 0x20(%rbx)
cmpl $0x0, 0x8(%rbx)
jle 0x7355
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x20(%rbx), %rdi
addq %r14, %rdi
xorl %esi, %esi
callq 0x3350
incq %r15
movslq 0x8(%rbx), %rax
addq $0x28, %r14
cmpq %rax, %r15
jl 0x7337
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/dustin[P]kvtest/./ep.hh
// Function: kvtest::HashTable::~HashTable()
~HashTable() {
            clear();
            for (int i = 0; i < (int)n_locks; i++) {
                pthread_mutex_destroy(&mutexes[i]);
            }
            free(mutexes);
            free(values);
            mutexes = NULL;
            values = NULL;
            active = false;
        }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x7586
cmpl $0x0, 0x8(%rbx)
jle 0x7391
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x20(%rbx), %rdi
addq %r14, %rdi
callq 0x32c0
incq %r15
movslq 0x8(%rbx), %rax
addq $0x28, %r14
cmpq %rax, %r15
jl 0x7375
movq 0x20(%rbx), %rdi
callq 0x32d0
movq 0x18(%rbx), %rdi
callq 0x32d0
movb $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x398f
// File: /workspace/github_cpp_makefile_star2_O1/dustin[P]kvtest/./ep.hh
// Function: kvtest::HashTable::set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char const*)
mutation_type_t set(std::string &key, const char *val) {
            assert(active);
            mutation_type_t rv = NOT_FOUND;
            int bucket_num = bucket(key);
            LockHolder lh(getMutex(bucket_num));
            StoredValue *v = unlocked_find(key, bucket_num);
            if (v) {
                rv = v->isClean() ? WAS_CLEAN : WAS_DIRTY;
                v->setValue(val);
            } else {
                v = new StoredValue(key, val, values[bucket_num]);
                values[bucket_num] = v;
            }
            return rv;
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpb $0x0, 0x10(%rdi)
je 0x74f4
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rsi), %rax
movb (%rax), %dl
testb %dl, %dl
je 0x7407
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 0x73f0
jmp 0x740c
movl $0x1505, %ecx           # imm = 0x1505
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
movl (%r14), %ecx
cltd
idivl %ecx
testl %ecx, %ecx
js 0x7513
movl 0x8(%r14), %ecx
testl %ecx, %ecx
js 0x7532
movl %edx, %ebp
movl %edx, %eax
xorl %edx, %edx
divl %ecx
leaq (%rdx,%rdx,4), %rsi
shlq $0x3, %rsi
addq 0x20(%r14), %rsi
leaq 0x8(%rsp), %rdi
callq 0x5c64
movq 0x18(%r14), %rax
movl %ebp, %r13d
movq (%rax,%r13,8), %r12
testq %r12, %r12
je 0x7473
leaq 0x8(%r12), %rsi
movq %r15, %rdi
callq 0x3050
testl %eax, %eax
je 0x7476
movq 0x30(%r12), %r12
jmp 0x7456
xorl %r12d, %r12d
testq %r12, %r12
je 0x74a0
movzbl (%r12), %ebp
incl %ebp
movq 0x28(%r12), %rdi
callq 0x32d0
movq %rbx, %rdi
callq 0x3410
movq %rax, 0x28(%r12)
movb $0x1, (%r12)
jmp 0x74cd
movl $0x38, %edi
callq 0x3270
movq %rax, %r12
movq 0x18(%r14), %rax
movq (%rax,%r13,8), %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x7ad6
movq 0x18(%r14), %rax
movq %r12, (%rax,%r13,8)
xorl %ebp, %ebp
cmpb $0x0, 0x10(%rsp)
jne 0x74e3
movq 0x8(%rsp), %rdi
callq 0x31e0
movb $0x1, 0x10(%rsp)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x22a2(%rip), %rdi      # 0x979d
leaq 0x2277(%rip), %rsi      # 0x9779
leaq 0x229b(%rip), %rcx      # 0x97a4
movl $0x81, %edx
callq 0x3160
leaq 0x234d(%rip), %rdi      # 0x9867
leaq 0x2258(%rip), %rsi      # 0x9779
leaq 0x230d(%rip), %rcx      # 0x9835
movl $0xab, %edx
callq 0x3160
leaq 0x2345(%rip), %rdi      # 0x987e
leaq 0x2239(%rip), %rsi      # 0x9779
leaq 0x22ee(%rip), %rcx      # 0x9835
movl $0xae, %edx
callq 0x3160
movq %rax, %rbx
movl $0x38, %esi
movq %r12, %rdi
callq 0x3280
jmp 0x7568
jmp 0x7565
movq %rax, %rbx
cmpb $0x0, 0x10(%rsp)
jne 0x757e
movq 0x8(%rsp), %rdi
callq 0x31e0
movb $0x1, 0x10(%rsp)
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O1/dustin[P]kvtest/./ep.hh
// Function: kvtest::HashTable::clear()
void clear() {
            assert(active);
            for (int i = 0; i < (int)size; i++) {
                LockHolder lh(getMutex(i));
                while (values[i]) {
                    StoredValue *v = values[i];
                    values[i] = v->next;
                    delete v;
                }
            }
        }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpb $0x1, 0x10(%rdi)
jne 0x768c
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jle 0x7642
xorl %r14d, %r14d
leaq 0x8(%rsp), %r15
cmpb $0x0, 0x10(%rbx)
je 0x766d
movl 0x8(%rbx), %ecx
testl %ecx, %ecx
js 0x764e
movl %r14d, %eax
xorl %edx, %edx
divl %ecx
leaq (%rdx,%rdx,4), %rsi
shlq $0x3, %rsi
addq 0x20(%rbx), %rsi
movq %r15, %rdi
callq 0x5c64
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %r12
testq %r12, %r12
je 0x761d
leaq (%rax,%r14,8), %rax
movq 0x30(%r12), %rcx
movq %rcx, (%rax)
movq %r12, %rdi
callq 0x7b4e
movl $0x38, %esi
movq %r12, %rdi
callq 0x3280
movq 0x18(%rbx), %rax
leaq (%rax,%r14,8), %rax
movq (%rax), %r12
testq %r12, %r12
jne 0x75f0
cmpb $0x0, 0x10(%rsp)
jne 0x7633
movq 0x8(%rsp), %rdi
callq 0x31e0
movb $0x1, 0x10(%rsp)
incq %r14
movslq (%rbx), %rax
cmpq %rax, %r14
jl 0x75af
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2229(%rip), %rdi      # 0x987e
leaq 0x211d(%rip), %rsi      # 0x9779
leaq 0x21d2(%rip), %rcx      # 0x9835
movl $0xae, %edx
callq 0x3160
leaq 0x2129(%rip), %rdi      # 0x979d
leaq 0x20fe(%rip), %rsi      # 0x9779
leaq 0x21b3(%rip), %rcx      # 0x9835
movl $0xaa, %edx
callq 0x3160
leaq 0x210a(%rip), %rdi      # 0x979d
leaq 0x20df(%rip), %rsi      # 0x9779
leaq 0x2147(%rip), %rcx      # 0x97e8
movl $0x69, %edx
callq 0x3160
nop
// File: /workspace/github_cpp_makefile_star2_O1/dustin[P]kvtest/./ep.hh
// Function: kvtest::HashTable::del(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool del(std::string &key) {
            assert(active);
            int bucket_num = bucket(key);
            LockHolder lh(getMutex(bucket_num));

            StoredValue *v = values[bucket_num];

            // Special case empty bucket.
            if (!v) {
                return false;
            }

            // Special case the first one
            if (key.compare(v->key) == 0) {
                values[bucket_num] = v->next;
                delete v;
                return true;
            }

            while (v->next) {
                if (key.compare(v->next->key) == 0) {
                    StoredValue *tmp = v->next;
                    v->next = v->next->next;
                    delete tmp;
                    return true;
                }
            }

            return false;
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpb $0x0, 0x10(%rdi)
je 0x77d2
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movb (%rax), %dl
testb %dl, %dl
je 0x76f2
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 0x76db
jmp 0x76f7
movl $0x1505, %ecx           # imm = 0x1505
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
movl (%r14), %ecx
cltd
idivl %ecx
testl %ecx, %ecx
js 0x77f1
movl 0x8(%r14), %ecx
testl %ecx, %ecx
js 0x7810
movl %edx, %r15d
xorl %ebp, %ebp
movl %edx, %eax
xorl %edx, %edx
divl %ecx
leaq (%rdx,%rdx,4), %rsi
shlq $0x3, %rsi
addq 0x20(%r14), %rsi
movq %rsp, %rdi
callq 0x5c64
movq 0x18(%r14), %rax
movl %r15d, %r12d
movq (%rax,%r12,8), %r15
testq %r15, %r15
je 0x77ae
leaq 0x8(%r15), %rsi
movq %rbx, %rdi
callq 0x3050
testl %eax, %eax
je 0x7786
movq 0x30(%r15), %rsi
testq %rsi, %rsi
je 0x77ac
addq $0x8, %rsi
movq %rbx, %rdi
callq 0x3050
testl %eax, %eax
jne 0x7757
movq 0x30(%r15), %rax
movq 0x30(%rax), %rcx
movq %rcx, 0x30(%r15)
movq %rax, %r15
testq %rax, %rax
jne 0x7792
jmp 0x77a7
movq 0x30(%r15), %rax
movq 0x18(%r14), %rcx
movq %rax, (%rcx,%r12,8)
movq %r15, %rdi
callq 0x7b4e
movl $0x38, %esi
movq %r15, %rdi
callq 0x3280
movb $0x1, %bpl
jmp 0x77ae
xorl %ebp, %ebp
cmpb $0x0, 0x8(%rsp)
jne 0x77c3
movq (%rsp), %rdi
callq 0x31e0
movb $0x1, 0x8(%rsp)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1fc4(%rip), %rdi      # 0x979d
leaq 0x1f99(%rip), %rsi      # 0x9779
leaq 0x20af(%rip), %rcx      # 0x9896
movl $0xb5, %edx
callq 0x3160
leaq 0x206f(%rip), %rdi      # 0x9867
leaq 0x1f7a(%rip), %rsi      # 0x9779
leaq 0x202f(%rip), %rcx      # 0x9835
movl $0xab, %edx
callq 0x3160
leaq 0x2067(%rip), %rdi      # 0x987e
leaq 0x1f5b(%rip), %rsi      # 0x9779
leaq 0x2010(%rip), %rcx      # 0x9835
movl $0xae, %edx
callq 0x3160
jmp 0x7831
movq %rax, %rbx
cmpb $0x0, 0x8(%rsp)
jne 0x7849
movq (%rsp), %rdi
callq 0x31e0
movb $0x1, 0x8(%rsp)
movq %rbx, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/dustin[P]kvtest/./ep.hh
// Function: kvtest::Flusher::run()
void run() {
            try {
                while(running) {
                    store->flush(true);
                }
                std::cout << "Shutting down flusher." << std::endl;
            } catch(std::runtime_error &e) {
                std::cerr << "Exception in executor loop: "
                          << e.what() << std::endl;
                assert(false);
            }
        }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movb 0x8(%rbx), %al
cmpb $0x1, %al
jne 0x786c
movq (%rbx), %rdi
movl $0x1, %esi
callq 0x6c24
jmp 0x7856
movq 0x5755(%rip), %rbx      # 0xcfc8
leaq 0x1ec5(%rip), %rsi      # 0x973f
movl $0x16, %edx
movq %rbx, %rdi
callq 0x32a0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq 0x5723(%rip), %rdi      # 0xcfc8
callq 0x3040
movq %rax, %rdi
callq 0x3180
popq %rbx
retq
jmp 0x78b6
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x7928
movq %rbx, %rdi
callq 0x30d0
movq %rax, %rbx
movq 0x5718(%rip), %rdi      # 0xcfe8
leaq 0x1e7f(%rip), %rsi      # 0x9756
movl $0x1c, %edx
callq 0x32a0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq 0x56f7(%rip), %rdi      # 0xcfe8
movq %rax, %rsi
callq 0x3260
movq %rax, %rdi
callq 0x30f0
leaq 0x1e6b(%rip), %rdi      # 0x9773
leaq 0x1e6a(%rip), %rsi      # 0x9779
leaq 0x1e6b(%rip), %rcx      # 0x9781
movl $0x11c, %edx            # imm = 0x11C
callq 0x3160
movq %rax, %rbx
callq 0x33b0
movq %rbx, %rdi
callq 0x33e0
movq %rax, %rdi
callq 0x398f
// File: /workspace/github_cpp_makefile_star2_O1/dustin[P]kvtest/./ep.hh
// Function: kvtest::StoredValue::StoredValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char const*, kvtest::StoredValue*)
StoredValue(std::string &k, const char *v, StoredValue *n) {
            key = k;
            value = NULL;
            setValue(v);
            dirty = true;
            next = n;
        }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r15
movq %rdi, %r14
leaq 0x8(%rdi), %r12
leaq 0x18(%rdi), %r13
movq %r13, 0x8(%rdi)
movq $0x0, 0x10(%rdi)
movb $0x0, 0x18(%rdi)
movq %r12, %rdi
callq 0x3130
movq $0x0, 0x28(%r14)
movq %r15, %rdi
callq 0x3410
movq %rax, 0x28(%r14)
movb $0x1, (%r14)
movq %rbx, 0x30(%r14)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x7b46
movq (%r13), %rsi
incq %rsi
callq 0x3280
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O1/theuni[P]libbtcnet/tests/multinet.cpp
// Function: CConnman::OnNeedOutgoingConnections[abi:cxx11](int)
std::list<CConnection> OnNeedOutgoingConnections(int need_count) final
    {
        std::list<CConnection> ret;
        if (!m_connections.empty())
            ret.splice(ret.end(), m_connections);
        return ret;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rdi, 0x8(%rdi)
movq %rdi, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x10(%rsi), %rdx
movq 0x10(%rsi), %rsi
cmpq %rdx, %rsi
je 0x4a64
movq %rbx, %rdi
callq 0x41b0
movq 0x20(%r14), %rax
addq %rax, 0x10(%rbx)
movq $0x0, 0x20(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/theuni[P]libbtcnet/tests/multinet.cpp
// Function: CConnman::OnOutgoingConnection(long, CConnection const&, CConnection const&)
bool OnOutgoingConnection(ConnID id, const CConnection& conn, const CConnection& resolved_conn) final
    {
        if (resolved_conn.GetNetConfig().message_start == mainnet_message_start)
            printf("mainnet connected first\n");
        else if (resolved_conn.GetNetConfig().message_start == testnet_message_start)
            printf("testnet connected first\n");
        Shutdown();
        return true;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r15
movq %rdi, %rbx
movq %rcx, %rdi
callq 0x7022
movq 0x10(%rax), %rdi
movq 0x18(%rax), %rax
movq %rax, %rdx
subq %rdi, %rdx
movq 0x17910(%rip), %rcx     # 0x1c3b8
movq 0x17901(%rip), %rsi     # 0x1c3b0
subq %rsi, %rcx
cmpq %rcx, %rdx
jne 0x4acc
leaq 0xd692(%rip), %r14      # 0x12150
cmpq %rdi, %rax
je 0x4b0d
callq 0x4370
testl %eax, %eax
je 0x4b0d
movq %r15, %rdi
callq 0x7022
movq 0x10(%rax), %rdi
movq 0x18(%rax), %rax
movq %rax, %rdx
subq %rdi, %rdx
movq 0x178e7(%rip), %rcx     # 0x1c3d0
movq 0x178d8(%rip), %rsi     # 0x1c3c8
subq %rsi, %rcx
cmpq %rcx, %rdx
jne 0x4b15
leaq 0xd639(%rip), %r14      # 0x12138
cmpq %rdi, %rax
je 0x4b0d
callq 0x4370
testl %eax, %eax
jne 0x4b15
movq %r14, %rdi
callq 0x4550
movq %rbx, %rdi
callq 0x7550
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/theuni[P]libbtcnet/src/connection.cpp
// Function: CConnectionBase::GetSockAddr(sockaddr*, int*) const
bool CConnectionBase::GetSockAddr(sockaddr* paddr, int* addrlen) const
{
    if (!addr.empty() && (addrlen != nullptr) && static_cast<size_t>(*addrlen) >= addr.size()) {
        memcpy(paddr, &addr[0], addr.size());
        *addrlen = addr.size();
        return true;
    }
    return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq 0x28(%rdi), %rax
movq 0x30(%rdi), %rdx
cmpq %rdx, %rax
sete %cl
testq %rbx, %rbx
sete %dil
orb %cl, %dil
jne 0x61bd
movslq (%rbx), %rcx
subq %rax, %rdx
cmpq %rcx, %rdx
jbe 0x61c1
xorl %eax, %eax
jmp 0x61d8
movq %rsi, %rdi
movq %rax, %rsi
callq 0x42d0
movl 0x30(%r14), %eax
subl 0x28(%r14), %eax
movl %eax, (%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/theuni[P]libbtcnet/src/connection.cpp
// Function: CConnectionBase::GetHost[abi:cxx11]() const
std::string CConnectionBase::GetHost() const
{
    if (isDns || isOnion)
        return host;

    std::string rethost;
    if (!addr.empty()) {
        std::array<char, NI_MAXHOST> hostbuf{};
        sockaddr_storage addr_stor;
        memset(&addr_stor, 0, sizeof(addr_stor));
        memcpy(&addr_stor, addr.data(), addr.size());
        if (getnameinfo(reinterpret_cast<sockaddr*>(&addr_stor), addr.size(), hostbuf.data(), hostbuf.size(), nullptr, 0, NI_NUMERICHOST) == 0)
            rethost.assign(hostbuf.data());
    }
    return rethost;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x498, %rsp            # imm = 0x498
movq %rdi, %rbx
cmpb $0x0, 0x22(%rsi)
jne 0x6206
cmpb $0x1, 0x23(%rsi)
jne 0x6237
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x72f4
movq %rbx, %rax
addq $0x498, %rsp            # imm = 0x498
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10(%rbx), %rbp
movq %rbp, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq 0x28(%rsi), %r12
movq 0x30(%rsi), %r14
cmpq %r14, %r12
je 0x6222
leaq 0x97(%rsp), %r15
movl $0x401, %edx            # imm = 0x401
movq %r15, %rdi
xorl %esi, %esi
callq 0x41e0
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r13
movaps %xmm0, 0x70(%r13)
movaps %xmm0, 0x60(%r13)
movaps %xmm0, 0x50(%r13)
movaps %xmm0, 0x40(%r13)
movaps %xmm0, 0x30(%r13)
movaps %xmm0, 0x20(%r13)
movaps %xmm0, 0x10(%r13)
movaps %xmm0, (%r13)
subq %r12, %r14
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x42d0
movl $0x1, (%rsp)
movq %r13, %rdi
movl %r14d, %esi
movq %r15, %rdx
movl $0x401, %ecx            # imm = 0x401
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x4240
testl %eax, %eax
jne 0x6222
movq 0x8(%rbx), %r14
leaq 0x97(%rsp), %r15
movq %r15, %rdi
callq 0x4190
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x4560
jmp 0x6222
movq %rax, %r14
movq (%rbx), %rdi
cmpq %rbp, %rdi
je 0x6313
callq 0x4340
movq %r14, %rdi
callq 0x4640
nop
// File: /workspace/github_cpp_makefile_star2_O1/theuni[P]libbtcnet/src/connection.cpp
// Function: CConnectionBase::GetPort() const
unsigned short CConnectionBase::GetPort() const
{
    if (isDns || isOnion)
        return port;

    if (!addr.empty()) {
        std::array<char, NI_MAXSERV> servbuf{};
        sockaddr_storage addr_stor;
        memset(&addr_stor, 0, sizeof(addr_stor));
        memcpy(&addr_stor, addr.data(), addr.size());
        if (getnameinfo(reinterpret_cast<sockaddr*>(&addr_stor), addr.size(), nullptr, 0, servbuf.data(), servbuf.size(), NI_NUMERICSERV) == 0)
            return std::atoi(servbuf.data());
    }
    return 0;
}

// Assembly:
cmpb $0x0, 0x22(%rdi)
jne 0x6328
cmpb $0x1, 0x23(%rdi)
jne 0x632d
movzwl 0x20(%rdi), %eax
retq
pushq %r15
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movq 0x28(%rdi), %rsi
movq 0x30(%rdi), %rbx
cmpq %rbx, %rsi
je 0x63c3
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
leaq 0x30(%rsp), %r15
movaps %xmm0, 0x70(%r15)
movaps %xmm0, 0x60(%r15)
movaps %xmm0, 0x50(%r15)
movaps %xmm0, 0x40(%r15)
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
subq %rsi, %rbx
movq %r15, %rdi
movq %rbx, %rdx
callq 0x42d0
movl $0x2, (%rsp)
movq %r15, %rdi
movl %ebx, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r14, %r8
movl $0x20, %r9d
callq 0x4240
movl %eax, %ebx
testl %ebx, %ebx
jne 0x63bf
leaq 0x10(%rsp), %rdi
callq 0x4570
testl %ebx, %ebx
je 0x63c5
xorl %eax, %eax
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/theuni[P]libbtcnet/src/connection.cpp
// Function: CConnection::CanConnectDirect(sockaddr*, CConnectionOptions::Family)
bool CConnection::CanConnectDirect(sockaddr* sock, CConnectionOptions::Family family)
{
    assert(sock != nullptr);
#ifndef _WIN32
    if(sock->sa_family == AF_UNIX && (family & CConnectionOptions::UNIX) == CConnectionOptions::UNIX)
        return true;
#endif
    return (sock->sa_family == AF_INET && (family & CConnectionOptions::IPV4) == CConnectionOptions::IPV4) ||
           (sock->sa_family == AF_INET6 && (family & CConnectionOptions::IPV6) == CConnectionOptions::IPV6);
}

// Assembly:
testq %rdi, %rdi
je 0x7068
movzwl (%rdi), %ecx
cmpw $0x1, %cx
sete %dl
movl %esi, %edi
shrb $0x3, %dil
movb $0x1, %al
testb %dl, %dil
jne 0x7067
cmpw $0x2, %cx
sete %dl
movl %esi, %edi
shrb %dil
testb %dl, %dil
jne 0x7067
cmpw $0xa, %cx
sete %al
shrb $0x2, %sil
andb %al, %sil
movl %esi, %eax
retq
pushq %rax
leaq 0xb13a(%rip), %rdi      # 0x121aa
leaq 0xb143(%rip), %rsi      # 0x121ba
leaq 0xb14f(%rip), %rcx      # 0x121cd
movl $0x114, %edx            # imm = 0x114
callq 0x4260
// File: /workspace/github_cpp_makefile_star2_O1/theuni[P]libbtcnet/src/connection.cpp
// Function: CConnection::CanConnectDirect() const
bool CConnection::CanConnectDirect() const
{
    if (!IsSet())
        return false;
    if (IsDNS())
        return false;
    if (IsOnion())
        return false;

    sockaddr_storage addr_stor;
    int socksize = sizeof(addr_stor);
    memset(&addr_stor, 0, socksize);
    sockaddr* sock = reinterpret_cast<sockaddr*>(&addr_stor);

    if (!GetSockAddr(sock, &socksize))
        return false;
    return CanConnectDirect(sock, opts.nFamily);
}

// Assembly:
cmpb $0x1, 0x24(%rdi)
jne 0x70f7
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x22(%rdi)
jne 0x70ea
cmpb $0x0, 0x23(%rbx)
jne 0x70ea
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
cmpq %rdx, %rsi
je 0x70ea
subq %rsi, %rdx
cmpq $0x80, %rdx
jbe 0x70fa
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
retq
movq %rsp, %r14
movq %r14, %rdi
callq 0x42d0
movl 0x138(%rbx), %ecx
movzwl (%r14), %edx
cmpw $0x1, %dx
sete %sil
movl %ecx, %edi
shrb $0x3, %dil
movb $0x1, %al
testb %sil, %dil
jne 0x70ec
cmpw $0x2, %dx
sete %sil
movl %ecx, %edi
shrb %dil
testb %sil, %dil
jne 0x70ec
cmpw $0xa, %dx
sete %al
shrb $0x2, %cl
andb %al, %cl
movl %ecx, %eax
jmp 0x70ec
// File: /workspace/github_cpp_makefile_star2_O1/theuni[P]libbtcnet/src/connection.cpp
// Function: CConnection::CanConnectProxy() const
bool CConnection::CanConnectProxy() const
{
    if (!IsSet())
        return false;
    if (!proxy.IsSet())
        return false;
    if (IsDNS())
        return opts.doResolve == CConnectionOptions::RESOLVE_CONNECT;
    if (IsOnion())
        return ((opts.nFamily & CConnectionOptions::ONION_PROXY) == CConnectionOptions::ONION_PROXY);

    sockaddr_storage addr_stor;
    int socksize = sizeof(addr_stor);
    memset(&addr_stor, 0, socksize);
    sockaddr* sock = reinterpret_cast<sockaddr*>(&addr_stor);

    if (!GetSockAddr(sock, &socksize))
        return false;
    return CanConnectDirect(sock, opts.nFamily);
}

// Assembly:
cmpb $0x1, 0x24(%rdi)
jne 0x7174
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
cmpb $0x1, 0x84(%rdi)
jne 0x71cd
cmpb $0x1, 0x22(%rbx)
jne 0x7177
cmpl $0x4, 0x114(%rbx)
sete %al
jmp 0x71cf
xorl %eax, %eax
retq
cmpb $0x1, 0x23(%rbx)
jne 0x718a
movb 0x138(%rbx), %al
andb $0x10, %al
shrb $0x4, %al
jmp 0x71cf
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
cmpq %rdx, %rsi
je 0x71cd
subq %rsi, %rdx
cmpq $0x80, %rdx
jbe 0x71da
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r14
retq
movq %rsp, %r14
movq %r14, %rdi
callq 0x42d0
movl 0x138(%rbx), %ecx
movzwl (%r14), %edx
cmpw $0x1, %dx
sete %sil
movl %ecx, %edi
shrb $0x3, %dil
movb $0x1, %al
testb %sil, %dil
jne 0x71cf
cmpw $0x2, %dx
sete %sil
movl %ecx, %edi
shrb %dil
testb %sil, %dil
jne 0x71cf
cmpw $0xa, %dx
sete %al
shrb $0x2, %cl
andb %al, %cl
movl %ecx, %eax
jmp 0x71cf
// File: /workspace/github_cpp_makefile_star2_O1/theuni[P]libbtcnet/src/handler.cpp
// Function: CConnectionHandlerInt::CConnectionHandlerInt(CConnectionHandler&, bool)
CConnectionHandlerInt::CConnectionHandlerInt(CConnectionHandler& handler, bool enable_threading)
    : m_interface(handler), m_connection_index(0), m_bytes_read(0), m_bytes_written(0), m_outgoing_conn_count(0), m_incoming_conn_count(0), m_outgoing_conn_limit(0), m_enable_threading(enable_threading), m_shutdown(false)
{
    bool result = true;
    if (m_enable_threading)
        result = setup_threads();
    assert(result);
    (void)result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
xorl %ecx, %ecx
movl %ecx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
leaq 0x38(%rdi), %rax
movl %ecx, 0x38(%rdi)
movq %rcx, 0x40(%rdi)
movq %rax, 0x48(%rdi)
movq %rax, 0x50(%rdi)
movq %rcx, 0x58(%rdi)
leaq 0x68(%rdi), %rax
movl %ecx, 0x68(%rdi)
movq %rcx, 0x70(%rdi)
movq %rax, 0x78(%rdi)
movq %rax, 0x80(%rdi)
movq %rcx, 0x88(%rdi)
leaq 0x98(%rdi), %rax
movl %ecx, 0x98(%rdi)
movq %rcx, 0xa0(%rdi)
movq %rax, 0xa8(%rdi)
movq %rax, 0xb0(%rdi)
movq %rcx, 0xb8(%rdi)
movq %rsi, 0xc0(%rdi)
movl %ecx, 0xe8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0xd8(%rdi)
movups %xmm0, 0xc8(%rdi)
movb %dl, 0xec(%rdi)
movb $0x0, 0xed(%rdi)
addq $0xf0, %rdi
leaq 0x1a0(%rbx), %r15
movl $0xb0, %edx
xorl %esi, %esi
callq 0x41e0
movq %r15, %rdi
callq 0x11b30
leaq 0x1c8(%rbx), %r12
movq %r12, %rdi
callq 0x11b30
cmpb $0x1, 0xec(%rbx)
jne 0x80ed
callq 0x43c0
testl %eax, %eax
jne 0x80fc
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa701(%rip), %rdi      # 0x12804
leaq 0xa701(%rip), %rsi      # 0x1280b
leaq 0xa70a(%rip), %rcx      # 0x1281b
movl $0x25, %edx
callq 0x4260
movq %rax, 0x8(%rsp)
movq %r12, %rdi
callq 0x11c9e
jmp 0x812f
movq %rax, 0x8(%rsp)
movq %r15, %rdi
callq 0x11c9e
jmp 0x813e
movq %rax, 0x8(%rsp)
leaq 0x198(%rbx), %rdi
leaq 0x190(%rbx), %r13
leaq 0x188(%rbx), %rbp
leaq 0x180(%rbx), %r14
leaq 0x178(%rbx), %r15
leaq 0x170(%rbx), %r12
leaq 0x90(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x60(%rbx), %rax
movq %rax, 0x18(%rsp)
leaq 0x30(%rbx), %rax
movq %rax, 0x20(%rsp)
callq 0xa78e
movq %r13, %rdi
callq 0xa7b0
movq %rbp, %rdi
callq 0xa7d2
movq %r14, %rdi
callq 0xa7d2
movq %r15, %rdi
callq 0xa7f4
movq %r12, %rdi
callq 0xa7f4
movq 0x10(%rsp), %rdi
callq 0xab90
movq 0x18(%rsp), %rdi
callq 0xabe4
movq 0x20(%rsp), %rdi
callq 0xac38
movq %rbx, %rdi
callq 0xac38
movq 0x8(%rsp), %rdi
callq 0x4640
nop
// File: /workspace/github_cpp_makefile_star2_O1/theuni[P]libbtcnet/src/handler.cpp
// Function: CConnectionHandlerInt::RequestOutgoingInt()
void CConnectionHandlerInt::RequestOutgoingInt()
{
    assert(IsEventThread());
    size_t need = static_cast<size_t>(std::min(g_max_simultaneous_connecting, m_outgoing_conn_limit - m_outgoing_conn_count - static_cast<int>(m_connecting.size())));
    if (need > 0) {
        std::list<CConnection> conns(m_interface.OnNeedOutgoingConnections(need));
        auto end = conns.begin();
        std::advance(end, std::min(conns.size(), static_cast<size_t>(need)));
        for (auto it = conns.begin(); it != end; ++it) {
            if (it->IsSet())
                StartConnection(std::move(*it));
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpb $0x1, 0xec(%rdi)
jne 0x88d4
movq 0x168(%rbx), %r14
callq 0x4310
cmpq %rax, %r14
jne 0x8981
movl 0xe0(%rbx), %ecx
movl 0xe8(%rbx), %eax
addl 0x58(%rbx), %ecx
subl %ecx, %eax
je 0x8975
cmpl $0x8, %eax
movl $0x8, %ecx
cmovll %eax, %ecx
movslq %ecx, %r14
movq 0xc0(%rbx), %rsi
movq (%rsi), %rax
movq %rsp, %r15
movq %r15, %rdi
movl %r14d, %edx
callq *0x10(%rax)
movq (%r15), %r12
movq 0x10(%r15), %rax
cmpq %r14, %rax
cmovbq %rax, %r14
testq %r14, %r14
jle 0x8932
negq %r14
movq %r12, %r15
movq (%r15), %r15
incq %r14
jne 0x8928
jmp 0x8968
movq %r12, %r15
je 0x8968
negq %r14
movq %r12, %r15
movq 0x8(%r15), %r15
decq %r14
jne 0x893d
jmp 0x8968
leaq 0x10(%r12), %r14
movq %r14, %rdi
callq 0x63d2
testb %al, %al
je 0x8964
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9d56
movq (%r12), %r12
cmpq %r15, %r12
jne 0x8948
movq %rsp, %rdi
callq 0x4e1c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x9f91(%rip), %rdi      # 0x12919
leaq 0x9e7c(%rip), %rsi      # 0x1280b
leaq 0xa538(%rip), %rcx      # 0x12ece
movl $0x192, %edx            # imm = 0x192
callq 0x4260
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4e1c
movq %rbx, %rdi
callq 0x4640
nop
// File: /workspace/github_cpp_makefile_star2_O1/theuni[P]libbtcnet/src/handler.cpp
// Function: CConnectionHandlerInt::IsEventThread() const
bool CConnectionHandlerInt::IsEventThread() const
{
#ifdef NO_THREADS
    return true;
#else
    if (!m_enable_threading)
        return true;
    return m_main_thread == std::this_thread::get_id();
#endif
}

// Assembly:
movb $0x1, %al
cmpb $0x1, 0xec(%rdi)
jne 0x8e3b
pushq %rbx
movq 0x168(%rdi), %rbx
callq 0x4310
cmpq %rax, %rbx
sete %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/theuni[P]libbtcnet/src/handler.cpp
// Function: CConnectionHandlerInt::OnResolveFailure(long, CConnection const&, int, bool)
void CConnectionHandlerInt::OnResolveFailure(ConnID id, const CConnection& conn, int /*error*/, bool retry)
{
    assert(IsEventThread());
    retry = retry && !m_shutdown;
    bool ret = m_interface.OnDnsFailure(conn, retry);
    auto it = m_dns_resolves.find(id);
    assert(it != m_dns_resolves.end());
    if (retry && ret)
        it->second->Retry();
    else
        m_dns_resolves.erase(it);
    if (m_request_event)
        m_request_event.active();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0xec(%rdi)
jne 0x8f7e
movq 0x168(%rbx), %r12
callq 0x4310
cmpq %rax, %r12
jne 0x9054
movb 0xed(%rbx), %r12b
xorb $0x1, %r12b
andb %bpl, %r12b
movq 0xc0(%rbx), %rdi
movq (%rdi), %rax
movzbl %r12b, %edx
movq %r15, %rsi
callq *0x28(%rax)
movq 0xa0(%rbx), %rsi
leaq 0x98(%rbx), %rcx
movq %rcx, %rdx
testq %rsi, %rsi
je 0x8fd1
movq %rcx, %rdx
xorl %edi, %edi
cmpq %r14, 0x20(%rsi)
setl %dil
cmovgeq %rsi, %rdx
movq 0x10(%rsi,%rdi,8), %rsi
testq %rsi, %rsi
jne 0x8fb9
movq %rcx, %rsi
cmpq %rcx, %rdx
je 0x8fe4
cmpq %r14, 0x20(%rdx)
cmovgq %rcx, %rdx
movq %rdx, %rsi
cmpq %rcx, %rsi
je 0x9035
andb %al, %r12b
cmpb $0x1, %r12b
jne 0x8ffd
movq 0x28(%rsi), %rdi
callq 0x1176a
jmp 0x9009
leaq 0x90(%rbx), %rdi
callq 0xb0e4
addq $0x1a0, %rbx            # imm = 0x1A0
movq %rbx, %rdi
callq 0x11d00
testb %al, %al
je 0x902c
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11d50
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9a61(%rip), %rdi      # 0x12a9d
leaq 0x97c8(%rip), %rsi      # 0x1280b
leaq 0x99fe(%rip), %rcx      # 0x12a48
movl $0xc2, %edx
callq 0x4260
leaq 0x98be(%rip), %rdi      # 0x12919
leaq 0x97a9(%rip), %rsi      # 0x1280b
leaq 0x99df(%rip), %rcx      # 0x12a48
movl $0xbe, %edx
callq 0x4260
nop