LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]articles/include/policies.hpp
// Function: FilledRandomInsert<plf::colony<NonTrivialStringMovable, std::allocator<NonTrivialStringMovable>, unsigned short>>::make(unsigned long)
inline static Container make(std::size_t size){
        // prepare randomized data that will have all the integers from the range
        if(v.size() != size){
            v.clear();
            v.reserve(size);
            for(std::size_t i = 0; i < size; ++i){
                v.push_back({i});
            }
            std::shuffle(begin(v), end(v), std::mt19937());
        }

        // fill with randomized data
        Container container;
        for(std::size_t i = 0; i < size; ++i){
            container.insert(v[i]);
        }

        return container;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1398, %rsp           # imm = 0x1398
movq 0xb413a(%rip), %rax     # 0xef8d0
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
movq %rsi, %r14
movq %rdi, %rbx
subq 0xb411b(%rip), %rax     # 0xef8c8
sarq $0x3, %rax
imulq %rax, %rcx
cmpq %rsi, %rcx
je 0x3b8bf
leaq 0xb4103(%rip), %r15     # 0xef8c8
movq %r15, %rdi
callq 0x3a958
movq %r15, %rdi
movq %r14, %rsi
callq 0x1a192
testq %r14, %r14
je 0x3b868
leaq 0x20(%rsp), %rbp
leaq 0x10(%rsp), %r15
leaq 0xb40d6(%rip), %r13     # 0xef8c8
xorl %r12d, %r12d
leaq 0x8(%rsp), %rsi
movq %rbp, 0x10(%rsp)
movq $0x41, 0x8(%rsp)
movq %r15, %rdi
xorl %edx, %edx
callq 0x42e0
vmovups 0x7c5b5(%rip), %zmm0    # 0xb7dd1
movq 0x8(%rsp), %rcx
movq %rax, 0x10(%rsp)
movq %rcx, 0x20(%rsp)
movb $0x4f, 0x40(%rax)
vmovups %zmm0, (%rax)
movq %rcx, 0x18(%rsp)
movb $0x0, (%rax,%rcx)
movq %r12, 0x30(%rsp)
movq %r13, %rdi
movq %r15, %rsi
vzeroupper
callq 0x3acf0
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3b860
callq 0x41a0
incq %r12
cmpq %r12, %r14
jne 0x3b7f5
movq 0xb4059(%rip), %rdi     # 0xef8c8
movq 0xb405a(%rip), %rsi     # 0xef8d0
movl $0x1, %eax
movl $0x1571, %ecx           # imm = 0x1571
movq $0x1571, 0x10(%rsp)     # imm = 0x1571
movq %rcx, %rdx
shrq $0x1e, %rdx
xorl %ecx, %edx
imull $0x6c078965, %edx, %ecx # imm = 0x6C078965
addl %eax, %ecx
movq %rcx, 0x10(%rsp,%rax,8)
incq %rax
cmpq $0x270, %rax            # imm = 0x270
jne 0x3b889
leaq 0x10(%rsp), %rdx
movq $0x270, 0x1380(%rdx) # imm = 0x270
callq 0x3a99d
vxorps %xmm0, %xmm0, %xmm0
vmovups %zmm0, (%rbx)
vxorps %xmm0, %xmm0, %xmm0
movl $0xffff000a, 0x40(%rbx) # imm = 0xFFFF000A
vmovups %ymm0, 0x48(%rbx)
vmovups %ymm0, 0x58(%rbx)
movq $0x8, 0x78(%rbx)
testq %r14, %r14
je 0x3b914
leaq 0x10(%rsp), %r15
xorl %r12d, %r12d
movq 0xb3fce(%rip), %rdx     # 0xef8c8
addq %r12, %rdx
movq %r15, %rdi
movq %rbx, %rsi
vzeroupper
callq 0x1a2ea
addq $0x28, %r12
decq %r14
jne 0x3b8f3
movq %rbx, %rax
addq $0x1398, %rsp           # imm = 0x1398
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
movq 0x10(%rsp), %rdi
movq %rax, %r14
cmpq %rbp, %rdi
je 0x3b94b
callq 0x41a0
jmp 0x3b94b
movq %rbx, %rdi
movq %rax, %r14
callq 0x1a2c8
movq %r14, %rdi
callq 0x42d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]articles/plf_colony_alpha/plf_colony.h
// Function: plf::colony<Trivial<8>, std::allocator<Trivial<8>>, unsigned short>::reduced_stack::initialize(unsigned long)
void initialize(const size_type first_group_size)
		{
			first_group = current_group = PLF_COLONY_ALLOCATE(stack_group_allocator_type, group_allocator_pair, 1, 0);

			try
			{
				#ifdef PLF_COLONY_VARIADICS_SUPPORT
					PLF_COLONY_CONSTRUCT(stack_group_allocator_type, group_allocator_pair, first_group, first_group_size);
				#else
					PLF_COLONY_CONSTRUCT(stack_group_allocator_type, group_allocator_pair, first_group, group(first_group_size));
				#endif
			}
			catch (...)
			{
				PLF_COLONY_DEALLOCATE(stack_group_allocator_type, group_allocator_pair, first_group, 1);
				first_group = current_group = NULL;
				throw;
			}

			top_element = start_element = first_group->elements;
			end_element = first_group->end;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x20, %edi
movq %rsi, %r14
callq 0x41c0
movq %rax, %r15
movq %rax, (%rbx)
movq %rax, 0x8(%rbx)
movq %rax, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xc3f8
movq %rax, (%r15)
leaq -0x8(%rax,%r14,8), %rax
vxorps %xmm0, %xmm0, %xmm0
vmovups %xmm0, 0x8(%r15)
movq %rax, 0x18(%r15)
movq 0x8(%rbx), %rax
movq (%rax), %rcx
movq %rcx, 0x18(%rbx)
movq %rcx, 0x10(%rbx)
movq 0x18(%rax), %rax
movq %rax, 0x20(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x40c0
movq 0x8(%rbx), %rdi
callq 0x41a0
vxorps %xmm0, %xmm0, %xmm0
vmovups %xmm0, (%rbx)
callq 0x4270
movq %rax, %rbx
callq 0x42c0
movq %rbx, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0xaa79
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]articles/plf_colony_alpha/plf_colony.h
// Function: plf::colony<Trivial<8>, std::allocator<Trivial<8>>, unsigned short>::change_group_sizes(unsigned short, unsigned short)
void change_group_sizes(const skipfield_type min_allocation_amount, const skipfield_type max_allocation_amount)
	{
		assert((min_allocation_amount > 2) & (min_allocation_amount <= max_allocation_amount));

		min_elements_per_group = min_allocation_amount;
		group_allocator_pair.max_elements_per_group = max_allocation_amount;

		// The following will only have an effect if the erased_locations becomes empty or is already empty
		erased_locations.group_allocator_pair.min_elements_per_group = ((min_allocation_amount < 8) ? min_allocation_amount : (min_allocation_amount >> 7) + 8);

		if (first_group != NULL && (first_group->size < min_allocation_amount || end_iterator.group_pointer->size > max_allocation_amount))
		{
			consolidate();
		}
	}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movl %esi, %eax
shrl $0x7, %eax
movw %si, 0x40(%rdi)
movw %dx, 0x42(%rdi)
addl $0x8, %eax
cmpw $0x8, %si
cmovbl %esi, %eax
movq %rax, 0x78(%rdi)
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x6cf3b
movq %rdi, %rbx
cmpw %si, 0x32(%rax)
jb 0x6cf16
movq (%rbx), %rax
cmpw %dx, 0x32(%rax)
jbe 0x6cf3b
leaq 0x8(%rsp), %r14
movq %rbx, %rsi
movq %r14, %rdi
callq 0xcc7a
movq %rbx, %rdi
movq %r14, %rsi
callq 0xcd38
leaq 0x8(%rsp), %rdi
callq 0xc6de
addq $0x88, %rsp
popq %rbx
popq %r14
retq
leaq 0x8(%rsp), %rdi
movq %rax, %rbx
callq 0xc6de
movq %rbx, %rdi
callq 0x42d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]articles/plf_colony_alpha/plf_timsort.h
// Function: plf::TimSort<Trivial<8>**, plf::colony<Trivial<8>, std::allocator<Trivial<8>>, unsigned short>::sort_dereferencer<plf::colony<Trivial<8>, std::allocator<Trivial<8>>, unsigned short>::less>>::sort(Trivial<8>**, Trivial<8>**, plf::Compare<Trivial<8>* const&, plf::colony<Trivial<8>, std::allocator<Trivial<8>>, unsigned short>::sort_dereferencer<plf::colony<Trivial<8>, std::allocator<Trivial<8>>, unsigned short>::less>>)
static void sort(iter_t const lo, iter_t const hi, compare_t c)
	{
		diff_t nRemaining = (hi - lo);

		if (nRemaining < 2)
		{
			return; // nothing to do
		}

		if (nRemaining < MIN_MERGE)
		{
			diff_t const initRunLen = countRunAndMakeAscending(lo, hi, c);
			binarySort(lo, hi, lo + initRunLen, c);
			return;
		}

		TimSort ts(c);
		diff_t const minRun = minRunLength(nRemaining);
		iter_t cur = lo;

		do
		{
			diff_t runLen = countRunAndMakeAscending(cur, hi, c);

			if (runLen < minRun)
			{
				diff_t const force = std::min(nRemaining, minRun);
				binarySort(cur, cur + force, cur + runLen, c);
				runLen = force;
			}

			ts.pushRun(cur, runLen);
			ts.mergeCollapse();

			cur += runLen;
			nRemaining -= runLen;
		} while (nRemaining != 0);

		assert(cur == hi);
		ts.mergeForceCollapse();
		assert(ts.pending_.size() == 1);

	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbp
subq %rdi, %rbp
movq %rdx, 0x8(%rsp)
sarq $0x3, %rbp
cmpq $0x2, %rbp
jl 0x6d810
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x1f, %rbp
ja 0x6d724
movq 0x8(%rsp), %r15
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
movb (%r15), %al
movb %al, (%rdx)
callq 0x6d838
movb (%r15), %sil
leaq (%r14,%rax,8), %rdx
leaq 0x6(%rsp), %rcx
movq %r14, %rdi
movb %sil, (%rcx)
movq %rbx, %rsi
callq 0x6d8be
jmp 0x6d810
movq 0x8(%rsp), %rax
vxorps %xmm0, %xmm0, %xmm0
xorl %r12d, %r12d
movb (%rax), %al
movb %al, 0x10(%rsp)
movl $0x7, 0x14(%rsp)
vmovups %ymm0, 0x18(%rsp)
movq %rbp, %rax
vmovups %ymm0, 0x28(%rsp)
movq %rax, %rcx
movl %ecx, %edx
andl $0x1, %edx
shrq %rax
orq %rdx, %r12
cmpq $0x3f, %rcx
ja 0x6d74d
addq %rax, %r12
leaq 0x4(%rsp), %r15
movq 0x8(%rsp), %rax
movb (%rax), %al
movb %al, 0x4(%rsp)
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
vzeroupper
callq 0x6d838
movq %rax, %r13
cmpq %r12, %rax
jge 0x6d7c5
movq 0x8(%rsp), %rax
cmpq %rbp, %r12
leaq (%r14,%r13,8), %rdx
movq %rbx, %r15
movq %rbp, %rbx
cmovlq %r12, %rbx
leaq (%r14,%rbx,8), %rsi
movb (%rax), %al
movb %al, 0x5(%rsp)
leaq 0x5(%rsp), %rcx
movq %r14, %rdi
callq 0x6d8be
movq %rbx, %r13
movq %r15, %rbx
leaq 0x4(%rsp), %r15
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x6d932
leaq 0x10(%rsp), %rdi
callq 0x6d96e
leaq (%r14,%r13,8), %r14
subq %r13, %rbp
jne 0x6d769
leaq 0x10(%rsp), %rdi
callq 0x6da1a
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x6d801
callq 0x41a0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x6d810
callq 0x41a0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6d823
jmp 0x6d823
leaq 0x10(%rsp), %rdi
movq %rax, %rbx
callq 0x6da80
movq %rbx, %rdi
callq 0x42d0
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]articles/plf_colony_alpha/plf_timsort.h
// Function: plf::TimSort<Trivial<8>**, plf::colony<Trivial<8>, std::allocator<Trivial<8>>, unsigned short>::sort_dereferencer<plf::colony<Trivial<8>, std::allocator<Trivial<8>>, unsigned short>::less>>::countRunAndMakeAscending(Trivial<8>**, Trivial<8>**, plf::Compare<Trivial<8>* const&, plf::colony<Trivial<8>, std::allocator<Trivial<8>>, unsigned short>::sort_dereferencer<plf::colony<Trivial<8>, std::allocator<Trivial<8>>, unsigned short>::less>>)
static diff_t countRunAndMakeAscending(iter_t const lo, iter_t const hi, compare_t compare)
	{
		assert(lo < hi);

		iter_t runHi = lo + 1;
		if (runHi == hi)
		{
			return 1;
		}

		if (compare.lt(*(runHi++), *lo))   // descending
		{
			while (runHi < hi && compare.lt(*runHi, *(runHi - 1)))
			{
				++runHi;
			}
			
			std::reverse(lo, runHi);
		}
		else     // ascending
		{
			while (runHi < hi && compare.ge(*runHi, *(runHi - 1)))
			{
				++runHi;
			}
		}

		return runHi - lo;
	}

