LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/LiGaCu[P]Distributed_System_to_Compute_the_Shortest_Path/serverB.cpp
// Function: getUDPsockandbind(addrinfo*)
int getUDPsockandbind(struct addrinfo *servinfo)
{
    int sockfd;
    struct addrinfo *p;
    int reuseaddr=1;
    
    // loop through all the results and bind to the first we can
    for(p = servinfo; p != NULL; p = p->ai_next) 
    {
        if ((sockfd = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1) 
        {
            perror("listener: socket");
            continue;
        }
        if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(int)) == -1) 
        {
            perror("setsockopt");
            exit(1);
        }
        if (bind(sockfd, p->ai_addr, p->ai_addrlen) == -1) 
        {
            close(sockfd);
            perror("listener: bind");
            continue;
        }
        break;
    }
    if (p == NULL) 
    {
        fprintf(stderr, "listener: failed to bind socket\n");
        exit (2);
    }
    return sockfd;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x1, 0x4(%rsp)
testq %rdi, %rdi
sete %r12b
je 0x27ea
movq %rdi, %rbx
leaq 0xa0d(%rip), %r15       # 0x3183
leaq 0x4(%rsp), %r14
leaq 0xa1d(%rip), %r13       # 0x319f
movl 0x4(%rbx), %edi
movl 0x8(%rbx), %esi
movl 0xc(%rbx), %edx
callq 0x2080
movl %eax, %ebp
movq %r15, %rdi
cmpl $-0x1, %eax
je 0x27d6
movl %ebp, %edi
movl $0x1, %esi
movl $0x2, %edx
movq %r14, %rcx
movl $0x4, %r8d
callq 0x2210
cmpl $-0x1, %eax
je 0x2801
movq 0x18(%rbx), %rsi
movl 0x10(%rbx), %edx
movl %ebp, %edi
callq 0x2050
cmpl $-0x1, %eax
jne 0x27ea
movl %ebp, %edi
callq 0x2250
movq %r13, %rdi
callq 0x2100
movq 0x28(%rbx), %rbx
testq %rbx, %rbx
sete %r12b
jne 0x2782
jmp 0x27ea
testb $0x1, %r12b
jne 0x2806
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x229a
callq 0x22af
// File: /workspace/github_cpp_makefile_star2_O1/ostafen[P]Fast-Insertion-Sort/src/main.cpp
// Function: ChainedBlockInsertionSort<int>* chain<int>(int)
ChainedBlockInsertionSort<T>* chain(int k) {
  ChainedBlockInsertionSort<T>* out = new ChainedBlockInsertionSort<T>;

  for(int i = 1; i<k; i++) {
    float exp = (float)(i+1)/(i+2);
    out = new ChainedBlockInsertionSort<T>(exp, out);
  }
  
  out->setLevel(k);
  return out;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
movl $0x20, %edi
callq 0x31b0
movq %rax, %r14
leaq 0x7251(%rip), %r15      # 0xace8
movq %r15, (%rax)
movl $0x8, %edi
callq 0x31b0
leaq 0x6ee5(%rip), %rcx      # 0xa990
movq %rcx, (%rax)
movq %rax, 0x10(%r14)
movl $0x3f000000, 0x8(%r14)  # imm = 0x3F000000
movl $0x1, 0x18(%r14)
cmpl $0x2, %ebx
jl 0x3b24
movl %ebx, %r12d
negl %r12d
movl $0x3, %r13d
leal -0x1(%r13), %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
xorps %xmm0, %xmm0
cvtsi2ss %r13d, %xmm0
divss %xmm0, %xmm1
movss %xmm1, 0xc(%rsp)
movl $0x20, %edi
callq 0x31b0
movq %r15, (%rax)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x8(%rax)
movq %r14, 0x10(%rax)
leal (%r12,%r13), %ecx
incl %ecx
movl %r13d, %edx
incl %edx
movl %edx, %r13d
movq %rax, %r14
cmpl $0x2, %ecx
jne 0x3ad3
jmp 0x3b27
movq %r14, %rax
movl %ebx, 0x18(%rax)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x20, %esi
movq %r14, %rdi
callq 0x31c0
movq %rbx, %rdi
callq 0x32a0
// File: /workspace/github_cpp_makefile_star2_O1/ostafen[P]Fast-Insertion-Sort/src/algo.cpp
// Function: InplaceInsertionBlock<int>::inplace_insertion_block(int*, int, int)
void inplace_insertion_block(T *A, int e, int k)
    {
        int l, r;
        r = e;
        l = e - 2 * k;

        int i = e - k;
        while (i >= 0 && l >= 0 && r > (e - k))
        {
            if (A[l] > A[r])
            {
                swap(&A[i], &A[l]);
                l--;
            }
            else
            {
                swap(&A[i], &A[r]);
                r--;
            }
            i--;
        }

        while (l >= 0)
        {
            swap(&A[i], &A[l]);
            i--;
            l--;
        }

        while (r > e - k)
        {
            swap(&A[i], &A[r]);
            i--;
            r--;
        }
    }

// Assembly:
pushq %rbp
pushq %rbx
movl %edx, %edi
subl %ecx, %edi
subl %ecx, %edi
movl %edx, %eax
subl %ecx, %eax
movl %eax, %r8d
orl %edi, %r8d
sets %r8b
testl %ecx, %ecx
setle %cl
orb %r8b, %cl
jne 0x4a17
movl %eax, %ecx
leaq (%rsi,%rcx,4), %r8
movl %eax, %r9d
movl %edi, %r10d
movl (%rsi,%r10,4), %r11d
movslq %edx, %rcx
movl (%rsi,%rcx,4), %ebp
movl (%r8), %ebx
cmpl %ebp, %r11d
jle 0x49f3
movl %r11d, (%r8)
movl %ebx, (%rsi,%r10,4)
decl %edi
jmp 0x49fd
movl %ebp, (%r8)
movl %ebx, (%rsi,%rcx,4)
decl %ecx
movl %ecx, %edx
leal -0x1(%r9), %ecx
testl %r9d, %r9d
jle 0x4a19
testl %edi, %edi
js 0x4a19
addq $-0x4, %r8
movl %ecx, %r9d
cmpl %eax, %edx
jg 0x49d3
jmp 0x4a19
movl %eax, %ecx
testl %edi, %edi
js 0x4a3f
movslq %ecx, %rcx
movl %edi, %edi
incq %rdi
movl (%rsi,%rcx,4), %r8d
movl -0x4(%rsi,%rdi,4), %r9d
movl %r9d, (%rsi,%rcx,4)
movl %r8d, -0x4(%rsi,%rdi,4)
decq %rcx
decq %rdi
jg 0x4a25
cmpl %eax, %edx
jle 0x4a64
movslq %ecx, %rcx
movslq %edx, %rdx
cltq
movl (%rsi,%rcx,4), %edi
movl (%rsi,%rdx,4), %r8d
movl %r8d, (%rsi,%rcx,4)
movl %edi, (%rsi,%rdx,4)
decq %rcx
decq %rdx
cmpq %rax, %rdx
jg 0x4a4b
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ostafen[P]Fast-Insertion-Sort/src/algo.cpp
// Function: InsertionSort<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::sort(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, int)
void sort(T *A, int n)
    {
        for (int i = 1; i < n; i++)
        {
            int j = i - 1;
            T value = A[i];
            while (j >= 0 && A[j] > value)
            {
                A[j + 1] = A[j];
                j--;
            }
            A[j + 1] = value;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpl $0x2, %edx
jl 0x514e
movq %rsi, %r12
leaq 0x18(%rsp), %r15
movl %edx, %eax
movq %rax, 0x28(%rsp)
movl $0x1, %r13d
leaq 0x8(%rsp), %r14
movq %rsi, %rbx
movq %rsi, 0x30(%rsp)
movq %r13, %rax
shlq $0x5, %rax
movq %r15, 0x8(%rsp)
movq (%r12,%rax), %rsi
movq 0x8(%r12,%rax), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x51b2
movq %rbx, %r15
movq %r13, %rbp
testq %rbp, %rbp
jle 0x5107
movq %r15, %rdi
movq %r14, %rsi
callq 0x3050
testl %eax, %eax
jle 0x5109
leaq -0x20(%r15), %r12
leaq 0x20(%r15), %rdi
decq %rbp
movq %r15, %rsi
callq 0x30c0
movq %r12, %r15
jmp 0x50db
xorl %ebp, %ebp
movslq %ebp, %rdi
shlq $0x5, %rdi
movq 0x30(%rsp), %r12
addq %r12, %rdi
movq %r14, %rsi
callq 0x30c0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %r15
cmpq %r15, %rdi
je 0x513c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31c0
incq %r13
addq $0x20, %rbx
cmpq 0x28(%rsp), %r13
jne 0x50b5
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x515f
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x517e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31c0
movq %rbx, %rdi
callq 0x32a0
movq %rax, %rdi
callq 0x4af8
// File: /workspace/github_cpp_makefile_star2_O1/ostafen[P]Fast-Insertion-Sort/src/algo.cpp
// Function: QuickSort<int>::_sort(int*, int, int)
void _sort(T arr[], int low, int high)
    {
        if(low < high) {
            int pi = partition(arr, low, high);
            _sort(arr, low, pi - 1);
            _sort(arr, pi + 1, high);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
cmpl %ebx, %ebp
jge 0x4bdc
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x4be6
movl %eax, %r12d
leal -0x1(%r12), %ecx
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x4b9a
incl %r12d
movl %r12d, %ebp
jmp 0x4bac
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ostafen[P]Fast-Insertion-Sort/src/algo.cpp
// Function: QuickSort<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::partition(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, int, int)
int partition(T arr[], int low, int high)
    {
        T pivot = arr[high];
        int i = (low - 1);

        for (int j = low; j <= high - 1; j++)
        {
            if (arr[j] <= pivot)
            {
                i++;
                swap(&arr[i], &arr[j]);
            }
        }
        swap(&arr[i + 1], &arr[high]);
        return i + 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
movq %rsi, %r15
movslq %ecx, %r14
movq %r14, %rbp
shlq $0x5, %rbp
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rsi,%rbp), %rsi
movq 0x8(%r15,%rbp), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x51b2
subl %ebx, %r14d
jle 0x5319
movslq %ebx, %r12
decl %ebx
shlq $0x5, %r12
addq %r15, %r12
leaq 0x8(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x3050
testl %eax, %eax
jg 0x5309
movslq %ebx, %rax
shlq $0x5, %rax
leaq (%rax,%r15), %rdi
addq $0x20, %rdi
movq %r12, %rsi
callq 0x5387
incl %ebx
addq $0x20, %r12
decl %r14d
jne 0x52e1
incl %ebx
leaq 0x18(%rsp), %r12
addq %r15, %rbp
movslq %ebx, %rdi
shlq $0x5, %rdi
addq %r15, %rdi
movq %rbp, %rsi
callq 0x5387
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5345
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31c0
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5358
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x5377
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31c0
movq %rbx, %rdi
callq 0x32a0
movq %rax, %rdi
callq 0x4af8
// File: /workspace/github_cpp_makefile_star2_O1/ostafen[P]Fast-Insertion-Sort/src/algo.cpp
// Function: QuickInsertionSort<int>::_sort(int*, int, int)
void _sort(T arr[], int low, int high)
    {
        int size = (high - low) + 1;
        if (size <= 10)
        {
            is.sort(arr + low, size);
            return;
        }
        int pi = partition(arr, low, high);
        _sort(arr, low, pi - 1);
        _sort(arr, pi + 1, high);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movl %ebp, %eax
subl %r14d, %eax
cmpl $0x9, %eax
jle 0x4ca5
movq %r15, %rdi
movq %rbx, %rsi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x4cf8
movl %eax, %r12d
leal -0x1(%r12), %ecx
movq %r15, %rdi
movq %rbx, %rsi
movl %r14d, %edx
callq 0x4c5a
incl %r12d
movl %r12d, %r14d
jmp 0x4c6d
testl %eax, %eax
jle 0x4cee
movslq %r14d, %rcx
leaq (%rbx,%rcx,4), %rcx
incl %eax
movl $0x1, %edx
movl (%rcx,%rdx,4), %esi
movq %rdx, %rdi
leaq -0x1(%rdi), %r8
movl %r8d, %r9d
movl (%rcx,%r9,4), %r9d
cmpl %esi, %r9d
jle 0x4ce0
movl %r9d, (%rcx,%rdi,4)
leaq 0x1(%r8), %r9
movq %r8, %rdi
cmpq $0x1, %r9
jg 0x4cbd
xorl %edi, %edi
movslq %edi, %rdi
movl %esi, (%rcx,%rdi,4)
incq %rdx
cmpq %rax, %rdx
jne 0x4cb7
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ostafen[P]Fast-Insertion-Sort/src/algo.cpp
// Function: MergeSort<int>::_sort(int*, int, int, int*)
void _sort(T *A, int l, int r, T *X)
    {
        if (l < r)
        {
            int m = l + (r - l) / 2;
            _sort(A, l, m, X);
            _sort(A, m + 1, r, X);
            merge(A, l, m, r, X);
        }
    }

// Assembly:
movl %ecx, %eax
subl %edx, %eax
jle 0x4e01
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %r12
movl %eax, %r13d
shrl $0x1f, %r13d
addl %eax, %r13d
sarl %r13d
leal (%r14,%r13), %ecx
movl %ecx, 0x4(%rsp)
callq 0x4d8c
leal (%r14,%r13), %edx
incl %edx
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %ecx
movq %rbx, %r8
callq 0x4d8c
movq %r12, %rdi
movq %r15, %rsi
movl %r14d, %edx
movl 0x4(%rsp), %ecx
movl %ebp, %r8d
movq %rbx, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4e02
retq
// File: /workspace/github_cpp_makefile_star2_O1/ostafen[P]Fast-Insertion-Sort/src/algo.cpp
// Function: HeapSort<int>::sort(int*, int)
virtual void sort(T *A, int n)
    {
        for (int i = n / 2 - 1; i >= 0; i--)
            heapify(A, n, i);

        for (int i = n - 1; i >= 0; i--)
        {
            swap(&A[0], &A[i]);
            heapify(A, i, 0);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x2, %edx
jl 0x4f26
movl %ebp, %r15d
shrl %r15d
incl %r15d
leal -0x2(%r15), %ecx
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x4f86
decl %r15d
cmpl $0x1, %r15d
jg 0x4f0c
testl %ebp, %ebp
jle 0x4f59
movl %ebp, %r12d
leaq -0x1(%r12), %r15
movl (%rbx), %eax
movl -0x4(%rbx,%r12,4), %ecx
movl %ecx, (%rbx)
movl %eax, -0x4(%rbx,%r12,4)
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
xorl %ecx, %ecx
callq 0x4f86
cmpq $0x1, %r12
movq %r15, %r12
jg 0x4f2d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ostafen[P]Fast-Insertion-Sort/src/algo.cpp
// Function: HeapSort<int>::heapify(int*, int, int)
void heapify(T arr[], int n, int i)
    {
        int largest = i;
        int l = 2 * i + 1;
        int r = 2 * i + 2;

        if (l < n && arr[l] > arr[largest])
            largest = l;

        if (r < n && arr[r] > arr[largest])
            largest = r;

        if (largest != i)
        {
            swap(&arr[i], &arr[largest]);

            heapify(arr, n, largest);
        }
    }

// Assembly:
leal 0x1(,%rcx,2), %r8d
movslq %ecx, %rax
movl %ecx, %edi
cmpl %edx, %r8d
jge 0x4fa9
movslq %r8d, %rdi
movl (%rsi,%rdi,4), %edi
cmpl (%rsi,%rax,4), %edi
jg 0x4fa6
movl %ecx, %r8d
movl %r8d, %edi
leal 0x2(,%rcx,2), %r8d
cmpl %edx, %r8d
jge 0x4fcc
movslq %r8d, %r9
movl (%rsi,%r9,4), %r9d
movslq %edi, %r10
cmpl (%rsi,%r10,4), %r9d
jg 0x4fc9
movl %edi, %r8d
movl %r8d, %edi
cmpl %ecx, %edi
je 0x4fe7
movslq %edi, %rcx
movl (%rsi,%rax,4), %r8d
movl (%rsi,%rcx,4), %r9d
movl %r9d, (%rsi,%rax,4)
movl %r8d, (%rsi,%rcx,4)
movl %edi, %ecx
jmp 0x4f86
retq
// File: /workspace/github_cpp_makefile_star2_O1/ostafen[P]Fast-Insertion-Sort/src/gen.cpp
// Function: IntArrayGenerator::random(int)
virtual int *random(int size)
    {
        int *v = new int[size];
        for (int i = 0; i < size; i++)
        {
            v[i] = randomInt();
        }
        return v;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movslq %esi, %r15
leaq (,%r15,4), %rax
testl %r15d, %r15d
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x3030
movq %rax, %r14
testl %r15d, %r15d
jle 0x5041
movl %ebp, %r15d
xorl %r12d, %r12d
callq 0x3060
movl 0x8(%rbx), %ecx
movl 0xc(%rbx), %esi
subl %ecx, %esi
incl %esi
cltd
idivl %esi
addl %ecx, %edx
movl %edx, (%r14,%r12,4)
incq %r12
cmpq %r12, %r15
jne 0x5021
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ostafen[P]Fast-Insertion-Sort/src/gen.cpp
// Function: StringArrayGenerator::random[abi:cxx11](int)
virtual string *random(int size)
    {
        string *A = new string[size];

        for (int i = 0; i < size; i++)
        {
            int len = rand() % maxLength;
            A[i] = getRandomString(len);
        }
        return A;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movslq %esi, %r12
movq %r12, %r15
shlq $0x5, %r15
leaq 0x8(%r15), %rax
testl %r12d, %r12d
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x3030
movq %rax, %r14
movq %r12, (%rax)
testl %r12d, %r12d
je 0x578c
leaq 0x18(%r14), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x20, %rax
addq $-0x20, %r15
jne 0x5773
addq $0x8, %r14
testl %ebp, %ebp
jle 0x57e2
leaq 0x18(%rsp), %r13
movl %ebp, %ebp
leaq 0x8(%rsp), %r15
movq %r14, %r12
callq 0x3060
cltd
idivl 0x8(%rbx)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x57f4
movq %r12, %rdi
movq %r15, %rsi
callq 0x3200
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x57d9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31c0
addq $0x20, %r12
decq %rbp
jne 0x57a3
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ostafen[P]Fast-Insertion-Sort/src/gen.cpp
// Function: StringArrayGenerator::getRandomString[abi:cxx11](int)
string getRandomString(int len)
    {
        string s = "";
        for (int j = 0; j < len; j++)
            s += (char)(rand() % 256);
        return s;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
leaq 0x197e(%rip), %rdx      # 0x718c
movq %rdx, %rsi
callq 0x4a68
testl %ebp, %ebp
jle 0x582e
callq 0x3060
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3150
decl %ebp
jne 0x581a
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x5852
movq (%r15), %rsi
incq %rsi
callq 0x31c0
movq %r14, %rdi
callq 0x32a0
// File: /workspace/github_cpp_makefile_star2_O1/ostafen[P]Fast-Insertion-Sort/src/gen.cpp
// Function: DoubleArrayGenerator::random(int)
virtual double *random(int size)
    {

        double *v = new double[size];
        for (int i = 0; i < size; i++)
        {
            v[i] = randomDouble();
        }
        return v;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movslq %esi, %r15
leaq (,%r15,8), %rax
testl %r15d, %r15d
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x3030
movq %rax, %r14
testl %r15d, %r15d
jle 0x5bab
movl %ebp, %r15d
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0x5bb8
movsd %xmm0, (%r14,%r12,8)
incq %r12
cmpq %r12, %r15
jne 0x5b95
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ostafen[P]Fast-Insertion-Sort/src/gen.cpp
// Function: DoubleArrayGenerator::randomDouble()
double randomDouble()
    {
        std::random_device rd;
        std::mt19937 gen(rd());
        double d = std::generate_canonical<double, 10>(gen);
        return d * (rand() % max);
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x2720, %rsp           # imm = 0x2720
movq %rdi, %rbx
leaq 0x1398(%rsp), %r14
movq %r14, %rdi
callq 0x5c82
movq %r14, %rdi
callq 0x3230
movl %eax, %eax
movq %rax, 0x10(%rsp)
movl $0x1, %ecx
movq %rax, %rdx
shrq $0x1e, %rdx
xorl %eax, %edx
imull $0x6c078965, %edx, %eax # imm = 0x6C078965
addl %ecx, %eax
movq %rax, 0x10(%rsp,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x5bea
leaq 0x10(%rsp), %rdi
movq $0x270, 0x1380(%rdi) # imm = 0x270
callq 0x5cfc
movsd %xmm0, 0x8(%rsp)
callq 0x3060
movl %eax, %ebp
movl 0xc(%rbx), %ebx
leaq 0x1398(%rsp), %rdi
callq 0x3180
movl %ebp, %eax
cltd
idivl %ebx
cvtsi2sd %edx, %xmm1
movsd 0x8(%rsp), %xmm0
mulsd %xmm1, %xmm0
addq $0x2720, %rsp           # imm = 0x2720
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x5c79
jmp 0x5c61
movq %rax, %rbx
leaq 0x1398(%rsp), %rdi
callq 0x3180
movq %rbx, %rdi
callq 0x32a0
movq %rax, %rdi
callq 0x4af8
nop
// File: /workspace/github_cpp_makefile_star2_O1/ostafen[P]Fast-Insertion-Sort/src/algo.cpp
// Function: ChainedBlockInsertionSort<int>::sort(int*, int)
virtual void sort(T *A, int n)
    {
        int k = pow(n, exp);
        if (n < k)
        {
            algo->sort(A, n);
            return;
        }

        algo->sort(A, k);
        for (int i = k; i < n; i += k)
        {
            if (n - i < k)
                k = n - i;

            T b[k];
            for (int h = 0; h < k; h++)
                b[h] = A[i + h];

            algo->sort(b, k);
            int j = i - 1;
            int s = k - 1;
            while (s >= 0)
            {
                while (j >= 0 && A[j] > b[s])
                {
                    A[j + s + 1] = A[j];
                    j--;
                }
                A[j + s + 1] = b[s];
                s--;
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %rbx
cvtsi2sd %edx, %xmm0
cvtss2sd 0x8(%rdi), %xmm1
callq 0x3290
cvttsd2si %xmm0, %r13d
movq %rbx, -0x40(%rbp)
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
movq (%rax), %rax
cmpl %r12d, %r13d
jle 0x5fbe
movq %r14, %rsi
movl %r12d, %edx
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movq %r14, %rsi
movl %r13d, %edx
callq *%rax
cmpl %r12d, %r13d
jge 0x60c5
movabsq $-0x100000000, %rbx     # imm = 0xFFFFFFFF00000000
movl %r13d, %r15d
movl %r13d, %edx
movl %r12d, -0x2c(%rbp)
movq %rsp, -0x48(%rbp)
subl %r15d, %r12d
movl %r13d, -0x30(%rbp)
cmpl %r13d, %r12d
cmovll %r12d, %edx
leaq 0xf(,%rdx,4), %rax
andq $-0x10, %rax
movq %rsp, %r13
subq %rax, %r13
movq %r13, %rsp
testl %edx, %edx
movq %rdx, -0x38(%rbp)
jle 0x602b
movslq %r15d, %rax
leaq (%r14,%rax,4), %rsi
movl %edx, %edx
shlq $0x2, %rdx
movq %r13, %rdi
callq 0x3140
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rdi
movq (%rdi), %rax
movq %r13, %rsi
callq *(%rax)
movq -0x38(%rbp), %rdx
testl %edx, %edx
jle 0x60ae
leal -0x1(%r15), %eax
movl -0x30(%rbp), %ecx
cmpl %r12d, %ecx
cmovll %ecx, %r12d
movslq %r12d, %rcx
movq %rcx, %r10
decq %rcx
testl %eax, %eax
js 0x6098
movl (%r13,%rcx,4), %esi
movl %eax, %edi
addl %r10d, %eax
shlq $0x20, %rax
movl (%r14,%rdi,4), %r8d
cmpl %esi, %r8d
jle 0x6096
movq %rax, %r9
sarq $0x1e, %r9
movl %r8d, (%r14,%r9)
leaq -0x1(%rdi), %r8
addq %rbx, %rax
testq %rdi, %rdi
movq %r8, %rdi
jg 0x606c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x6098
movl %edi, %eax
movl (%r13,%rcx,4), %esi
leal (%r10,%rax), %edi
movslq %edi, %rdi
movl %esi, (%r14,%rdi,4)
cmpq $0x1, %r10
jg 0x6054
movq -0x48(%rbp), %rsp
addl %edx, %r15d
movl %edx, %r13d
movl -0x2c(%rbp), %r12d
cmpl %r12d, %r15d
jl 0x5fe3
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ostafen[P]Fast-Insertion-Sort/src/algo.cpp
// Function: FastInsertionSort<int>::sort(int*, int)
virtual void sort(T *A, int n)
    {
        int i = log(log_base, n);
        float exp = (float)(i - 1) / i;
        int k_0 = pow(n, exp);
        if (k_0 <= 0)
            return;

        T b[k_0];
        _sort(A, n, i, b);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movss 0x18(%rdi), %xmm0
movss %xmm0, -0x2c(%rbp)
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
callq 0x3220
movaps %xmm0, -0x40(%rbp)
movss -0x2c(%rbp), %xmm0
callq 0x3220
movaps -0x40(%rbp), %xmm1
divss %xmm0, %xmm1
cvttss2si %xmm1, %r12d
movaps %xmm1, %xmm0
leal -0x1(%r12), %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
divss %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
cvtss2sd %xmm1, %xmm1
callq 0x3290
cvttsd2si %xmm0, %eax
testl %eax, %eax
jle 0x64a1
movq %rsp, %r13
movl %eax, %eax
movq %rsp, %r8
leaq 0xf(,%rax,4), %rax
andq $-0x10, %rax
subq %rax, %r8
movq %r8, %rsp
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movl %r12d, %ecx
callq 0x6684
movq %r13, %rsp
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ostafen[P]Fast-Insertion-Sort/src/algo.cpp
// Function: QuickBlockInsertionSort<int>::_sort(int*, int, int)
void _sort(T arr[], int low, int high)
    {
        int size = (high - low) + 1;
        if (size <= minSize)
        {
            is.sort(arr + low, size);
            return;
        }
        int pi = partition(arr, low, high);
        _sort(arr, low, pi - 1);
        _sort(arr, pi + 1, high);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
movl %ebp, %edx
subl %r15d, %edx
cmpl 0x8(%r14), %edx
jl 0x6ae6
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
movl %ebp, %ecx
callq 0x6b04
movl %eax, %r12d
leal -0x1(%r12), %ecx
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
callq 0x6a9a
incl %r12d
movl %r12d, %r15d
jmp 0x6aad
incl %edx
addq $0x10, %r14
movslq %r15d, %rax
leaq (%rbx,%rax,4), %rsi
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6868
nop
// File: /workspace/github_cpp_makefile_star2_O1/ostafen[P]Fast-Insertion-Sort/src/util.cpp
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>* arrayCopy<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, int)
T *arrayCopy(T *A, int n)
{
    T *B = new T[n];
    for (int i = 0; i < n; i++)
        B[i] = A[i];
    return B;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movslq %esi, %r12
movq %r12, %r15
shlq $0x5, %r15
leaq 0x8(%r15), %rax
testl %r12d, %r12d
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x3030
movq %rax, %r14
movq %r12, (%rax)
testl %r12d, %r12d
je 0x6d0b
leaq 0x18(%r14), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x20, %rax
addq $-0x20, %r15
jne 0x6cf2
addq $0x8, %r14
testl %ebp, %ebp
jle 0x6d31
movl %ebp, %r12d
movq %r14, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x30c0
addq $0x20, %r15
addq $0x20, %rbx
decq %r12
jne 0x6d19
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/awbrenn[P]robot-controller/Middleware.cpp
// Function: main
int main (int argc, char *argv[]) {
    /* check for valid command line arguments */
    if (argc != 2)
        stateProperUsageAndDie(0);


    /* convert the URL to a string (to make parsing easier) */
   	string URL(argv[1]);
	parseURL(URL); // then parse it

    /*set up a TCP connection to the robot*/
    setupRobotConnection();

    initializeProxyServer();
    middlewareMainLoop();

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
cmpl $0x2, %edi
je 0x26c6
xorl %edi, %edi
callq 0x438d
movq 0x8(%rbx), %rsi
leaq -0x58(%rbp), %rbx
leaq -0x11(%rbp), %rdx
movq %rbx, %rdi
callq 0x3a76
leaq -0x28(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x38(%rbp), %rdi
callq 0x3d02
leaq -0x38(%rbp), %rdi
callq 0x2760
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0x2713
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2200
callq 0x2856
callq 0x28dd
callq 0x2964
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0x273f
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2200
jmp 0x273f
movq %rax, %rbx
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2758
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O1/awbrenn[P]robot-controller/Middleware.cpp
// Function: parseURL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void parseURL(string URL) {
	size_t serverName_endIndex;

	// basic checks for valid URL
   	if (URL.length() < HTTP_URL_SECTION + 1) // check if the url is long enough
	    dieWithError((char *)"parseURL() failed: URL is too short");
	else if (URL.substr(0, HTTP_URL_SECTION).compare("http://") != 0) // check if the url starts with "http://"
	    dieWithError((char *)"parseURL() failed: URL does not start with \"http://\"");

    serverName_endIndex = URL.find_first_of("/", HTTP_URL_SECTION);

    if (serverName_endIndex == URL.npos) { // no path 
        SERVER_NAME = URL.substr(HTTP_URL_SECTION, URL.length() - HTTP_URL_SECTION);
    }
    else {
        SERVER_NAME = URL.substr(HTTP_URL_SECTION, serverName_endIndex - HTTP_URL_SECTION);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpq $0x8, 0x8(%rdi)
jae 0x2780
leaq 0x2926(%rip), %rdi      # 0x50a4
jmp 0x27cc
leaq -0x38(%rbp), %r15
movl $0x7, %ecx
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2210
leaq 0x292b(%rip), %rsi      # 0x50c8
movq %r15, %rdi
callq 0x20a0
movl %eax, %r14d
movq (%r15), %rdi
leaq -0x28(%rbp), %rax
cmpq %rax, %rdi
je 0x27c0
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2200
testl %r14d, %r14d
je 0x27d1
leaq 0x2904(%rip), %rdi      # 0x50d0
callq 0x4364
leaq 0x28f6(%rip), %rsi      # 0x50ce
movl $0x7, %edx
movl $0x1, %ecx
movq %rbx, %rdi
callq 0x22c0
cmpq $-0x1, %rax
je 0x2808
addq $-0x7, %rax
leaq -0x38(%rbp), %r14
movl $0x7, %edx
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rcx
jmp 0x281f
movq 0x8(%rbx), %rcx
addq $-0x7, %rcx
leaq -0x38(%rbp), %r14
movl $0x7, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2210
leaq 0x49c5(%rip), %rdi      # 0x71f0
movq %r14, %rsi
callq 0x2260
movq (%r14), %rdi
leaq -0x28(%rbp), %rax
cmpq %rax, %rdi
je 0x284b
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2200
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/awbrenn[P]robot-controller/Middleware.cpp
// Function: setupRobotConnection()
void setupRobotConnection() {
    struct hostent *thehost; /* Hostent from gethostbyname() */
   
    /* Create a TCP socket for communication with the robot */
    if ((ROBOT_SOCKET = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0)
        dieWithError((char *)"socket() failed");

    /* Construct the server address structure */
    memset(&ROBOT_ADDR, 0, sizeof(ROBOT_ADDR));    /* Zero out structure */
    ROBOT_ADDR.sin_family = AF_INET;                 /* Internet addr family */
    ROBOT_ADDR.sin_addr.s_addr = inet_addr(SERVER_NAME.c_str()); /* Server IP address */
    ROBOT_ADDR.sin_port = htons(ROBOT_PORT);     /* Server port */

    /* If user gave a non dotted decimal address, we need to resolve it  */
    if ((int)ROBOT_ADDR.sin_addr.s_addr == -1) {
        thehost = gethostbyname(SERVER_NAME.c_str());
        ROBOT_ADDR.sin_addr.s_addr = *((unsigned long *) thehost->h_addr_list[0]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x2, %edi
movl $0x1, %esi
movl $0x6, %edx
callq 0x2080
movl %eax, 0x4a7c(%rip)      # 0x72f0
testl %eax, %eax
jns 0x2884
leaq 0x27f9(%rip), %rdi      # 0x5078
callq 0x4364
xorps %xmm0, %xmm0
movups %xmm0, 0x4a6a(%rip)     # 0x72f8
movw $0x2, 0x4a61(%rip)      # 0x72f8
movq 0x4952(%rip), %rdi      # 0x71f0
callq 0x21f0
movl %eax, 0x4a53(%rip)      # 0x72fc
movzwl 0x4920(%rip), %ecx      # 0x71d0
rolw $0x8, %cx
movw %cx, 0x4a3f(%rip)       # 0x72fa
cmpl $-0x1, %eax
jne 0x28db
movq 0x4929(%rip), %rdi      # 0x71f0
callq 0x2230
movq 0x18(%rax), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, 0x4a21(%rip)      # 0x72fc
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/awbrenn[P]robot-controller/Middleware.cpp
// Function: initializeProxyServer()
void initializeProxyServer() {
    /* Create socket for sending/receiving datagrams */
    if ((PROXY_SOCKET = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)
        dieWithError((char *)"socket() failed");

    /* Construct local address structure */
    memset(&PROXY_ADDR, 0, sizeof(PROXY_ADDR));   /* Zero out structure */
    PROXY_ADDR.sin_family = AF_INET;                /* Internet address family */
    PROXY_ADDR.sin_addr.s_addr = htonl(INADDR_ANY); /* Any incoming interface */
    PROXY_ADDR.sin_port = htons(PROXY_PORT);      /* Local port */

    /* Bind to the local address */
    if (bind(PROXY_SOCKET, (struct sockaddr *) &PROXY_ADDR, sizeof(PROXY_ADDR)) < 0)
        dieWithError((char *)"bind() failed");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x2, %edi
movl $0x2, %esi
movl $0x11, %edx
callq 0x2080
movl %eax, 0x49f9(%rip)      # 0x72f4
testl %eax, %eax
jns 0x290b
leaq 0x2772(%rip), %rdi      # 0x5078
callq 0x4364
xorps %xmm0, %xmm0
movups %xmm0, 0x49f3(%rip)     # 0x7308
leaq 0x49ec(%rip), %rsi      # 0x7308
movw $0x2, 0x49e3(%rip)      # 0x7308
movl $0x0, 0x49dd(%rip)      # 0x730c
movzwl 0x489c(%rip), %eax      # 0x71d2
rolw $0x8, %ax
movw %ax, 0x49c9(%rip)       # 0x730a
movl 0x49ad(%rip), %edi      # 0x72f4
movl $0x10, %edx
callq 0x2060
testl %eax, %eax
js 0x2957
popq %rbp
retq
leaq 0x272a(%rip), %rdi      # 0x5088
popq %rbp
jmp 0x4364
// File: /workspace/github_cpp_makefile_star2_O1/awbrenn[P]robot-controller/Middleware.cpp
// Function: middlewareMainLoop()
void middlewareMainLoop() {
    while(true) {
        getCommandFromClient();
        buildRequestHeader();
        setupRobotConnection();
        sendRobotTheCommand();
        getHTTPResponse(); // get a response from the robot
        sendRobotResponseToClient();
        cleanup();
        close(ROBOT_SOCKET); // close the connection with the robot
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x2998
callq 0x2a0d
callq 0x2856
callq 0x2b5d
callq 0x2bbe
callq 0x2c9a
callq 0x2eb7
movl 0x495f(%rip), %edi      # 0x72f0
callq 0x2370
jmp 0x2968
// File: /workspace/github_cpp_makefile_star2_O1/awbrenn[P]robot-controller/Middleware.cpp
// Function: getCommandFromClient()
void getCommandFromClient() {
    int messageLen;
    unsigned int clientAddrLen = sizeof(CLIENT_ADDR);
    char clientRequestBuffer[1000];
    char *command;

    bzero(clientRequestBuffer, 1000);

    if ((messageLen = recvfrom(PROXY_SOCKET, clientRequestBuffer, RECV_BUFF_SIZE, 
        0, (struct sockaddr *) &CLIENT_ADDR, &clientAddrLen)) < 0)
        dieWithError((char *)"recv() failed");
    
    //parse out header
    
    command = clientRequestBuffer;
    detectCommand(command);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x3f0, %rsp            # imm = 0x3F0
leaq -0x14(%rbp), %rbx
movl $0x10, (%rbx)
leaq -0x400(%rbp), %r14
movl $0x3e8, %edx            # imm = 0x3E8
movq %r14, %rdi
xorl %esi, %esi
callq 0x2130
movl 0x4928(%rip), %edi      # 0x72f4
leaq 0x4945(%rip), %r8       # 0x7318
movl $0xf4240, %edx          # imm = 0xF4240
movq %r14, %rsi
xorl %ecx, %ecx
movq %rbx, %r9
callq 0x2170
testl %eax, %eax
jns 0x29f5
leaq 0x267a(%rip), %rdi      # 0x506a
callq 0x4364
leaq -0x400(%rbp), %rdi
callq 0x2efd
addq $0x3f0, %rsp            # imm = 0x3F0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/awbrenn[P]robot-controller/Middleware.cpp
// Function: buildRequestHeader()
void buildRequestHeader() {
    REQUEST_MESSAGE += FILE_PATH;
    REQUEST_MESSAGE += " HTTP/1.1\r\n";
    REQUEST_MESSAGE += "Host: " + SERVER_NAME + "\r\n";
    REQUEST_MESSAGE += "Connection: close\r\n";
    REQUEST_MESSAGE += "\r\n";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq 0x47f1(%rip), %rsi      # 0x7210
movq 0x47f2(%rip), %rdx      # 0x7218
leaq 0x4843(%rip), %rbx      # 0x7270
movq %rbx, %rdi
callq 0x20b0
leaq 0x26c9(%rip), %rsi      # 0x5105
movq %rbx, %rdi
callq 0x2360
leaq 0x26c6(%rip), %rsi      # 0x5111
leaq 0x479e(%rip), %rdx      # 0x71f0
leaq -0x50(%rbp), %rbx
movq %rbx, %rdi
callq 0x3bfe
leaq 0x26c9(%rip), %rsi      # 0x512e
movq %rbx, %rdi
callq 0x2360
leaq -0x20(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2a91
movq %rdx, -0x30(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x20(%rbp)
jmp 0x2a98
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, -0x28(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq 0x47b2(%rip), %rdi      # 0x7270
callq 0x20b0
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x2ad8
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x2200
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2af1
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2200
leaq 0x4778(%rip), %rbx      # 0x7270
leaq 0x2619(%rip), %rsi      # 0x5118
movq %rbx, %rdi
callq 0x2360
leaq 0x2620(%rip), %rsi      # 0x512e
movq %rbx, %rdi
callq 0x2360
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x2b3c
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x2200
jmp 0x2b3c
movq %rax, %rbx
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b55
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O1/awbrenn[P]robot-controller/Middleware.cpp
// Function: sendRobotTheCommand()
void sendRobotTheCommand() {
    /* Establish the connection to the robot */
    if (connect(ROBOT_SOCKET, (struct sockaddr *) &ROBOT_ADDR, sizeof(ROBOT_ADDR)) < 0)
        dieWithError((char *)"connect() failed");

    /* Send the string to the robot */
    if (send(ROBOT_SOCKET, REQUEST_MESSAGE.c_str(), REQUEST_MESSAGE.length(), 0) != (int)REQUEST_MESSAGE.length())
        dieWithError((char *)"send() sent a different number of bytes than expected");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x4789(%rip), %edi      # 0x72f0
leaq 0x478a(%rip), %rsi      # 0x72f8
movl $0x10, %edx
callq 0x21a0
testl %eax, %eax
jns 0x2b88
leaq 0x24a0(%rip), %rdi      # 0x5023
callq 0x4364
movl 0x4762(%rip), %edi      # 0x72f0
movq 0x46db(%rip), %rsi      # 0x7270
movq 0x46dc(%rip), %rdx      # 0x7278
xorl %ecx, %ecx
callq 0x2110
movslq 0x46ce(%rip), %rcx      # 0x7278
cmpq %rcx, %rax
jne 0x2bb1
popq %rbp
retq
leaq 0x247c(%rip), %rdi      # 0x5034
popq %rbp
jmp 0x4364
// File: /workspace/github_cpp_makefile_star2_O1/awbrenn[P]robot-controller/Middleware.cpp
// Function: getHTTPResponse()
void getHTTPResponse() {
    char *httpRequestBuffer = (char *) malloc(RECV_BUFF_SIZE * sizeof(char));
    int messageLen;

    if ((messageLen = recv(ROBOT_SOCKET, httpRequestBuffer, RECV_BUFF_SIZE, 0)) < 0)
        dieWithError((char *)"recv() failed");
       
     int total_bytes_recieved = 0;

     if (messageLen < 200)  {
         if ((messageLen = recv(ROBOT_SOCKET, httpRequestBuffer, RECV_BUFF_SIZE, 0)) < 0)
             dieWithError((char *)"recv() failed");

         total_bytes_recieved += messageLen;
     }
    
    cout << messageLen << endl;

    /* build the HTTP_RESPONSE as a string */
    for (int i = 0; i < messageLen; ++i) {
        HTTP_RESPONSE += httpRequestBuffer[i];
    }

    //cout << "WE GOT HERE!!\nHTTP_RESPONSE:\n" << messageLen << "\n\n" << HTTP_RESPONSE << endl;

    // int content_length = getContentLength();
    // int start_of_content = getStartOfContent();

    // cout << "Content Length: " << content_length <<
    // "\nStart of Content: " << start_of_content << "\n\n" << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0xf4240, %edi          # imm = 0xF4240
callq 0x2270
movq %rax, %rbx
movl 0x4714(%rip), %edi      # 0x72f0
movl $0xf4240, %edx          # imm = 0xF4240
movq %rax, %rsi
xorl %ecx, %ecx
callq 0x20c0
movq %rax, %r14
testl %r14d, %r14d
jns 0x2bff
leaq 0x2470(%rip), %rdi      # 0x506a
callq 0x4364
cmpl $0xc7, %r14d
jg 0x2c31
movl 0x46e2(%rip), %edi      # 0x72f0
movl $0xf4240, %edx          # imm = 0xF4240
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x20c0
movq %rax, %r14
testl %r14d, %r14d
jns 0x2c31
leaq 0x243e(%rip), %rdi      # 0x506a
callq 0x4364
movq 0x4398(%rip), %rdi      # 0x6fd0
movl %r14d, %esi
callq 0x2320
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
testl %r14d, %r14d
jle 0x2c91
movl %r14d, %r15d
xorl %r12d, %r12d
leaq 0x45d4(%rip), %r14      # 0x7250
movsbl (%rbx,%r12), %esi
movq %r14, %rdi
callq 0x21b0
incq %r12
cmpq %r12, %r15
jne 0x2c7c
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/awbrenn[P]robot-controller/Middleware.cpp
// Function: fragmentHTTPResponse[abi:cxx11]()
vector<string> fragmentHTTPResponse() {
    size_t index;
    size_t size;
    vector<string> fragmented_response;

    /* split the HTTP response into 1000 byte chunks */
    for (index = 0; index < HTTP_RESPONSE.length(); index += UDP_PACKET_MAX_SIZE - 12) {
        /* get the size of the fragment */
        if ((HTTP_RESPONSE.length() - index) > UDP_PACKET_MAX_SIZE - 12)
            size = UDP_PACKET_MAX_SIZE - 12;
        else
            size = HTTP_RESPONSE.length() - index;

        fragmented_response.push_back(HTTP_RESPONSE.substr(index, size));
    }

    return fragmented_response;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x3afe(%rip), %rcx      # 0x7258
testq %rcx, %rcx
je 0x37c9
xorl %r13d, %r13d
movl $0x3dc, %r14d           # imm = 0x3DC
leaq -0x48(%rbp), %r15
xorl %r12d, %r12d
addq %r13, %rcx
cmpq %r14, %rcx
cmovaeq %r14, %rcx
movq %r15, %rdi
leaq 0x3acd(%rip), %rsi      # 0x7250
movq %r12, %rdx
callq 0x2210
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4148
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x37af
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2200
addq $0x3dc, %r12            # imm = 0x3DC
movq 0x3a9b(%rip), %rcx      # 0x7258
addq $-0x3dc, %r13           # imm = 0xFC24
cmpq %rcx, %r12
jb 0x376f
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x37fc
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x37fc
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x3ab4
movq %r14, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O1/awbrenn[P]robot-controller/Middleware.cpp
// Function: convertHeaderInfoToString[abi:cxx11](unsigned int)
string convertHeaderInfoToString(uint32_t header_info) {
    string header_info_string;
    char uint4_chunk;
    int size_of_uint32_t = 4;
    int bits_in_a_byte = 8;

    for (int i = 0; i < size_of_uint32_t; ++i) {
        uint4_chunk = (char) ((header_info << (i * bits_in_a_byte)) >> (3 * bits_in_a_byte));
        header_info_string.push_back(uint4_chunk);
    }

    return header_info_string;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
xorl %r15d, %r15d
movl %r14d, %esi
movl %r15d, %ecx
shll %cl, %esi
sarl $0x18, %esi
movq %rbx, %rdi
callq 0x21b0
addl $0x8, %r15d
cmpl $0x20, %r15d
jne 0x3a0b
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x3a4b
movq (%r12), %rsi
incq %rsi
callq 0x2200
movq %r14, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O1/awbrenn[P]robot-controller/ErrorFunctions.cpp
// Function: stateProperUsageAndDie(int)
void stateProperUsageAndDie(int program_id) {
    if (program_id == 0) // middleware
        dieWithError((char *)"Improper Usage - See proper usage below\n"
                             "$> <path_to_executable> <port number>\n");
    else if (program_id == 1) // client
        dieWithError((char *)"Improper Usage - See proper usage below\n"
                             "$> <path_to_executable> <ip of middleware> <port of middleware>"
                             " <ip of robot> <id of robot> <length> <number of"
                             "edges>");
    else
        dieWithError((char *)"Improper Usage");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
movq 0x2c3e(%rip), %rcx      # 0x6fd8
movq (%rcx), %rdi
leaq 0xf55(%rip), %rsi       # 0x52f9
cmpl $0x1, %eax
je 0x43b6
testl %eax, %eax
jne 0x43bf
leaq 0xf4f(%rip), %rdx       # 0x5303
jmp 0x43c6
leaq 0xf95(%rip), %rdx       # 0x5352
jmp 0x43c6
leaq 0x102a(%rip), %rdx      # 0x53f0
xorl %eax, %eax
callq 0x2290
movl $0x1, %edi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O1/justinpajak[P]Sum_SGX/aes.cpp
// Function: main
int main(int argc, char *argv[]) {

	/* 256 bit key */
    unsigned char *key = (unsigned char *)"01234567890123456789012345678901";

    /* 128 bit IV */
    unsigned char *iv = (unsigned char *)"0123456789012345";

    /* Plaintext and Ciphertext declaration */
    unsigned char *plaintext;
    unsigned char ciphertext[128];
    int ciphertext_len, decryptedtext_len;

    /* Loop through data.txt file and encrypt each float */
    FILE* data = fopen("data.txt", "r+");
    if (!data) {
        fprintf(stderr, "Unable to open file: %s\n", strerror(errno));
        return 1;
    }
    FILE* enc_data = fopen("enc.txt", "w+");
    if (!enc_data) {
        fprintf(stderr, "Unable to open file: %s\n", strerror(errno));
        return 1;
    }
    char buffer[BUFSIZ];
    while (fgets(buffer, BUFSIZ, data)) {
        buffer[16] = '\0';
        plaintext = (unsigned char*)buffer;
        ciphertext_len = encrypt(plaintext, strlen((char*)plaintext), key, iv, ciphertext);
        fwrite((const char*)ciphertext, 128, 1, enc_data);
    };


    // test protocol: Decrypt all of enc.txt to dec.txt 
    /*FILE* dec_data = fopen("dec.txt", "w");
    if (!dec_data) {
        fprintf(stderr, "Unable to open file: %s\n", strerror(errno));
        return 1;
    }
    fseek(enc_data, 0L, SEEK_SET);
    while(fread((char*)ciphertext, 128, 1, enc_data)) {
        unsigned char decryptedtext[128];
        decryptedtext_len = decrypt(ciphertext, ciphertext_len, key, iv, decryptedtext);
        decryptedtext[decryptedtext_len] = '\0';
        fputs((const char*)decryptedtext, dec_data);
        fputs("\n", dec_data);
    }

    fclose(dec_data);*/

    fclose(data);
    fclose(enc_data);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2088, %rsp           # imm = 0x2088
leaq 0xd1f(%rip), %rdi       # 0x2036
leaq 0xd21(%rip), %rsi       # 0x203f
callq 0x1100
testq %rax, %rax
je 0x13f0
movq %rax, %rbx
leaq 0xd25(%rip), %rdi       # 0x205b
leaq 0xd26(%rip), %rsi       # 0x2063
callq 0x1100
testq %rax, %rax
je 0x13f7
movq %rax, %r14
leaq -0x20b0(%rbp), %rdi
movl $0x2000, %esi           # imm = 0x2000
movq %rbx, %rdx
callq 0x1130
testq %rax, %rax
je 0x13cc
leaq -0x20b0(%rbp), %r15
leaq 0xcb0(%rip), %r13       # 0x2025
leaq -0xb0(%rbp), %r12
movb $0x0, -0x20a0(%rbp)
movq %r15, %rdi
callq 0x1080
movq %r15, %rdi
movl %eax, %esi
leaq 0xc6d(%rip), %rdx       # 0x2004
movq %r13, %rcx
movq %r12, %r8
callq 0x1403
movl $0x80, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rcx
callq 0x1150
movq %r15, %rdi
movl $0x2000, %esi           # imm = 0x2000
movq %rbx, %rdx
callq 0x1130
testq %rax, %rax
jne 0x137c
movq %rbx, %rdi
callq 0x10e0
movq %r14, %rdi
callq 0x10e0
xorl %eax, %eax
addq $0x2088, %rsp           # imm = 0x2088
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x11a6
jmp 0x13fc
callq 0x1170
movl $0x1, %eax
jmp 0x13de
// File: /workspace/github_cpp_makefile_star2_O1/justinpajak[P]Sum_SGX/aes.cpp
// Function: encrypt(unsigned char*, int, unsigned char*, unsigned char*, unsigned char*)
int encrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key,
            unsigned char *iv, unsigned char *ciphertext)
{
    EVP_CIPHER_CTX *ctx;

    int len;

    int ciphertext_len;

    /* Create and initialise the context */
    ctx = EVP_CIPHER_CTX_new();
    EVP_EncryptInit_ex(ctx, EVP_aes_256_cbc(), NULL, key, iv);

    EVP_EncryptUpdate(ctx, ciphertext, &len, plaintext, plaintext_len);
    ciphertext_len = len;

	EVP_EncryptFinal_ex(ctx, ciphertext + len, &len);
    ciphertext_len += len;

    /* Clean up */
    EVP_CIPHER_CTX_free(ctx);

    return ciphertext_len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movl %esi, -0x2c(%rbp)
movq %rdi, %r13
callq 0x10c0
movq %rax, %rbx
callq 0x10b0
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
movq %r12, %rcx
movq %r15, %r8
callq 0x1090
leaq -0x30(%rbp), %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r13, %rcx
movl -0x2c(%rbp), %r8d
callq 0x1040
movslq (%r15), %r12
addq %r12, %r14
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1140
movl (%r15), %r14d
addl %r12d, %r14d
movq %rbx, %rdi
callq 0x10f0
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq