LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/angelapwen[P]text-based-game/space.cpp
// Function: Space::Space()
Space::Space() {
	name = "default";
	weapon = "default";
	top = right = left = bottom = corner = nullptr;
	newMove = nullptr;
	cornerAccess = false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r15
leaq 0xaaa5(%rip), %rax      # 0x14d30
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
leaq 0x18(%rdi), %r14
movq %r14, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb %al, 0x18(%rdi)
leaq 0x28(%rdi), %r12
leaq 0x38(%rdi), %r13
movq %r13, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movb %al, 0x38(%rdi)
leaq 0x32be(%rip), %rcx      # 0xd57b
movl $0x7, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2220
movq 0x30(%r15), %rdx
leaq 0x32a1(%rip), %rcx      # 0xd57b
movl $0x7, %r8d
movq %r12, %rdi
xorl %esi, %esi
callq 0x2220
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%r15)
movups %xmm0, 0x58(%r15)
movups %xmm0, 0x48(%r15)
movb $0x0, 0x78(%r15)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r15
movq (%r12), %rdi
cmpq %r13, %rdi
je 0xa323
movq (%r13), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22b1
movq %r15, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O1/angelapwen[P]text-based-game/space.cpp
// Function: Space::Space(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Space::Space(string nameIn, string weaponIn) {
	name = nameIn;
	weapon = weaponIn;
	top = right = left = bottom = corner = nullptr;
	newMove = nullptr;
	cornerAccess = false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rdi, %r15