// Assembly:
leaq 0x8(%rdi), %rcx
cmpq %rsi, %rcx
je 0x6d888
movq 0x8(%rdi), %r8
movq (%rdi), %rdx
leaq 0x10(%rdi), %rax
movq (%r8), %r8
cmpq (%rdx), %r8
jae 0x6d86e
cmpq %rsi, %rax
jae 0x6d88e
movq (%rax), %r8
movq -0x8(%rax), %rdx
movq (%r8), %r8
cmpq (%rdx), %r8
jae 0x6d88e
addq $0x8, %rax
jmp 0x6d854
cmpq %rsi, %rax
jae 0x6d8b5
movq (%rax), %rdx
movq -0x8(%rax), %rcx
movq (%rdx), %rdx
cmpq (%rcx), %rdx
jb 0x6d8b5
addq $0x8, %rax
jmp 0x6d86e
movl $0x1, %eax
retq
leaq -0x8(%rax), %rdx
cmpq %rdi, %rdx
jbe 0x6d8b5
movq -0x8(%rcx), %rsi
movq (%rdx), %r8
movq %r8, -0x8(%rcx)
movq %rsi, (%rdx)
addq $-0x8, %rdx
leaq 0x8(%rcx), %rsi
cmpq %rdx, %rcx
movq %rsi, %rcx
jb 0x6d897
subq %rdi, %rax
sarq $0x3, %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]articles/plf_colony_alpha/plf_timsort.h
// Function: plf::TimSort<Trivial<8>**, plf::colony<Trivial<8>, std::allocator<Trivial<8>>, unsigned short>::sort_dereferencer<plf::colony<Trivial<8>, std::allocator<Trivial<8>>, unsigned short>::less>>::binarySort(Trivial<8>**, Trivial<8>**, Trivial<8>**, plf::Compare<Trivial<8>* const&, plf::colony<Trivial<8>, std::allocator<Trivial<8>>, unsigned short>::sort_dereferencer<plf::colony<Trivial<8>, std::allocator<Trivial<8>>, unsigned short>::less>>)
static void binarySort(iter_t const lo, iter_t const hi, iter_t start, compare_t compare)
	{
		assert(lo <= start && start <= hi);
		if (start == lo)
		{
			++start;
		}
		for (; start < hi; ++start)
		{
			assert(lo <= start);
			/*const*/ value_t pivot = PLF_TIMSORT_MOVE(*start);

			iter_t const pos = std::upper_bound(lo, start, pivot, compare.less_function());
			for (iter_t p = start; p > pos; --p)
			{
				*p = PLF_TIMSORT_MOVE(*(p - 1));
			}
			*pos = PLF_TIMSORT_MOVE(pivot);
		}
	}

