LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x547f(%rip), %rax      # 0xbd10
movq %rax, (%rdi)
leaq 0x48(%rdi), %r14
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x5c1e
movq 0x18(%rbx), %rax
movb $0x0, 0x8(%rax)
leaq 0x70(%rbx), %r15
movq %r15, %rdi
callq 0x3030
testl %eax, %eax
jne 0x6956
cmpb $0x0, 0x10(%rsp)
jne 0x68d7
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 0x68f2
movb $0x0, 0x8(%rdi)
movl $0x10, %esi
callq 0x3280
movq 0xa0(%rbx), %r12
testq %r12, %r12
je 0x6910
movq %r12, %rdi
callq 0x785a
movl $0x50, %esi
movq %r12, %rdi
callq 0x3280
movq %r15, %rdi
callq 0x3430
movq %r14, %rdi
callq 0x32c0
cmpb $0x0, 0x10(%rsp)
jne 0x693e
movq 0x8(%rsp), %rdi
callq 0x31e0
addq $0x20, %rbx
movq %rbx, %rdi
callq 0x7298
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x3100
movq %rax, %rbx
leaq 0x1d0b(%rip), %rsi      # 0x8675
movq %rax, %rdi
callq 0x30c0
movq 0x5677(%rip), %rsi      # 0xbff0
movq 0x5638(%rip), %rdx      # 0xbfb8
movq %rbx, %rdi
callq 0x33c0
movq %rax, %rdi
callq 0x395d
// File: /workspace/github_cpp_makefile_star2_O3/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 0x72f8
cmpl $0x1, %eax
ja 0x69f2
leaq 0x48(%r15), %rsi
movq %rsp, %rdi
callq 0x5c1e
movq %r15, %rdi
movq %r14, %rsi
callq 0x6a26
cmpb $0x0, 0x8(%rsp)
jne 0x69f2
movq (%rsp), %rdi
callq 0x31e0
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 0x6a1e
movq (%rsp), %rdi
callq 0x31e0
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x7c26
addq $0x70, %rbx
movq %rbx, %rdi
callq 0x3030
testl %eax, %eax
jne 0x6a51
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x3100
movq %rax, %rbx
leaq 0x1c10(%rip), %rsi      # 0x8675
movq %rax, %rdi
callq 0x30c0
movq 0x557c(%rip), %rsi      # 0xbff0
movq 0x553d(%rip), %rdx      # 0xbfb8
movq %rbx, %rdi
callq 0x33c0
movq %rax, %r14
movq %rbx, %rdi
callq 0x31c0
movq %r14, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x72f8
cmpl $0x1, %eax
ja 0x6add
leaq 0x48(%r15), %rsi
movq %rsp, %rdi
callq 0x5c1e
movq %r15, %rdi
movq %r14, %rsi
callq 0x6a26
cmpb $0x0, 0x8(%rsp)
jne 0x6add
movq (%rsp), %rdi
callq 0x31e0
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 0x6b09
movq (%rsp), %rdi
callq 0x31e0
movq %rbx, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6bb0
leaq 0x48(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0x5c1e
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0xa0(%rbx), %r14
testq %r14, %r14
je 0x6b4f
movq %r14, %rdi
callq 0x785a
movl $0x50, %esi
movq %r14, %rdi
callq 0x3280
movq $0x0, 0xa0(%rbx)
movq %rbx, %rdi
callq 0x67a2
addq $0x20, %rbx
movq %rbx, %rdi
callq 0x74b0
cmpb $0x0, 0x10(%rsp)
jne 0x6b8c
movq 0x8(%rsp), %rdi
callq 0x31e0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
cmpb $0x0, 0x10(%rsp)
jne 0x6ba8
movq 0x8(%rsp), %rdi
callq 0x31e0
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x5c1e
movq 0xa0(%rbx), %r14
movq 0x30(%r14), %rax
cmpq 0x10(%r14), %rax
je 0x6c87
movq $0x0, 0xa0(%rbx)
movq %rbx, %rdi
callq 0x67a2
cmpb $0x0, 0x8(%rsp)
jne 0x6c0b
movq (%rsp), %rdi
callq 0x31e0
movb $0x1, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x5364
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x6cba
movq (%rdi), %rax
callq *0x40(%rax)
leaq 0x10(%rsp), %r15
movq 0x30(%r14), %rax
cmpq 0x10(%r14), %rax
je 0x6c47
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x6fd8
jmp 0x6c2d
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
movq %r14, %rdi
callq 0x785a
movl $0x50, %esi
movq %r14, %rdi
callq 0x3280
leaq 0x5013(%rip), %rax      # 0xbc80
leaq 0x20(%rsp), %rdi
movq %rax, -0x10(%rdi)
callq 0x32c0
leaq 0x48(%rsp), %rdi
callq 0x3430
jmp 0x6c9f
testb %bpl, %bpl
je 0x6c9f
addq $0x70, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3360
testl %eax, %eax
jne 0x6cd9
cmpb $0x0, 0x8(%rsp)
jne 0x6caf
movq (%rsp), %rdi
callq 0x31e0
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1953(%rip), %rdi      # 0x8614
leaq 0x1957(%rip), %rsi      # 0x861f
leaq 0x1a15(%rip), %rcx      # 0x86e4
movl $0x88, %edx
callq 0x3160
movl $0x10, %edi
callq 0x3100
movq %rax, %r14
leaq 0x19dd(%rip), %rsi      # 0x86ca
movq %rax, %rdi
callq 0x30c0
movq 0x52f4(%rip), %rsi      # 0xbff0
movq 0x52b5(%rip), %rdx      # 0xbfb8
movq %r14, %rdi
callq 0x33c0
movq %rax, %rbx
movq %r14, %rdi
callq 0x31c0
jmp 0x6d45
jmp 0x6d1c
jmp 0x6d1c
movq %rax, %rbx
jmp 0x6d45
jmp 0x6d23
movq %rax, %rbx
leaq 0x4f53(%rip), %rax      # 0xbc80
leaq 0x20(%rsp), %rdi
movq %rax, -0x10(%rdi)
callq 0x32c0
leaq 0x48(%rsp), %rdi
callq 0x3430
cmpb $0x0, 0x8(%rsp)
jne 0x6d55
movq (%rsp), %rdi
callq 0x31e0
movq %rbx, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x75d0
movb %al, 0xf(%rsp)
testb %al, %al
je 0x6fc0
movq %r15, %rdi
movq %r14, %rsi
callq 0x6a26
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_O3/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)
testl %r14d, %r14d
jle 0x7292
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 0x7274
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x74b0
cmpl $0x0, 0x8(%rbx)
jle 0x72cd
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 0x72b1
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 0x395d
// File: /workspace/github_cpp_makefile_star2_O3/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 0x7423
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rsi), %rax
movb (%rax), %dl
testb %dl, %dl
je 0x7343
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 0x732c
jmp 0x7348
movl $0x1505, %ecx           # imm = 0x1505
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
movl (%r14), %ecx
cltd
idivl %ecx
testl %ecx, %ecx
js 0x7442
movl 0x8(%r14), %ecx
testl %ecx, %ecx
js 0x7461
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 0x5c1e
movq 0x18(%r14), %rax
movl %ebp, %r13d
movq (%rax,%r13,8), %r12
testq %r12, %r12
je 0x73af
leaq 0x8(%r12), %rsi
movq %r15, %rdi
callq 0x3050
testl %eax, %eax
je 0x73de
movq 0x30(%r12), %r12
jmp 0x7392
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 0x7a06
movq 0x18(%r14), %rax
movq %r12, (%rax,%r13,8)
xorl %ebp, %ebp
jmp 0x7401
movzbl (%r12), %ebp
incl %ebp
movq 0x28(%r12), %rdi
callq 0x32d0
movq %rbx, %rdi
callq 0x3410
movq %rax, 0x28(%r12)
movb $0x1, (%r12)
cmpb $0x0, 0x10(%rsp)
jne 0x7412
movq 0x8(%rsp), %rdi
callq 0x31e0
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1373(%rip), %rdi      # 0x879d
leaq 0x1348(%rip), %rsi      # 0x8779
leaq 0x136c(%rip), %rcx      # 0x87a4
movl $0x81, %edx
callq 0x3160
leaq 0x141e(%rip), %rdi      # 0x8867
leaq 0x1329(%rip), %rsi      # 0x8779
leaq 0x13de(%rip), %rcx      # 0x8835
movl $0xab, %edx
callq 0x3160
leaq 0x1416(%rip), %rdi      # 0x887e
leaq 0x130a(%rip), %rsi      # 0x8779
leaq 0x13bf(%rip), %rcx      # 0x8835
movl $0xae, %edx
callq 0x3160
movq %rax, %rbx
movl $0x38, %esi
movq %r12, %rdi
callq 0x3280
jmp 0x7497
jmp 0x7494
movq %rax, %rbx
cmpb $0x0, 0x10(%rsp)
jne 0x74a8
movq 0x8(%rsp), %rdi
callq 0x31e0
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x75b1
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jle 0x7567
xorl %r14d, %r14d
leaq 0x8(%rsp), %r15
cmpb $0x0, 0x10(%rbx)
je 0x7592
movl 0x8(%rbx), %ecx
testl %ecx, %ecx
js 0x7573
movl %r14d, %eax
xorl %edx, %edx
divl %ecx
leaq (%rdx,%rdx,4), %rsi
shlq $0x3, %rsi
addq 0x20(%rbx), %rsi
movq %r15, %rdi
callq 0x5c1e
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %r12
testq %r12, %r12
je 0x7547
leaq (%rax,%r14,8), %rax
movq 0x30(%r12), %rcx
movq %rcx, (%rax)
movq %r12, %rdi
callq 0x7a7e
movl $0x38, %esi
movq %r12, %rdi
callq 0x3280
movq 0x18(%rbx), %rax
leaq (%rax,%r14,8), %rax
movq (%rax), %r12
testq %r12, %r12
jne 0x751a
cmpb $0x0, 0x10(%rsp)
jne 0x7558
movq 0x8(%rsp), %rdi
callq 0x31e0
incq %r14
movslq (%rbx), %rax
cmpq %rax, %r14
jl 0x74d9
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1304(%rip), %rdi      # 0x887e
leaq 0x11f8(%rip), %rsi      # 0x8779
leaq 0x12ad(%rip), %rcx      # 0x8835
movl $0xae, %edx
callq 0x3160
leaq 0x1204(%rip), %rdi      # 0x879d
leaq 0x11d9(%rip), %rsi      # 0x8779
leaq 0x128e(%rip), %rcx      # 0x8835
movl $0xaa, %edx
callq 0x3160
leaq 0x11e5(%rip), %rdi      # 0x879d
leaq 0x11ba(%rip), %rsi      # 0x8779
leaq 0x1222(%rip), %rcx      # 0x87e8
movl $0x69, %edx
callq 0x3160
// File: /workspace/github_cpp_makefile_star2_O3/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 0x76f9
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movb (%rax), %dl
testb %dl, %dl
je 0x7616
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 0x75ff
jmp 0x761b
movl $0x1505, %ecx           # imm = 0x1505
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
movl (%r14), %ecx
cltd
idivl %ecx
testl %ecx, %ecx
js 0x7718
movl 0x8(%r14), %ecx
testl %ecx, %ecx
js 0x7737
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 0x5c1e
movq 0x18(%r14), %rax
movl %r15d, %r12d
movq (%rax,%r12,8), %r15
testq %r15, %r15
je 0x76da
leaq 0x8(%r15), %rsi
movq %rbx, %rdi
callq 0x3050
testl %eax, %eax
je 0x76b2
movq 0x30(%r15), %rsi
testq %rsi, %rsi
je 0x76d8
addq $0x8, %rsi
movq %rbx, %rdi
callq 0x3050
testl %eax, %eax
jne 0x767b
movq 0x30(%r15), %rbx
movq 0x30(%rbx), %rax
movq %rax, 0x30(%r15)
movq %rbx, %rdi
callq 0x7a7e
movl $0x38, %esi
movq %rbx, %rdi
jmp 0x76ce
movq 0x30(%r15), %rax
movq 0x18(%r14), %rcx
movq %rax, (%rcx,%r12,8)
movq %r15, %rdi
callq 0x7a7e
movl $0x38, %esi
movq %r15, %rdi
callq 0x3280
movb $0x1, %bpl
jmp 0x76da
xorl %ebp, %ebp
cmpb $0x0, 0x8(%rsp)
jne 0x76ea
movq (%rsp), %rdi
callq 0x31e0
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x109d(%rip), %rdi      # 0x879d
leaq 0x1072(%rip), %rsi      # 0x8779
leaq 0x1188(%rip), %rcx      # 0x8896
movl $0xb5, %edx
callq 0x3160
leaq 0x1148(%rip), %rdi      # 0x8867
leaq 0x1053(%rip), %rsi      # 0x8779
leaq 0x1108(%rip), %rcx      # 0x8835
movl $0xab, %edx
callq 0x3160
leaq 0x1140(%rip), %rdi      # 0x887e
leaq 0x1034(%rip), %rsi      # 0x8779
leaq 0x10e9(%rip), %rcx      # 0x8835
movl $0xae, %edx
callq 0x3160
jmp 0x7758
movq %rax, %rbx
cmpb $0x0, 0x8(%rsp)
jne 0x776b
movq (%rsp), %rdi
callq 0x31e0
movq %rbx, %rdi
callq 0x33e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x778e
movq (%rbx), %rdi
movl $0x1, %esi
callq 0x6bb0
jmp 0x7778
movq 0x4833(%rip), %rbx      # 0xbfc8
leaq 0xfa3(%rip), %rsi       # 0x873f
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 0x4801(%rip), %rdi      # 0xbfc8
callq 0x3040
movq %rax, %rdi
callq 0x3180
popq %rbx
retq
jmp 0x77d8
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x784a
movq %rbx, %rdi
callq 0x30d0
movq %rax, %rbx
movq 0x47f6(%rip), %rdi      # 0xbfe8
leaq 0xf5d(%rip), %rsi       # 0x8756
movl $0x1c, %edx
callq 0x32a0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq 0x47d5(%rip), %rdi      # 0xbfe8
movq %rax, %rsi
callq 0x3260
movq %rax, %rdi
callq 0x30f0
leaq 0xf49(%rip), %rdi       # 0x8773
leaq 0xf48(%rip), %rsi       # 0x8779
leaq 0xf49(%rip), %rcx       # 0x8781
movl $0x11c, %edx            # imm = 0x11C
callq 0x3160
movq %rax, %rbx
callq 0x33b0
movq %rbx, %rdi
callq 0x33e0
movq %rax, %rdi
callq 0x395d
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6fb0
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 0xd682(%rip), %r14      # 0x12140
cmpq %rdi, %rax
je 0x4b0d
callq 0x4370
testl %eax, %eax
je 0x4b0d
movq %r15, %rdi
callq 0x6fb0
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 0xd629(%rip), %r14      # 0x12128
cmpq %rdi, %rax
je 0x4b0d
callq 0x4370
testl %eax, %eax
jne 0x4b15
movq %r14, %rdi
callq 0x4550
movq %rbx, %rdi
callq 0x74ea
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x618d
movslq (%rbx), %rcx
subq %rax, %rdx
cmpq %rcx, %rdx
jbe 0x6191
xorl %eax, %eax
jmp 0x61a8
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_O3/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 0x61d6
cmpb $0x1, 0x23(%rsi)
jne 0x6207
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7282
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 0x61f2
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 0x61f2
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 0x61f2
movq %rax, %r14
movq (%rbx), %rdi
cmpq %rbp, %rdi
je 0x62e3
callq 0x4340
movq %r14, %rdi
callq 0x4640
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x62f8
cmpb $0x1, 0x23(%rdi)
jne 0x62fd
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 0x6383
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
testl %eax, %eax
je 0x6387
xorl %eax, %eax
jmp 0x6391
leaq 0x10(%rsp), %rdi
callq 0x4570
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6ff6
movzwl (%rdi), %ecx
cmpw $0x1, %cx
sete %dl
movl %esi, %edi
shrb $0x3, %dil
movb $0x1, %al
testb %dl, %dil
jne 0x6ff5
cmpw $0x2, %cx
sete %dl
movl %esi, %edi
shrb %dil
testb %dl, %dil
jne 0x6ff5
cmpw $0xa, %cx
sete %al
shrb $0x2, %sil
andb %al, %sil
movl %esi, %eax
retq
pushq %rax
leaq 0xb1ac(%rip), %rdi      # 0x121aa
leaq 0xb1b5(%rip), %rsi      # 0x121ba
leaq 0xb1c1(%rip), %rcx      # 0x121cd
movl $0x114, %edx            # imm = 0x114
callq 0x4260
// File: /workspace/github_cpp_makefile_star2_O3/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 0x7085
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x22(%rdi)
jne 0x7078
cmpb $0x0, 0x23(%rbx)
jne 0x7078
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 0x7078
subq %rsi, %rdx
cmpq $0x80, %rdx
jbe 0x7088
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 0x707a
cmpw $0x2, %dx
sete %sil
movl %ecx, %edi
shrb %dil
testb %sil, %dil
jne 0x707a
cmpw $0xa, %dx
sete %al
shrb $0x2, %cl
andb %al, %cl
movl %ecx, %eax
jmp 0x707a
// File: /workspace/github_cpp_makefile_star2_O3/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 0x7102
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
cmpb $0x1, 0x84(%rdi)
jne 0x715b
cmpb $0x1, 0x22(%rbx)
jne 0x7105
cmpl $0x4, 0x114(%rbx)
sete %al
jmp 0x715d
xorl %eax, %eax
retq
cmpb $0x1, 0x23(%rbx)
jne 0x7118
movb 0x138(%rbx), %al
andb $0x10, %al
shrb $0x4, %al
jmp 0x715d
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 0x715b
subq %rsi, %rdx
cmpq $0x80, %rdx
jbe 0x7168
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 0x715d
cmpw $0x2, %dx
sete %sil
movl %ecx, %edi
shrb %dil
testb %sil, %dil
jne 0x715d
cmpw $0xa, %dx
sete %al
shrb $0x2, %cl
andb %al, %cl
movl %ecx, %eax
jmp 0x715d
// File: /workspace/github_cpp_makefile_star2_O3/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 0x11974
leaq 0x1c8(%rbx), %r12
movq %r12, %rdi
callq 0x11974
cmpb $0x1, 0xec(%rbx)
jne 0x8089
callq 0x43c0
testl %eax, %eax
jne 0x8098
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa761(%rip), %rdi      # 0x12800
leaq 0xa761(%rip), %rsi      # 0x12807
leaq 0xa76a(%rip), %rcx      # 0x12817
movl $0x25, %edx
callq 0x4260
movq %rax, 0x8(%rsp)
movq %r12, %rdi
callq 0x11adc
jmp 0x80cb
movq %rax, 0x8(%rsp)
movq %r15, %rdi
callq 0x11adc
jmp 0x80da
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 0xa64c
movq %r13, %rdi
callq 0xa66e
movq %rbp, %rdi
callq 0xa690
movq %r14, %rdi
callq 0xa690
movq %r15, %rdi
callq 0xa6b2
movq %r12, %rdi
callq 0xa6b2
movq 0x10(%rsp), %rdi
callq 0xaa2a
movq 0x18(%rsp), %rdi
callq 0xaa7e
movq 0x20(%rsp), %rdi
callq 0xaad2
movq %rbx, %rdi
callq 0xaad2
movq 0x8(%rsp), %rdi
callq 0x4640
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8868
movq 0x168(%rbx), %r14
callq 0x4310
cmpq %rax, %r14
jne 0x8912
movl 0xe0(%rbx), %ecx
movl 0xe8(%rbx), %eax
addl 0x58(%rbx), %ecx
subl %ecx, %eax
je 0x8906
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 0x88c6
negq %r14
movq %r12, %r15
movq (%r15), %r15
incq %r14
jne 0x88bc
jmp 0x88f9
je 0x88fe
negq %r14
movq %r12, %r15
movq 0x8(%r15), %r15
decq %r14
jne 0x88ce
jmp 0x88f9
leaq 0x10(%r12), %r14
movq %r14, %rdi
callq 0x639e
testb %al, %al
je 0x88f5
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9cc0
movq (%r12), %r12
cmpq %r15, %r12
jne 0x88d9
movq %rsp, %rdi
callq 0x4e16
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x9ffc(%rip), %rdi      # 0x12915
leaq 0x9ee7(%rip), %rsi      # 0x12807
leaq 0xa5a3(%rip), %rcx      # 0x12eca
movl $0x192, %edx            # imm = 0x192
callq 0x4260
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4e16
movq %rbx, %rdi
callq 0x4640
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8ddf
pushq %rbx
movq 0x168(%rdi), %rbx
callq 0x4310
cmpq %rax, %rbx
sete %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8f20
movq 0x168(%rbx), %r12
callq 0x4310
cmpq %rax, %r12
jne 0x8fe7
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), %rcx
testq %rcx, %rcx
je 0x8fc8
leaq 0x90(%rbx), %rdi
leaq 0x98(%rbx), %rdx
movq %rdx, %rsi
xorl %r8d, %r8d
cmpq %r14, 0x20(%rcx)
setl %r8b
cmovgeq %rcx, %rsi
movq 0x10(%rcx,%r8,8), %rcx
testq %rcx, %rcx
jne 0x8f5f
cmpq %rdx, %rsi
je 0x8fc8
cmpq %r14, 0x20(%rsi)
jg 0x8fc8
andb %al, %r12b
cmpb $0x1, %r12b
jne 0x8f97
movq 0x28(%rsi), %rdi
callq 0x115b2
jmp 0x8f9c
callq 0xaf58
addq $0x1a0, %rbx            # imm = 0x1A0
movq %rbx, %rdi
callq 0x11b3e
testb %al, %al
je 0x8fbf
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11b8e
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9aca(%rip), %rdi      # 0x12a99
leaq 0x9831(%rip), %rsi      # 0x12807
leaq 0x9a67(%rip), %rcx      # 0x12a44
movl $0xc2, %edx
callq 0x4260
leaq 0x9927(%rip), %rdi      # 0x12915
leaq 0x9812(%rip), %rsi      # 0x12807
leaq 0x9a48(%rip), %rcx      # 0x12a44
movl $0xbe, %edx
callq 0x4260
// File: /workspace/github_cpp_makefile_star2_O3/theuni[P]libbtcnet/src/handler.cpp
// Function: CConnectionHandlerInt::OnIncomingConnection(CConnection const&, int, sockaddr*, int)
void CConnectionHandlerInt::OnIncomingConnection(const CConnection& bind, evutil_socket_t sock, sockaddr* address, int socklen)
{
    assert(IsEventThread());

    ConnID id = GetNextConnectionIndex();
    std::unique_ptr<ConnectionBase> ptr(new CIncomingConn(*this, bind, id, sock, address, socklen));
    {
        auto it = m_connecting.emplace_hint(m_connecting.end(), id, std::move(ptr));
        it->second->Connect();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movl %r8d, %r12d
movq %rcx, 0x10(%rsp)
movl %edx, %ebp
movq %rsi, %r13
movq %rdi, %rbx
cmpb $0x1, 0xec(%rdi)
jne 0x92e9
movq 0x168(%rbx), %r14
callq 0x4310
cmpq %rax, %r14
jne 0x9388
movq %rbx, %rdi
callq 0x925e
movq %rax, %r14
movq %rax, 0x18(%rsp)
movl $0x4b8, %edi            # imm = 0x4B8
callq 0x4350
movq %rax, %r15
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
callq 0x756a
movl %r12d, (%rsp)
leaq 0x20(%rsp), %rdx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rcx
movl %ebp, %r8d
movq 0x10(%rsp), %r9
callq 0x1179c
leaq 0x8(%rsp), %r14
movq %r15, (%r14)
leaq 0x20(%rsp), %rdi
callq 0x4e48
leaq 0x30(%rbx), %rdi
addq $0x38, %rbx
leaq 0x18(%rsp), %rdx
movq %rbx, %rsi
movq %r14, %rcx
callq 0xaf8e
movq 0x28(%rax), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x9376
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9586(%rip), %rdi      # 0x12915
leaq 0x9471(%rip), %rsi      # 0x12807
leaq 0x97a7(%rip), %rcx      # 0x12b44
movl $0xef, %edx
callq 0x4260
jmp 0x93a9
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x93d8
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x93d8
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x4e48
jmp 0x93d0
movq %rax, %rbx
movq %r15, %rdi
callq 0x4340
movq %rbx, %rdi
callq 0x4640
// File: /workspace/github_cpp_makefile_star2_O3/theuni[P]libbtcnet/src/handler.cpp
// Function: CConnectionHandlerInt::OnListenFailure(long, CConnection const&)
void CConnectionHandlerInt::OnListenFailure(ConnID id, const CConnection& bind)
{
    assert(IsEventThread());
    m_interface.OnBindFailure(bind);
    optional_lock(m_bind_mutex, m_enable_threading);
    m_binds.erase(id);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq %rsi, (%rsp)
cmpb $0x1, 0xec(%rdi)
jne 0x940b
movq 0x168(%r14), %r15
callq 0x4310
cmpq %rax, %r15
jne 0x946d
movq 0xc0(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
leaq 0x118(%r14), %rbx
movb 0xec(%r14), %bpl
cmpb $0x1, %bpl
jne 0x943b
movq %rbx, %rdi
callq 0x44f0
testl %eax, %eax
jne 0x948c
addq $0x60, %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0xb1cc
movq %r14, %rdi
movq %rax, %rsi
callq 0xb24e
testb %bpl, %bpl
je 0x9462
movq %rbx, %rdi
callq 0x42c0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x94a1(%rip), %rdi      # 0x12915
leaq 0x938c(%rip), %rsi      # 0x12807
leaq 0x971e(%rip), %rcx      # 0x12ba0
movl $0xfb, %edx
callq 0x4260
movl %eax, %edi
callq 0x4280
movq %rax, %r14
testb %bpl, %bpl
je 0x94a3
movq %rbx, %rdi
callq 0x42c0
movq %r14, %rdi
callq 0x4640
nop
// File: /workspace/github_cpp_makefile_star2_O3/theuni[P]libbtcnet/src/handler.cpp
// Function: CConnectionHandlerInt::OnIncomingConnected(long, CConnection const&, CConnection const&)
void CConnectionHandlerInt::OnIncomingConnected(ConnID id, const CConnection& conn, const CConnection& resolved_conn)
{
    assert(IsEventThread());
    DEBUG_PRINT(LOGVERBOSE, "id:", id);
    auto it = m_connecting.find(id);
    assert(it != m_connecting.end());
    std::unique_ptr<ConnectionBase> moved(nullptr);
    it->second.swap(moved);
    m_connecting.erase(it);

    if (!m_interface.OnIncomingConnection(id, conn, resolved_conn))
        return;
    moved->SetRateLimitGroup(m_incoming_rate_limit);
    moved->Enable();
    {
        optional_lock(m_conn_mutex, m_enable_threading);
        m_connected.emplace_hint(m_connected.end(), id, std::move(moved));
    }
    m_incoming_conn_count++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, 0x10(%rsp)
cmpb $0x1, 0xec(%rdi)
jne 0x96a7
movq 0x168(%rbx), %r13
callq 0x4310
cmpq %rax, %r13
jne 0x97bf
movq 0x40(%rbx), %rax
testq %rax, %rax
je 0x97a0
leaq 0x30(%rbx), %rdi
leaq 0x38(%rbx), %rcx
movq %rcx, %rsi
xorl %edx, %edx
cmpq %r12, 0x20(%rax)
setl %dl
cmovgeq %rax, %rsi
movq 0x10(%rax,%rdx,8), %rax
testq %rax, %rax
jne 0x96bf
cmpq %rcx, %rsi
je 0x97a0
cmpq %r12, 0x20(%rsi)
jg 0x97a0
movq 0x28(%rsi), %r13
movq $0x0, 0x28(%rsi)
movq %r13, 0x8(%rsp)
callq 0xadd0
movq 0xc0(%rbx), %rdi
movq (%rdi), %rax
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq *0x48(%rax)
testb %al, %al
je 0x9782
leaq 0x180(%rbx), %rsi
movq %r13, %rdi
callq 0xe000
movq %r13, %rdi
callq 0xdd28
leaq 0xf0(%rbx), %r14
movb 0xec(%rbx), %bpl
cmpb $0x1, %bpl
jne 0x9754
movq %r14, %rdi
callq 0x44f0
testl %eax, %eax
jne 0x97de
leaq 0x8(%rbx), %rsi
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
callq 0xaf8e
testb %bpl, %bpl
je 0x9777
movq %r14, %rdi
callq 0x42c0
incl 0xe4(%rbx)
movq 0x8(%rsp), %r13
testq %r13, %r13
je 0x9791
movq (%r13), %rax
movq %r13, %rdi
callq *0x8(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x94a9(%rip), %rdi      # 0x12c50
leaq 0x9059(%rip), %rsi      # 0x12807
leaq 0x94b4(%rip), %rcx      # 0x12c69
movl $0x11e, %edx            # imm = 0x11E
callq 0x4260
leaq 0x914f(%rip), %rdi      # 0x12915
leaq 0x903a(%rip), %rsi      # 0x12807
leaq 0x9495(%rip), %rcx      # 0x12c69
movl $0x11b, %edx            # imm = 0x11B
callq 0x4260
movl %eax, %edi
callq 0x4280
jmp 0x97f9
movq %rax, %rbx
testb %bpl, %bpl
je 0x97fc
movq %r14, %rdi
callq 0x42c0
jmp 0x97fc
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x980c
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0x4640
// File: /workspace/github_cpp_makefile_star2_O3/theuni[P]libbtcnet/src/handler.cpp
// Function: CConnectionHandlerInt::OnOutgoingConnected(long, CConnection const&, CConnection const&)
void CConnectionHandlerInt::OnOutgoingConnected(ConnID id, const CConnection& conn, const CConnection& resolved_conn)
{
    assert(IsEventThread());
    DEBUG_PRINT(LOGVERBOSE, "id:", id);
    auto it = m_connecting.find(id);
    assert(it != m_connecting.end());
    std::unique_ptr<ConnectionBase> moved(nullptr);
    it->second.swap(moved);
    m_connecting.erase(it);

    if (!m_interface.OnOutgoingConnection(id, conn, resolved_conn))
        return;
    moved->SetRateLimitGroup(m_outgoing_rate_limit);
    moved->Enable();
    {
        optional_lock(m_conn_mutex, m_enable_threading);
        m_connected.emplace_hint(m_connected.end(), id, std::move(moved));
    }
    m_outgoing_conn_count++;
    m_interface.OnReadyForFirstSend(id);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, 0x10(%rsp)
cmpb $0x1, 0xec(%rdi)
jne 0x9851
movq 0x168(%rbx), %r13
callq 0x4310
cmpq %rax, %r13
jne 0x997b
movq 0x40(%rbx), %rax
testq %rax, %rax
je 0x995c
leaq 0x30(%rbx), %rdi
leaq 0x38(%rbx), %rcx
movq %rcx, %rsi
xorl %edx, %edx
cmpq %r12, 0x20(%rax)
setl %dl
cmovgeq %rax, %rsi
movq 0x10(%rax,%rdx,8), %rax
testq %rax, %rax
jne 0x9869
cmpq %rcx, %rsi
je 0x995c
cmpq %r12, 0x20(%rsi)
jg 0x995c
movq 0x28(%rsi), %r13
movq $0x0, 0x28(%rsi)
movq %r13, 0x8(%rsp)
callq 0xadd0
movq 0xc0(%rbx), %rdi
movq (%rdi), %rax
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq *0x40(%rax)
testb %al, %al
je 0x993e
leaq 0x188(%rbx), %rsi
movq %r13, %rdi
callq 0xe000
movq %r13, %rdi
callq 0xdd28
leaq 0xf0(%rbx), %r14
movb 0xec(%rbx), %bpl
cmpb $0x1, %bpl
jne 0x98fe
movq %r14, %rdi
callq 0x44f0
testl %eax, %eax
jne 0x999a
leaq 0x8(%rbx), %rsi
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
callq 0xaf8e
testb %bpl, %bpl
je 0x9921
movq %r14, %rdi
callq 0x42c0
incl 0xe0(%rbx)
movq 0xc0(%rbx), %rdi
movq 0x10(%rsp), %rsi
movq (%rdi), %rax
callq *0x58(%rax)
movq 0x8(%rsp), %r13
testq %r13, %r13
je 0x994d
movq (%r13), %rax
movq %r13, %rdi
callq *0x8(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x92ed(%rip), %rdi      # 0x12c50
leaq 0x8e9d(%rip), %rsi      # 0x12807
leaq 0x935a(%rip), %rcx      # 0x12ccb
movl $0x133, %edx            # imm = 0x133
callq 0x4260
leaq 0x8f93(%rip), %rdi      # 0x12915
leaq 0x8e7e(%rip), %rsi      # 0x12807
leaq 0x933b(%rip), %rcx      # 0x12ccb
movl $0x130, %edx            # imm = 0x130
callq 0x4260
movl %eax, %edi
callq 0x4280
jmp 0x99b5
movq %rax, %rbx
testb %bpl, %bpl
je 0x99b8
movq %r14, %rdi
callq 0x42c0
jmp 0x99b8
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x99c8
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0x4640