LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/ctSkennerton[P]fxtract/util/bitmat_t.c
// Function: dotest
void
dotest(int nrows, int ncols, int *xys)
{
    BITMAT *inp = bitmat(nrows, ncols);
    BITMAT *exp = bitmat(ncols, nrows);

    for (; *xys >= 0; xys += 2) {
        bitmat_set(inp, xys[0] % nrows, xys[1] % ncols, 1);
        bitmat_set(exp, xys[1] % ncols, xys[0] % nrows, 1);
    }

    BITMAT *act = bitmat_trans(inp);
    int rc = refcmp(bitmat_ref(act), bitmat_ref(exp));
    ok(!rc, "trans %d x %d", nrows, ncols);
    if (rc) {
        puts("expected:"); prbm(exp);
        puts("actual:"); prbm(act);
    }

    bitmat_destroy(inp);
    bitmat_destroy(exp);
    bitmat_destroy(act);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r13
movl %esi, %r12d
movl %edi, %r15d
callq 0x378c
movq %rax, %rbx
movl %r12d, %edi
movl %r15d, %esi
callq 0x378c
movq %rax, %r14
movl (%r13), %eax
testl %eax, %eax
js 0x3624
addq $0x8, %r13
cltd
idivl %r15d
movl %edx, %esi
movl -0x4(%r13), %eax
cltd
idivl %r12d
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x385e
movl -0x8(%r13), %ecx
movl -0x4(%r13), %eax
cltd
idivl %r12d
movl %edx, %esi
movl %ecx, %eax
cltd
idivl %r15d
movq %r14, %rdi
movl $0x1, %ecx
callq 0x385e
movl (%r13), %eax
addq $0x8, %r13
testl %eax, %eax
jns 0x35dc
movq %rbx, %rdi
callq 0x3900
movq %rax, (%rsp)
movq %rax, %rdi
callq 0x38f2
movq %rax, %rbp
movq %rdx, %r13
movq %r14, %rdi
callq 0x38f2
movq %rdx, %rcx
movq %rbp, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x479b
movl %eax, %ebp
xorl %esi, %esi
testl %eax, %eax
sete %sil
subq $0x8, %rsp
leaq 0x2a12(%rip), %r10      # 0x607e
leaq 0x2a00(%rip), %r11      # 0x6073
leaq 0x29f2(%rip), %r9       # 0x606c
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r12
pushq %r15
movq 0x18(%rsp), %r15
pushq %r10
pushq $0x38
pushq %r11
callq 0x4c20
addq $0x30, %rsp
testl %ebp, %ebp
je 0x36c9
leaq 0x29e4(%rip), %rdi      # 0x608c
callq 0x32e0
movq %r14, %rdi
callq 0x36ef
leaq 0x29da(%rip), %rdi      # 0x6096
callq 0x32e0
movq %r15, %rdi
callq 0x36ef
movq %rbx, %rdi
callq 0x37f7
movq %r14, %rdi
callq 0x37f7
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x37f7
// File: /workspace/github_cpp_makefile_star2_O1/ctSkennerton[P]fxtract/util/bitmat_t.c
// Function: prbm
void
prbm(BITMAT const*bmp)
{
    int r, c, nrows = bitmat_rows(bmp), ncols = bitmat_cols(bmp);

    for (r = 0; r < nrows; ++r) {
        printf("%3d ", r);
        for (c = 0; c < ncols; ++c) {
            if (!(c & 7)) putchar(' ');
            putchar("-#"[bitmat_get(bmp, r, c)]);
        }
        putchar('\n');
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x38ea
movl %eax, %ebp
movq %rbx, %rdi
callq 0x38ee
testl %ebp, %ebp
jle 0x377a
movl %eax, %r14d
leaq 0x2989(%rip), %r15      # 0x60a3
xorl %r12d, %r12d
leaq 0x297a(%rip), %rdi      # 0x609e
movl %r12d, %esi
xorl %eax, %eax
callq 0x3050
testl %r14d, %r14d
jle 0x3768
xorl %r13d, %r13d
testb $0x7, %r13b
jne 0x3746
movl $0x20, %edi
callq 0x3280
movq %rbx, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x3812
cltq
movsbl (%rax,%r15), %edi
callq 0x3280
incl %r13d
cmpl %r13d, %r14d
jne 0x3736
movl $0xa, %edi
callq 0x3280
incl %r12d
cmpl %ebp, %r12d
jne 0x371d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/ctSkennerton[P]fxtract/util/bitmat.c
// Function: bitmat
BITMAT*
bitmat(int nrows, int ncols)
{
    assert (nrows % 8 == 0 && ncols % 8 == 0);
    BITMAT *bmp = (BITMAT *) malloc(sizeof*bmp);
    *bmp = (BITMAT) { (uint8_t *) calloc(nrows, ncols/8), nrows, ncols };
    return bmp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %eax
orl %edi, %eax
testb $0x7, %al
jne 0x37d8
movl %esi, %ebx
movl %edi, %ebp
movl $0x10, %edi
callq 0x3260
movq %rax, %r14
movslq %ebp, %r15
movl %ebx, %eax
sarl $0x3, %eax
movslq %eax, %rsi
movq %r15, %rdi
callq 0x3130
movq %rax, (%r14)
movl %r15d, 0x8(%r14)
movl %ebx, 0xc(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28c7(%rip), %rdi      # 0x60a6
leaq 0x28e1(%rip), %rsi      # 0x60c7
leaq 0x28e3(%rip), %rcx      # 0x60d0
movl $0x1e, %edx
callq 0x3120
// File: /workspace/github_cpp_makefile_star2_O1/ctSkennerton[P]fxtract/util/bitmat.c
// Function: bitmat_set
void
bitmat_set(BITMAT *bmp, int row, int col, int val)
{
    assert((unsigned)row < bmp->nrows && (unsigned)col < bmp->ncols);
    col += row * bmp->ncols;
    uint8_t bit = 1 << (col & 7), *at = &bmp->data[col >> 3];
    *at = val ? *at | bit : *at & ~bit;
}

// Assembly:
cmpl %esi, 0x8(%rdi)
jbe 0x3895
movl 0xc(%rdi), %eax
cmpl %edx, %eax
jbe 0x3895
imull %esi, %eax
addl %edx, %eax
movl %eax, %edx
andb $0x7, %dl
movq (%rdi), %rsi
sarl $0x3, %eax
cltq
movzbl (%rsi,%rax), %edi
movl %edi, %r8d
btsl %edx, %r8d
btrl %edx, %edi
testl %ecx, %ecx
cmovnel %r8d, %edi
movb %dil, (%rsi,%rax)
retq
pushq %rax
leaq 0x284c(%rip), %rdi      # 0x60e9
leaq 0x2823(%rip), %rsi      # 0x60c7
leaq 0x28a0(%rip), %rcx      # 0x614b
movl $0x35, %edx
callq 0x3120
// File: /workspace/github_cpp_makefile_star2_O1/bonetblai[P]mdp-engine/rect/./rect.h
// Function: problem_t::next(state_t const&, int, std::vector<std::pair<state_t, float>, std::allocator<std::pair<state_t, float>>>&) const
virtual void next(const state_t &s, Problem::action_t a, std::vector<std::pair<state_t, float> > &outcomes) const {
        ++expansions_;
        outcomes.clear();
        if( a != fwd ) {
            outcomes.reserve(1);
            outcomes.push_back(std::make_pair(s, 1.0));
            if( a == ::left ) {
                outcomes.back().first.left(cols_);
            } else if( a == ::right ) {
                outcomes.back().first.right(cols_);
            }
        } else if( a == fwd ) {
            outcomes.reserve(3);
            if( p_ > 0 ) {
                outcomes.push_back(std::make_pair(s, p_));
                outcomes.back().first.fwd(rows_);
            }
            if( 1 - p_ > 0 ) {
                outcomes.push_back(std::make_pair(s, (1 - p_) / 2));
                outcomes.back().first.left(cols_);
                outcomes.push_back(std::make_pair(s, (1 - p_) / 2));
                outcomes.back().first.right(cols_);
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rdi, %r14
incq 0x10(%rdi)
movq %rsi, %r15
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0x8903
movq %rax, 0x8(%rbx)
testl %ebp, %ebp
je 0x8955
movl $0x1, %esi
movq %rbx, %rdi
callq 0x8a3a
movl (%r15), %eax
movq %rsp, %rsi
movl %eax, (%rsi)
movl $0x3f800000, 0x4(%rsi)  # imm = 0x3F800000
movq %rbx, %rdi
callq 0x8b26
cmpl $0x2, %ebp
je 0x8a13
cmpl $0x1, %ebp
jne 0x8a2b
movq 0x8(%rbx), %rax
movzwl -0x6(%rax), %ecx
testw %cx, %cx
je 0x8a2b
decl %ecx
jmp 0x8a27
movl $0x3, %esi
movq %rbx, %rdi
callq 0x8a3a
movss 0x20(%r14), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
jae 0x899d
movl (%r15), %eax
movq %rsp, %rsi
movl %eax, (%rsi)
movss %xmm0, 0x4(%rsi)
movq %rbx, %rdi
callq 0x8b26
movq 0x8(%rbx), %rax
movl 0x18(%r14), %edx
movzwl -0x8(%rax), %ecx
decl %edx
cmpl %ecx, %edx
jbe 0x899d
incl %ecx
movw %cx, -0x8(%rax)
movss 0x20(%r14), %xmm0
movss 0x1c659(%rip), %xmm1    # 0x25004
ucomiss %xmm0, %xmm1
jbe 0x8a2b
movss 0x1c654(%rip), %xmm1    # 0x2500c
mulss %xmm1, %xmm0
subss %xmm0, %xmm1
movl (%r15), %eax
movq %rsp, %rsi
movl %eax, (%rsi)
movss %xmm1, 0x4(%rsi)
movq %rbx, %rdi
callq 0x8b26
movq 0x8(%rbx), %rax
movzwl -0x6(%rax), %ecx
testw %cx, %cx
je 0x89e8
decl %ecx
movw %cx, -0x6(%rax)
movss 0x20(%r14), %xmm0
movss 0x1c616(%rip), %xmm1    # 0x2500c
mulss %xmm1, %xmm0
subss %xmm0, %xmm1
movl (%r15), %eax
movq %rsp, %rsi
movl %eax, (%rsi)
movss %xmm1, 0x4(%rsi)
movq %rbx, %rdi
callq 0x8b26
movq 0x8(%rbx), %rax
movl 0x1c(%r14), %edx
movzwl -0x6(%rax), %ecx
decl %edx
cmpl %ecx, %edx
jbe 0x8a2b
incl %ecx
movw %cx, -0x6(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Tumelo4[P]-Single-Linked-List-In-CPP/LinkedList.cpp
// Function: LinkedList::~LinkedList()
LinkedList::~LinkedList()
{
	while(head)
	{
		Node* tmp = head;
		head = head->next;
		delete tmp;
		tmp = NULL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x4045cc
movq (%rdi), %rax
movq %rax, (%rbx)
movl $0x10, %esi
callq 0x404960
movq (%rbx), %rdi
jmp 0x4045b2
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Tumelo4[P]-Single-Linked-List-In-CPP/LinkedList.cpp
// Function: LinkedList::prepend(int)
void LinkedList::prepend(int data)
{
	// check if link is empty
	if(!head)
	{
		head = new Node(data);
	}
	else
	{
		Node* node = new Node(data);
		node->next = head;
		head = node;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r15d
movq %rdi, %r14
movq (%rdi), %r12
movl $0x10, %edi
callq 0x405660
movq %rax, %rbx
testq %r12, %r12
je 0x404623
movq %rbx, %rdi
movl %r15d, %esi
callq 0x404944
movq (%r14), %rax
movq %rax, (%rbx)
jmp 0x40462e
movq %rbx, %rdi
movl %r15d, %esi
callq 0x404944
movq %rbx, (%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x40463c
movq %rax, %r14
movl $0x10, %esi
movq %rbx, %rdi
callq 0x404960
movq %r14, %rdi
callq 0x4a5530
// File: /workspace/github_cpp_makefile_star2_O1/Tumelo4[P]-Single-Linked-List-In-CPP/LinkedList.cpp
// Function: LinkedList::indexInsertion(int, int)
void LinkedList::indexInsertion(int data, int index)
{
	if (index == 0)
	{
		this->prepend(data);
	}
	else if ( index == size())
	{
		this->append(data);
	}
	else
	{
		int count = 0;
		Node* curr = head;
		Node* prev = NULL;
		for(;count != index; count++, prev = curr, curr=curr->next);
		Node* newNode = new Node(data);
		newNode->next = curr;
		prev->next = newNode;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
testl %edx, %edx
je 0x4046b2
leal 0x1(%rdx), %eax
movq %rdi, %rcx
movq (%rcx), %rcx
decl %eax
testq %rcx, %rcx
jne 0x40466b
testl %eax, %eax
je 0x4046c1
incl %edx
xorl %r15d, %r15d
movq %r15, %r12
movq (%rdi), %r15
movq %r15, %rdi
decl %edx
jne 0x40467e
movl $0x10, %edi
callq 0x405660
movq %rax, %r14
movq %rax, %rdi
movl %ebx, %esi
callq 0x404944
movq %r15, (%r14)
movq %r14, (%r12)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %ebx, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4045ea
movl %ebx, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4046e8
movq %rax, %rbx
movl $0x10, %esi
movq %r14, %rdi
callq 0x404960
movq %rbx, %rdi
callq 0x4a5530
// File: /workspace/github_cpp_makefile_star2_O1/Tumelo4[P]-Single-Linked-List-In-CPP/LinkedList.cpp
// Function: LinkedList::append(int)
void LinkedList::append(int data)
{
	// check if head is null
	if(!head)
	{
		head = new Node(data);
	}
	else
	{
		Node* curr = head;
		for(;curr->next != NULL; curr = curr->next);
		curr->next = new Node(data);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq (%rdi), %rax
testq %rax, %rax
je 0x404722
movq %rax, %r15
movq (%rax), %rax
testq %rax, %rax
jne 0x4046fd
movl $0x10, %edi
callq 0x405660
movq %rax, %rbx
movq %rax, %rdi
movl %r14d, %esi
callq 0x404944
jmp 0x40473d
movq %rdi, %r15
movl $0x10, %edi
callq 0x405660
movq %rax, %rbx
movq %rax, %rdi
movl %r14d, %esi
callq 0x404944
movq %rbx, (%r15)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x40474d
movq %rax, %r14
movl $0x10, %esi
movq %rbx, %rdi
callq 0x404960
movq %r14, %rdi
callq 0x4a5530
// File: /workspace/github_cpp_makefile_star2_O1/Tumelo4[P]-Single-Linked-List-In-CPP/LinkedList.cpp
// Function: operator<<(std::ostream&, LinkedList&)
ostream& operator<<(ostream &os, LinkedList&obj)
{
	for(Node* curr = obj.head; curr != NULL; curr=curr->next)
	{

		if(curr->next == NULL)
		{
			os<<curr->getData();
		}
		else
		{
			os<<curr->getData()<<",";
		}
	}
	return os;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %r14
testq %r14, %r14
je 0x4047b4
leaq 0x171882(%rip), %r15    # 0x576004
movq (%r14), %r12
movq %r14, %rdi
callq 0x404954
movq %rbx, %rdi
movl %eax, %esi
callq 0x46dce0
testq %r12, %r12
je 0x4047ac
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x46d410
movq (%r14), %r14
testq %r14, %r14
jne 0x404782
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Tumelo4[P]-Single-Linked-List-In-CPP/LinkedList.cpp
// Function: LinkedList::reverse()
void LinkedList::reverse()
{
	if( head != NULL && size()> 1)
	{
		Node* curr = head;
		Node* prev = NULL;
		Node* prevprev = NULL;
		bool flag = false;

		for(;curr != NULL;prevprev = prev,prev=curr,curr = curr->next)
		{
			if(flag == false)
			{
				if(prevprev != NULL)
				{
					prevprev->next = NULL;
					prev->next = prevprev;
					flag = true;
				}
			}
			else
			{
				prev->next = prevprev;
			}
		}
		if (size() == 2)
		{
			prevprev->next = NULL;
			prev->next = prevprev;
		}
		else
		{
			prev->next = prevprev;
		}
		head = prev;
	}
}

// Assembly:
cmpq $0x0, (%rdi)
je 0x404844
pushq %rbp
movq %rsp, %rbp
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rdi, %rcx
movq (%rcx), %rcx
incl %eax
testq %rcx, %rcx
jne 0x4047d2
cmpl $0x2, %eax
jb 0x404843
movq (%rdi), %r9
testq %r9, %r9
je 0x40481c
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %edx, %edx
movq %r9, %rax
testb $0x1, %cl
jne 0x404806
testq %r8, %r8
je 0x404809
movq $0x0, (%r8)
movb $0x1, %cl
movq %r8, (%rdx)
movq (%rax), %r9
movq %rdx, %rsi
movq %rdx, %r8
movq %rax, %rdx
testq %r9, %r9
jne 0x4047f0
jmp 0x404820
xorl %eax, %eax
xorl %esi, %esi
movl $0x3, %ecx
movq %rdi, %rdx
movq (%rdx), %rdx
decl %ecx
testq %rdx, %rdx
jne 0x404828
testl %ecx, %ecx
jne 0x40483d
movq $0x0, (%rsi)
movq %rsi, (%rax)
movq %rax, (%rdi)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/Tumelo4[P]-Single-Linked-List-In-CPP/Main.cpp
// Function: main
int main()
{
	LinkedList* linkedList = new LinkedList();

	linkedList->append(2);
	linkedList->append(4);
	linkedList->prepend(1);
	linkedList->indexInsertion(0,0);
	linkedList->indexInsertion(5,4);
	linkedList->indexInsertion(3,3);
	//cout<<linkedList<<"\n";  output memory
	cout<<*linkedList<<"\n";
	linkedList->reverse();
	cout<<*linkedList<<"\n";
	delete linkedList;
	linkedList = NULL;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0x8, %edi
callq 0x405660
movq %rax, %rbx
movq %rax, %rdi
callq 0x404598
movq %rbx, %rdi
movl $0x2, %esi
callq 0x4046e8
movq %rbx, %rdi
movl $0x4, %esi
callq 0x4046e8
movq %rbx, %rdi
movl $0x1, %esi
callq 0x4045ea
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x404654
movq %rbx, %rdi
movl $0x5, %esi
movl $0x4, %edx
callq 0x404654
movq %rbx, %rdi
movl $0x3, %esi
movl $0x3, %edx
callq 0x404654
movq $0x5e3440, %r14         # imm = 0x5E3440
movq %r14, %rdi
movq %rbx, %rsi
callq 0x404765
leaq 0x1782d3(%rip), %r15    # 0x57cbaa
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x46d410
movq %rbx, %rdi
callq 0x4047c0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x404765
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x46d410
movq %rbx, %rdi
callq 0x4045a6
movl $0x8, %esi
movq %rbx, %rdi
callq 0x404960
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x8, %esi
movq %rbx, %rdi
callq 0x404960
movq %r14, %rdi
callq 0x4a5530
// File: /workspace/github_cpp_makefile_star2_O1/devanshdalal[P]cloud-computing-concepts-part-2/MP1Node.cpp
// Function: MP1Node::MP1Node(Member*, Params*, EmulNet*, Log*, Address*)
MP1Node::MP1Node(Member *member, Params *params, EmulNet *emul, Log *log, Address *address)
{
    for (int i = 0; i < 6; i++)
    {
        NULLADDR[i] = 0;
    }
    this->memberNode = member;
    this->this_node_ = *(int *)address;
    // std::cout << "this_node_: " << this_node_ << "\n";
    this->emulNet = emul;
    this->log = log;
    this->par = params;
    this->memberNode->addr = *address;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x1c168(%rip), %rax     # 0x1fc40
movq %rax, (%rdi)
leaq 0x30(%rdi), %rbx
leaq 0x60(%rdi), %rax
movq %rax, 0x30(%rdi)
movl $0x1, %eax
movq %rax, 0x38(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movl $0x3f800000, %r10d      # imm = 0x3F800000
movl %r10d, 0x50(%rdi)
movups %xmm0, 0x58(%rdi)
leaq 0x68(%rdi), %r14
leaq 0x98(%rdi), %r11
movq %r11, 0x68(%rdi)
movq %rax, 0x70(%rdi)
movups %xmm0, 0x78(%rdi)
movl %r10d, 0x88(%rdi)
xorl %eax, %eax
movl %eax, 0x28(%rdi)
movw $0x0, 0x2c(%rdi)
movups %xmm0, 0x90(%rdi)
movl %eax, 0xa0(%rdi)
movq %rsi, 0x20(%rdi)
movl (%r9), %eax
movl %eax, 0xa4(%rdi)
movq %rcx, 0x8(%rdi)
movq %r8, 0x10(%rdi)
movq %rdx, 0x18(%rdi)
leaq 0x8(%rsi), %rdi
movq %r9, %rsi
callq 0xce5e
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r15
movq %r14, %rdi
callq 0x59b0
movq %rbx, %rdi
callq 0x5a2a
movq %r15, %rdi
callq 0x3470
nop
// File: /workspace/github_cpp_makefile_star2_O1/devanshdalal[P]cloud-computing-concepts-part-2/MP1Node.cpp
// Function: MP1Node::introduceSelfToGroup(Address*)
int MP1Node::introduceSelfToGroup(Address *joinaddr)
{
#ifdef DEBUGLOG
    static char s[1024];
#endif

    if (0 == memcmp((char *)&(memberNode->addr.addr), (char *)&(joinaddr->addr), sizeof(memberNode->addr.addr)))
    {
        // I am the group booter (first process to join the group). Boot up the group
#ifdef DEBUGLOG
        log->LOG(&memberNode->addr, "Starting up group...");
#endif
        memberNode->inGroup = true;
        AddNode(this_node_);
    }
    else
    {
        size_t msgsize = sizeof(MessageHdr) + sizeof(joinaddr->addr) + sizeof(long) + 1;
        // cout << "msgsize: " << sizeof(MessageHdr) << " " << sizeof(joinaddr->addr) << " " << sizeof(long) << " " << 1 << "\n";
        MessageHdr *msg = (MessageHdr *)malloc(msgsize * sizeof(char));

        // create JOINREQ message: format of data is {struct Address myaddr}
        msg->msgType = JOINREQ;
        memcpy((char *)(msg + 1), &memberNode->addr.addr, sizeof(memberNode->addr.addr));
        memcpy((char *)(msg + 1) + 1 + sizeof(memberNode->addr.addr), &memberNode->heartbeat, sizeof(long));

#ifdef DEBUGLOG
        sprintf(s, "Trying to join...");
        log->LOG(&memberNode->addr, s);
#endif

        // send JOINREQ message to introducer member
        emulNet->ENsend(&memberNode->addr, joinaddr, (char *)msg, msgsize);
        free(msg);
    }

    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %r13
leaq 0x8(%r13), %r15
movl 0x8(%r13), %eax
xorl (%rsi), %eax
movzwl 0xc(%r13), %ecx
xorw 0x4(%rsi), %cx
movzwl %cx, %ecx
orl %eax, %ecx
je 0x3da1
movq %rsi, %r14
movl $0x13, %edi
callq 0x3370
movq %rax, %r12
movl $0x0, (%rax)
movl (%r15), %eax
movl %eax, 0x4(%r12)
movzwl 0x4(%r15), %eax
movw %ax, 0x8(%r12)
movq 0x18(%r13), %rax
movq %rax, 0xb(%r12)
movups 0x142e1(%rip), %xmm0    # 0x18036
movaps %xmm0, 0x1c544(%rip)    # 0x202a0
movw $0x2e, 0x1c54b(%rip)    # 0x202b0
leaq 0x1c534(%rip), %rdx     # 0x202a0
movq 0x10(%rbx), %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0xc188
movq 0x8(%rbx), %rdi
movq 0x20(%rbx), %rsi
addq $0x8, %rsi
movq %r14, %rdx
movq %r12, %rcx
movl $0x13, %r8d
callq 0x69dc
movq %r12, %rdi
callq 0x3320
jmp 0x3dcc
movq 0x10(%rbx), %rdi
leaq 0x14275(%rip), %rdx     # 0x18021
movq %r15, %rsi
xorl %eax, %eax
callq 0xc188
movq 0x20(%rbx), %rax
movb $0x1, 0xf(%rax)
movl 0xa4(%rbx), %esi
movq %rbx, %rdi
callq 0x3df2
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/devanshdalal[P]cloud-computing-concepts-part-2/MP1Node.cpp
// Function: MP1Node::ModifyLocalState()
void MP1Node::ModifyLocalState()
{
    // std::cout << "Start ModifyLocalState\n";
    const auto current_time = par->getcurrtime();
    for (auto it = local_state_.begin(); it != local_state_.end();)
    {
        const auto &node_status = it->second;
        // std::cout << "node_status.state: " << node_status.state << " " << this_node_ << " " << it->first << "\n";
        // std::cout << "node_status: " << node_status.timeout << " " << current_time << "\n";
        if (node_status.timeout <= current_time)
        {
            switch (node_status.state)
            {
            case FINALWAITING:
            {
                it = local_state_.erase(it);
            }
            break;
            case SWIMWAITING:
            {
                // remove
                auto *message = CreateMessage(FAILED, it->first, this_node_);
                PublishToAll(*message, MSGSIZE);
                free(message);
                it = local_state_.erase(it);
            }
            break;
            case TIMEOUTWAITING:
            {
                PingK(it->first);
                local_state_[it->first] = {SWIMWAITING, current_time + WAITING_TIMEOUT, -1};
            }
            break;
            default:
                break;
            }
            // it = local_state_.erase(it);
        }
        else
        {
            ++it;
        }
    }
    // std::cout << "End ModifyLocalState\n";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0xce42
movq %rbx, (%rsp)
movq 0x78(%rbx), %r15
testq %r15, %r15
je 0x5350
movq (%rsp), %rcx
leaq 0x68(%rcx), %r14
movslq %eax, %r13
leal 0xa(%r13), %eax
cltq
movq %rax, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movq (%rsp), %rbx
cmpq %r13, 0x18(%r15)
jle 0x52ac
movq (%r15), %r15
jmp 0x5347
movl 0x10(%r15), %eax
testl %eax, %eax
je 0x5315
cmpl $0x1, %eax
je 0x52c3
cmpl $0x2, %eax
je 0x5305
jmp 0x5347
movl 0x8(%r15), %ebp
movl 0xa4(%rbx), %r14d
movl $0xc, %edi
callq 0x3370
movq %rax, %r12
movl $0x2, (%rax)
movl %ebp, 0x4(%rax)
movl %r14d, 0x8(%rax)
movq 0x10(%rsp), %r14
movl $0xc, %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4e72
movq %r12, %rdi
callq 0x3320
movq %r14, %rdi
movq %r15, %rsi
callq 0x67a8
movq %rax, %r15
jmp 0x5347
leaq 0x8(%r15), %r12
movl (%r12), %esi
movq (%rsp), %rdi
callq 0x5360
movq %r14, %rdi
movq %r12, %rsi
callq 0x62a6
movl $0x1, (%rax)
movq 0x8(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF
testq %r15, %r15
jne 0x529e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/devanshdalal[P]cloud-computing-concepts-part-2/MP2Node.cpp
// Function: PrintRing(std::vector<Node, std::allocator<Node>>)
void PrintRing(std::vector<Node> ring)
{
	std::cout << "RING:";
	for (auto &node : ring)
	{
		std::cout << " " << node.getAddress()->getAddress();
	}
	std::cout << "\n";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq 0x1140c(%rip), %rdi     # 0x1ffd0
leaq 0xa0ed(%rip), %rsi      # 0x18cb8
movl $0x5, %edx
callq 0x32d0
movq (%r14), %rbx
movq 0x8(%r14), %rbp
cmpq %rbp, %rbx
je 0xec4e
leaq 0x18(%rsp), %r13
movq 0x113e3(%rip), %r14     # 0x1ffd0
leaq 0x96c2(%rip), %r15      # 0x182b6
leaq 0x8(%rsp), %r12
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x32d0
movq %rbx, %rdi
callq 0x14cc4
movq %r12, %rdi
movq %rax, %rsi
callq 0xb51c
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0x32d0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xec45
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3280
addq $0x20, %rbx
cmpq %rbp, %rbx
jne 0xebf9
movq 0x1137b(%rip), %rdi     # 0x1ffd0
leaq 0x9699(%rip), %rsi      # 0x182f5
movl $0x1, %edx
callq 0x32d0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xec8f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3280
movq %rbx, %rdi
callq 0x3470
nop
// File: /workspace/github_cpp_makefile_star2_O1/devanshdalal[P]cloud-computing-concepts-part-2/MP2Node.cpp
// Function: MP2Node::MP2Node(Member*, Params*, EmulNet*, Log*, Address*)
MP2Node::MP2Node(Member *memberNode, Params *par, EmulNet *emulNet, Log *log, Address *address)
{
	this->memberNode = memberNode;
	this->par = par;
	this->emulNet = emulNet;
	this->log = log;
	ht = new HashTable();
	secondary = new HashTable();
	tertiary = new HashTable();
	this->memberNode->addr = *address;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %rdi, %rbx
leaq 0x88(%rdi), %rax
xorl %edi, %edi
movl %edi, 0x88(%rbx)
movq %rdi, 0x90(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
movq %rdi, 0x40(%rbx)
movq %rax, 0x98(%rbx)
movq %rax, 0xa0(%rbx)
movq %rdi, 0xa8(%rbx)
movl %edi, 0xb0(%rbx)
movq %rsi, 0x60(%rbx)
movq %rdx, 0x68(%rbx)
movq %rcx, 0x70(%rbx)
movq %r8, 0x78(%rbx)
movl $0x38, %edi
callq 0x3270
movq %rax, %r15
movq %rax, %rdi
callq 0x14cdc
movq %r15, 0x48(%rbx)
movl $0x38, %edi
callq 0x3270
movq %rax, %r15
movq %rax, %rdi
callq 0x14cdc
movq %r15, 0x50(%rbx)
movl $0x38, %edi
callq 0x3270
movq %rax, %r15
movq %rax, %rdi
callq 0x14cdc
movq %r15, 0x58(%rbx)
movq 0x60(%rbx), %rdi
addq $0x8, %rdi
movq %r14, %rsi
callq 0xce5e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0xed68
jmp 0xed68
movq %rax, %r14
movl $0x38, %esi
movq %r15, %rdi
callq 0x3280
jmp 0xed7d
movq %rax, %r14
leaq 0x30(%rbx), %r15
leaq 0x18(%rbx), %r12
leaq 0x80(%rbx), %rdi
callq 0x13ba4
movq %r15, %rdi
callq 0xb860
movq %r12, %rdi
callq 0xb860
movq %rbx, %rdi
callq 0xb860
movq %r14, %rdi
callq 0x3470
nop
// File: /workspace/github_cpp_makefile_star2_O1/devanshdalal[P]cloud-computing-concepts-part-2/MP2Node.cpp
// Function: MP2Node::~MP2Node()
MP2Node::~MP2Node()
{
	delete ht;
	delete secondary;
	delete tertiary;
	delete memberNode;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
testq %rdi, %rdi
je 0xedc5
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0xedd4
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0xede3
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0xedf2
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x80(%rbx), %rdi
callq 0x13ba4
leaq 0x30(%rbx), %rdi
callq 0xb860
leaq 0x18(%rbx), %rdi
callq 0xb860
movq %rbx, %rdi
popq %rbx
jmp 0xb860
nop
// File: /workspace/github_cpp_makefile_star2_O1/devanshdalal[P]cloud-computing-concepts-part-2/MP2Node.cpp
// Function: MP2Node::createKeyValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ReplicaType)
bool MP2Node::createKeyValue(string key, string value, ReplicaType replica)
{
	/*
	 * Implement this
	 */
	// Insert key, value, replicaType into the hash table

	switch (replica)
	{
	case ReplicaType::PRIMARY:
	{
		ht->create(key, value);
		break;
	}
	case ReplicaType::SECONDARY:
	{
		secondary->create(key, value);
		break;
	}
	case ReplicaType::TERTIARY:
	{
		tertiary->create(key, value);
		break;
	}
	default:
		break;
	}
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdx, %rbx
cmpl $0x2, %ecx
je 0x11284
cmpl $0x1, %ecx
je 0x11206
testl %ecx, %ecx
jne 0x11304
movq 0x48(%rdi), %r14
leaq 0xb8(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0xa8(%rsp), %rdi
movq %rax, %rsi
callq 0xbb34
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0xbb34
leaq 0xa8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
movq %r14, %rdi
callq 0x14d3e
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x111f9
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0xa8(%rsp), %rdi
jmp 0x112f4
movq 0x50(%rdi), %r14
leaq 0x98(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x88(%rsp), %rdi
movq %rax, %rsi
callq 0xbb34
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0xbb34
leaq 0x88(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %r14, %rdi
callq 0x14d3e
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x1127a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x88(%rsp), %rdi
jmp 0x112f4
movq 0x58(%rdi), %r14
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x68(%rsp), %rdi
movq %rax, %rsi
callq 0xbb34
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0xbb34
leaq 0x68(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x14d3e
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x112ef
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x11304
movq (%r15), %rsi
incq %rsi
callq 0x3280
movb $0x1, %al
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x1136c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x1136c
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x11379
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x11379
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x11383
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x11383
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
jmp 0x1138b
movq %rax, %rbx
movq 0x68(%rsp), %rdi
jmp 0x1138b
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0x1139b
movq (%r15), %rsi
incq %rsi
callq 0x3280
movq %rbx, %rdi
callq 0x3470
nop
// File: /workspace/github_cpp_makefile_star2_O1/devanshdalal[P]cloud-computing-concepts-part-2/MP2Node.cpp
// Function: MP2Node::readKey(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string MP2Node::readKey(string key)
{
	/*
	 * Implement this
	 */
	// Read key from local hash table and return value
	if (ht->count(key))
	{
		return ht->read(key);
	}
	if (secondary->count(key))
	{
		return secondary->read(key);
	}
	return tertiary->read(key);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x48(%rsi), %r12
leaq 0x38(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %r13
movq %r13, %rdi
callq 0xbb34
movq %r12, %rdi
movq %r13, %rsi
callq 0x14f64
movq %rax, %r12
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11407
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3280
testq %r12, %r12
je 0x11451
movq 0x48(%r15), %r15
leaq 0x98(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %r14
movq %r14, %rdi
callq 0xbb34
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x14d4c
movq 0x88(%rsp), %rdi
jmp 0x1150f
movq 0x50(%r15), %r12
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0xbb34
movq %r12, %rdi
movq %r13, %rsi
callq 0x14f64
movq %rax, %r12
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1149a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3280
testq %r12, %r12
je 0x114d8
movq 0x50(%r15), %r15
leaq 0x78(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %r14
movq %r14, %rdi
callq 0xbb34
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x14d4c
movq 0x68(%rsp), %rdi
jmp 0x1150f
movq 0x58(%r15), %r15
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0xbb34
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x14d4c
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11520
movq (%rbp), %rsi
incq %rsi
callq 0x3280
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x48(%rsp), %rdi
jmp 0x11568
movq %rax, %rbx
movq 0x68(%rsp), %rdi
jmp 0x11568
movq %rax, %rbx
movq 0x8(%rsp), %rdi
jmp 0x11568
movq %rax, %rbx
movq 0x88(%rsp), %rdi
jmp 0x11568
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11579
movq (%rbp), %rsi
incq %rsi
callq 0x3280
movq %rbx, %rdi
callq 0x3470
nop
// File: /workspace/github_cpp_makefile_star2_O1/devanshdalal[P]cloud-computing-concepts-part-2/MP2Node.cpp
// Function: MP2Node::recvLoop()
bool MP2Node::recvLoop()
{
	deleteExpired();
	if (memberNode->bFailed)
	{
		return false;
	}
	else
	{
		return emulNet->ENrecv(&(memberNode->addr), this->enqueueWrapper, NULL, 1, &(memberNode->mp2q));
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x1344e
movq 0x60(%rbx), %r9
cmpb $0x0, 0x10(%r9)
je 0x13424
xorl %eax, %eax
jmp 0x1344c
movq 0x70(%rbx), %rdi
leaq 0x8(%r9), %rsi
addq $0x98, %r9
leaq 0x3fe(%rip), %rdx       # 0x13838
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x6bf0
testl %eax, %eax
setne %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/t0mm4rx[P]piscine_cpp/day06/ex00/main.cpp
// Function: main
int		main(int argc, char **argv)
{
	if (argc != 2)
	{
		std::cout << "Wrong usage: ./convert <number>" << std::endl;
		return (1);
	}
	go(argv[1]);
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl $0x2, %edi
jne 0x28fc
movq 0x8(%rsi), %rdi
callq 0x230c
xorl %eax, %eax
jmp 0x2943
movq 0x26d5(%rip), %rbx      # 0x4fd8
leaq 0x7c9(%rip), %rsi       # 0x30d3
movl $0x1f, %edx
movq %rbx, %rdi
callq 0x2120
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH19_SpecializedToolsAndTechniques/examples/dyn_cast.cc
// Function: exercises()
void exercises() {
	A *pa = new C;
    if (B *pb = dynamic_cast< B* >(pa))
         cout << "cast from C to B* ok" << endl;
    else
         cout << "cast from C to B* not ok" << endl;
	B *pb = new B;
    if (C *pc = dynamic_cast< C* >(pb))
         cout << "cast from B to C* ok" << endl;
    else
         cout << "cast from B to C* not ok" << endl;

	A *pc = new C;
    if (B *pb = dynamic_cast< B* >(pc))
         cout << "cast C to B* ok" << endl;
    else
         cout << "cast C to B* not ok" << endl;

	A *pd = new D;
    if (B *pb = dynamic_cast< B* >(pd))
         cout << "cast D to B* ok" << endl;
    else
         cout << "cast D to B* not ok" << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl $0x8, %edi
callq 0x20a0
leaq 0x2a34(%rip), %r14      # 0x4cc8
movq %r14, (%rax)
leaq 0x2992(%rip), %rsi      # 0x4c30
leaq 0x299b(%rip), %rdx      # 0x4c40
movq %rax, %rdi
movq $-0x1, %rcx
callq 0x20c0
movq 0x2d1d(%rip), %rdi      # 0x4fd8
testq %rax, %rax
je 0x22ce
leaq 0xd43(%rip), %rsi       # 0x300a
movl $0x14, %edx
jmp 0x22da
leaq 0xd4a(%rip), %rsi       # 0x301f
movl $0x18, %edx
callq 0x20d0
movq 0x2cf2(%rip), %rbx      # 0x4fd8
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2090
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2070
movl $0x8, %edi
callq 0x20a0
leaq 0x29da(%rip), %rcx      # 0x4cf8
movq %rcx, (%rax)
leaq 0x2918(%rip), %rsi      # 0x4c40
leaq 0x2939(%rip), %rdx      # 0x4c68
movq %rax, %rdi
xorl %ecx, %ecx
callq 0x20c0
movq 0x2c98(%rip), %rdi      # 0x4fd8
testq %rax, %rax
je 0x2353
leaq 0xcec(%rip), %rsi       # 0x3038
movl $0x14, %edx
jmp 0x235f
leaq 0xcf3(%rip), %rsi       # 0x304d
movl $0x18, %edx
callq 0x20d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2090
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2070
movl $0x8, %edi
callq 0x20a0
movq %r14, (%rax)
leaq 0x2891(%rip), %rsi      # 0x4c30
leaq 0x289a(%rip), %rdx      # 0x4c40
movq %rax, %rdi
movq $-0x1, %rcx
callq 0x20c0
movq 0x2c1c(%rip), %rdi      # 0x4fd8
testq %rax, %rax
je 0x23cf
leaq 0xc9e(%rip), %rsi       # 0x3066
movl $0xf, %edx
jmp 0x23db
leaq 0xca0(%rip), %rsi       # 0x3076
movl $0x13, %edx
callq 0x20d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2090
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2070
movl $0x8, %edi
callq 0x20a0
leaq 0x2910(%rip), %rcx      # 0x4d28
movq %rcx, (%rax)
leaq 0x280e(%rip), %rsi      # 0x4c30
leaq 0x2817(%rip), %rdx      # 0x4c40
movq %rax, %rdi
movq $-0x1, %rcx
callq 0x20c0
movq 0x2b99(%rip), %rdi      # 0x4fd8
testq %rax, %rax
je 0x2452
leaq 0xc3f(%rip), %rsi       # 0x308a
movl $0xf, %edx
jmp 0x245e
leaq 0xc41(%rip), %rsi       # 0x309a
movl $0x13, %edx
callq 0x20d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2090
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2070
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH19_SpecializedToolsAndTechniques/examples/dyn_cast.cc
// Function: cast_to_ref(Base const&)
void cast_to_ref(const Base &b)
{
    try {
        const Derived &d = dynamic_cast<const Derived&>(b);
	// use the Derived object to which b referred
    } catch (bad_cast) {
        cout << "called f with an object that is not a Derived" << endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x27e5(%rip), %rsi      # 0x4c80
leaq 0x27ee(%rip), %rdx      # 0x4c90
xorl %ecx, %ecx
callq 0x20c0
testq %rax, %rax
je 0x24b5
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x2130
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x2526
movq %rbx, %rdi
callq 0x20e0
movq 0x2af7(%rip), %rax      # 0x4fc8
addq $0x10, %rax
movq %rax, -0x10(%rbp)
movq %rbx, %rdi
callq 0x2050
movq 0x2af0(%rip), %rdi      # 0x4fd8
leaq 0xbbf(%rip), %rsi       # 0x30ae
movl $0x2d, %edx
callq 0x20d0
movq 0x2ad8(%rip), %rdi      # 0x4fd8
callq 0x2060
leaq -0x10(%rbp), %rdi
callq 0x2120
callq 0x2100
jmp 0x24ae
movq %rax, %rbx
leaq -0x10(%rbp), %rdi
callq 0x2120
callq 0x2100
movq %rbx, %rdi
callq 0x2110
movq %rax, %rdi
callq 0x257c
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH19_SpecializedToolsAndTechniques/examples/dyn_cast.cc
// Function: main
int main()
{
	Base *bp; 
	bp = new Derived;  // bp actually points to a Derived object
	if (Derived *dp = dynamic_cast<Derived*>(bp)) 
	{
	    // use the Derived object to which dp points
	} else {  // bp points at a Base object
    	// use the Base object to which bp points
	}

	exercises();
	
	cast_to_ref(*bp);
	cast_to_ref(Base());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x8, %edi
callq 0x20a0
movq %rax, %rbx
leaq 0x2830(%rip), %rax      # 0x4d80
movq %rax, (%rbx)
callq 0x227c
movq %rbx, %rdi
callq 0x248e
leaq 0x2839(%rip), %rax      # 0x4da0
leaq -0x10(%rbp), %rdi
movq %rax, (%rdi)
callq 0x248e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/MarkOates[P]file-downloader/ex_file_downloader.cpp
// Function: main
int main(int, char**)
{
   std::string file_url = "https://www.allegro.cc/theme/default/image/logo.png";
   FileDownloader::FileHandle handle = FileDownloader::download_file(file_url, "logo.png");

   if (handle.get_status() == FileDownloader::DOWNLOADED)
      std::cout << "File Downloaded Successfully!" << std::endl;
   else
      std::cout << "Download Error: " << handle.get_error() << std::endl;

   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
leaq -0x90(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0xc34(%rip), %rsi       # 0x3004
leaq 0xc60(%rip), %rdx       # 0x3037
leaq -0xa0(%rbp), %rbx
movq %rbx, %rdi
callq 0x2696
leaq -0x70(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x80(%rbp), %rdi
callq 0x25fc
leaq -0x50(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0xc1e(%rip), %rsi       # 0x302f
leaq 0xc1f(%rip), %rdx       # 0x3037
leaq -0x60(%rbp), %rdi
callq 0x2696
leaq -0x118(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x295e
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x244a
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2060
movq -0x80(%rbp), %rdi
cmpq %r15, %rdi
je 0x245f
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x2060
leaq -0x118(%rbp), %rdi
callq 0x28a6
cmpl $0x2, %eax
jne 0x24b8
movq 0x2b69(%rip), %rbx      # 0x4fe0
leaq 0xbba(%rip), %rsi       # 0x3038
movl $0x1d, %edx
movq %rbx, %rdi
callq 0x21d0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq 0x2b37(%rip), %rdi      # 0x4fe0
callq 0x2120
movq %rax, %rdi
callq 0x20f0
jmp 0x2537
movq 0x2b21(%rip), %rdi      # 0x4fe0
leaq 0xb90(%rip), %rsi       # 0x3056
movl $0x10, %edx
callq 0x21d0
leaq -0x40(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x2914
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq 0x2af1(%rip), %rdi      # 0x4fe0
callq 0x21d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2120
movq %rax, %rdi
callq 0x20f0
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2537
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2060
leaq -0x118(%rbp), %rdi
callq 0x280a
movq -0xa0(%rbp), %rdi
cmpq %r14, %rdi
je 0x255e
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x2060
xorl %eax, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x25c9
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x258f
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2060
jmp 0x258f
movq %rax, %rbx
movq -0x80(%rbp), %rdi
cmpq %r15, %rdi
je 0x25d8
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x2060
jmp 0x25d8
movq %rax, %rbx
jmp 0x25d8
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25cc
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2060
jmp 0x25cc
movq %rax, %rbx
leaq -0x118(%rbp), %rdi
callq 0x280a
movq -0xa0(%rbp), %rdi
cmpq %r14, %rdi
je 0x25f3
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x2060
movq %rbx, %rdi
callq 0x2150
nop
// File: /workspace/github_cpp_makefile_star2_O1/DCTewi[P]Truthtable-Calculator/functions.cpp
// Function: isLegal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool isLegal(const std::string &expr)
{
    // Start error
    if (expr[0] != '!' && expr[0] != '(' && !isalpha(expr[0])) return false;
    // Tail error
    if (expr[expr.size() - 1] != ')' && !isalpha(expr[expr.size() - 1])) return false;
    
    for (int i = 1; i < static_cast<int>(expr.size()); i++)
    {
        if (expr[i - 1] == '!' || expr[i] == '!') continue;
        // Consequent operators
        if (operators.count(expr[i]) && operators.count(expr[i - 1])) return false;
        // Consequent variables
        if (isalpha(expr[i]) && isalpha(expr[i - 1])) return false;
    }

    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
movzbl (%r14), %eax
cmpl $0x21, %eax
je 0x282b
cmpl $0x28, %eax
je 0x282b
movsbl %al, %edi
callq 0x2210
testl %eax, %eax
je 0x28c9
movq 0x8(%rbx), %rax
movsbl -0x1(%r14,%rax), %edi
cmpl $0x29, %edi
je 0x2847
callq 0x2210
testl %eax, %eax
je 0x28c9
cmpl $0x2, 0x8(%rbx)
setl %bpl
jl 0x28cb
movl $0x1, %r15d
leaq 0x6912(%rip), %r14      # 0x9170
movq (%rbx), %rsi
cmpb $0x21, -0x1(%rsi,%r15)
je 0x28b7
cmpb $0x21, (%rsi,%r15)
je 0x28b7
addq %r15, %rsi
movq %r14, %rdi
callq 0x43e6
testq %rax, %rax
je 0x2897
movq (%rbx), %rax
leaq (%rax,%r15), %rsi
decq %rsi
movq %r14, %rdi
callq 0x43e6
testq %rax, %rax
jne 0x28cb
movq (%rbx), %r12
movsbl (%r12,%r15), %edi
callq 0x2210
testl %eax, %eax
je 0x28b7
movsbl -0x1(%r12,%r15), %edi
callq 0x2210
testl %eax, %eax
jne 0x28cb
incq %r15
movslq 0x8(%rbx), %rax
cmpq %rax, %r15
setge %bpl
jl 0x285e
jmp 0x28cb
xorl %ebp, %ebp
andb $0x1, %bpl
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/rpetit3[P]fastq-scan/fastq-scan.cpp
// Function: Stats::init()
void init(void) {
            read_total = 0;
            total_bp = 0;
            qual_sum = 0;
            read_length_count.resize(MAX_READ_LENGTH,0);
            per_base_qual.resize(MAX_READ_LENGTH,0);
            per_base_count.resize(MAX_READ_LENGTH,0);
            phred = 33;
        }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorl %r15d, %r15d
movq %r15, 0x38(%rdi)
movq %r15, (%rdi)
movq %r15, 0xc8(%rdi)
addq $0x20, %rdi
leaq 0x8(%rsp), %r14
movl $0x0, (%r14)
movl $0x2faf080, %esi        # imm = 0x2FAF080
movq %r14, %rdx
callq 0x44be
leaq 0x88(%rbx), %rdi
movq %r15, (%r14)
leaq 0x8(%rsp), %r14
movl $0x2faf080, %esi        # imm = 0x2FAF080
movq %r14, %rdx
callq 0x44f2
leaq 0xa0(%rbx), %rdi
movq %r15, (%r14)
leaq 0x8(%rsp), %rdx
movl $0x2faf080, %esi        # imm = 0x2FAF080
callq 0x44f2
movl $0x21, 0xb8(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/rpetit3[P]fastq-scan/fastq-scan.cpp
// Function: Stats::transform_quality(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int transform_quality(string qual) {
            unsigned int total = 0;
            total_bp += qual.length();
            read_length_count[qual.length()]++;
            for (unsigned int i = 0; i < qual.length(); i++) {
                unsigned int qual_val = (unsigned int)qual[i];
                per_base_qual[i] += qual_val;
                per_base_count[i]++;
                total += qual_val;
            }

            if (qual.length() > 0) {
                double avg_qual = total / qual.length();
                qual_sum += avg_qual;
                per_read_qual.push_back(avg_qual);
                return 0;
            } else {
                return 1;
            }
        }

// Assembly:
pushq %rax
movq 0x8(%rsi), %rax
addq %rax, (%rdi)
movq 0x20(%rdi), %rcx
incl (%rcx,%rax,4)
movq 0x8(%rsi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x2e34
movq (%rsi), %rdx
movq 0x88(%rdi), %r8
movq 0xa0(%rdi), %r9
movl $0x1, %r10d
xorl %r11d, %r11d
movsbl (%rdx,%r11), %ecx
addq %rcx, (%r8,%r11,8)
incq (%r9,%r11,8)
addl %ecx, %eax
movl %r10d, %r11d
movq 0x8(%rsi), %rcx
incl %r10d
cmpq %r11, %rcx
ja 0x2e14
movl %eax, %eax
testq %rcx, %rcx
je 0x2e77
xorl %edx, %edx
divq %rcx
cvtsi2sd %rax, %xmm0
movsd %xmm0, (%rsp)
movsd 0xc8(%rdi), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0xc8(%rdi)
movq 0x78(%rdi), %rsi
cmpq 0x80(%rdi), %rsi
je 0x2e7e
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x78(%rdi)
jmp 0x2e8a
movl $0x1, %eax
jmp 0x2e8c
addq $0x70, %rdi
movq %rsp, %rdx
callq 0x4f7c
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O1/smuething[P]dune-cxx11/16-shared_from_this.cc
// Function: main
int main()
{
  std::shared_ptr<A> p1(new A());
  std::shared_ptr<A> p2 = p1->shared_from_this();
  assert(p1 == p2);
  return 0;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movl $0x10, %edi
callq 0x1070
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %rsp, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1300
movq (%rbx), %rsi
leaq 0x10(%rsp), %rdi
callq 0x14d2
movq (%rsp), %rax
cmpq 0x10(%rsp), %rax
jne 0x124d
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1236
callq 0x1286
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1245
callq 0x1286
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq
leaq 0xdb0(%rip), %rdi       # 0x2004
leaq 0xdb2(%rip), %rsi       # 0x200d
leaq 0xdc2(%rip), %rcx       # 0x2024
movl $0xc, %edx
callq 0x1060
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x127e
callq 0x1286
movq %rbx, %rdi
callq 0x10c0