LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x49ef
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 0x49cb
movl %r11d, (%r8)
movl %ebx, (%rsi,%r10,4)
decl %edi
jmp 0x49d5
movl %ebp, (%r8)
movl %ebx, (%rsi,%rcx,4)
decl %ecx
movl %ecx, %edx
leal -0x1(%r9), %ecx
testl %r9d, %r9d
jle 0x49f1
testl %edi, %edi
js 0x49f1
addq $-0x4, %r8
movl %ecx, %r9d
cmpl %eax, %edx
jg 0x49ab
jmp 0x49f1
movl %eax, %ecx
testl %edi, %edi
js 0x4a24
movslq %ecx, %rcx
movl %edi, %r8d
leaq (%rsi,%r8,4), %r9
notq %r8
leaq (%rsi,%rcx,4), %r10
notl %edi
addl %edi, %ecx
xorl %edi, %edi
movl (%r10,%rdi,4), %r11d
movl (%r9,%rdi,4), %ebx
movl %ebx, (%r10,%rdi,4)
movl %r11d, (%r9,%rdi,4)
decq %rdi
cmpq %rdi, %r8
jne 0x4a0c
cmpl %eax, %edx
jle 0x4a49
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 0x4a30
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x513c
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 0x51a0
movq %rbx, %r15
movq %r13, %rbp
testq %rbp, %rbp
jle 0x50f5
movq %r15, %rdi
movq %r14, %rsi
callq 0x3050
testl %eax, %eax
jle 0x50f7
leaq -0x20(%r15), %r12
leaq 0x20(%r15), %rdi
decq %rbp
movq %r15, %rsi
callq 0x30c0
movq %r12, %r15
jmp 0x50c9
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 0x512a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31c0
incq %r13
addq $0x20, %rbx
cmpq 0x28(%rsp), %r13
jne 0x50a3
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x514d
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x516c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31c0
movq %rbx, %rdi
callq 0x32a0
movq %rax, %rdi
callq 0x4ae1
// File: /workspace/github_cpp_makefile_star2_O3/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:
cmpl %ecx, %edx
jge 0x4bcf
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x4bd0
movl %eax, %r12d
leal -0x1(%r12), %ecx
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x4b82
incl %r12d
movl %r12d, %ebp
cmpl %ebx, %r12d
jl 0x4b98
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x51a0
subl %ebx, %r14d
jle 0x530f
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 0x52ff
movslq %ebx, %rax
shlq $0x5, %rax
leaq (%rax,%r15), %rdi
addq $0x20, %rdi
movq %r12, %rsi
callq 0x537d
incl %ebx
addq $0x20, %r12
decl %r14d
jne 0x52d7
incl %ebx
leaq 0x18(%rsp), %r12
addq %r15, %rbp
movslq %ebx, %rdi
shlq $0x5, %rdi
addq %r15, %rdi
movq %rbp, %rsi
callq 0x537d
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x533b
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 0x534e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x536d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31c0
movq %rbx, %rdi
callq 0x32a0
movq %rax, %rdi
callq 0x4ae1
// File: /workspace/github_cpp_makefile_star2_O3/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 %edx, %r12d
movq %rsi, %rbx
movl %ecx, %eax
subl %edx, %eax
cmpl $0xa, %eax
jge 0x4c60
movl %r12d, %r15d
jmp 0x4c9a
movl %ecx, %ebp
movq %rdi, %r14
movq %r14, %rdi
movq %rbx, %rsi
movl %r12d, %edx
movl %ebp, %ecx
callq 0x4cec
movl %eax, %r15d
leal -0x1(%r15), %ecx
movq %r14, %rdi
movq %rbx, %rsi
movl %r12d, %edx
callq 0x4c44
incl %r15d
movl %ebp, %eax
subl %r15d, %eax
movl %r15d, %r12d
cmpl $0xa, %eax
jge 0x4c65
testl %eax, %eax
jle 0x4ce3
movslq %r15d, %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 0x4cd5
movl %r9d, (%rcx,%rdi,4)
leaq 0x1(%r8), %r9
movq %r8, %rdi
cmpq $0x1, %r9
jg 0x4cb2
xorl %edi, %edi
movslq %edi, %rdi
movl %esi, (%rcx,%rdi,4)
incq %rdx
cmpq %rax, %rdx
jne 0x4cac
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4df5
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 0x4d80
leal (%r14,%r13), %edx
incl %edx
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %ecx
movq %rbx, %r8
callq 0x4d80
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 0x4df6
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4f1a
movl %ebp, %r15d
shrl %r15d
incl %r15d
leal -0x2(%r15), %ecx
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x4f7a
decl %r15d
cmpl $0x1, %r15d
ja 0x4f00
testl %ebp, %ebp
jle 0x4f4d
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 0x4f7a
cmpq $0x1, %r12
movq %r15, %r12
ja 0x4f21
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4f9d
movslq %r8d, %rdi
movl (%rsi,%rdi,4), %edi
cmpl (%rsi,%rax,4), %edi
jg 0x4f9a
movl %ecx, %r8d
movl %r8d, %edi
leal 0x2(,%rcx,2), %r8d
cmpl %edx, %r8d
jge 0x4fc0
movslq %r8d, %r9
movl (%rsi,%r9,4), %r9d
movslq %edi, %r10
cmpl (%rsi,%r10,4), %r9d
jg 0x4fbd
movl %edi, %r8d
movl %r8d, %edi
cmpl %ecx, %edi
je 0x4fdb
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 0x4f7a
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movl %esi, %r15d
leaq (,%r15,4), %rax
testl %esi, %esi
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x3030
movq %rax, %r14
testl %ebp, %ebp
jle 0x5030
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 0x5010
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
leaq 0x8(%rax), %r14
movq %r12, (%rax)
testl %r12d, %r12d
je 0x57df
addq $0x18, %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x20, %rax
addq $-0x20, %r15
jne 0x5774
testl %ebp, %ebp
jle 0x57df
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 0x57f2
movq %r12, %rdi
movq %r15, %rsi
callq 0x3200
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x57d6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31c0
addq $0x20, %r12
decq %rbp
jne 0x57a0
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x19b0(%rip), %rdx      # 0x71bc
movq %rdx, %rsi
callq 0x4a4c
testl %ebp, %ebp
jle 0x582c
callq 0x3060
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3150
decl %ebp
jne 0x5818
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 0x5850
movq (%r15), %rsi
incq %rsi
callq 0x31c0
movq %r14, %rdi
callq 0x32a0
// File: /workspace/github_cpp_makefile_star2_O3/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
movl %esi, %r15d
leaq (,%r15,8), %rax
testl %esi, %esi
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x3030
movq %rax, %r14
testl %ebp, %ebp
jle 0x5b8e
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0x5b9a
movsd %xmm0, (%r14,%r12,8)
incq %r12
cmpq %r12, %r15
jne 0x5b78
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x5c64
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 0x5bcc
leaq 0x10(%rsp), %rdi
movq $0x270, 0x1380(%rdi) # imm = 0x270
callq 0x5cde
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 0x5c5b
jmp 0x5c43
movq %rax, %rbx
leaq 0x1398(%rsp), %rdi
callq 0x3180
movq %rbx, %rdi
callq 0x32a0
movq %rax, %rdi
callq 0x4ae1
nop
// File: /workspace/github_cpp_makefile_star2_O3/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, %r15d
movq %rsi, %r14
movq %rdi, %rbx
cvtsi2sd %edx, %xmm0
cvtss2sd 0x8(%rdi), %xmm1
callq 0x3290
cvttsd2si %xmm0, %ecx
movq %rbx, -0x38(%rbp)
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
movq (%rax), %rax
cmpl %r15d, %ecx
jle 0x5fc5
movq %r14, %rsi
movl %r15d, %edx
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movq %r14, %rsi
movl %ecx, %ebx
movl %ecx, %edx
callq *%rax
cmpl %r15d, %ebx
jge 0x60f0
movl %ebx, %ecx
movabsq $-0x100000000, %rbx     # imm = 0xFFFFFFFF00000000
movl %ecx, %r9d
movl %ecx, %r12d
movl %r15d, -0x2c(%rbp)
movq %rsp, -0x48(%rbp)
subl %r9d, %r15d
cmpl %ecx, %r15d
cmovll %r15d, %r12d
leaq 0xf(,%r12,4), %rax
andq $-0x10, %rax
movq %rsp, %r13
subq %rax, %r13
movq %r13, %rsp
testl %r12d, %r12d
movq %r12, -0x50(%rbp)
jle 0x60bc
movslq %r9d, %rax
leaq (%r14,%rax,4), %rsi
movl %ecx, -0x30(%rbp)
leaq (,%r12,4), %rdx
movq %r13, %rdi
movq %r9, -0x40(%rbp)
callq 0x3140
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdi
movq (%rdi), %rax
movq %r13, %rsi
movl %r12d, %edx
callq *(%rax)
movq -0x40(%rbp), %r9
leal -0x1(%r9), %eax
movl -0x30(%rbp), %ecx
cmpl %r15d, %ecx
cmovll %ecx, %r15d
movslq %r15d, %rcx
movl -0x2c(%rbp), %r15d
movl -0x4(%r13,%rcx,4), %edx
testl %eax, %eax
js 0x60a3
movl %eax, %esi
addl %ecx, %eax
shlq $0x20, %rax
movl (%r14,%rsi,4), %edi
cmpl %edx, %edi
jle 0x60a1
movq %rax, %r8
sarq $0x1e, %r8
movl %edi, (%r14,%r8)
leaq -0x1(%rsi), %rdi
addq %rbx, %rax
testq %rsi, %rsi
movq %rdi, %rsi
jg 0x6078
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x60a3
movl %esi, %eax
leal (%rcx,%rax), %esi
leaq -0x1(%rcx), %rdi
movslq %esi, %rsi
movl %edx, (%r14,%rsi,4)
cmpq $0x1, %rcx
movq %rdi, %rcx
jg 0x6067
jmp 0x60d9
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdi
movq (%rdi), %rax
movq %r13, %rsi
movl %r12d, %edx
movq %r9, %r15
callq *(%rax)
movq %r15, %r9
movl -0x2c(%rbp), %r15d
movq -0x48(%rbp), %rsp
movq -0x50(%rbp), %r12
addl %r12d, %r9d
movl %r12d, %ecx
cmpl %r15d, %r9d
jl 0x5fed
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r14
movl %ecx, %edx
subl %r12d, %edx
cmpl 0x8(%rdi), %edx
jge 0x6aea
movl %r12d, %r15d
jmp 0x6b22
movl %ecx, %ebp
movq %r14, %rdi
movq %rbx, %rsi
movl %r12d, %edx
movl %ebp, %ecx
callq 0x6b40
movl %eax, %r15d
leal -0x1(%r15), %ecx
movq %r14, %rdi
movq %rbx, %rsi
movl %r12d, %edx
callq 0x6aca
incl %r15d
movl %ebp, %edx
subl %r15d, %edx
movl %r15d, %r12d
cmpl 0x8(%r14), %edx
jge 0x6aec
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 0x6896
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
leaq 0x8(%rax), %r14
movq %r12, (%rax)
testl %r12d, %r12d
je 0x6d72
addq $0x18, %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x20, %rax
addq $-0x20, %r15
jne 0x6d37
testl %ebp, %ebp
jle 0x6d72
movl %ebp, %r12d
movq %r14, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x30c0
addq $0x20, %r15
addq $0x20, %rbx
decq %r12
jne 0x6d5a
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4389
movq 0x8(%rbx), %rsi
leaq -0x58(%rbp), %rbx
leaq -0x11(%rbp), %rdx
movq %rbx, %rdi
callq 0x3a84
leaq -0x28(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x38(%rbp), %rdi
callq 0x3d14
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 0x2967
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_O3/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 $0x7, 0x8(%rdi)
ja 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 0x4360
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_O3/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 0x2911
leaq 0x2772(%rip), %rdi      # 0x5078
callq 0x4360
movl 0x49e3(%rip), %eax      # 0x72f4
movq $0x0, 0x49f4(%rip) # 0x7310
leaq 0x49e5(%rip), %rsi      # 0x7308
movw $0x2, 0x49dc(%rip)      # 0x7308
movl $0x0, 0x49d6(%rip)      # 0x730c
movzwl 0x4895(%rip), %ecx      # 0x71d2
rolw $0x8, %cx
movw %cx, 0x49c2(%rip)       # 0x730a
movl %eax, %edi
movl $0x10, %edx
callq 0x2060
testl %eax, %eax
js 0x295a
popq %rbp
retq
leaq 0x2727(%rip), %rdi      # 0x5088
popq %rbp
jmp 0x4360
// File: /workspace/github_cpp_makefile_star2_O3/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 0x299b
callq 0x2a10
callq 0x2856
callq 0x2b5b
callq 0x2bbc
callq 0x2c9a
callq 0x2eab
movl 0x495c(%rip), %edi      # 0x72f0
callq 0x2370
jmp 0x296b
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4925(%rip), %edi      # 0x72f4
leaq 0x4942(%rip), %r8       # 0x7318
movl $0xf4240, %edx          # imm = 0xF4240
movq %r14, %rsi
xorl %ecx, %ecx
movq %rbx, %r9
callq 0x2170
testl %eax, %eax
jns 0x29f8
leaq 0x2677(%rip), %rdi      # 0x506a
callq 0x4360
leaq -0x400(%rbp), %rdi
callq 0x2ef1
addq $0x3f0, %rsp            # imm = 0x3F0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x47ee(%rip), %rsi      # 0x7210
movq 0x47ef(%rip), %rdx      # 0x7218
leaq 0x4840(%rip), %rbx      # 0x7270
movq %rbx, %rdi
callq 0x20b0
leaq 0x26c6(%rip), %rsi      # 0x5105
movq %rbx, %rdi
callq 0x2360
leaq 0x26c3(%rip), %rsi      # 0x5111
leaq 0x479b(%rip), %rdx      # 0x71f0
leaq -0x50(%rbp), %rbx
movq %rbx, %rdi
callq 0x3c10
leaq 0x26c6(%rip), %rsi      # 0x512e
movq %rbx, %rdi
callq 0x2360
leaq -0x20(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x2a94
movq %rsi, -0x30(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x20(%rbp)
jmp 0x2a9e
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq %r14, %rsi
movq 0x8(%rax), %rdx
movq %rdx, -0x28(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x47b4(%rip), %rdi      # 0x7270
callq 0x20b0
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x2ad6
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x2200
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2aef
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2200
leaq 0x477a(%rip), %rbx      # 0x7270
leaq 0x261b(%rip), %rsi      # 0x5118
movq %rbx, %rdi
callq 0x2360
leaq 0x2622(%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 0x2b3a
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x2200
jmp 0x2b3a
movq %rax, %rbx
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b53
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O3/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 0x478b(%rip), %edi      # 0x72f0
leaq 0x478c(%rip), %rsi      # 0x72f8
movl $0x10, %edx
callq 0x21a0
testl %eax, %eax
jns 0x2b86
leaq 0x24a2(%rip), %rdi      # 0x5023
callq 0x4360
movl 0x4764(%rip), %edi      # 0x72f0
movq 0x46dd(%rip), %rsi      # 0x7270
movq 0x46de(%rip), %rdx      # 0x7278
xorl %ecx, %ecx
callq 0x2110
movslq 0x46d0(%rip), %rcx      # 0x7278
cmpq %rcx, %rax
jne 0x2baf
popq %rbp
retq
leaq 0x247e(%rip), %rdi      # 0x5034
popq %rbp
jmp 0x4360
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4716(%rip), %edi      # 0x72f0
movl $0xf4240, %edx          # imm = 0xF4240
movq %rax, %rsi
xorl %ecx, %ecx
callq 0x20c0
movq %rax, %r14
testl %r14d, %r14d
js 0x2bfc
cmpl $0xc7, %r14d
jbe 0x2c08
jmp 0x2c31
leaq 0x2467(%rip), %rdi      # 0x506a
callq 0x4360
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 0x4360
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_O3/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 0x3b0a(%rip), %rcx      # 0x7258
testq %rcx, %rcx
je 0x37bd
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 0x3ad9(%rip), %rsi      # 0x7250
movq %r12, %rdx
callq 0x2210
movq %rbx, %rdi
movq %r15, %rsi
callq 0x413c
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x37a3
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2200
addq $0x3dc, %r12            # imm = 0x3DC
movq 0x3aa7(%rip), %rcx      # 0x7258
addq $-0x3dc, %r13           # imm = 0xFC24
cmpq %rcx, %r12
jb 0x3763
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x37f0
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x37f0
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x3ac2
movq %r14, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3a19
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x3a59
movq (%r12), %rsi
incq %rsi
callq 0x2200
movq %r14, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2c42(%rip), %rcx      # 0x6fd8
movq (%rcx), %rdi
leaq 0xf59(%rip), %rsi       # 0x52f9
cmpl $0x1, %eax
je 0x43b2
testl %eax, %eax
jne 0x43bb
leaq 0xf53(%rip), %rdx       # 0x5303
jmp 0x43c2
leaq 0xf99(%rip), %rdx       # 0x5352
jmp 0x43c2
leaq 0x102e(%rip), %rdx      # 0x53f0
xorl %eax, %eax
callq 0x2290
movl $0x1, %edi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O3/juancalaca[P]dotsboxes/DotsEdge.cc
// Function: DotsEdge::Claim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int DotsEdge::Claim(string name)
{
	int claimedBoxes = 0;
	
	this->claimed = true;
	
	if (this->box1->NewlyClaimed())
	{
		cout << name << " claimed a box" << endl;
		this->box1->Claim(name);
		claimedBoxes++;
	}
	
	if (this->box2 != NULL && this->box2->NewlyClaimed())
	{
		cout << name << " claimed a box" << endl;
		this->box2->Claim(name);
		claimedBoxes++;
	}
	
	return claimedBoxes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movb $0x1, 0x10(%rdi)
movq (%rdi), %rdi
callq 0x277e
xorl %ebp, %ebp
testb %al, %al
je 0x24dd
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x5b80(%rip), %rdi      # 0x7fd0
callq 0x2150
movq %rax, %r15
leaq 0x2ba5(%rip), %rsi      # 0x5004
movl $0xe, %edx
movq %rax, %rdi
callq 0x2150
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq (%r14), %r15
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0x25cc
movq %r15, %rdi
movq %r12, %rsi
callq 0x274c
movq 0x28(%rsp), %rdi
movl $0x1, %ebp
cmpq %r13, %rdi
je 0x24dd
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x2590
callq 0x277e
testb %al, %al
je 0x2590
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x5acb(%rip), %rdi      # 0x7fd0
callq 0x2150
movq %rax, %r15
leaq 0x2af0(%rip), %rsi      # 0x5004
movl $0xe, %edx
movq %rax, %rdi
callq 0x2150
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x8(%r14), %r14
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x25cc
movq %r14, %rdi
movq %rbx, %rsi
callq 0x274c
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x258e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
incl %ebp
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
jmp 0x25b3
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x25c4
movq (%r13), %rsi
incq %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O3/juancalaca[P]dotsboxes/DotsBox.cc
// Function: DotsBox::DotsBox()
DotsBox::DotsBox()
{
	this->left = NULL;
	this->top = NULL;
	this->right = NULL;
	this->bottom = NULL;
	
	this->claimed = false;
	this->name = "  ";
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x28(%rdi), %rbx
leaq 0x38(%rdi), %r15
movq %r15, 0x28(%rdi)
movq $0x0, 0x30(%rdi)
xorl %eax, %eax
movb %al, 0x38(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movups %xmm0, 0x10(%rdi)
movb %al, 0x20(%rdi)
leaq 0x2a32(%rip), %rcx      # 0x50c8
movl $0x2, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21a0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x26c4
movq (%r15), %rsi
incq %rsi
callq 0x2140
movq %r14, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O3/juancalaca[P]dotsboxes/DotsBox.cc
// Function: DotsBox::~DotsBox()
DotsBox::~DotsBox() { 
	this->left = NULL;
	this->right = NULL;
	this->top = NULL;
	this->bottom = NULL;
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq 0x28(%rdi), %rax
addq $0x38, %rdi
cmpq %rdi, %rax
je 0x26f1
movq (%rdi), %rsi
incq %rsi
movq %rax, %rdi
jmp 0x2140
retq
// File: /workspace/github_cpp_makefile_star2_O3/juancalaca[P]dotsboxes/DotsBoard.cc
// Function: DotsBoard::ClaimEdge(int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int DotsBoard::ClaimEdge(int row, int column, int edge_num, string name)
{
	DotsEdge *edge = this->boxes[row][column]->GetEdge(edge_num);
	
	//if that edge is taken return -1
	if (edge->IsClaimed())
	{
		return -1;
	}
	
	int new_claimed =  edge->Claim(name);
	this->claimedBoxes += new_claimed;
	return new_claimed;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r8, %r14
movq %rdi, %rbx
movslq %esi, %rax
movq 0x10(%rdi), %rsi
leaq (%rax,%rax,2), %rax
movslq %edx, %rdx
movq (%rsi,%rax,8), %rax
movq (%rax,%rdx,8), %rdi
movl %ecx, %esi
callq 0x271e
movq %rax, %r15
movq %rax, %rdi
callq 0x2414
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %al, %al
jne 0x2b18
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rsp, %r14
movq %r14, %rdi
callq 0x25cc
movq %r15, %rdi
movq %r14, %rsi
callq 0x2418
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x2b15
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
addl %ebp, 0x8(%rbx)
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x2b40
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O3/juancalaca[P]dotsboxes/main.cc
// Function: ZedBoard::ZedBoard()
ZedBoard()
	{
		fd = open( "/dev/mem", O_RDWR);
		pBase = (char *) mmap(
				NULL,
				gpio_size,
				PROT_READ | PROT_WRITE,
				MAP_SHARED,
				fd,	
				gpio_address);

		//Check error
		if (pBase == MAP_FAILED)
		{
			cerr << "Mapping I/O memory failed - Did you run with 'sudo'?\n";
			exit(1); // Returns 1 to the operating system; 
		}

	}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x1100(%rip), %rdi      # 0x5243
movl $0x2, %esi
xorl %eax, %eax
callq 0x20d0
movl %eax, 0x8(%rbx)
movl $0xff, %esi
movl $0x400d0000, %r9d       # imm = 0x400D0000
xorl %edi, %edi
movl $0x3, %edx
movl $0x1, %ecx
movl %eax, %r8d
callq 0x21e0
movq %rax, (%rbx)
cmpq $-0x1, %rax
je 0x417c
popq %rbx
retq
movq 0x3e6d(%rip), %rdi      # 0x7ff0
leaq 0x10c2(%rip), %rsi      # 0x524c
callq 0x2120
movl $0x1, %edi
callq 0x2160
nop
// File: /workspace/github_cpp_makefile_star2_O3/LiGaCu[P]Distributed_System_to_Compute_the_Shortest_Path/serverC.cpp
// Function: Dijkstra(int, int, float*, int*, float (*) [11])
void Dijkstra(int node_num, int srcidx, float *dist, int *prev, float distans[maxnode_num][maxnode_num])
{
    bool s[maxnode_num];    
    for(int i=1; i<=node_num; ++i)
    {
        dist[i] = distans[srcidx][i];
        s[i] = 0;     
        if(dist[i] == inf_dis)
            prev[i] = 0;
        else
            prev[i] = srcidx;
    }
    dist[srcidx] = 0;
    s[srcidx] = 1;

    for(int i=2; i<=node_num; ++i)
    {
        int tmp = inf_dis;
        int u = srcidx;
        
        for(int j=1; j<=node_num; ++j)
            if((!s[j]) && dist[j]<tmp)
            {
                u = j;            
                tmp = dist[j];
            }
        s[u] = 1;    

        for(int j=1; j<=node_num; ++j)
            if((!s[j]) && distans[u][j]<inf_dis)
            {
                float newdist = dist[u] + distans[u][j];
                if(newdist < dist[j])
                {
                    dist[j] = newdist;
                    prev[j] = u;
                }
            }
    }

}

// Assembly:
movslq %esi, %r9
testl %edi, %edi
jle 0x319d
pushq %r14
pushq %rbx
leal 0x1(%rdi), %eax
imulq $0x2c, %r9, %r10
addq %r8, %r10
movl $0x1, %r11d
movss 0xf93(%rip), %xmm0      # 0x4050
movss (%r10,%r11,4), %xmm1
movss %xmm1, (%rdx,%r11,4)
ucomiss %xmm0, %xmm1
movl $0x0, %ebx
cmovnel %esi, %ebx
cmovpl %esi, %ebx
movb $0x0, -0xb(%rsp,%r11)
movl %ebx, (%rcx,%r11,4)
incq %r11
cmpq %r11, %rax
jne 0x30bd
movl $0x0, (%rdx,%r9,4)
movb $0x1, -0xb(%rsp,%r9)
cmpl $0x1, %edi
je 0x3199
movl $0x2, %r9d
movl $0x5f5e100, %ebx        # imm = 0x5F5E100
movl $0x1, %r11d
movl %esi, %r10d
cmpb $0x0, -0xb(%rsp,%r11)
jne 0x3135
xorps %xmm2, %xmm2
cvtsi2ss %ebx, %xmm2
movss (%rdx,%r11,4), %xmm1
ucomiss %xmm1, %xmm2
jbe 0x3135
cvttss2si %xmm1, %ebx
movl %r11d, %r10d
incq %r11
cmpq %r11, %rax
jne 0x3114
movslq %r10d, %r11
movb $0x1, -0xb(%rsp,%r11)
imulq $0x2c, %r11, %rbx
addq %r8, %rbx
movl $0x1, %r14d
cmpb $0x0, -0xb(%rsp,%r14)
jne 0x3181
movss (%rbx,%r14,4), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x3181
addss (%rdx,%r11,4), %xmm1
movss (%rdx,%r14,4), %xmm2
ucomiss %xmm1, %xmm2
jbe 0x3181
movss %xmm1, (%rdx,%r14,4)
movl %r10d, (%rcx,%r14,4)
incq %r14
cmpq %r14, %rax
jne 0x3153
leal 0x1(%r9), %r10d
cmpl %edi, %r9d
movl %r10d, %r9d
jne 0x3106
popq %rbx
popq %r14
retq
movl $0x0, (%rdx,%r9,4)
retq
// File: /workspace/github_cpp_makefile_star2_O3/LiGaCu[P]Distributed_System_to_Compute_the_Shortest_Path/serverC.cpp
// Function: recoverPath(int*, int, int, int*, int*)
void recoverPath(int *prev, int srcidx, int dstidx, int *indextable, int *path)
{
    int que[maxnode_num];
    int tot = 1;
    que[tot] = dstidx;
    tot++;
    int tmp = prev[dstidx];
    while(tmp != srcidx)
    {
        que[tot] = tmp;
        tot++;
        tmp = prev[tmp];
    }
    que[tot] = srcidx;
    int j = 0;
    for(int i=tot; i>=1; --i)
    {
        path[j] = indextable[que[i]];
        j++;
    }
    path[j]=2333;
}

// Assembly:
movl %edx, -0x34(%rsp)
movslq %edx, %rax
movl (%rdi,%rax,4), %edx
movl $0x2, %eax
cmpl %esi, %edx
je 0x31cf
movl $0x2, %eax
movl %edx, -0x38(%rsp,%rax,4)
incq %rax
movslq %edx, %rdx
movl (%rdi,%rdx,4), %edx
cmpl %esi, %edx
jne 0x31be
movl %eax, %edx
leaq (%rsp,%rdx,4), %rdx
addq $-0x38, %rdx
movl %esi, (%rdx)
cmpl $0x2, %eax
movl $0x1, %esi
cmovgel %eax, %esi
xorl %eax, %eax
movslq (%rdx), %rdi
movl (%rcx,%rdi,4), %edi
movl %edi, (%r8,%rax,4)
incq %rax
addq $-0x4, %rdx
cmpq %rax, %rsi
jne 0x31e8
movl $0x91d, (%r8,%rsi,4)    # imm = 0x91D
retq
// File: /workspace/github_cpp_makefile_star2_O3/macfergus[P]baduk/cppsrc/baduk/game.cpp
// Function: baduk::newGame(unsigned int, float)
std::shared_ptr<const GameState> newGame(unsigned int board_size, float komi) {
    return std::shared_ptr<const GameState>(
        std::make_shared<const GameStateImpl>(
            Board(board_size, board_size),
            Stone::black,
            komi
        )
    );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x5b58, %rsp           # imm = 0x5B58
movq %rdi, %rbx
leaq 0xc(%rsp), %r14
movss %xmm0, (%r14)
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movl %esi, %edx
callq 0xf75a
leaq 0x8(%rsp), %rcx
movl $0x0, (%rcx)
leaq 0x10(%rsp), %r12
leaq 0x7(%rsp), %rsi
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %r8
callq 0x3d52
movaps (%r12), %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x5b58, %rsp           # imm = 0x5B58
popq %rbx
popq %r12
popq %r14
popq %r15
retq