leaq 0xa9e2(%rip), %rax      # 0x14d30
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
leaq 0x18(%rdi), %r14
movq %r14, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb %al, 0x18(%rdi)
leaq 0x28(%rdi), %r13
leaq 0x38(%rdi), %rbp
movq %rbp, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movb %al, 0x38(%rdi)
movq %rbx, %rdi
callq 0x20c0
movq %r13, %rdi
movq %r12, %rsi
callq 0x20c0
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%r15)
movups %xmm0, 0x58(%r15)
movups %xmm0, 0x48(%r15)
movb $0x0, 0x78(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq (%r13), %rdi
cmpq %rbp, %rdi
je 0xa3ca
movq (%rbp), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22c5
movq %r15, %rdi
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O1/angelapwen[P]text-based-game/space.cpp
// Function: Space::action[abi:cxx11]()
std::string Space::action() {
	string received;

	int actionChoice = intValidation(1, 2);

	switch (actionChoice) {
		case 1:
			// User made the "wrong" choice and does not receive a weapon
			received = "none";
			break;
		case 2:
			// Return the string of the weapon that the current Space includes
			received = weapon;
			break;
		default:
			break;
	}

	return received;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl $0x1, %esi
movl $0x2, %edx
callq 0xacd4
cmpl $0x1, %eax
je 0xac92
cmpl $0x2, %eax
jne 0xacad
addq $0x28, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20c0
jmp 0xacad
movq 0x8(%rbx), %rdx
leaq 0x2da8(%rip), %rcx      # 0xda45
movl $0x4, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2220
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0xaccc
movq (%r15), %rsi
incq %rsi
callq 0x21a0
movq %r14, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O1/angelapwen[P]text-based-game/space.cpp
// Function: Space::intValidation(int, int)
int Space::intValidation(int min, int max) {
	cout << "Make your choice: ";

	int input;
	cin >> input;

	// Try again if input is out of range or fails
	while (input < min || input > max || cin.fail()) {
		cout << "Input must be an integer between " << min << " and "
		     << max << "." << endl;
		cout << "Please try again: ";
		cin.clear();
		cin.ignore(256, '\n');
		cin >> input;
	}

	// Flush buffer after successful input
	cin.clear();
	cin.ignore(256, '\n');

	return input;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq 0xa2e6(%rip), %r14      # 0x14fd0
leaq 0x4c91(%rip), %rsi      # 0xf982
movl $0x12, %edx
movq %r14, %rdi
callq 0x21c0
movq 0xa2db(%rip), %r15      # 0x14fe0
leaq 0x49c7(%rip), %r13      # 0xf6d3
movq %r15, %rdi
leaq 0x4(%rsp), %rsi
callq 0x20d0
movl 0x4(%rsp), %eax
cmpl %ebp, %eax
setl %cl
cmpl %ebx, %eax
setg %al
orb %cl, %al
jne 0xad3e
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r15,%rax)
je 0xadf4
movl $0x21, %edx
movq %r14, %rdi
leaq 0x495e(%rip), %rsi      # 0xf6ab
callq 0x21c0
movq %r14, %rdi
movl %ebp, %esi
callq 0x2260
movq %rax, %r12
movl $0x5, %edx
movq %rax, %rdi
leaq 0x495f(%rip), %rsi      # 0xf6cd
callq 0x21c0
movq %r12, %rdi
movl %ebx, %esi
callq 0x2260
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x32e5(%rip), %rsi      # 0xe074
callq 0x21c0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movl $0x12, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x21c0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
xorl %esi, %esi
callq 0x2250
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
movl $0xa, %edx
callq 0x20e0
jmp 0xad0c
addq %rax, %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x2250
movq 0xa1d8(%rip), %rdi      # 0x14fe0
movl $0x100, %esi            # imm = 0x100
movl $0xa, %edx
callq 0x20e0
movl 0x4(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/angelapwen[P]text-based-game/vectorSatchel.cpp
// Function: VectorSatchel::randomDrop()
void VectorSatchel::randomDrop() {
	// Randomly shuffle the contents of vector
	std::random_shuffle(satchel.begin(),satchel.end());

	cout << "A " << satchel.back() << " has been selected at random for you "
												 "to drop." << endl;

	// Delete last element
	satchel.pop_back();

	// Update weapon status after one was deleted
	updateWeapons();

	// Print current weapons
	cout << "Your current weapon list is:" << endl;
	printWeapons();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %r14
movq 0x20(%rdi), %r15
cmpq %r15, %r14
je 0xb28a
leaq 0x20(%r14), %rax
cmpq %r15, %rax
je 0xb28a
movl $0x20, %r12d
callq 0x2050
cltq
movq %r12, %rcx
sarq $0x5, %rcx
incq %rcx
cqto
idivq %rcx
shlq $0x5, %rdx
cmpq %rdx, %r12
je 0xb279
leaq (%r14,%r12), %rdi
addq %r14, %rdx
movq %rdx, %rsi
callq 0x2120
leaq (%r14,%r12), %rax
addq $0x20, %rax
addq $0x20, %r12
cmpq %r15, %rax
jne 0xb24b
movq 0x9d3f(%rip), %r14      # 0x14fd0
leaq 0x54fe(%rip), %rsi      # 0x10796
movl $0x2, %edx
movq %r14, %rdi
callq 0x21c0
movq 0x20(%rbx), %rax
movq -0x20(%rax), %rsi
movq -0x18(%rax), %rdx
movq %r14, %rdi
callq 0x21c0
movq %rax, %r15
leaq 0x54d6(%rip), %rsi      # 0x10799
movl $0x2d, %edx
movq %rax, %rdi
callq 0x21c0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movq 0x20(%rbx), %rax
leaq -0x20(%rax), %rcx
movq %rcx, 0x20(%rbx)
movq -0x20(%rax), %rdi
addq $-0x10, %rax
cmpq %rax, %rdi
je 0xb31b
movq (%rax), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0xb372
leaq 0x4e95(%rip), %rsi      # 0x101bf
movl $0x1c, %edx
movq %r14, %rdi
callq 0x21c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *0x8(%rax)
// File: /workspace/github_cpp_makefile_star2_O1/angelapwen[P]text-based-game/vectorSatchel.cpp
// Function: VectorSatchel::updateWeapons()
void VectorSatchel::updateWeapons() {
	// Sort bag for binary search
	std::sort(satchel.begin(),satchel.end());

	// Search for each weapon type in bag and set bool flag to false if not found
	if (!std::binary_search(satchel.begin(),satchel.end(),"knife")) {
		knife = false;
	}
	if (!std::binary_search(satchel.begin(),satchel.end(),"wrench")) {
		wrench = false;
	}
	if (!std::binary_search(satchel.begin(),satchel.end(),"rope")) {
		rope = false;
	}
	if (!std::binary_search(satchel.begin(),satchel.end(),"pipe")) {
		pipe = false;
	}
	if (!std::binary_search(satchel.begin(),satchel.end(),"revolver")) {
		revolver = false;
	}
	if (!std::binary_search(satchel.begin(),satchel.end(),"candlestick")) {
		candlestick = false;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %r14
movq 0x20(%rdi), %r15
cmpq %r15, %r14
je 0xb3b4
movq %r15, %rax
subq %r14, %rax
sarq $0x5, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0xb919
movq %r14, %rdi
movq %r15, %rsi
callq 0xb9fd
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rsi
leaq 0x2181(%rip), %rdx      # 0xd544
callq 0xb53b
testb %al, %al
jne 0xb3d0
movb $0x0, 0x10(%rbx)
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rsi
leaq 0x217f(%rip), %rdx      # 0xd55e
callq 0xb56b
testb %al, %al
jne 0xb3ec
movb $0x0, 0x13(%rbx)
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rsi
leaq 0x215c(%rip), %rdx      # 0xd557
callq 0xb59b
testb %al, %al
jne 0xb408
movb $0x0, 0x11(%rbx)
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rsi
leaq 0x2150(%rip), %rdx      # 0xd567
callq 0xb59b
testb %al, %al
jne 0xb424
movb $0x0, 0x15(%rbx)
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rsi
leaq 0x2119(%rip), %rdx      # 0xd54c
callq 0xb5cb
testb %al, %al
jne 0xb440
movb $0x0, 0x12(%rbx)
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rsi
leaq 0x20e7(%rip), %rdx      # 0xd536
callq 0xb5fb
testb %al, %al
jne 0xb45c
movb $0x0, 0x14(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/robin_hood/test.cpp
// Function: test_int(unsigned int, unsigned int)
uint32_t test_int(uint32_t n, uint32_t x0)
{
	uint32_t i, x, z = 0;
	robin_hood::unordered_map<uint32_t, uint32_t, Hash32> h;
	for (i = 0, x = x0; i < n; ++i) {
		x = hash32(x);
#ifndef UDB2_TEST_DEL
		z += ++h[get_key(n, x)];
#else
		auto p = h.try_emplace(get_key(n, x), i);
		if (p.second == false) h.erase(p.first);
#endif
	}
	fprintf(stderr, "# unique keys: %ld; checksum: %u\n", h.size(), z);
	return h.size();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movabsq $-0x3b314601e57a13ad, %rax # imm = 0xC4CEB9FE1A85EC53
leaq 0x28(%rsp), %rcx
movq %rax, -0x20(%rcx)
movq %rcx, -0x18(%rcx)
movq %rcx, -0x10(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, -0x8(%rcx)
movq $0x0, 0x8(%rcx)
movq $0x20, 0x10(%rcx)
movl $0x0, (%rsp)
testl %edi, %edi
je 0x1674
movl %esi, %ebp
movl %edi, %r14d
movl %edi, %ebx
shrl $0x2, %ebx
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %r12
movq %rsp, %r13
movl %ebp, %eax
shll $0xf, %eax
notl %eax
addl %ebp, %eax
movl %eax, %ecx
shrl $0xa, %ecx
xorl %eax, %ecx
leal (%rcx,%rcx,8), %eax
movl %eax, %ecx
shrl $0x6, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0xb, %eax
notl %eax
addl %ecx, %eax
movl %eax, %ebp
shrl $0x10, %ebp
xorl %eax, %ebp
movl %ebp, %eax
xorl %edx, %edx
divl %ebx
movl %edx, %eax
shll $0xf, %eax
notl %eax
addl %edx, %eax
movl %eax, %ecx
shrl $0xa, %ecx
xorl %eax, %ecx
leal (%rcx,%rcx,8), %eax
movl %eax, %ecx
shrl $0x6, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0xb, %eax
notl %eax
addl %ecx, %eax
movl %eax, %ecx
shrl $0x10, %ecx
xorl %eax, %ecx
movl %ecx, 0x4(%rsp)
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0x1770
cmpb $0x0, 0x50(%rsp)
jne 0x1663
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq %r15, %rdi
callq 0x16fe
movl (%rsp), %eax
incl %eax
movl %eax, (%rsp)
cmpl %r14d, %eax
jb 0x15d9
movq 0x2965(%rip), %rax      # 0x3fe0
movq (%rax), %rdi
movq 0x20(%rsp), %rdx
leaq 0x9eb(%rip), %rsi       # 0x2075
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x10d0
movq 0x20(%rsp), %rbx
cmpq $0x0, 0x28(%rsp)
je 0x16bd
movq $0x0, 0x20(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x16bd
callq 0x10a0
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
cmpq $0x0, 0x28(%rsp)
je 0x16f6
movq $0x0, 0x20(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x16f6
callq 0x10a0
movq %rbx, %rdi
callq 0x1100
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/robin_hood/./robin_hood.h
// Function: robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::erase(robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::Iter<false>)
iterator erase(iterator pos) {
        ROBIN_HOOD_TRACE(this)
        // we assume that pos always points to a valid entry, and not end().
        auto const idx = static_cast<size_t>(pos.mKeyVals - mKeyVals);

        shiftDown(idx);
        --mNumElements;

        if (*pos.mInfo) {
            // we've backward shifted, return this again
            return pos;
        }

        // no backward shift, return next element
        return ++pos;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
subq 0x8(%rdi), %rsi
sarq $0x3, %rsi
callq 0x1ece
decq 0x18(%r15)
cmpb $0x0, (%r14)
jne 0x1764
addq $0x8, %rbx
movq 0x1(%r14), %rax
testq %rax, %rax
je 0x1735
incq %r14
jmp 0x174d
addq $0x9, %r14
addq $0x40, %rbx
movq (%r14), %rax
addq $0x8, %r14
testq %rax, %rax
je 0x1739
addq $-0x8, %r14
movq %r14, %rcx
bsfq %rax, %rax
movl %eax, %r14d
shrl $0x3, %r14d
addq %rcx, %r14
andl $-0x8, %eax
addq %rax, %rbx
movq %rbx, %rax
movq %r14, %rdx
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/robin_hood/./robin_hood.h
// Function: std::pair<robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::Iter<false>, bool> robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::try_emplace_impl<unsigned int, unsigned int&>(unsigned int&&, unsigned int&)
std::pair<iterator, bool> try_emplace_impl(OtherKey&& key, Args&&... args) {
        ROBIN_HOOD_TRACE(this)
        auto idxAndState = insertKeyPrepareEmptySpot(key);
        switch (idxAndState.second) {
        case InsertionState::key_found:
            break;

        case InsertionState::new_node:
            ::new (static_cast<void*>(&mKeyVals[idxAndState.first])) Node(
                *this, std::piecewise_construct, std::forward_as_tuple(std::forward<OtherKey>(key)),
                std::forward_as_tuple(std::forward<Args>(args)...));
            break;

        case InsertionState::overwrite_node:
            mKeyVals[idxAndState.first] = Node(*this, std::piecewise_construct,
                                               std::forward_as_tuple(std::forward<OtherKey>(key)),
                                               std::forward_as_tuple(std::forward<Args>(args)...));
            break;

        case InsertionState::overflow_error:
            throwOverflowError();
            break;
        }

        return std::make_pair(iterator(mKeyVals + idxAndState.first, mInfo + idxAndState.first),
                              InsertionState::key_found != idxAndState.second);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x1810
movq %rax, %r15
movl %edx, %ebp
testl %edx, %edx
je 0x17d5
cmpl $0x3, %ebp
je 0x17bc
cmpl $0x2, %ebp
jne 0x17dd
movq 0x8(%r14), %rax
movl (%r13), %ecx
movl %ecx, (%rax,%r15,8)
movl (%r12), %ecx
movl %ecx, 0x4(%rax,%r15,8)
jmp 0x17dd
movl (%r13), %eax
movq 0x8(%r14), %rcx
movl (%r12), %edx
shlq $0x20, %rdx
orq %rax, %rdx
movq %rdx, (%rcx,%r15,8)
jmp 0x17dd
movq %r14, %rdi
callq 0x1952
movq %r15, %rax
shlq $0x3, %rax
addq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
addq %r15, %rcx
cmpl $0x1, %ebp
movq %rax, (%rbx)
movq %rcx, 0x8(%rbx)
setne 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/robin_hood/./robin_hood.h
// Function: robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::increase_size()
bool increase_size() {
        // nothing allocated yet? just allocate InitialNumElements
        if (0 == mMask) {
            initData(InitialNumElements);
            return true;
        }

        auto const maxNumElementsAllowed = calcMaxNumElementsAllowed(mMask + 1);
        if (mNumElements < maxNumElementsAllowed && try_increase_info()) {
            return true;
        }

        ROBIN_HOOD_LOG("mNumElements=" << mNumElements << ", maxNumElementsAllowed="
                                       << maxNumElementsAllowed << ", load="
                                       << (static_cast<double>(mNumElements) * 100.0 /
                                           (static_cast<double>(mMask) + 1)))

        if (mNumElements * 2 < calcMaxNumElementsAllowed(mMask + 1)) {
            // we have to resize, even though there would still be plenty of space left!
            // Try to rehash instead. Delete freed memory so we don't steadyily increase mem in case
            // we have to rehash a few times
            nextHashMultiplier();
            rehashPowerOfTwo(mMask + 1, true);
        } else {
            // we've reached the capacity of the map, so the hash seems to work nice. Keep using it.
            rehashPowerOfTwo((mMask + 1) * 2, false);
        }
        return true;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0x1a3c
movabsq $0x28f5c28f5c28f5c, %r15 # imm = 0x28F5C28F5C28F5C
incq %rax
movabsq $0x28f5c28f5c28f5c3, %r14 # imm = 0x28F5C28F5C28F5C3
cmpq %r15, %rax
ja 0x1a65
shlq $0x4, %rax
leaq (%rax,%rax,4), %rax
shrq $0x2, %rax
mulq %r14
shrq $0x2, %rdx
cmpq %rdx, 0x18(%rbx)
jae 0x19f6
movq %rbx, %rdi
callq 0x1bfc
testb %al, %al
jne 0x1a5d
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rcx
addq %rdi, %rdi
leaq 0x1(%rcx), %rsi
movq %rsi, %rax
cmpq %r15, %rsi
ja 0x1a7d
shlq $0x4, %rax
leaq (%rax,%rax,4), %rax
shrq $0x2, %rax
mulq %r14
shrq $0x2, %rdx
cmpq %rdx, %rdi
jae 0x1a4b
movabsq $-0x3b314601e57a13ac, %rax # imm = 0xC4CEB9FE1A85EC54
addq %rax, (%rbx)
movq %rbx, %rdi
movl $0x1, %edx
jmp 0x1a58
movl $0x8, %esi
movq %rbx, %rdi
callq 0x1af8
jmp 0x1a5d
leaq 0x2(,%rcx,2), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1ce0
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
shrq $0x2, %rax
mulq %r14
shlq $0x2, %rdx
andq $-0x10, %rdx
leaq (%rdx,%rdx,4), %rdx
jmp 0x19e4
shrq $0x2, %rax
mulq %r14
shlq $0x2, %rdx
andq $-0x10, %rdx
leaq (%rdx,%rdx,4), %rdx
jmp 0x1a20
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/robin_hood/./robin_hood.h
// Function: robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::shiftUp(unsigned long, unsigned long)
void
    shiftUp(size_t startIdx,
            size_t const insertion_idx) noexcept(std::is_nothrow_move_assignable<Node>::value) {
        auto idx = startIdx;
        ::new (static_cast<void*>(mKeyVals + idx)) Node(std::move(mKeyVals[idx - 1]));
        while (--idx != insertion_idx) {
            mKeyVals[idx] = std::move(mKeyVals[idx - 1]);
        }

        idx = startIdx;
        while (idx != insertion_idx) {
            ROBIN_HOOD_COUNT(shiftUp)
            mInfo[idx] = static_cast<uint8_t>(mInfo[idx - 1] + mInfoInc);
            if (ROBIN_HOOD_UNLIKELY(mInfo[idx] + mInfoInc > 0xFF)) {
                mMaxNumElementsAllowed = 0;
            }
            --idx;
        }
    }

// Assembly:
movq 0x8(%rdi), %rax
movq -0x8(%rax,%rsi,8), %rcx
movq %rcx, (%rax,%rsi,8)
leaq -0x1(%rsi), %rax
cmpq %rdx, %rax
je 0x1abd
movq 0x8(%rdi), %rcx
movq -0x8(%rcx,%rax,8), %r8
movq %r8, (%rcx,%rax,8)
decq %rax
cmpq %rax, %rdx
jne 0x1aa8
cmpq %rdx, %rsi
jne 0x1ac3
retq
movq 0x10(%rdi), %rax
movb -0x1(%rax,%rsi), %cl
addb 0x30(%rdi), %cl
movb %cl, (%rax,%rsi)
movq 0x10(%rdi), %rax
movzbl (%rax,%rsi), %eax
addl 0x30(%rdi), %eax
cmpl $0x100, %eax            # imm = 0x100
jae 0x1aed
decq %rsi
cmpq %rsi, %rdx
jne 0x1ac3
jmp 0x1ac2
movq $0x0, 0x28(%rdi)
jmp 0x1ae3
nop
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/robin_hood/./robin_hood.h
// Function: robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::initData(unsigned long)
void initData(size_t max_elements) {
        mNumElements = 0;
        mMask = max_elements - 1;
        mMaxNumElementsAllowed = calcMaxNumElementsAllowed(max_elements);

        auto const numElementsWithBuffer = calcNumElementsWithBuffer(max_elements);

        // malloc & zero mInfo. Faster than calloc everything.
        auto const numBytesTotal = calcNumBytesTotal(numElementsWithBuffer);
        ROBIN_HOOD_LOG("std::calloc " << numBytesTotal << " = calcNumBytesTotal("
                                      << numElementsWithBuffer << ")")
        mKeyVals = reinterpret_cast<Node*>(
            detail::assertNotNull<std::bad_alloc>(std::malloc(numBytesTotal)));
        mInfo = reinterpret_cast<uint8_t*>(mKeyVals + numElementsWithBuffer);
        std::memset(mInfo, 0, numBytesTotal - numElementsWithBuffer * sizeof(Node));

        // set sentinel
        mInfo[numElementsWithBuffer] = 1;

        mInfoInc = InitialInfoInc;
        mInfoHashShift = InitialInfoHashShift;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq $0x0, 0x18(%rdi)
leaq -0x1(%rsi), %rax
movq %rax, 0x20(%rdi)
movabsq $0x28f5c28f5c28f5c, %rsi # imm = 0x28F5C28F5C28F5C
movabsq $0x28f5c28f5c28f5c3, %rcx # imm = 0x28F5C28F5C28F5C3
movq %r14, %rax
cmpq %rsi, %r14
ja 0x1bc6
shlq $0x4, %rax
leaq (%rax,%rax,4), %rax
shrq $0x2, %rax
mulq %rcx
shrq $0x2, %rdx
movq %rdx, 0x28(%rbx)
movq %r14, %rax
cmpq %rsi, %r14
ja 0x1bde
shlq $0x4, %rax
leaq (%rax,%rax,4), %rax
shrq $0x2, %rax
mulq %rcx
shrq $0x2, %rdx
movl $0xff, %r12d
cmpq %r12, %rdx
cmovbq %rdx, %r12
leaq (%r12,%r14), %r15
leaq (%r15,%r15,8), %rdi
addq $0x8, %rdi
callq 0x10c0
testq %rax, %rax
je 0x1bf6
leaq (%r12,%r14), %rdx
addq $0x8, %rdx
movq %rax, 0x8(%rbx)
leaq (%rax,%r15,8), %r14
movq %r14, 0x10(%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0x1070
movb $0x1, (%r15,%r14)
movq $0x20, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
shrq $0x2, %rax
mulq %rcx
shlq $0x2, %rdx
andq $-0x10, %rdx
leaq (%rdx,%rdx,4), %rdx
jmp 0x1b49
shrq $0x2, %rax
mulq %rcx
shlq $0x2, %rdx
andq $-0x10, %rdx
leaq (%rdx,%rdx,4), %rdx
jmp 0x1b6c
callq 0x1dc9
nop
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/robin_hood/./robin_hood.h
// Function: robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::try_increase_info()
bool try_increase_info() {
        ROBIN_HOOD_LOG("mInfoInc=" << mInfoInc << ", numElements=" << mNumElements
                                   << ", maxNumElementsAllowed="
                                   << calcMaxNumElementsAllowed(mMask + 1))
        if (mInfoInc <= 2) {
            // need to be > 2 so that shift works (otherwise undefined behavior!)
            return false;
        }
        // we got space left, try to make info smaller
        mInfoInc = static_cast<uint8_t>(mInfoInc >> 1U);

        // remove one bit of the hash, leaving more space for the distance info.
        // This is extremely fast because we can operate on 8 bytes at once.
        ++mInfoHashShift;
        auto const numElementsWithBuffer = calcNumElementsWithBuffer(mMask + 1);

        for (size_t i = 0; i < numElementsWithBuffer; i += 8) {
            auto val = unaligned_load<uint64_t>(mInfo + i);
            val = (val >> 1U) & UINT64_C(0x7f7f7f7f7f7f7f7f);
            std::memcpy(mInfo + i, &val, sizeof(val));
        }
        // update sentinel, which might have been cleared out!
        mInfo[numElementsWithBuffer] = 1;

        mMaxNumElementsAllowed = calcMaxNumElementsAllowed(mMask + 1);
        return true;
    }

// Assembly:
movl 0x30(%rdi), %ecx
cmpl $0x3, %ecx
jb 0x1cae
movabsq $0x28f5c28f5c28f5c, %r8 # imm = 0x28F5C28F5C28F5C
movl %ecx, %eax
shrl %eax
movzbl %al, %eax
movl %eax, 0x30(%rdi)
incl 0x34(%rdi)
movq 0x20(%rdi), %r9
incq %r9
movabsq $0x28f5c28f5c28f5c3, %rsi # imm = 0x28F5C28F5C28F5C3
movq %r9, %rax
cmpq %r8, %r9
ja 0x1cb5
shlq $0x4, %rax
leaq (%rax,%rax,4), %rax
shrq $0x2, %rax
mulq %rsi
shrq $0x2, %rdx
movl $0xff, %eax
cmpq %rax, %rdx
cmovbq %rdx, %rax
addq %r9, %rax
je 0x1c83
xorl %edx, %edx
movabsq $0x7f7f7f7f7f7f7f7f, %r9 # imm = 0x7F7F7F7F7F7F7F7F
movq 0x10(%rdi), %r10
movq (%r10,%rdx), %r11
shrq %r11
andq %r9, %r11
movq %r11, (%r10,%rdx)
addq $0x8, %rdx
cmpq %rax, %rdx
jb 0x1c68
movq 0x10(%rdi), %rdx
movb $0x1, (%rdx,%rax)
movq 0x20(%rdi), %rax
incq %rax
cmpq %r8, %rax
ja 0x1cca
shlq $0x4, %rax
leaq (%rax,%rax,4), %rax
shrq $0x2, %rax
mulq %rsi
shrq $0x2, %rdx
movq %rdx, 0x28(%rdi)
cmpl $0x3, %ecx
setae %al
retq
shrq $0x2, %rax
mulq %rsi
shlq $0x2, %rdx
andq $-0x10, %rdx
leaq (%rdx,%rdx,4), %rdx
jmp 0x1c4b
shrq $0x2, %rax
mulq %rsi
shlq $0x2, %rdx
andq $-0x10, %rdx
leaq (%rdx,%rdx,4), %rdx
jmp 0x1caa
nop
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/robin_hood/./robin_hood.h
// Function: robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::rehashPowerOfTwo(unsigned long, bool)
void rehashPowerOfTwo(size_t numBuckets, bool forceFree) {
        ROBIN_HOOD_TRACE(this)

        Node* const oldKeyVals = mKeyVals;
        uint8_t const* const oldInfo = mInfo;

        const size_t oldMaxElementsWithBuffer = calcNumElementsWithBuffer(mMask + 1);

        // resize operation: move stuff
        initData(numBuckets);
        if (oldMaxElementsWithBuffer > 1) {
            for (size_t i = 0; i < oldMaxElementsWithBuffer; ++i) {
                if (oldInfo[i] != 0) {
                    // might throw an exception, which is really bad since we are in the middle of
                    // moving stuff.
                    insert_move(std::move(oldKeyVals[i]));
                    // destroy the node but DON'T destroy the data.
                    oldKeyVals[i].~Node();
                }
            }

            // this check is not necessary as it's guarded by the previous if, but it helps
            // silence g++'s overeager "attempt to free a non-heap object 'map'
            // [-Werror=free-nonheap-object]" warning.
            if (oldKeyVals != reinterpret_cast_no_cast_align_warning<Node*>(&mMask)) {
                // don't destroy old data: put it into the pool instead
                if (forceFree) {
                    std::free(oldKeyVals);
                } else {
                    DataPool::addOrFree(oldKeyVals, calcNumBytesTotal(oldMaxElementsWithBuffer));
                }
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rcx
incq %rcx
movabsq $0x28f5c28f5c28f5c, %rax # imm = 0x28F5C28F5C28F5C
cmpq %rax, %rcx
ja 0x1da4
movq %rcx, %rax
shlq $0x4, %rax
leaq (%rax,%rax,4), %rax
shrq $0x2, %rax
movabsq $0x28f5c28f5c28f5c3, %rdx # imm = 0x28F5C28F5C28F5C3
mulq %rdx
shrq $0x2, %rdx
movq 0x8(%rbx), %r14
movq 0x10(%rbx), %r12
movl $0xff, %r13d
cmpq %r13, %rdx
cmovbq %rdx, %r13
addq %rcx, %r13
movq %rbx, %rdi
callq 0x1af8
cmpq $0x2, %r13
jb 0x1d95
leaq 0x20(%rbx), %rax
movq %rax, (%rsp)
xorl %ebp, %ebp
movq %r14, %r15
cmpb $0x0, (%r12,%rbp)
je 0x1d6d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1df8
incq %rbp
addq $0x8, %r15
cmpq %rbp, %r13
jne 0x1d5b
cmpq (%rsp), %r14
je 0x1d95
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10a0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rcx, %rax
shrq $0x2, %rax
movabsq $0x28f5c28f5c28f5c3, %rdx # imm = 0x28F5C28F5C28F5C3
mulq %rdx
shlq $0x2, %rdx
andq $-0x10, %rdx
leaq (%rdx,%rdx,4), %rdx
jmp 0x1d28
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/robin_hood/./robin_hood.h
// Function: robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::insert_move(robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::DataNode<robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>, true>&&)
void insert_move(Node&& keyval) {
        // we don't retry, fail if overflowing
        // don't need to check max num elements
        if (0 == mMaxNumElementsAllowed && !try_increase_info()) {
            throwOverflowError();
        }

        size_t idx{};
        InfoType info{};
        keyToIdx(keyval.getFirst(), &idx, &info);

        // skip forward. Use <= because we are certain that the element is not there.
        while (info <= mInfo[idx]) {
            idx = idx + 1;
            info += mInfoInc;
        }

        // key not found, so we are now exactly where we want to insert it.
        auto const insertion_idx = idx;
        auto const insertion_info = static_cast<uint8_t>(info);
        if (ROBIN_HOOD_UNLIKELY(insertion_info + mInfoInc > 0xFF)) {
            mMaxNumElementsAllowed = 0;
        }

        // find an empty spot
        while (0 != mInfo[idx]) {
            next(&info, &idx);
        }

        auto& l = mKeyVals[insertion_idx];
        if (idx == insertion_idx) {
            ::new (static_cast<void*>(&l)) Node(std::move(keyval));
        } else {
            shiftUp(idx, insertion_idx);
            l = std::move(keyval);
        }

        // put at empty spot
        mInfo[insertion_idx] = insertion_info;

        ++mNumElements;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x28(%rdi)
jne 0x1e22
movq %rbx, %rdi
callq 0x1bfc
testb %al, %al
jne 0x1e22
movq %rbx, %rdi
callq 0x1952
movl (%r14), %eax
imulq (%rbx), %rax
movq %rax, %r15
shrq $0x21, %r15
xorq %rax, %r15
movl %r15d, %r12d
andl $0x1f, %r12d
movb 0x34(%rbx), %cl
shrq %cl, %r12
movl 0x30(%rbx), %ecx
shrq $0x5, %r15
andq 0x20(%rbx), %r15
addl %ecx, %r12d
movq 0x10(%rbx), %rax
movzbl (%rax,%r15), %edx
cmpl %edx, %r12d
ja 0x1e6a
addl %ecx, %r12d
movzbl 0x1(%rax,%r15), %edx
incq %r15
jmp 0x1e57
movzbl %r12b, %edx
addl %ecx, %edx
cmpl $0x100, %edx            # imm = 0x100
jae 0x1ec3
movl $0x1, %ecx
decq %rcx
cmpb $0x0, (%rax,%r15)
leaq 0x1(%rax), %rax
jne 0x1e7d
movq 0x8(%rbx), %r13
testq %rcx, %rcx
je 0x1ea5
movq %r15, %rsi
subq %rcx, %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x1a92
movq (%r14), %rax
movq %rax, (%r13,%r15,8)
movq 0x10(%rbx), %rax
movb %r12b, (%rax,%r15)
incq 0x18(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq $0x0, 0x28(%rbx)
jmp 0x1e78
nop
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/robin_hood/./robin_hood.h
// Function: robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::shiftDown(unsigned long)
void shiftDown(size_t idx) noexcept(std::is_nothrow_move_assignable<Node>::value) {
        // until we find one that is either empty or has zero offset.
        // TODO(martinus) we don't need to move everything, just the last one for the same
        // bucket.
        mKeyVals[idx].destroy(*this);

        // until we find one that is either empty or has zero offset.
        while (mInfo[idx + 1] >= 2 * mInfoInc) {
            ROBIN_HOOD_COUNT(shiftDown)
            mInfo[idx] = static_cast<uint8_t>(mInfo[idx + 1] - mInfoInc);
            mKeyVals[idx] = std::move(mKeyVals[idx + 1]);
            ++idx;
        }

        mInfo[idx] = 0;
        // don't destroy, we've moved it
        // mKeyVals[idx].destroy(*this);
        mKeyVals[idx].~Node();
    }

// Assembly:
movq 0x10(%rdi), %rax
movzbl 0x1(%rsi,%rax), %ecx
movl 0x30(%rdi), %edx
leal (%rdx,%rdx), %r8d
cmpl %ecx, %r8d
ja 0x1f0a
subb %dl, %cl
movb %cl, (%rax,%rsi)
movq 0x8(%rdi), %rax
movq 0x8(%rax,%rsi,8), %rcx
movq %rcx, (%rax,%rsi,8)
movq 0x10(%rdi), %rax
movzbl 0x2(%rax,%rsi), %ecx
movl 0x30(%rdi), %edx
leal (%rdx,%rdx), %r8d
incq %rsi
jmp 0x1ede
movb $0x0, (%rax,%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/henrixh[P]shittydsa/examples/fenwick.cpp
// Function: main
int main(int, char **)
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ul size, ops;
  cin >> size >> ops;

  Fenwick fen {size};

  char op;
  ul index;
  l diff;
  for (ul i {0}; i < ops; ++i) {
    cin >> op;
    if (op == '+') {
      cin >> index >> diff;
      fen.add(index, diff);
    }

    if (op == '?') {
      cin >> index;
      cout << fen.sum(0, index) << "\n";
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
xorl %edi, %edi
callq 0x1040
movq 0x2d78(%rip), %rdi      # 0x3fe0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x0, 0xd8(%rdi,%rax)
leaq 0x40(%rsp), %rbx
movq %rbx, %rsi
callq 0x1060
leaq 0x38(%rsp), %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x1060
movq (%rbx), %rsi
leaq 0x18(%rsp), %rdi
callq 0x13d0
cmpq $0x0, (%r14)
je 0x1386
xorl %r12d, %r12d
movq 0x2d27(%rip), %rbx      # 0x3fe0
leaq 0xf(%rsp), %r14
leaq 0x10(%rsp), %r15
movq 0x2d06(%rip), %r13      # 0x3fd0
leaq 0xd5f(%rip), %rbp       # 0x2030
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10e0
cmpb $0x2b, 0xf(%rsp)
jne 0x132b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1060
movq %rax, %rdi
leaq 0x30(%rsp), %rsi
callq 0x10c0
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rax, %rdx
jbe 0x132b
movq 0x30(%rsp), %rsi
addq %rsi, (%rcx,%rax,8)
leaq 0x1(%rax), %rdi
orq %rdi, %rax
cmpq %rdx, %rax
jb 0x131b
cmpb $0x3f, 0xf(%rsp)
jne 0x1378
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1060
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x135e
movq 0x18(%rsp), %rcx
xorl %esi, %esi
addq -0x8(%rcx,%rax,8), %rsi
leaq -0x1(%rax), %rdx
andq %rdx, %rax
jne 0x134e
jmp 0x1360
xorl %esi, %esi
movq %r13, %rdi
callq 0x1090
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x10d0
incq %r12
cmpq 0x38(%rsp), %r12
jb 0x12d1
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x139d
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x10b0
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x13c8
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x10b0
movq %rbx, %rdi
callq 0x1100
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/testServer/src/main.cpp
// Function: main
int main(int argc, char **argv)
{
	SYSLOG_INIT("../logs/server.log", LOG_LEVEL_DEBUG, 1048576, 10);	
	
	beyondy::Async::Queue<beyondy::Async::Message> *inQ = new beyondy::Async::Queue<beyondy::Async::Message>(1024);
	beyondy::Async::Queue<beyondy::Async::Message> *outQ = new beyondy::Async::Queue<beyondy::Async::Message>(2048);

	beyondy::Async::Processor *processor = new Echo();
	processor->setSendFunc(async_send_delegator, outQ);
	int retval = processor->onInit();

	beyondy::Async::MtWorker *mtWorker = new beyondy::Async::MtWorker(inQ, processor, 10);
	mtWorker->start();

	beyondy::Async::EventManager *emgr = new beyondy::Async::EventManager(outQ, 1024);

	retval = emgr->addListener("tcp://0.0.0.0:5010", inQ, processor, 100);
	if (retval < 0) {
		SYSLOG_ERROR("addListener failed");
		return 1;
	}
/*
	int cid = emgr->addConnector("inet@localhost:5010/tcp", inQ, processor, 1);
	if (cid < 0) {
		SYSLOG_ERROR("addConnector failed");
		return 2;
	}
**/
	emgr->start();

	// nothing
	processor->onExit();

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0x218, %edi            # imm = 0x218
callq 0x2250
movq %rax, %rbx
leaq 0x4a45(%rip), %rsi      # 0x7004
movl $0x100000, %ecx         # imm = 0x100000
movl $0xa, %r8d
movq %rax, %rdi
movl $0x5, %edx
callq 0x5690
leaq 0x9caa(%rip), %r13      # 0xc288
movq %rbx, (%r13)
movl $0xb0, %edi
callq 0x2250
movq %rax, %rbx
movl $0x400, %esi            # imm = 0x400
movq %rax, %rdi
callq 0x2746
movl $0xb0, %edi
callq 0x2250
movq %rax, %r15
movl $0x800, %esi            # imm = 0x800
movq %rax, %rdi
callq 0x2746
movl $0x30, %edi
callq 0x2250
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
leaq 0x958f(%rip), %rax      # 0xbbc0
leaq 0x10(%rax), %rcx
movq %rcx, (%r14)
movl $0x77359400, %ecx       # imm = 0x77359400
movq %rcx, 0x18(%r14)
movq %rcx, 0x20(%r14)
leaq 0x1644(%rip), %rcx      # 0x3c90
movq %rcx, 0x8(%r14)
movq %r15, 0x10(%r14)
movq %r14, %rdi
callq *0x30(%rax)
movl $0x20, %edi
callq 0x2250
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl $0xa, %ecx
callq 0x3a88
movq %r12, %rdi
callq 0x3bc0
movl $0x70, %edi
callq 0x2250
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x2dd4
leaq 0x4971(%rip), %rsi      # 0x7017
movq %r12, %rdi
movq %rbx, %rdx
movq %r14, %rcx
movl $0x64, %r8d
callq 0x2f60
testl %eax, %eax
js 0x26d3
movq %r12, %rdi
callq 0x399e
movq (%r14), %rax
movq %r14, %rdi
callq *0x28(%rax)
xorl %ebx, %ebx
jmp 0x26f4
movq (%r13), %rdi
movl $0x1, %ebx
cmpl $0x2, (%rdi)
jl 0x26f4
leaq 0x4942(%rip), %rdx      # 0x702a
movl $0x2, %esi
xorl %eax, %eax
callq 0x56bc
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movl $0x70, %esi
jmp 0x2712
movq %rax, %r14
movl $0x20, %esi
movq %r12, %rdi
jmp 0x2739
movq %rax, %r14
movl $0xb0, %esi
movq %r15, %rdi
jmp 0x2739
movq %rax, %r14
movl $0xb0, %esi
jmp 0x2736
movq %rax, %r14
movl $0x218, %esi            # imm = 0x218
movq %rbx, %rdi
callq 0x2260
movq %r14, %rdi
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/testServer/src/../../../serverd/src/Echo.cpp
// Function: Echo::onInit()
int Echo::onInit()
{
	maxInputSize = 50 * 1024 * 1024;
	maxOutputSize = 50 * 1024 * 1024;

	dstFlow = getConnector("dst");
	// TODO: use more general log
	// after compile the frame with -rdynamic, lib can use tis symbols
	// SYSLOG_INIT("../logs/business.log", LOG_LEVEL_DEBUG, 10*1024*1024, 10);
	return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x3200000, %eax        # imm = 0x3200000
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
leaq 0x4722(%rip), %rdi      # 0x705e
callq 0x259c
movl %eax, 0x28(%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/testServer/src/../../../serverd/src/Echo.cpp
// Function: Echo::doEcho(beyondy::Async::Message*)
int Echo::doEcho(Message *req)
{
	int takenMs = 0;
	if (req->getWptr() >= (long)(sizeof(struct proto_h16_head) + sizeof(int))) {
		takenMs = *((int *)(req->data() + sizeof(struct proto_h16_head)));	
	}

	SYSLOG_DEBUG("Echo took %dms", takenMs);
	if (takenMs > 0) usleep((long)takenMs*1000);

	Message *rsp = Message::create(req->getWptr(), req->fd, req->flow);
	memcpy(rsp->data(), req->data(), req->getWptr());

	struct proto_h16_head *h = (struct proto_h16_head *)rsp->data();
	h->cmd = h->cmd + 1;

	/* set response size */
	rsp->setWptr(req->getWptr());

	Message::destroy(req);
	if (sendMessage(rsp) < 0) {
		Message::destroy(rsp);
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %ebp, %ebp
cmpq $0x14, 0x10(%rsi)
jl 0x2966
movq (%r14), %rax
movl 0x10(%rax), %ebp
leaq 0x991b(%rip), %rax      # 0xc288
movq (%rax), %rdi
cmpl $0x5, (%rdi)
jl 0x298a
leaq 0x46e6(%rip), %rdx      # 0x7062
movl $0x5, %esi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x56bc
testl %ebp, %ebp
jle 0x2999
imull $0x3e8, %ebp, %edi      # imm = 0x3E8
callq 0x2320
movq 0x10(%r14), %rdi
movl 0x24(%r14), %esi
movl 0x28(%r14), %edx
callq 0x5944
movq %rax, %r15
movq (%rax), %rdi
movq (%r14), %rsi
movq 0x10(%r14), %rdx
callq 0x2200
movq (%r15), %rax
incw 0x4(%rax)
movq 0x10(%r14), %rax
movq %rax, 0x10(%r15)
movq %r14, %rdi
callq 0x59ac
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x29ed
movq 0x10(%rbx), %rsi
movq %r15, %rdi
callq *%rax
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jns 0x29fa
movq %r15, %rdi
callq 0x59ac
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/testServer/src/../../../serverd/src/Echo.cpp
// Function: Echo::doMore(beyondy::Async::Message*)
int Echo::doMore(Message *req)
{
	int takenMs = 0;
	if (req->getWptr() >= (long)(sizeof(struct proto_h16_head) + sizeof(int))) {
		takenMs = *((int *)(req->data() + sizeof(struct proto_h16_head)));	
	}

	SYSLOG_DEBUG("More took %dms", takenMs);
	if (takenMs > 0) usleep((long)takenMs*1000);

	Message *rsp = Message::create(req->getWptr(), req->fd, req->flow);
	memcpy(rsp->data(), req->data(), req->getWptr());

	struct proto_h16_head *h = (struct proto_h16_head *)rsp->data();
	h->cmd = ECHO_CMD_MORE_RSP;

	/* set response size */
	rsp->setWptr(req->getWptr());

	Message::destroy(req);
	if (sendMessage(rsp) < 0) {
		Message::destroy(rsp);
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %ebp, %ebp
cmpq $0x14, 0x10(%rsi)
jl 0x2b80
movq (%r14), %rax
movl 0x10(%rax), %ebp
leaq 0x9701(%rip), %rax      # 0xc288
movq (%rax), %rdi
cmpl $0x5, (%rdi)
jl 0x2ba4
leaq 0x4567(%rip), %rdx      # 0x70fd
movl $0x5, %esi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x56bc
testl %ebp, %ebp
jle 0x2bb3
imull $0x3e8, %ebp, %edi      # imm = 0x3E8
callq 0x2320
movq 0x10(%r14), %rdi
movl 0x24(%r14), %esi
movl 0x28(%r14), %edx
callq 0x5944
movq %rax, %r15
movq (%rax), %rdi
movq (%r14), %rsi
movq 0x10(%r14), %rdx
callq 0x2200
movq (%r15), %rax
movw $0x5, 0x4(%rax)
movq 0x10(%r14), %rax
movq %rax, 0x10(%r15)
movq %r14, %rdi
callq 0x59ac
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x2c09
movq 0x10(%rbx), %rsi
movq %r15, %rdi
callq *%rax
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jns 0x2c16
movq %r15, %rdi
callq 0x59ac
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/testServer/src/../../../serverd/src/Echo.cpp
// Function: Echo::onMessage(beyondy::Async::Message*)
int Echo::onMessage(beyondy::Async::Message *req)
{
	SYSLOG_DEBUG("Echo got a message from fd=%d flow=%d msize=%d, byte0=%ld,%d, enQ=%ld,%d, deQ=%ld,%ld", \
		req->fd, req->flow, req->getWptr(),
		req->ts_byte_first.tv_sec, req->ts_byte_first.tv_usec,
		req->ts_enqueue.tv_sec, req->ts_enqueue.tv_usec,
		req->ts_dequeue.tv_sec, req->ts_dequeue.tv_usec);
	struct proto_h16_head *h = (struct proto_h16_head *)req->data();
	int retval = 0;

	if (h->cmd == ECHO_CMD_ECHO_REQ) {
		retval = doEcho(req);
	}
	else if (h->cmd == ECHO_CMD_FORWARD_REQ || h->cmd == ECHO_CMD_MORE_RSP) {
		retval = doForward(req);
	}
	else if (h->cmd == ECHO_CMD_MORE_REQ) {
		retval = doMore(req);
	}
	else {
		SYSLOG_DEBUG("Echo uknown cmd=%d", h->cmd);
	}

	return retval;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x9650(%rip), %r15      # 0xc288
movq (%r15), %rdi
cmpl $0x5, (%rdi)
jl 0x2c78
movl 0x24(%rbx), %ecx
movl 0x28(%rbx), %r8d
movq 0x10(%rbx), %r9
movups 0x30(%rbx), %xmm0
movups 0x40(%rbx), %xmm1
movups 0x50(%rbx), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0x44a0(%rip), %rdx      # 0x710c
movl $0x5, %esi
xorl %eax, %eax
callq 0x56bc
movq (%rbx), %rax
movzwl 0x4(%rax), %ecx
cmpq $0x5, %rcx
ja 0x2cd1
leaq 0x43b4(%rip), %rax      # 0x7040
movslq (%rax,%rcx,4), %rdx
addq %rax, %rdx
jmpq *%rdx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x2a06
movq %r14, %rdi
movq %rbx, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x294a
movq %r14, %rdi
movq %rbx, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x2b64
movq (%r15), %rdi
cmpl $0x5, (%rdi)
jl 0x2cec
leaq 0x4482(%rip), %rdx      # 0x7162
movl $0x5, %esi
xorl %eax, %eax
callq 0x56bc
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/testServer/src/../../../serverd/src/Echo.cpp
// Function: Echo::onSent(beyondy::Async::Message*, int)
int Echo::onSent(Message *msg, int status)
{
	SYSLOG_DEBUG("Echo message from fd=%d flow=%d msize=%d sent status=%d, enQ=%ld,%ld, deQ=%ld,%ld, byte0=%ld,%ld, sent=%ld,%ld", \
		msg->fd, msg->flow, msg->getWptr(), status,
		msg->ts_enqueue.tv_sec, msg->ts_enqueue.tv_usec,
		msg->ts_dequeue.tv_sec, msg->ts_dequeue.tv_usec,
		msg->ts_byte_first.tv_sec, msg->ts_byte_first.tv_usec,
		msg->ts_process_end.tv_sec, msg->ts_process_end.tv_usec);
	Message::destroy(msg);
	return 0;
}

// Assembly:
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
leaq 0x9581(%rip), %rax      # 0xc288
movq (%rax), %rdi
cmpl $0x5, (%rdi)
jl 0x2d54
movl 0x24(%rbx), %ecx
movl 0x28(%rbx), %r8d
movq 0x10(%rbx), %r9
movups 0x40(%rbx), %xmm0
movups 0x50(%rbx), %xmm1
movups 0x30(%rbx), %xmm2
movups 0x60(%rbx), %xmm3
movups %xmm3, 0x38(%rsp)
movups %xmm2, 0x28(%rsp)
movups %xmm1, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
movl %edx, (%rsp)
leaq 0x442d(%rip), %rdx      # 0x7175
movl $0x5, %esi
xorl %eax, %eax
callq 0x56bc
movq %rbx, %rdi
callq 0x59ac
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/sun98[P]Mini-DFS/datanode.cpp
// Function: DataServer::operator()()
void DataServer::operator()()
{
    while (true)
    {
        std::unique_lock<std::mutex> lk(mtx);
        cv.wait(lk, [&]() { return !this->finish; });
        if (cmd == "up")
        {
            size_ += bufSize / 1024.0 / 1024.0;
            put();
        }
        else if (cmd == "down")
            read();
        else if (cmd == "loc")
            locate();
        else if (cmd == "down_id")
            fetch();
        this->finish = true;
        lk.unlock();
        cv.notify_all();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x28(%rdi), %r13
leaq 0x50(%rdi), %r14
leaq 0x80(%rdi), %r15
leaq -0x38(%rbp), %r12
movq %r13, -0x38(%rbp)
movb $0x0, -0x30(%rbp)
movq %r12, %rdi
callq 0x5068
movb $0x1, -0x30(%rbp)
cmpb $0x1, 0xb8(%rbx)
jne 0x389e
movq %r14, %rdi
movq %r12, %rsi
callq 0x30f0
cmpb $0x0, 0xb8(%rbx)
jne 0x388a
movq %r15, %rdi
leaq 0x5772(%rip), %rsi      # 0x901a
callq 0x30e0
testl %eax, %eax
je 0x38f4
movq %r15, %rdi
leaq 0x5762(%rip), %rsi      # 0x901d
callq 0x30e0
testl %eax, %eax
je 0x3923
movq %r15, %rdi
leaq 0x5754(%rip), %rsi      # 0x9022
callq 0x30e0
testl %eax, %eax
je 0x392d
movq %r15, %rdi
leaq 0x5745(%rip), %rsi      # 0x9026
callq 0x30e0
testl %eax, %eax
jne 0x3935
movq %rbx, %rdi
callq 0x492c
jmp 0x3935
xorps %xmm0, %xmm0
cvtsi2sdl 0xa4(%rbx), %xmm0
movsd 0x5701(%rip), %xmm1     # 0x9008
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
addsd 0x20(%rbx), %xmm0
movsd %xmm0, 0x20(%rbx)
movq %rbx, %rdi
callq 0x396e
jmp 0x3935
movq %rbx, %rdi
callq 0x3f34
jmp 0x3935
movq %rbx, %rdi
callq 0x4498
movb $0x1, 0xb8(%rbx)
movq %r12, %rdi
callq 0x4f02
movq %r14, %rdi
callq 0x3460
movq %r12, %rdi
callq 0x4f34
jmp 0x386d
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x4f34
movq %rbx, %rdi
callq 0x34a0
nop