// Assembly:
xorl %eax, %eax
cmpq %rdi, %rdx
sete %al
leaq (%rdx,%rax,8), %rax
cmpq %rsi, %rax
jae 0x6d930
movq (%rax), %rcx
movq %rax, %r9
subq %rdi, %r9
movq %rdi, %rdx
sarq $0x3, %r9
testq %r9, %r9
jle 0x6d90c
movq (%rcx), %r8
movq %rdi, %rdx
movq %r9, %r10
shrq %r10
movq (%rdx,%r10,8), %r11
cmpq (%r11), %r8
jb 0x6d904
leaq 0x8(%rdx,%r10,8), %rdx
notq %r10
addq %r9, %r10
movq %r10, %r9
testq %r10, %r10
jg 0x6d8ed
movq %rax, %r8
cmpq %rdx, %rax
jbe 0x6d927
movq -0x8(%r8), %r9
leaq -0x8(%r8), %r10
movq %r9, (%r8)
movq %r10, %r8
cmpq %rdx, %r10
ja 0x6d914
movq %rcx, (%rdx)
addq $0x8, %rax
jmp 0x6d8ca
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]articles/plf_colony_alpha/plf_timsort.h
// Function: plf::TimSort<Trivial<8>**, plf::colony<Trivial<8>, std::allocator<Trivial<8>>, unsigned short>::sort_dereferencer<plf::colony<Trivial<8>, std::allocator<Trivial<8>>, unsigned short>::less>>::mergeAt(long)
void mergeAt(diff_t const i)
	{
		diff_t const stackSize = pending_.size();
		assert(stackSize >= 2);
		assert(i >= 0);
		assert(i == stackSize - 2 || i == stackSize - 3);

		iter_t base1 = pending_[i].base;
		diff_t len1 = pending_[i].len;
		iter_t base2 = pending_[i + 1].base;
		diff_t len2 = pending_[i + 1].len;

		assert(len1 > 0 && len2 > 0);
		assert(base1 + len1 == base2);

		pending_[i].len = len1 + len2;

		if (i == stackSize - 3)
		{
			pending_[i + 1] = pending_[i + 2];
		}

		pending_.pop_back();

		diff_t const k = gallopRight(*base2, base1, len1, 0);
		assert(k >= 0);

		base1 += k;
		len1 -= k;

		if (len1 == 0)
		{
			return;
		}

		len2 = gallopLeft(*(base1 + (len1 - 1)), base2, len2, len2 - 1);
		assert(len2 >= 0);
		if (len2 == 0)
		{
			return;
		}

		if (len1 <= len2)
		{
			mergeLo(base1, len1, base2, len2);
		}
		else
		{
			mergeHi(base1, len1, base2, len2);
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x20(%rdi), %rcx
movq 0x28(%rdi), %rax
movq %rsi, %r10
shlq $0x4, %r10
movq %rdi, %rbx
movq 0x8(%rcx,%r10), %r13
movq 0x18(%rcx,%r10), %r12
movq (%rcx,%r10), %rdx
movq 0x10(%rcx,%r10), %r15
movq %rax, %rdi
subq %rcx, %rdi
sarq $0x4, %rdi
addq $-0x3, %rdi
leaq (%r12,%r13), %r8
movq %r8, 0x8(%rcx,%r10)
cmpq %rsi, %rdi
jne 0x6dc44
leaq (%rcx,%r10), %rax
leaq 0x10(%rcx,%r10), %rcx
vmovups 0x20(%rax), %xmm0
vmovups %xmm0, (%rcx)
movq 0x28(%rbx), %rax
addq $-0x10, %rax
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rcx
xorl %r8d, %r8d
movq %rdx, (%rsp)
movq %rax, 0x28(%rbx)
callq 0x6dcd8
movq %r13, %rbp
subq %rax, %rbp
je 0x6dcb9
movq (%rsp), %rcx
leaq -0x1(%r12), %r8
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rdx
leaq -0x8(%rcx,%r13,8), %rsi
movq %r12, %rcx
callq 0x6ddbe
testq %rax, %rax
je 0x6dcb9
movq (%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rcx
movq %rax, %r8
leaq (%rdx,%r14,8), %rsi
movq %rbp, %rdx
addq $0x8, %rsp
cmpq %rax, %rbp
jle 0x6dcc8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6e12e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6dea8
nop
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]articles/plf_colony_alpha/plf_colony.h
// Function: plf::colony<Trivial<8>, std::allocator<Trivial<8>>, unsigned short>::group_create(unsigned short)
void group_create(const skipfield_type number_of_elements)
	{
		const group_pointer_type next_group = end_iterator.group_pointer->next_group = PLF_COLONY_ALLOCATE(group_allocator_type, group_allocator_pair, 1, end_iterator.group_pointer);

		try
		{
			#ifdef PLF_COLONY_VARIADICS_SUPPORT
				PLF_COLONY_CONSTRUCT(group_allocator_type, group_allocator_pair, next_group, number_of_elements, end_iterator.group_pointer);
			#else
				PLF_COLONY_CONSTRUCT(group_allocator_type, group_allocator_pair, next_group, group(number_of_elements, end_iterator.group_pointer));
			#endif
		}
		catch (...)
		{
			PLF_COLONY_DESTROY(group_allocator_type, group_allocator_pair, next_group);
			PLF_COLONY_DEALLOCATE(group_allocator_type, group_allocator_pair, next_group, 1);
			end_iterator.group_pointer->next_group = NULL;
			throw;
		}

		end_iterator.group_pointer = next_group;
		end_iterator.element_pointer = next_group->elements;
	}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x38, %edi
movl %esi, %ebp
callq 0x41c0
movq (%rbx), %rcx
movq %rax, %r14
movq %r14, 0x8(%rcx)
movq (%rbx), %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0xcaaa
movq %r14, (%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rdi
callq 0x40c0
movq 0x10(%r14), %rdi
callq 0x41a0
movq %r14, %rdi
callq 0x41a0
movq (%rbx), %rax
movq $0x0, 0x8(%rax)
callq 0x4270
movq %rax, %rbx
callq 0x42c0
movq %rbx, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0xaa79
nop
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]articles/plf_colony_alpha/plf_colony.h
// Function: plf::colony<NonTrivialStringMovable, std::allocator<NonTrivialStringMovable>, unsigned short>::group_fill(NonTrivialStringMovable const&, unsigned short)
void group_fill(const element_type &element, const skipfield_type number_of_elements)
	{
		const element_pointer_type fill_end = end_iterator.element_pointer + number_of_elements;

		do
		{
			try
			{
				PLF_COLONY_CONSTRUCT(element_allocator_type, (*this), end_iterator.element_pointer++, element);
			}
			catch (...)
			{
				end_iterator.group_pointer->last_endpoint = --end_iterator.element_pointer;
				const skipfield_type temp = static_cast<const skipfield_type>(end_iterator.element_pointer - end_iterator.group_pointer->elements);
				end_iterator.group_pointer->number_of_elements = temp;
				end_iterator.skipfield_pointer = end_iterator.group_pointer->skipfield + temp;
				throw;
			}
		} while (end_iterator.element_pointer != fill_end);

		end_iterator.group_pointer->last_endpoint = end_iterator.element_pointer;
		end_iterator.group_pointer->number_of_elements = number_of_elements;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x8(%rdi), %r15
movl %edx, %eax
leaq (%rax,%rax,4), %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq (%r15,%rax,8), %r12
leaq 0x28(%r15), %rax
leaq 0x10(%r15), %rcx
movq %rax, 0x8(%rbx)
movq %rcx, (%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xbfe8
movq 0x20(%r14), %rax
movq %rax, 0x20(%r15)
movq 0x8(%rbx), %r15
cmpq %r12, %r15
jne 0x947f2
movq (%rbx), %rax
movq %r15, (%rax)
movw %bp, 0x30(%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0x40c0
movq 0x8(%rbx), %rcx
movq (%rbx), %rax
movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD
addq $-0x28, %rcx
movq %rcx, 0x8(%rbx)
movq %rcx, (%rax)
subq 0x10(%rax), %rcx
sarq $0x3, %rcx
imulq %rcx, %rdx
movzwl %dx, %ecx
movw %dx, 0x30(%rax)
addl %ecx, %ecx
addq 0x18(%rax), %rcx
movq %rcx, 0x10(%rbx)
callq 0x4270
movq %rax, %rbx
callq 0x42c0
movq %rbx, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0xaa79
nop
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]articles/include/policies.hpp
// Function: RandomErase1<std::deque<Trivial<8>, std::allocator<Trivial<8>>>>::run(std::deque<Trivial<8>, std::allocator<Trivial<8>>>&, unsigned long)
inline static void run(Container &c, std::size_t /*size*/){
        auto it = c.begin();

        while(it != c.end()){
            if(distribution(generator) > 9900){
                it = c.erase(it);
            } else {
                ++it;
            }
        }

        std::cout << c.size() << std::endl;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x10(%rdi), %rbp
movq %rdi, %rbx
cmpq 0x30(%rdi), %rbp
je 0x976d3
movq 0x20(%rbx), %r13
movq 0x28(%rbx), %r12
leaq 0xacbc8(%rip), %r14     # 0x144218
leaq 0xacba9(%rip), %r15     # 0x144200
movq %r15, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x32bca
cmpq $0x26ad, %rax           # imm = 0x26AD
jb 0x976ae
movq %rbp, 0x8(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %rbx, %rsi
movq (%r12), %rax
movq %rax, 0x10(%rsp)
addq $0x200, %rax            # imm = 0x200
movq %rax, 0x18(%rsp)
movq %r12, 0x20(%rsp)
callq 0x515e6
movq 0x28(%rsp), %rbp
movq 0x38(%rsp), %r13
movq 0x40(%rsp), %r12
jmp 0x976c7
addq $0x8, %rbp
cmpq %r13, %rbp
jne 0x976c7
movq 0x8(%r12), %rbp
addq $0x8, %r12
leaq 0x200(%rbp), %r13
cmpq 0x30(%rbx), %rbp
jne 0x97657
movq 0x10(%rbx), %rax
jmp 0x976d6
movq %rbp, %rax
movq 0x48(%rbx), %rcx
movq 0x20(%rbx), %rsi
movq 0x578f3(%rip), %rdi     # 0xeefd8
movq %rcx, %rdx
subq 0x28(%rbx), %rdx
shrq $0x3, %rdx
cmpq $0x1, %rcx
adcq $-0x1, %rdx
subq 0x38(%rbx), %rbp
subq %rax, %rsi
shlq $0x6, %rdx
sarq $0x3, %rsi
addq %rdx, %rsi
sarq $0x3, %rbp
addq %rbp, %rsi
callq 0x4110
movq %rax, %rbx
movq (%rax), %rax
movl $0xa, %esi
movq -0x18(%rax), %rdi
addq %rbx, %rdi
callq 0x41b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4120
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]articles/src/graphs.cpp
// Function: compute_values[abi:cxx11](std::shared_ptr<graphs::graph>)
std::unordered_map<std::string, std::unordered_map<std::string, std::size_t>> compute_values(std::shared_ptr<graphs::graph> graph){
    std::unordered_map<std::string, std::unordered_map<std::string, std::size_t>> results;

    for(auto& result : graph->results){
        results[result.group][result.serie] = result.value;
    }

    return results;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x30(%rdi), %rax
vxorps %xmm0, %xmm0, %xmm0
movq %rdi, %rbx
movq %rax, (%rdi)
movq $0x1, 0x8(%rdi)
vmovups %xmm0, 0x10(%rdi)
movl $0x3f800000, 0x20(%rdi) # imm = 0x3F800000
vmovups %xmm0, 0x28(%rdi)
movq (%rsi), %rax
movq 0x60(%rax), %r14
movq 0x68(%rax), %r15
cmpq %r15, %r14
je 0xb199f
addq $0x20, %r14
movq 0x20(%r14), %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb37be
leaq -0x20(%r14), %rsi
movq %rax, %rdi
callq 0xb3bee
leaq 0x48(%r14), %rcx
addq $0x28, %r14
movq %r12, (%rax)
cmpq %r15, %r14
movq %rcx, %r14
jne 0xb1971
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
movq %rax, %r14
callq 0xb2e82
movq %r14, %rdi
callq 0x42d0
// File: /workspace/github_cpp_makefile_star2_O3/vianna274[P]dropbox/src/Client.cpp
// Function: Dropbox::Client::askServerUpdates()
void Client::askServerUpdates() {
	
	int fd, wd;
	this->initializeInotify(&fd, &wd);
	
	while(1) {
		this->lockMutex();
		
		this->eventsInotify(&fd);
		
		inotify_rm_watch(fd, wd);
		close(fd);

		this->askUpdate();

		int fd, wd;
		this->initializeInotify(&fd, &wd);

		this->unlockMutex();
		this_thread::sleep_for(chrono::milliseconds(5000));
	}
	/* Clean up*/
	inotify_rm_watch(fd, wd);
	close(fd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq -0x2c(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x49c8
leaq 0x70(%rbx), %r14
movq %r14, %rdi
callq 0x3470
testl %eax, %eax
jne 0x49c1
leaq -0x2c(%rbp), %rax
movl (%rax), %r12d
movl -0x30(%rbp), %r13d
leaq -0x48(%rbp), %r15
movq %rbx, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x4ad6
movl %r12d, %edi
movl %r13d, %esi
callq 0x31b0
movl %r12d, %edi
callq 0x35e0
movq %rbx, %rdi
callq 0x50ee
movq %rbx, %rdi
leaq -0x38(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0x49c8
movq %r14, %rdi
callq 0x3280
movq $0x5, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movq %r15, %rdi
movq %r15, %rsi
callq 0x30f0
cmpl $-0x1, %eax
jne 0x49b5
callq 0x3060
cmpl $0x4, (%rax)
je 0x499b
movq %r14, %rdi
callq 0x3470
testl %eax, %eax
je 0x494c
movl %eax, %edi
callq 0x3250
// File: /workspace/github_cpp_makefile_star2_O3/vianna274[P]dropbox/src/Client.cpp
// Function: Dropbox::Client::initializeInotify(int*, int*)
void Client::initializeInotify(int *fd, int *wd){
	/* Initialize Inotify*/
	*fd = inotify_init();
	if ( *fd < 0 ) {
		cout << "Couldn't initialize inotify" << endl;
	}
	/* add watch to starting directory */
	*wd = inotify_add_watch(*fd, syncDirPath.c_str(), IN_CLOSE_WRITE | IN_MOVED_FROM | IN_MOVED_TO); 

	if (*wd == -1){
		cout << "Couldn't add watch to " << syncDirPath.c_str() << endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x35b0
movl %eax, (%r15)
testl %eax, %eax
jns 0x4a2e
movq 0x105e1(%rip), %r12     # 0x14fd0
leaq 0xb669(%rip), %rsi      # 0x1005f
movl $0x1b, %edx
movq %r12, %rdi
callq 0x33a0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3330
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3260
movl (%r15), %eax
movq 0x50(%rbx), %rsi
movl %eax, %edi
movl $0xc8, %edx
callq 0x3210
movl %eax, (%r14)
cmpl $-0x1, %eax
je 0x4a4f
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x1057a(%rip), %r14     # 0x14fd0
leaq 0xb61e(%rip), %rsi      # 0x1007b
movl $0x16, %edx
movq %r14, %rdi
callq 0x33a0
movq 0x50(%rbx), %rbx
testq %rbx, %rbx
je 0x4a8f
movq %rbx, %rdi
callq 0x3170
movq 0x1054e(%rip), %rdi     # 0x14fd0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x33a0
jmp 0x4aa7
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x3520
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3330
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3260
// File: /workspace/github_cpp_makefile_star2_O3/vianna274[P]dropbox/src/Client.cpp
// Function: Dropbox::Client::createSyncDir()
void Client::createSyncDir(){
	struct stat st;
	if(stat(syncDirPath.c_str(), &st) == -1){ //Se não existe cria, se existe faz nada
		mkdir(syncDirPath.c_str(), 0777);
		cout << "Created Sync Dir on " + syncDirPath << endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movq %rdi, %rbx
movq 0x50(%rdi), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x32f0
cmpl $-0x1, %eax
jne 0x5962
addq $0x50, %rbx
movq (%rbx), %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x31a0
leaq 0xa78e(%rip), %rsi      # 0x10092
leaq -0x30(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rdx
callq 0x5fff
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0xf6af(%rip), %rdi      # 0x14fd0
callq 0x33a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3330
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3260
leaq -0x20(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5962
callq 0x3320
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x20(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5983
callq 0x3320
movq %rbx, %rdi
callq 0x3580
nop
// File: /workspace/github_cpp_makefile_star2_O3/vianna274[P]dropbox/src/Client.cpp
// Function: Dropbox::Client::removeFileRecord(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Client::removeFileRecord(string filename) {
	vector<FileRecord>::iterator it;
	for(it = this->fileRecords.begin(); it != this->fileRecords.end(); it++) {
		if (string(it->filename) == filename) {
			this->fileRecords.erase(it);
			return;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0xc0(%rdi), %r12
cmpq 0xc8(%rdi), %r12
je 0x5af2
movq %rsi, %r15
leaq 0xe8(%r12), %r14
movq %rdi, -0x38(%rbp)
leaq -0x58(%rbp), %rdi
movq %r12, %rsi
leaq -0x29(%rbp), %rdx
callq 0x3150
movq -0x50(%rbp), %rdx
cmpq 0x8(%r15), %rdx
jne 0x5a7f
movq -0x58(%rbp), %r13
testq %rdx, %rdx
je 0x5a87
movq (%r15), %rsi
movq %r13, %rdi
callq 0x3350
testl %eax, %eax
sete %bl
jmp 0x5a89
movq -0x58(%rbp), %r13
xorl %ebx, %ebx
jmp 0x5a89
movb $0x1, %bl
leaq -0x48(%rbp), %rax
cmpq %rax, %r13
je 0x5a9a
movq %r13, %rdi
callq 0x3320
testb %bl, %bl
jne 0x5ab8
movl $0xe8, %eax
addq %rax, %r12
addq %rax, %r14
movq -0x38(%rbp), %rax
cmpq 0xc8(%rax), %r12
jne 0x5a4a
jmp 0x5af2
movq -0x38(%rbp), %rbx
movq 0xc8(%rbx), %rdx
cmpq %rdx, %r14
je 0x5ae4
subq %r14, %rdx
movq %r14, %rdi
addq $-0xe8, %rdi
movq %r14, %rsi
callq 0x3500
movq 0xc8(%rbx), %rdx
addq $-0xe8, %rdx
movq %rdx, 0xc8(%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/vianna274[P]dropbox/src/Client.cpp
// Function: Dropbox::Client::updateFileRecord(Dropbox::_FileRecord)
void Client::updateFileRecord(FileRecord newFile) {
	vector<FileRecord>::iterator it;
	for(it = this->fileRecords.begin(); it != this->fileRecords.end(); it++) {
		if (string(it->filename) == string(newFile.filename)) {
			*it = newFile;
			return;
		}
	}
	this->fileRecords.push_back(newFile);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
leaq 0x10(%rbp), %rbx
movq 0xc0(%rdi), %r15
movq 0xc8(%rdi), %rsi
cmpq %rsi, %r15
je 0x5bcf
leaq -0x70(%rbp), %rdi
movq %r15, %rsi
leaq -0x29(%rbp), %rdx
callq 0x3150
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %rbx, %rdi
callq 0x3170
leaq (%rax,%rbx), %rdx
leaq -0x50(%rbp), %rdi
movq %rbx, %rsi
callq 0x630e
movq -0x68(%rbp), %rdx
cmpq -0x48(%rbp), %rdx
jne 0x5b88
movq -0x50(%rbp), %r13
testq %rdx, %rdx
je 0x5b91
movq -0x70(%rbp), %rdi
movq %r13, %rsi
callq 0x3350
testl %eax, %eax
sete %r12b
jmp 0x5b94
movq -0x50(%rbp), %r13
xorl %r12d, %r12d
jmp 0x5b94
movb $0x1, %r12b
leaq -0x40(%rbp), %rax
cmpq %rax, %r13
je 0x5ba5
movq %r13, %rdi
callq 0x3320
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x5bb7
callq 0x3320
testb %r12b, %r12b
jne 0x5bf5
addq $0xe8, %r15
movq 0xc8(%r14), %rsi
jmp 0x5b28
cmpq 0xd0(%r14), %rsi
je 0x5c07
movl $0xe8, %edx
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x32b0
addq $0xe8, 0xc8(%r14)
jmp 0x5c19
movl $0xe8, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x32b0
jmp 0x5c19
addq $0xc0, %r14
movq %r14, %rdi
movq %rbx, %rdx
callq 0x6414
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x5c3d
callq 0x3320
movq %rbx, %rdi
callq 0x3580
nop
// File: /workspace/github_cpp_makefile_star2_O3/vianna274[P]dropbox/src/Client.cpp
// Function: Dropbox::Client::requestServerFileList()
void Client::requestServerFileList() {

	MessageData packet = make_packet(TYPE_LIST_SERVER, 1, 1, -1, "list_server");
	socket->send(&packet);
	vector<FileRecord> files = this->receiveFileList(this->getSocket());
	this->printFileList(files);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1010, %rsp           # imm = 0x1010
movq %rdi, %rbx
leaq 0xa1d4(%rip), %r9       # 0x10124
leaq -0x1014(%rbp), %r14
movq %r14, %rdi
movl $0x6, %esi
movl $0x1, %edx
movl $0x1, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0x65b0
movq 0x40(%rbx), %rdi
movq %r14, %rsi
callq 0xea3c
movq 0x40(%rbx), %rdx
leaq -0x40(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7840
leaq -0x28(%rbp), %rdi
movq %r14, %rsi
callq 0x610c
leaq -0x28(%rbp), %rsi
movq %rbx, %rdi
callq 0x7908
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0x5fb9
callq 0x3320
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x5fc7
callq 0x3320
addq $0x1010, %rsp           # imm = 0x1010
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0x5fe9
callq 0x3320
jmp 0x5fe9
movq %rax, %rbx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x5ff7
callq 0x3320
movq %rbx, %rdi
callq 0x3580
// File: /workspace/github_cpp_makefile_star2_O3/vianna274[P]dropbox/src/MessageData.cpp
// Function: Dropbox::make_packet(int, int, int, int, char const*)
MessageData Dropbox::make_packet(int type, int seq, int totalSize, int len, const char *payload){
    MessageData data;
    data.type = type;
    data.seq = seq;
    data.totalSize = totalSize;
    data.len = len;
    data.socketSeq = -1;
    // File or record packets can't have \0 at the end of the payload
    if(type == TYPE_DATA || type == TYPE_SEND_FILE)
        memcpy(data.payload, payload, len);
    else
        strncpy(data.payload, payload, MESSAGE_LEN);

    return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movl %ecx, 0x8(%rdi)
movl %r8d, 0xc(%rdi)
movl $0xffffffff, 0x10(%rdi) # imm = 0xFFFFFFFF
cmpl $0x3, %esi
je 0x65d5
testl %esi, %esi
jne 0x65e9
movq %rbx, %rdi
addq $0x14, %rdi
movslq %r8d, %rdx
movq %r9, %rsi
callq 0x32b0
jmp 0x65fd
movq %rbx, %rdi
addq $0x14, %rdi
movl $0xfa0, %edx            # imm = 0xFA0
movq %r9, %rsi
callq 0x31f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/vianna274[P]dropbox/src/MessageData.cpp
// Function: Dropbox::make_packet(int, int, int, int, char const*, char const*)
MessageData Dropbox::make_packet(int type, int seq, int totalSize, int len, const char *payload, const char *username){
    MessageData data;
    data.type = type;
    data.seq = seq;
    data.totalSize = totalSize;
    data.len = len;
    data.socketSeq = -1;
    // File or record packets can't have \0 at the end of the payload
    if(type == TYPE_DATA || type == TYPE_SEND_FILE)
        memcpy(data.payload, payload, len);
    else
        strncpy(data.payload, payload, MESSAGE_LEN);
    
    strncpy(data.username, username, 30);

    return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rbp), %r14
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movl %ecx, 0x8(%rdi)
movl %r8d, 0xc(%rdi)
movl $0xffffffff, 0x10(%rdi) # imm = 0xFFFFFFFF
cmpl $0x3, %esi
je 0x6631
testl %esi, %esi
jne 0x6642
leaq 0x14(%rbx), %rdi
movslq %r8d, %rdx
movq %r9, %rsi
callq 0x32b0
jmp 0x6653
leaq 0x14(%rbx), %rdi
movl $0xfa0, %edx            # imm = 0xFA0
movq %r9, %rsi
callq 0x31f0
movq %rbx, %rdi
addq $0xfb4, %rdi            # imm = 0xFB4
movl $0x1e, %edx
movq %r14, %rsi
callq 0x31f0
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/vianna274[P]dropbox/src/Operations.cpp
// Function: Dropbox::Operations::getFileList(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
vector<FileRecord> Operations::getFileList(string dirPath) {
    vector<FileRecord> files;
    struct stat filestatus;
    DIR *dir;
    struct dirent *ent;

    if ((dir = opendir (dirPath.c_str())) != NULL) {
        while ((ent = readdir (dir)) != NULL) {
            if(ent->d_type == 0x8) {
				stat((dirPath + ent->d_name).c_str(), &filestatus);
                FileRecord fileRecord = make_record(ent->d_name, filestatus.st_ctim.tv_sec, filestatus.st_atim.tv_sec, filestatus.st_mtim.tv_sec, filestatus.st_size);
				files.push_back(fileRecord);
            }
        }
        closedir(dir);
    }
    return files;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rdx, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rdx), %rdi
callq 0x3490
testq %rax, %rax
je 0x679d
movq %rax, %r15
leaq -0x1a0(%rbp), %r12
movq %r15, %rdi
callq 0x34b0
movq %rax, %r13
testq %rax, %rax
je 0x6795
cmpb $0x8, 0x12(%r13)
jne 0x66c5
leaq -0x190(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x6270
addq $0x13, %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x35c0
movq -0x1a0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x32f0
movq -0x1a0(%rbp), %rdi
leaq -0x190(%rbp), %rax
cmpq %rax, %rdi
je 0x673a
callq 0x3320
movq -0x50(%rbp), %rdx
movq -0x70(%rbp), %rcx
movq -0x60(%rbp), %r8
movl -0x88(%rbp), %r9d
movq %r12, %rdi
movq %r13, %rsi
callq 0x6560
movq 0x8(%rbx), %r13
cmpq 0x10(%rbx), %r13
je 0x6782
movl $0xe8, %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x32b0
addq $0xe8, %r13
movq %r13, 0x8(%rbx)
jmp 0x66c5
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x6414
jmp 0x66c5
movq %r15, %rdi
callq 0x34f0
movq %rbx, %rax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x67d3
movq %rax, %r14
movq -0x1a0(%rbp), %rdi
leaq -0x190(%rbp), %rax
cmpq %rax, %rdi
je 0x67d6
callq 0x3320
jmp 0x67d6
jmp 0x67d3
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x67e3
callq 0x3320
movq %r14, %rdi
callq 0x3580
nop
// File: /workspace/github_cpp_makefile_star2_O3/vianna274[P]dropbox/src/Operations.cpp
// Function: Dropbox::Operations::sendFileList(Dropbox::WrapperSocket*, std::vector<Dropbox::_FileRecord, std::allocator<Dropbox::_FileRecord>>)
void Operations::sendFileList(WrapperSocket *socket, vector<FileRecord> files){
    if(files.empty()){
        MessageData packet = make_packet(TYPE_NOTHING_TO_SEND, 1, 1, -1, "nothing_to_send");
        socket->send(&packet);
        return;
    }
    int seq = 1;
    for(FileRecord record : files) {
        MessageData packet = make_packet(TYPE_DATA, seq, files.size(), sizeof(FileRecord), (char*)&record);
        socket->send(&packet);
        seq++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10c8, %rsp           # imm = 0x10C8
movq %rsi, %r12
movq (%rdx), %r15
movq 0x8(%rdx), %r13
cmpq %r13, %r15
je 0x6885
movq %rdx, %r14
movq %r12, -0x30(%rbp)
movl $0x1, %r12d
movl $0xe8, %edx
leaq -0x118(%rbp), %rdi
movq %r15, %rsi
callq 0x32b0
movq 0x8(%r14), %rax
subq (%r14), %rax
shrq $0x3, %rax
imull $0x4f72c235, %eax, %ecx # imm = 0x4F72C235
movq %r14, %rbx
leaq -0x10ec(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
movl %r12d, %edx
movl $0xe8, %r8d
leaq -0x118(%rbp), %r9
callq 0x65b0
movq -0x30(%rbp), %rdi
movq %r14, %rsi
movq %rbx, %r14
callq 0xea3c
incl %r12d
addq $0xe8, %r15
cmpq %r13, %r15
jne 0x681c
jmp 0x68bb
leaq 0x9a1d(%rip), %r9       # 0x102a9
leaq -0x10ec(%rbp), %rbx
movq %rbx, %rdi
movl $0x7, %esi
movl $0x1, %edx
movl $0x1, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0x65b0
movq %r12, %rdi
movq %rbx, %rsi
callq 0xea3c
addq $0x10c8, %rsp           # imm = 0x10C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/vianna274[P]dropbox/src/Operations.cpp
// Function: Dropbox::Operations::receiveFile(Dropbox::WrapperSocket*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Operations::receiveFile(WrapperSocket *socket, string filename, string dirPath) {
    string filePath = dirPath + filename;
		
    ofstream newFile;
		newFile.open(filePath, ofstream::trunc | ofstream::binary);
		if(!newFile.is_open()) {
			return;
    }
    int seqNumber, totalPackets;
    do{
        MessageData *packet = socket->receive(TIMEOUT_OFF);
        seqNumber = packet->seq;
        totalPackets = packet->totalSize;
        newFile.write(packet->payload, packet->len);
    }while(seqNumber != totalPackets);
    
    newFile.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x220, %rsp            # imm = 0x220
movq %rsi, %rbx
leaq -0x40(%rbp), %rdi
movq %rcx, %rsi
callq 0x61a0
leaq -0x240(%rbp), %rdi
callq 0x3530
leaq -0x240(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movl $0x24, %edx
callq 0x31c0
leaq -0x1d0(%rbp), %rdi
callq 0x30b0
testb %al, %al
je 0x695d
leaq -0x240(%rbp), %r14
movq %rbx, %rdi
xorl %esi, %esi
callq 0xec2e
movl 0x4(%rax), %r15d
movl 0x8(%rax), %r12d
movq %rax, %rsi
addq $0x14, %rsi
movslq 0xc(%rax), %rdx
movq %r14, %rdi
callq 0x33f0
cmpl %r12d, %r15d
jne 0x6927
leaq -0x240(%rbp), %rdi
callq 0x3420
movq 0xe664(%rip), %rax      # 0x14fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x238(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x240(%rbp,%rcx)
callq 0x32c0
leaq -0x148(%rbp), %rdi
callq 0x3110
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x69a5
callq 0x3320
addq $0x220, %rsp            # imm = 0x220
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x69be
jmp 0x69be
movq %rax, %rbx
jmp 0x69cd
movq %rax, %rbx
leaq -0x240(%rbp), %rdi
callq 0x3480
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x69df
callq 0x3320
movq %rbx, %rdi
callq 0x3580
nop
// File: /workspace/github_cpp_makefile_star2_O3/vianna274[P]dropbox/src/Operations.cpp
// Function: Dropbox::Operations::receiveFileList(Dropbox::WrapperSocket*)
vector<FileRecord> Operations::receiveFileList(WrapperSocket * socket) {
	MessageData *unconvertedFiles;
	FileRecord record;
	vector<FileRecord> files;
	do {
		unconvertedFiles = socket->receive(TIMEOUT_OFF);
		if(unconvertedFiles->type == TYPE_NOTHING_TO_SEND) break;
		record = *((FileRecord*)unconvertedFiles->payload);
		files.push_back(record);
	} while(unconvertedFiles->seq != unconvertedFiles->totalSize);
	return files;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdx, -0x30(%rbp)
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq -0x118(%rbp), %r14
movq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0xec2e
movq %rax, %r12
cmpl $0x7, (%rax)
je 0x78db
movq %r12, %r13
addq $0x14, %r13
movl $0xe8, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x32b0
movq 0x8(%rbx), %r15
cmpq 0x10(%rbx), %r15
je 0x78c1
movl $0xe8, %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0x3500
addq $0xe8, %r15
movq %r15, 0x8(%rbx)
jmp 0x78cf
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x6414
movl 0x4(%r12), %eax
cmpl 0x8(%r12), %eax
jne 0x7870
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x7900
callq 0x3320
movq %r14, %rdi
callq 0x3580
// File: /workspace/github_cpp_makefile_star2_O3/vianna274[P]dropbox/src/Operations.cpp
// Function: Dropbox::Operations::receiveUploadAll(Dropbox::WrapperSocket*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Operations::receiveUploadAll(WrapperSocket * socket, string dirPath) {
	while(1) {
		MessageData * packet = socket->receive(TIMEOUT_OFF);
		if (packet->type == TYPE_SEND_UPLOAD_ALL_DONE ||
			packet->type == TYPE_NOTHING_TO_SEND)
			break;
		this->receiveFile(socket, string(packet->payload), dirPath);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, -0x30(%rbp)
movq %rsi, %r14
leaq -0x60(%rbp), %r15
leaq -0x70(%rbp), %rbx
movq %r14, %rdi
xorl %esi, %esi
callq 0xec2e
movq %rax, %r13
movl (%rax), %eax
cmpl $0x7, %eax
je 0x7b7b
cmpl $0xa, %eax
je 0x7b7b
movq %r15, %r12
leaq 0x14(%r13), %r15
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %r15, %rdi
callq 0x3170
leaq (%rax,%r13), %rdx
addq $0x14, %rdx
leaq -0x50(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %r15
callq 0x630e
movq %r12, -0x70(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x6270
movq %r14, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x68ce
movq -0x70(%rbp), %rdi
cmpq %r15, %rdi
je 0x7b60
callq 0x3320
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x7ad8
callq 0x3320
jmp 0x7ad8
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x70(%rbp), %rdi
cmpq %r15, %rdi
je 0x7ba0
callq 0x3320
jmp 0x7ba0
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x7bb2
callq 0x3320
movq %rbx, %rdi
callq 0x3580
// File: /workspace/github_cpp_makefile_star2_O3/vianna274[P]dropbox/src/Server.cpp
// Function: Dropbox::Server::Server(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Server::Server(string ipLocal) : connectClientSocket(SERVER_PORT), listenToServersSocket(BACKUPS_PORT)
{
    this->isMain = true;
    this->ipLocal = ipLocal;
    this->ipMain = ipLocal;
    this->backups = {};
    this->usersIp = {};
    this->backupsSockets = {};
    this->status = STATUS_NORMAL;
    initializeUsers();
    initializePorts();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r12
movq %rdi, %rbx
callq 0x667c
leaq 0x10(%rbx), %rax
movq %rax, -0x68(%rbp)
movq %rax, (%rbx)
leaq 0x8362(%rip), %rsi      # 0x103e0
leaq 0x836f(%rip), %rdx      # 0x103f4
movq %rbx, %rdi
callq 0x630e
leaq 0x20(%rbx), %rdi
leaq 0xe8(%rbx), %r14
movl $0xc8, %edx
xorl %esi, %esi
callq 0x3230
movq %r14, %rdi
movl $0xfa0, %esi            # imm = 0xFA0
callq 0xe6b0
movq %r14, -0x60(%rbp)
leaq 0x130(%rbx), %rdi
movq %rdi, -0x58(%rbp)
movl $0x2328, %esi           # imm = 0x2328
callq 0xe6b0
leaq 0x958(%rbx), %rax
movq %rax, -0x50(%rbp)
leaq 0x970(%rbx), %rax
movq %rax, -0x40(%rbp)
leaq 0x988(%rbx), %rax
movq %rax, -0x38(%rbp)
leaq 0x9a0(%rbx), %rax
movq %rax, -0x30(%rbp)
leaq 0x9b8(%rbx), %r15
leaq 0x9c8(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x9a8(%rbx)
movups %xmm0, 0x998(%rbx)
movups %xmm0, 0x988(%rbx)
movups %xmm0, 0x978(%rbx)
movups %xmm0, 0x968(%rbx)
movups %xmm0, 0x958(%rbx)
movq %rax, -0x48(%rbp)
movq %rax, 0x9b8(%rbx)
xorl %eax, %eax
movq %rax, 0x9c0(%rbx)
movb %al, 0x9c8(%rbx)
leaq 0x9d8(%rbx), %r13
leaq 0x9e8(%rbx), %r14
movq %r14, 0x9d8(%rbx)
movq %rax, 0x9e0(%rbx)
movb %al, 0x9e8(%rbx)
movb $0x1, 0x9f8(%rbx)
movq %r15, %rdi
movq %r12, %rsi
callq 0x3220
movq %r13, %rdi
movq %r12, %rsi
callq 0x3220
movq -0x40(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd412
movq -0x38(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd412
movq -0x30(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd6d2
movl $0x18, 0x180(%rbx)
movq %rbx, %rdi
callq 0x8270
addq $0x184, %rbx            # imm = 0x184
movl $0x7d0, %edx            # imm = 0x7D0
movq %rbx, %rdi
movl $0x1, %esi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3230
movq %rax, %r12
jmp 0x8250
movq %rax, %r12
jmp 0x8259
movq %rax, %r12
movq (%r13), %rdi
cmpq %r14, %rdi
je 0x8205
callq 0x3320
movq (%r15), %rdi
cmpq -0x48(%rbp), %rdi
je 0x8213
callq 0x3320
movq -0x30(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x8224
callq 0x3320
movq -0x38(%rbp), %rdi
callq 0xcf3c
movq -0x40(%rbp), %rdi
callq 0xcf3c
movq -0x50(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x8247
callq 0x3320
movq -0x58(%rbp), %rdi
callq 0xe69a
movq -0x60(%rbp), %rdi
callq 0xe69a
movq (%rbx), %rdi
cmpq -0x68(%rbp), %rdi
je 0x8267
callq 0x3320
movq %r12, %rdi
callq 0x3580
nop
// File: /workspace/github_cpp_makefile_star2_O3/vianna274[P]dropbox/src/Server.cpp
// Function: Dropbox::Server::makeConnection()
void Server::makeConnection(){
    MessageData packet = make_packet(TYPE_MAKE_BACKUP, 1, 1, -1, ipLocal.c_str());
    talkToPrimaryMtx.lock();
    talkToPrimary->send(&packet);
    talkToPrimaryMtx.unlock();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xfe0, %rsp            # imm = 0xFE0
movq %rdi, %rbx
movq 0x9b8(%rdi), %r9
leaq -0xfe4(%rbp), %rdi
movl $0x10, %esi
movl $0x1, %edx
movl $0x1, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0x65b0
leaq 0xc0(%rbx), %r14
movq %r14, %rdi
callq 0x3470
testl %eax, %eax
jne 0x9a1d
movq 0x178(%rbx), %rdi
leaq -0xfe4(%rbp), %rsi
callq 0xea3c
movq %r14, %rdi
callq 0x3280
addq $0xfe0, %rsp            # imm = 0xFE0
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %edi
callq 0x3250