LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/mertyildiran[P]Plexus/plexus/wrapper.cpp
// Function: PyNetwork_init(PyNetwork*, _object*, _object*)
static int PyNetwork_init(PyNetwork *self, PyObject *args, PyObject *kwargs)
{
    int size;
    int input_dim = 0;
    int output_dim = 0;
    double connectivity = 0.01;
    int precision = 2;
    int randomly_fire = false;
    int dynamic_output = false;
    int visualization = false;
    double decay_factor =  1.0;

    static char *kwlist[] = {
        "size",
        "input_dim",
        "output_dim",
        "connectivity",
        "precision",
        "randomly_fire",
        "dynamic_output",
        "visualization",
        "decay_factor",
        NULL
    };

    if (! PyArg_ParseTupleAndKeywords(
        args,
        kwargs,
        "i|iidipppd",
        kwlist,
        &size,
        &input_dim,
        &output_dim,
        &connectivity,
        &precision,
        &randomly_fire,
        &dynamic_output,
        &visualization,
        &decay_factor
    ))
        return -1;

    self->ptrObj = new Network(
        size,
        input_dim,
        output_dim,
        connectivity,
        precision,
        randomly_fire,
        dynamic_output,
        visualization,
        decay_factor
    );

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, 0x30(%rsp)
xorl %eax, %eax
leaq 0x28(%rsp), %r9
movl %eax, (%r9)
leaq 0x24(%rsp), %r10
movl %eax, (%r10)
movabsq $0x3f847ae147ae147b, %rcx # imm = 0x3F847AE147AE147B
leaq 0x18(%rsp), %r11
movq %rcx, (%r11)
leaq 0x14(%rsp), %r14
movl $0x2, (%r14)
leaq 0x10(%rsp), %r15
movl %eax, (%r15)
leaq 0xc(%rsp), %r12
movl %eax, (%r12)
leaq 0x8(%rsp), %r13
movl %eax, (%r13)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rsp, %rbp
movq %rax, (%rbp)
subq $0x8, %rsp
leaq 0x23a0(%rip), %rax      # 0xca63
leaq 0x64e6(%rip), %rcx      # 0x10bb0
leaq 0x34(%rsp), %r8
movq %rsi, %rdi
movq %rdx, %rsi
movq %rax, %rdx
movl $0x0, %eax
pushq %rbp
pushq %r13
pushq %r12
pushq %r15
pushq %r14
pushq %r11
pushq %r10
callq 0x60f0
addq $0x40, %rsp
testl %eax, %eax
je 0xa759
movl $0x188, %edi            # imm = 0x188
callq 0x6270
movq %rax, %r14
movl 0x2c(%rsp), %esi
movl 0x28(%rsp), %edx
movl 0x24(%rsp), %ecx
movsd 0x18(%rsp), %xmm0
movl 0x14(%rsp), %r8d
xorl %r9d, %r9d
cmpl $0x0, 0x10(%rsp)
setne %r9b
xorl %eax, %eax
cmpl $0x0, 0xc(%rsp)
setne %al
xorl %r10d, %r10d
cmpl $0x0, 0x8(%rsp)
setne %r10b
movsd (%rsp), %xmm1
movq %r14, %rdi
pushq %r10
pushq %rax
callq 0x6b4e
addq $0x10, %rsp
movq %r14, 0x10(%rbx)
xorl %eax, %eax
jmp 0xa75e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %fs:0x28, %rcx
cmpq 0x30(%rsp), %rcx
jne 0xa7a5
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x188, %esi            # imm = 0x188
movq %r14, %rdi
callq 0x6280
movq %fs:0x28, %rax
cmpq 0x30(%rsp), %rax
jne 0xa7a5
movq %rbx, %rdi
callq 0x6440
callq 0x62a0
// File: /workspace/github_cpp_makefile_star2_O1/mertyildiran[P]Plexus/plexus/wrapper.cpp
// Function: PyNeuron_init(PyNeuron*, _object*)
static int PyNeuron_init(PyNeuron *self, PyObject *args)
{
    PyNetwork * network;

    if (! PyArg_ParseTuple(args, "O", &network))
        return -1;

    Py_XINCREF(network);

    self->ptrObj = new Neuron(*network->ptrObj);

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rax
movq %rdi, %rbx
movq %fs:0x28, %rcx
movq %rcx, 0x8(%rsp)
leaq 0x1d76(%rip), %rsi      # 0xc58c
movq %rsp, %rdx
movq %rax, %rdi
xorl %eax, %eax
callq 0x6380
testl %eax, %eax
je 0xa854
movq (%rsp), %r15
testq %r15, %r15
je 0xa833
incq (%r15)
movl $0xb0, %edi
callq 0x6270
movq %rax, %r14
movq 0x10(%r15), %rsi
movq %rax, %rdi
callq 0x665c
movq %r14, 0x10(%rbx)
xorl %eax, %eax
jmp 0xa859
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %fs:0x28, %rcx
cmpq 0x8(%rsp), %rcx
jne 0xa89b
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0xb0, %esi
movq %r14, %rdi
callq 0x6280
movq %fs:0x28, %rax
cmpq 0x8(%rsp), %rax
jne 0xa89b
movq %rbx, %rdi
callq 0x6440
callq 0x62a0
// File: /workspace/github_cpp_makefile_star2_O1/mertyildiran[P]Plexus/plexus/wrapper.cpp
// Function: main
int main(int argc, char *argv[])
{
    glob_argc = argc;
    glob_argv = argv;

    wchar_t *program = Py_DecodeLocale(argv[0], NULL);

    /* Pass argv[0] to the Python interpreter */
    Py_SetProgramName(program);

    /* Initialize the Python interpreter.  Required. */
    Py_Initialize();

    /* Add a static module */
    initcplexus();
}

// Assembly:
pushq %rax
movq 0x56c3(%rip), %rax      # 0xff70
movl %edi, (%rax)
movq 0x5712(%rip), %rax      # 0xffc8
movq %rsi, (%rax)
movq (%rsi), %rdi
xorl %esi, %esi
callq 0x6310
movq %rax, %rdi
callq 0x62e0
callq 0x6470
callq 0xa49c
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O1/mertyildiran[P]Plexus/plexus/wrapper.cpp
// Function: PyNetwork_get_output(PyNetwork*, void*)
static PyObject * PyNetwork_get_output(PyNetwork *self, void *closure)
{
    std::vector<double> output;

    output = (self->ptrObj)->get_output();

    PyObject *PList = PyList_New(0);

    for (const auto& i: output) {
        PyObject *value = Py_BuildValue("d", i);
        PyList_Append(PList, value);
        Py_XDECREF(value);
    }

    return PList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %fs:0x28, %rax
movq %rax, 0x30(%rsp)
movq 0x10(%rdi), %rsi
leaq 0x10(%rsp), %rdi
callq 0x7af0
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %rbp
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
xorl %edi, %edi
callq 0x6220
movq %rax, %r15
cmpq %rbp, %rbx
je 0xadab
leaq 0x17b5(%rip), %r12      # 0xc524
movq %rbx, %r14
movsd (%r14), %xmm0
movq %r12, %rdi
movb $0x1, %al
callq 0x61e0
movq %rax, %r13
movq %r15, %rdi
movq %rax, %rsi
callq 0x6140
testq %r13, %r13
je 0xada2
decq (%r13)
jne 0xada2
movq %r13, %rdi
callq 0x61d0
addq $0x8, %r14
cmpq %rbp, %r14
jne 0xad72
testq %rbx, %rbx
je 0xadc0
movq 0x8(%rsp), %rsi
subq %rbx, %rsi
movq %rbx, %rdi
callq 0x6280
movq %fs:0x28, %rax
cmpq 0x30(%rsp), %rax
jne 0xae24
movq %r15, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xadf4
movq %rax, %r15
movq $0x0, 0x8(%rsp)
xorl %ebx, %ebx
jmp 0xadf7
movq %rax, %r15
testq %rbx, %rbx
je 0xae0c
movq 0x8(%rsp), %rsi
subq %rbx, %rsi
movq %rbx, %rdi
callq 0x6280
movq %fs:0x28, %rax
cmpq 0x30(%rsp), %rax
jne 0xae24
movq %r15, %rdi
callq 0x6440
callq 0x62a0
// File: /workspace/github_cpp_makefile_star2_O1/mertyildiran[P]Plexus/plexus/wrapper.cpp
// Function: PyNetwork_neuron_PyList_builder(std::vector<Neuron*, std::allocator<Neuron*>>)
static PyObject * PyNetwork_neuron_PyList_builder(std::vector<Neuron*> neurons)
{
    PyObject *PList = PyList_New(0);
    Py_XINCREF(PList);

    for (Neuron* i: neurons) {
        PyNeuron * neuron = PyObject_New(PyNeuron, &PyNeuronType);
        neuron->ptrObj = i;
        PyList_Append(PList, Py_BuildValue("O", neuron));
    }
    return PList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %edi, %edi
callq 0x6220
movq %rax, %rbx
testq %rax, %rax
je 0xb373
incq (%rbx)
movq (%r14), %r12
movq 0x8(%r14), %r13
cmpq %r13, %r12
je 0xb3be
leaq 0x544a(%rip), %r14      # 0x107d0
leaq 0x11ff(%rip), %r15      # 0xc58c
movq (%r12), %rbp
movq %r14, %rdi
callq 0x6150
movq %rbp, 0x10(%rax)
movq %r15, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x61e0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6140
addq $0x8, %r12
cmpq %r13, %r12
jne 0xb38d
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mertyildiran[P]Plexus/plexus/wrapper.cpp
// Function: PyNeuron_set_index(PyNeuron*, _object*, void*)
static int PyNeuron_set_index(PyNeuron *self, PyObject *value, void *closue)
{
    if (value == NULL) {
        PyErr_SetString(
            PyExc_TypeError,
            "Cannot delete the position attribute"
        );
        return -1;
    }

    if (! PyLong_Check(value)) {
        PyErr_SetString(
            PyExc_TypeError,
            "The position attribute value must be an integer"
        );
        return -1;
    }

    self->ptrObj->index = PyLong_AsLong(value);

    return 0;
}

// Assembly:
pushq %rbx
testq %rsi, %rsi
je 0xb44e
movq 0x8(%rsi), %rax
testb $0x1, 0xab(%rax)
jne 0xb46b
movq 0x4b76(%rip), %rax      # 0xffb8
movq (%rax), %rdi
leaq 0x17d0(%rip), %rsi      # 0xcc1c
jmp 0xb45f
movq 0x4b63(%rip), %rax      # 0xffb8
movq (%rax), %rdi
leaq 0x1798(%rip), %rsi      # 0xcbf7
callq 0x62c0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xb480
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x6040
movq 0x10(%rbx), %rcx
movq %rax, 0x20(%rcx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/mertyildiran[P]Plexus/plexus/wrapper.cpp
// Function: PyNeuron_get_position(PyNeuron*, void*)
static PyObject * PyNeuron_get_position(PyNeuron *self, void *closure)
{
    PyObject *PList = PyList_New(0);
    Py_XINCREF(PList);
    PyList_Append(
        PList,
        Py_BuildValue(
            "i",
            std::get<0>(self->ptrObj->position)
        )
    );
    PyList_Append(
        PList,
        Py_BuildValue(
            "i",
            std::get<1>(self->ptrObj->position)
        )
    );
    return PyList_AsTuple(PList);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
xorl %edi, %edi
callq 0x6220
movq %rax, %rbx
testq %rax, %rax
je 0xb4e6
incq (%rbx)
movq 0x10(%r14), %rax
movl 0x18(%rax), %esi
leaq 0x1558(%rip), %r15      # 0xca4c
movq %r15, %rdi
xorl %eax, %eax
callq 0x61e0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6140
movq 0x10(%r14), %rax
movl 0x14(%rax), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x61e0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6140
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x60e0
// File: /workspace/github_cpp_makefile_star2_O1/mertyildiran[P]Plexus/plexus/wrapper.cpp
// Function: PyNeuron_set_position(PyNeuron*, _object*, void*)
static int PyNeuron_set_position(PyNeuron *self, PyObject *value, void *closue)
{
    if (value == NULL) {
        PyErr_SetString(
            PyExc_TypeError,
            "Cannot delete the position attribute"
        );
        return -1;
    }

    if (! PyTuple_Check(value)) {
        PyErr_SetString(
            PyExc_TypeError,
            "The position attribute value must be a tuple"
        );
        return -1;
    }

    PyObject *x = PyTuple_GetItem(value, 0);
    PyObject *y = PyTuple_GetItem(value, 1);

    if (! PyFloat_Check(x) || ! PyFloat_Check(y)) {
        PyErr_SetString(
            PyExc_TypeError,
            "The elements of position attribute must be float"
        );
        return -1;
    }

    std::get<0>(self->ptrObj->position) = PyFloat_AsDouble(x);
    std::get<1>(self->ptrObj->position) = PyFloat_AsDouble(y);

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0xb562
movq %rsi, %r14
movq 0x8(%rsi), %rax
testb $0x4, 0xab(%rax)
jne 0xb578
movq 0x4a65(%rip), %rax      # 0xffb8
movq (%rax), %rdi
leaq 0x16ef(%rip), %rsi      # 0xcc4c
jmp 0xb60d
movq 0x4a4f(%rip), %rax      # 0xffb8
movq (%rax), %rdi
leaq 0x1684(%rip), %rsi      # 0xcbf7
jmp 0xb60d
movq %rdi, %rbx
movq %r14, %rdi
xorl %esi, %esi
callq 0x6490
movq %rax, %r15
movl $0x1, %esi
movq %r14, %rdi
callq 0x6490
movq %rax, %r14
movq 0x8(%r15), %rdi
cmpq 0x4a2d(%rip), %rdi      # 0xffd0
je 0xb5b5
movq 0x4a24(%rip), %rsi      # 0xffd0
callq 0x6090
testl %eax, %eax
je 0xb5fc
movq 0x8(%r14), %rdi
cmpq 0x4a10(%rip), %rdi      # 0xffd0
je 0xb5d2
movq 0x4a07(%rip), %rsi      # 0xffd0
callq 0x6090
testl %eax, %eax
je 0xb5fc
movq %r15, %rdi
callq 0x61c0
cvttsd2si %xmm0, %eax
movq 0x10(%rbx), %rcx
movl %eax, 0x18(%rcx)
movq %r14, %rdi
callq 0x61c0
cvttsd2si %xmm0, %eax
movq 0x10(%rbx), %rcx
movl %eax, 0x14(%rcx)
xorl %eax, %eax
jmp 0xb617
movq 0x49b5(%rip), %rax      # 0xffb8
movq (%rax), %rdi
leaq 0x166c(%rip), %rsi      # 0xcc79
callq 0x62c0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/mertyildiran[P]Plexus/plexus/wrapper.cpp
// Function: PyNeuron_connections_PyDict_build(std::unordered_map<Neuron*, double, std::hash<Neuron*>, std::equal_to<Neuron*>, std::allocator<std::pair<Neuron* const, double>>>)
static PyObject * PyNeuron_connections_PyDict_build(
    std::unordered_map<Neuron*,
    double> connections
)
{
    PyObject *PDict = PyDict_New();
    Py_XINCREF(PDict);

    for (auto& it: connections) {
        PyNeuron * neuron = PyObject_New(PyNeuron, &PyNeuronType);
        neuron->ptrObj = it.first;
        PyDict_SetItem(
            PDict,
            Py_BuildValue("O", neuron),
            Py_BuildValue("d", it.second)
        );
    }
    return PDict;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x62b0
movq %rax, %rbx
testq %rax, %rax
je 0xb855
incq (%rbx)
movq 0x10(%r14), %rbp
testq %rbp, %rbp
je 0xb8b9
leaq 0x4f6b(%rip), %r14      # 0x107d0
leaq 0xd20(%rip), %r15       # 0xc58c
leaq 0xcb1(%rip), %r12       # 0xc524
movq %r14, %rdi
callq 0x6150
movq 0x8(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq %r15, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x61e0
movq %rax, %r13
movsd 0x10(%rbp), %xmm0
movq %r12, %rdi
movb $0x1, %al
callq 0x61e0
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x60b0
movq (%rbp), %rbp
testq %rbp, %rbp
jne 0xb873
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Funcke[P]cpp_server/lib/http_request_lifecycle.cpp
// Function: http::HttpRequestLifecycle::HttpRequestLifecycle(int)
HttpRequestLifecycle::HttpRequestLifecycle(int socket) {
        this->socket = socket;
        this->request.first_line(this->read_line());
        printf("%s\n", this->request.protocol.c_str());
        while(true) {
            std::string* raw_header = this->read_line();
            if(raw_header->length() == 1)
                break;
            this->request.add_header_from_string(raw_header);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x55f4(%rip), %rax      # 0x7d38
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb %al, 0x18(%rdi)
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movb %al, 0x38(%rdi)
leaq 0x58(%rdi), %rcx
movq %rcx, 0x48(%rdi)
movq %rax, 0x50(%rdi)
movb %al, 0x58(%rdi)
leaq 0x70(%rdi), %rcx
movl %eax, 0x70(%rdi)
movq %rax, 0x78(%rdi)
movq %rcx, 0x80(%rdi)
movq %rcx, 0x88(%rdi)
movq %rax, 0x90(%rdi)
leaq 0xa0(%rdi), %rcx
movl %eax, 0xa0(%rdi)
movq %rax, 0xa8(%rdi)
movq %rcx, 0xb0(%rdi)
movq %rcx, 0xb8(%rdi)
movq %rax, 0xc0(%rdi)
movl %esi, 0xc8(%rdi)
callq 0x2826
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2a04
movq 0x48(%r14), %rdi
callq 0x22d0
movq %r14, %rdi
callq 0x2826
movq 0x8(%rax), %r15
cmpq $0x1, %r15
je 0x2805
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2b68
cmpq $0x1, %r15
jne 0x27e2
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2812
movq %rax, %r14
movq %rbx, %rdi
callq 0x28d4
movq %r14, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O1/Funcke[P]cpp_server/lib/http_request_lifecycle.cpp
// Function: http::HttpRequestLifecycle::read_line[abi:cxx11]()
std::string* HttpRequestLifecycle::read_line() {
        std::string* line = new std::string();
        char next;
        do{
        read(this->socket, &next, 1); 
        if(next != '\n')
            *line += next;
        }while(next != '\n');
        return line;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x20, %edi
callq 0x21e0
movq %rax, %r14
addq $0x10, %rax
movq %rax, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
movl 0xc8(%rbx), %edi
leaq -0x19(%rbp), %r15
movl $0x1, %edx
movq %r15, %rsi
callq 0x2290
movb (%r15), %al
cmpb $0xa, %al
je 0x2895
movsbl %al, %esi
movq %r14, %rdi
callq 0x21a0
movl 0xc8(%rbx), %edi
movl $0x1, %edx
movq %r15, %rsi
callq 0x2290
movb -0x19(%rbp), %al
jmp 0x286e
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Funcke[P]cpp_server/lib/request.cpp
// Function: http::Request::first_line(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
void Request::first_line(std::string* first) {
        std::istringstream iss(*first);
        std::vector<std::string> results(std::istream_iterator<std::string>{iss},std::istream_iterator<std::string>());
        this->method = results[0];
        this->path = results[1];
        this->protocol = results[2];                   
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdi, %rbx
leaq -0x210(%rbp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x2300
leaq -0x90(%rbp), %rdi
movq %r14, %rsi
callq 0x2e8c
xorl %eax, %eax
leaq -0x48(%rbp), %r14
movq %rax, -0x18(%r14)
movq %r14, -0x10(%r14)
movq %rax, -0x8(%r14)
movb %al, (%r14)
movb %al, 0x10(%r14)
leaq -0x30(%rbp), %rdi
leaq -0x90(%rbp), %rsi
leaq -0x60(%rbp), %rdx
leaq -0x11(%rbp), %rcx
callq 0x2ee4
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x2a7e
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2200
leaq -0x78(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a97
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2200
movq -0x30(%rbp), %rsi
leaq 0x20(%rbx), %rdi
callq 0x2120
movq -0x30(%rbp), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x2120
movq -0x30(%rbp), %rsi
addq $0x40, %rsi
addq $0x40, %rbx
movq %rbx, %rdi
callq 0x2120
leaq -0x30(%rbp), %rdi
callq 0x2ffa
movq 0x54f0(%rip), %rsi      # 0x7fc8
leaq -0x210(%rbp), %rdi
callq 0x2280
leaq -0x198(%rbp), %rdi
callq 0x20d0
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x2b14
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2200
leaq -0x78(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b40
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2200
jmp 0x2b40
movq %rax, %rbx
jmp 0x2b40
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x2ffa
movq 0x5481(%rip), %rsi      # 0x7fc8
leaq -0x210(%rbp), %rdi
callq 0x2280
leaq -0x198(%rbp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O1/Funcke[P]cpp_server/lib/request.cpp
// Function: http::Request::add_header_from_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
void Request::add_header_from_string(std::string* raw_header) {
        const std::string delimiter(": ");
        int split_pos = raw_header->find(delimiter);
        std::string key = raw_header->substr(0, split_pos);
        std::string value = raw_header->substr(split_pos + 2, raw_header->size());
        if(key == "Cookie")
            this->add_cookie(&value);
        else
            this->add_header(&key, &value);
        std::cout << key << std::endl;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x70(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x24d2(%rip), %rsi      # 0x505f
leaq 0x24cd(%rip), %rdx      # 0x5061
leaq -0x80(%rbp), %r15
movq %r15, %rdi
callq 0x2694
movq (%r15), %rsi
movq 0x8(%r15), %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x2320
movq %rax, %r15
movslq %r15d, %rcx
leaq -0x40(%rbp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2210
shlq $0x20, %r15
movabsq $0x200000000, %rdx      # imm = 0x200000000
addq %r15, %rdx
sarq $0x20, %rdx
movq 0x8(%r14), %rcx
leaq -0x60(%rbp), %rdi
movq %r14, %rsi
callq 0x2210
leaq 0x2471(%rip), %rsi      # 0x5062
leaq -0x40(%rbp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x2c1c
addq $0x60, %rbx
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x3064
leaq -0x60(%rbp), %rsi
movq %rax, %rdi
callq 0x2120
jmp 0x2c28
leaq -0x60(%rbp), %rsi
movq %rbx, %rdi
callq 0x2d16
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq 0x5399(%rip), %rdi      # 0x7fd0
callq 0x2250
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2c7f
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2200
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2c98
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2200
movq -0x80(%rbp), %rdi
cmpq %r12, %rdi
je 0x2cad
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x2200
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2ce0
movq %rax, %rbx
jmp 0x2cf9
movq %rax, %rbx
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2ce0
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2200
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2cf9
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2200
movq -0x80(%rbp), %rdi
cmpq %r12, %rdi
je 0x2d0e
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O1/Funcke[P]cpp_server/lib/request.cpp
// Function: http::Request::add_cookie(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
void Request::add_cookie(std::string* cookie) {
        const std::string delimiter("=");
        int split_pos = cookie->find(delimiter);
        const std::string key = cookie->substr(0, split_pos);
        const std::string value = cookie->substr(split_pos + 1, cookie->size());
        this->cookies[key] = value;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x70(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x232e(%rip), %rsi      # 0x5069
leaq 0x2328(%rip), %rdx      # 0x506a
leaq -0x80(%rbp), %r15
movq %r15, %rdi
callq 0x2694
movq (%r15), %rsi
movq 0x8(%r15), %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x2320
movq %rax, %r15
movslq %r15d, %rcx
leaq -0x60(%rbp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2210
shlq $0x20, %r15
movabsq $0x100000000, %rdx      # imm = 0x100000000
addq %r15, %rdx
sarq $0x20, %rdx
movq 0x8(%r14), %rcx
leaq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x2210
addq $0x90, %rbx
leaq -0x60(%rbp), %rsi
movq %rbx, %rdi
callq 0x3064
leaq -0x40(%rbp), %rsi
movq %rax, %rdi
callq 0x2120
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2dd0
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2200
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2de9
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2200
movq -0x80(%rbp), %rdi
cmpq %r12, %rdi
je 0x2dfe
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x2200
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2e31
movq %rax, %rbx
jmp 0x2e4a
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e31
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2200
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e4a
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2200
movq -0x80(%rbp), %rdi
cmpq %r12, %rdi
je 0x2e5f
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O1/Funcke[P]cpp_server/lib/server.cpp
// Function: http::Server::Server(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Server::Server(int port, std::string host) {
        this->network_access.sin_port = htons(port);
        this->network_access.sin_addr.s_addr = inet_addr(host.c_str());
        this->network_access.sin_family = AF_INET;
        this->threadpool = new Threadpool(120);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
rolw $0x8, %si
movw %si, 0xe(%rdi)
movq (%rdx), %rdi
callq 0x21f0
movl %eax, 0x10(%rbx)
movw $0x2, 0xc(%rbx)
movl $0xd0, %edi
callq 0x21e0
movq %rax, %r14
movq %rax, %rdi
movl $0x78, %esi
callq 0x3a34
movq %r14, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movl $0xd0, %esi
movq %r14, %rdi
callq 0x2200
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O1/Funcke[P]cpp_server/lib/server.cpp
// Function: http::Server::connect_to_network()
void Server::connect_to_network() {
        //memset(&this->network_access, 0, sizeof(this->network_access));
        this->network_socket = socket( AF_INET, SOCK_STREAM, 0 );
        
        if(bind(this->network_socket, (struct sockaddr*)&this->network_access, sizeof(this->network_access)) > 0) {
            this->abort(-1, "Could not bind server to socket!\n");
        }

        if(listen(this->network_socket, 100) < 0) {
            this->abort(-2, "Connection queue overrun!\n");
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2080
movl %eax, 0x8(%rbx)
leaq 0xc(%rbx), %rsi
movl %eax, %edi
movl $0x10, %edx
callq 0x2060
testl %eax, %eax
jg 0x398a
movl 0x8(%rbx), %edi
movl $0x64, %esi
callq 0x2240
testl %eax, %eax
js 0x3995
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
leaq -0x48(%rbp), %rdi
callq 0x23ab
jmp 0x3972
leaq -0x28(%rbp), %rdi
callq 0x23f9
jmp 0x3983
// File: /workspace/github_cpp_makefile_star2_O1/Funcke[P]cpp_server/lib/server.cpp
// Function: http::Server::wait_for_requests()
void Server::wait_for_requests() {
        socklen_t len;
        len = sizeof(this->network_access);
        int connection = accept(this->network_socket, (struct sockaddr*)&this->network_access, &len);
        if(connection < 0) {
            this->abort(-3, "Client could not connect\n");
        }
        HttpRequestLifecycle* lc = new HttpRequestLifecycle(connection);
        this->threadpool->add_job(lc);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq -0x1c(%rbp), %rdx
movl $0x10, (%rdx)
movl 0x8(%rdi), %edi
leaq 0xc(%rbx), %rsi
callq 0x20c0
movl %eax, %r14d
testl %eax, %eax
js 0x3a0f
movl $0xd0, %edi
callq 0x21e0
movq %rax, %r15
movq %rax, %rdi
movl %r14d, %esi
callq 0x2730
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x3cee
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq -0x40(%rbp), %rdi
callq 0x2447
jmp 0x39e1
movq %rax, %rbx
movl $0xd0, %esi
movq %r15, %rdi
callq 0x2200
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O1/Funcke[P]cpp_server/lib/threadpool.cpp
// Function: Threadpool::Threadpool(int)
Threadpool::Threadpool(int size) {
    this->size = size;
    this->terminated = false;
    for(int i = 0; i < size; i++) {
        this->pool.push_back(std::thread(&Threadpool::worker_loop, this));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, %r15d
movq %rdi, %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq $0x0, 0x20(%rdi)
addq $0x28, %rdi
movq %rdi, -0x40(%rbp)
callq 0x2270
leaq 0x58(%r12), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x98(%r12)
movups %xmm0, 0x88(%r12)
movups %xmm0, 0x78(%r12)
movups %xmm0, 0x68(%r12)
movups %xmm0, 0x58(%r12)
movq %rdi, -0x38(%rbp)
xorl %esi, %esi
callq 0x3f0c
xorps %xmm0, %xmm0
movups %xmm0, 0xb0(%r12)
movq $0x0, 0xc0(%r12)
movl %r15d, 0xa8(%r12)
movb $0x0, 0xc8(%r12)
testl %r15d, %r15d
jle 0x3b1c
leaq 0xb0(%r12), %r13
leaq -0x30(%rbp), %rbx
leaq -0x48(%rbp), %r14
leaq 0x7e(%rip), %rax        # 0x3b64
movq %rax, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movq %r12, -0x48(%rbp)
movq %rbx, %rdi
leaq -0x58(%rbp), %rsi
movq %r14, %rdx
callq 0x3d96
movq %r13, %rdi
movq %rbx, %rsi
callq 0x40da
cmpq $0x0, -0x30(%rbp)
jne 0x3b5e
decl %r15d
jne 0x3adf
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x3b4d
jmp 0x3b39
cmpq $0x0, -0x30(%rbp)
jne 0x3b5e
movq %rax, %rbx
movq %r13, %rdi
callq 0x3e28
movq -0x38(%rbp), %rdi
callq 0x3eb2
movq -0x40(%rbp), %rdi
callq 0x2350
movq %rbx, %rdi
callq 0x2330
callq 0x2090
nop
// File: /workspace/github_cpp_makefile_star2_O1/Funcke[P]cpp_server/lib/threadpool.cpp
// Function: Threadpool::worker_loop()
void Threadpool::worker_loop() {
    while(1) {
        {
            Job* j;
            std::unique_lock<std::mutex> lock(this->job_mutex);
            this->condition.wait(lock, [this]{ return (this->job_queue.size() != 0 || this->terminated);});
            j = std::move(this->job_queue.front());
            this->job_queue.pop();
            printf("Job read\n");
            lock.unlock();
            j->run();
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x28(%rdi), %r14
leaq 0x58(%rdi), %r15
leaq -0x38(%rbp), %r12
movq %rbx, -0x38(%rbp)
movb $0x0, -0x30(%rbp)
movq %r12, %rdi
callq 0x4280
movb $0x1, -0x30(%rbp)
movq 0xa0(%rbx), %rax
movq %rax, %rcx
subq 0x80(%rbx), %rcx
shrq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
shlq $0x6, %rcx
movq 0x78(%rbx), %rax
movq 0x88(%rbx), %rdx
subq 0x90(%rbx), %rdx
sarq $0x3, %rdx
addq %rcx, %rdx
subq 0x68(%rbx), %rax
sarq $0x3, %rax
addq %rdx, %rax
jne 0x3bf5
cmpb $0x0, 0xc8(%rbx)
jne 0x3bf5
movq %r14, %rdi
movq %r12, %rsi
callq 0x20b0
jmp 0x3b98
movq 0x68(%rbx), %rax
movq (%rax), %r13
movq %r15, %rdi
callq 0x44d8
leaq 0x1560(%rip), %rdi      # 0x516b
callq 0x22d0
movq %r12, %rdi
callq 0x3e66
movq (%r13), %rax
movq %r13, %rdi
callq *(%rax)
movq %r12, %rdi
callq 0x3e98
jmp 0x3b84
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x3e98
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O1/Funcke[P]cpp_server/lib/threadpool.cpp
// Function: Threadpool::~Threadpool()
Threadpool::~Threadpool() {
    delete(&(this->job_mutex));
    delete(&(this->condition));
    delete(&(this->job_queue));
    delete(&(this->size));
    delete(&(this->pool));
    delete(&(this->terminated));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movl $0x28, %esi
callq 0x2200
leaq 0x28(%r14), %rbx
movq %rbx, %rdi
callq 0x2350
movl $0x30, %esi
movq %rbx, %rdi
callq 0x2200
leaq 0x58(%r14), %r15
movq %r15, %rdi
callq 0x3eb2
movl $0x50, %esi
movq %r15, %rdi
callq 0x2200
leaq 0xa8(%r14), %rdi
movl $0x4, %esi
callq 0x2200
leaq 0xb0(%r14), %r12
movq %r12, %rdi
callq 0x3e28
movl $0x18, %esi
movq %r12, %rdi
callq 0x2200
addq $0xc8, %r14
movl $0x1, %esi
movq %r14, %rdi
callq 0x2200
movq %r12, %rdi
callq 0x3e28
movq %r15, %rdi
callq 0x3eb2
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2350
nop
// File: /workspace/github_cpp_makefile_star2_O1/Funcke[P]cpp_server/lib/threadpool.cpp
// Function: Threadpool::add_job(Job*)
void Threadpool::add_job(Job* j) {
    std::unique_lock<std::mutex> lock(this->job_mutex);
    this->job_queue.push(j);
    printf("Job added\n");
    lock.unlock();
    this->condition.notify_all();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq %rsi, -0x18(%rbp)
leaq -0x28(%rbp), %r14
movq %rdi, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0x4280
movb $0x1, 0x8(%r14)
movq 0x88(%rbx), %rax
movq 0x98(%rbx), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x3d41
movq -0x18(%rbp), %rcx
movq %rcx, (%rax)
addq $0x8, 0x88(%rbx)
jmp 0x3d4e
leaq 0x58(%rbx), %rdi
leaq -0x18(%rbp), %rsi
callq 0x42c6
leaq 0x141f(%rip), %rdi      # 0x5174
callq 0x22d0
leaq -0x28(%rbp), %rdi
callq 0x3e66
addq $0x28, %rbx
movq %rbx, %rdi
callq 0x2310
leaq -0x28(%rbp), %rdi
callq 0x3e98
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x3e98
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O1/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/main.cpp
// Function: main
int main()
{
  Cart newCart;
  vector<Video> videoList;  //creates an empty vector of Videos called videoList to store movie data from file
    
  if(!importMovieDataFromFile(videoList))  //read in data from CSV
    return 1;  //if the file can't be opened, immediately end the program;

  mainMenu(newCart, videoList);

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
leaq -0x48(%rbp), %rdi
callq 0x6e64
xorps %xmm0, %xmm0
leaq -0x20(%rbp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
callq 0x25bc
movl $0x1, %ebx
testb %al, %al
je 0x24cd
xorl %ebx, %ebx
leaq -0x48(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x34a8
leaq -0x20(%rbp), %rdi
callq 0x2506
leaq -0x38(%rbp), %rdi
callq 0x2506
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x20(%rbp), %rdi
callq 0x2506
leaq -0x38(%rbp), %rdi
callq 0x2506
movq %rbx, %rdi
callq 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O1/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: systemPause()
void systemPause()
{
	cin.clear();
	std::cin.ignore(1024, '\n');	// Discart old input
	std::cout << "Press enter to continue...";
	std::cin.get();			// Proceed after new input from user
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x84c6(%rip), %rbx      # 0xafe0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
xorl %esi, %esi
callq 0x2200
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movl $0xa, %edx
callq 0x20d0
movq 0x848c(%rip), %rdi      # 0xafd0
leaq 0x5524(%rip), %rsi      # 0x806f
movl $0x1a, %edx
callq 0x2180
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2190
// File: /workspace/github_cpp_makefile_star2_O1/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: mainMenu(Cart&, std::vector<Video, std::allocator<Video>>&)
void mainMenu(Cart& newCart, vector<Video> &videoList)
{
	int choiceMain;						//Variable to hold user's menu choice
	do //If choiceMain == 0, the program terminates
	{
		displayMainMenu();  //Display main menu
   		cin >> choiceMain;  //Get user's choice
    		validateMainMenuChoice(choiceMain); //Make sure user enter valid choice
    		mainMenuSwitch(choiceMain, newCart, videoList); //Conduct menu navigation
	}
  	while (choiceMain != 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x7b1c(%rip), %r15      # 0xafe0
leaq -0x24(%rbp), %r12
callq 0x3501
movq %r15, %rdi
movq %r12, %rsi
callq 0x20c0
movq %r12, %rdi
callq 0x3775
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x381a
cmpl $0x0, -0x24(%rbp)
jne 0x34c8
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: validateMainMenuChoice(int&)
void validateMainMenuChoice(int &choiceMain)
{
	//While the user input is not of the "int" datatype,
	//or the user input is larger than 6 or smaller than 1
	while (!cin || choiceMain > 6 || choiceMain < 1)
	{
		cin.clear();	//Clear bad input flag
		cin.ignore(10000, '\n');	//Discard input
		cout << "Please enter a number between 1 and 6" << endl;
		cin >> choiceMain;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x7856(%rip), %r14      # 0xafe0
movq 0x783f(%rip), %r15      # 0xafd0
leaq 0x4bed(%rip), %r12      # 0x8385
movq (%r14), %rax
movq -0x18(%rax), %rdi
testb $0x5, 0x20(%r14,%rdi)
jne 0x37b1
movl (%rbx), %eax
addl $-0x7, %eax
cmpl $-0x7, %eax
ja 0x3811
addq %r14, %rdi
xorl %esi, %esi
callq 0x2200
movl $0x2710, %esi           # imm = 0x2710
movq %r14, %rdi
movl $0xa, %edx
callq 0x20d0
movl $0x25, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2180
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20c0
jmp 0x3798
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: mainMenuSwitch(int&, Cart&, std::vector<Video, std::allocator<Video>>&)
void mainMenuSwitch(int &choiceMain, Cart& newCart, vector<Video> &videoList)
{
	switch (choiceMain) 
	{
		case 1: titleSearchMain(newCart, videoList);
			break;
		case 2: genreSearchMain(newCart, videoList);
			break;
		case 3: directorSearchMain(newCart, videoList);
			break;
		case 4: moviesInCartMain(newCart);
			break;
		case 5: displayPrice(newCart);
			break;
		case 6: checkOutMain(newCart, choiceMain);
			break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movl (%rdi), %eax
decl %eax
cmpl $0x5, %eax
ja 0x38db
leaq 0x47cb(%rip), %rcx      # 0x8004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rsi, %rdi
movq %rdx, %rsi
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x38f9
movups (%rsi), %xmm0
leaq -0x60(%rbp), %rbx
movaps %xmm0, -0x10(%rbx)
addq $0x10, %rsi
movq %rbx, %rdi
callq 0x58be
leaq -0x70(%rbp), %rdi
callq 0x45fe
jmp 0x38d3
movq %rsi, %rdi
movq %rdx, %rsi
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x4046
movq %rsi, %rdi
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x4423
movq %rsi, %rdi
movq %rdx, %rsi
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x3c5a
movq %rdi, %r14
movups (%rsi), %xmm0
leaq -0x30(%rbp), %rbx
movaps %xmm0, -0x10(%rbx)
addq $0x10, %rsi
movq %rbx, %rdi
callq 0x58be
leaq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x46b6
movq %rbx, %rdi
callq 0x2506
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x38e6
movq %rax, %r14
movq %rbx, %rdi
callq 0x2506
movq %r14, %rdi
callq 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: displayPrice(Cart)
void displayPrice(Cart newCart)
{
	cout << endl << "Current price of the movies in your cart: \n$" << 
	std::fixed << std::setprecision(2) << newCart.getTPrice() << endl;
	systemPause();	//Waits for user input
			//before returning to main menu
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x69c1(%rip), %r14      # 0xafd0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq %rax, %r14
leaq 0x4103(%rip), %rsi      # 0x8743
movl $0x2c, %edx
movq %rax, %rdi
callq 0x2180
movq (%r14), %rax
movq -0x18(%rax), %rcx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl 0x18(%r14,%rcx), %edx
orl $0x4, %edx
movl %edx, 0x18(%r14,%rcx)
movq -0x18(%rax), %rax
movq $0x2, 0x8(%r14,%rax)
movq %rbx, %rdi
callq 0x6ea4
movq %r14, %rdi
callq 0x21e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
popq %rbx
popq %r14
popq %rbp
jmp 0x2b0d
// File: /workspace/github_cpp_makefile_star2_O1/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: checkOutMain(Cart, int&)
void checkOutMain(Cart newCart, int &choiceMain)
{	
	char readyCheckOut;
	std::cout << "Ready to check out? (Y/N)" << endl;
	std::cin >> readyCheckOut;

	while (!cin || (toupper(readyCheckOut) != 'Y' && toupper(readyCheckOut) != 'N'))
	{
		std::cout << "Please enter 'Y' to proceed to check out, "<<
			"or enter 'N' to return to the main menu." << endl;
		std::cin >> readyCheckOut;
	}
	if (toupper(readyCheckOut) == 'N')
	{
		std::cout << "Returning to main menu..." << endl;
	}
	else if (toupper(readyCheckOut) == 'Y')
	{  //if user wants to check out,
		displayCheckOut(newCart);	//normal check out stuff happens,
		choiceMain = 0; //sets choiceMain = 0; sending termination
	}                 	//signal to mainMenu() to exit while loop                
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, -0x38(%rbp)
movq %rdi, -0x40(%rbp)
movq 0x68fa(%rip), %r14      # 0xafd0
leaq 0x4093(%rip), %rsi      # 0x8770
movl $0x19, %edx
movq %r14, %rdi
callq 0x2180
movq 0x68ef(%rip), %r12      # 0xafe0
leaq -0x29(%rbp), %r13
leaq 0x408e(%rip), %rbx      # 0x878a
leaq 0x40b2(%rip), %r15      # 0x87b5
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq %r12, %rdi
movq %r13, %rsi
callq 0x21a0
movq (%r12), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r12,%rax)
jne 0x4758
movsbl -0x29(%rbp), %edi
callq 0x2260
cmpl $0x4e, %eax
je 0x47b2
cmpl $0x59, %eax
je 0x477a
movl $0x2a, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2180
movl $0x28, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2180
jmp 0x4703
movq -0x40(%rbp), %rsi
movups (%rsi), %xmm0
leaq -0x60(%rbp), %rbx
movaps %xmm0, -0x10(%rbx)
addq $0x10, %rsi
movq %rbx, %rdi
callq 0x58be
leaq -0x70(%rbp), %rdi
callq 0x5512
movq %rbx, %rdi
callq 0x2506
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
jmp 0x47ed
leaq 0x4025(%rip), %rsi      # 0x87de
movl $0x19, %edx
movq %r14, %rdi
callq 0x2180
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2506
movq %r14, %rdi
callq 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: validateGenreMenuChoice(int&)
void validateGenreMenuChoice(int &choiceGenre)
{
	while (!cin || choiceGenre > 7 || choiceGenre < 0)
	{
		cin.clear();
		cin.ignore(10000, '\n');
		cout << "Please enter a choice between 0 and 7" << endl;
		cin >> choiceGenre;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x6289(%rip), %r14      # 0xafe0
movq (%r14), %rax
movq -0x18(%rax), %rdi
testb $0x5, 0x20(%r14,%rdi)
jne 0x4d6f
cmpl $0x8, (%rbx)
jb 0x4df3
addq %r14, %rdi
movq 0x6257(%rip), %r15      # 0xafd0
leaq 0x37c0(%rip), %r12      # 0x8540
xorl %esi, %esi
callq 0x2200
movl $0x2710, %esi           # imm = 0x2710
movq %r14, %rdi
movl $0xa, %edx
callq 0x20d0
movl $0x25, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2180
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20c0
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
testb $0x5, 0x20(%r14,%rax)
jne 0x4d80
cmpl $0x7, (%rbx)
ja 0x4d80
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: genreSearchVector(std::vector<Video, std::allocator<Video>> const&, std::vector<Video, std::allocator<Video>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void genreSearchVector(const vector<Video>& videos, vector<Video>& results, string genreIn)  
//takes a const vector of movies to search, a vector of videos to add results to, and a search term.
{
    Video temp;  //creates a temporary video to hold values as we process vector
    int index = 0;
    int size = videos.size();
    while(index < size)
    {
       	temp = videos[index];  //set temp equal to the video at [index]
       	if(temp.getGenre() == genreIn)
    		results.push_back(videos[index]);  //if video is found, add it to results
       	index++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdx, %rbx
movq %rsi, -0x30(%rbp)
movq %rdi, %r15
leaq -0xe8(%rbp), %rdi
callq 0x656c
movq 0x8(%r15), %rax
subq (%r15), %rax
sarq $0x3, %rax
movabsq $-0x79435e50d79435e5, %r12 # imm = 0x86BCA1AF286BCA1B
imulq %rax, %r12
testl %r12d, %r12d
jle 0x4f2d
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r14d, %r14d
movq (%r15), %r13
leaq (%r14,%r13), %rsi
leaq -0xe8(%rbp), %rdi
callq 0x20b0
leaq (%r14,%r13), %rsi
addq $0x20, %rsi
leaq -0xc8(%rbp), %rdi
callq 0x20b0
leaq (%r14,%r13), %rsi
addq $0x40, %rsi
leaq -0xa8(%rbp), %rdi
callq 0x20b0
leaq (%r14,%r13), %rsi
addq $0x60, %rsi
leaq -0x88(%rbp), %rdi
callq 0x20b0
leaq (%r14,%r13), %rsi
addq $0x80, %rsi
leaq -0x68(%rbp), %rdi
callq 0x5aae
leaq -0x50(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x684e
movq -0x48(%rbp), %rdx
cmpq 0x8(%rbx), %rdx
jne 0x4ee8
testq %rdx, %rdx
je 0x4eed
movq (%rbx), %rsi
movq -0x50(%rbp), %rdi
callq 0x2170
testl %eax, %eax
sete %r13b
jmp 0x4ef0
xorl %r13d, %r13d
jmp 0x4ef0
movb $0x1, %r13b
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x4f09
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
testb %r13b, %r13b
je 0x4f1d
movq (%r15), %rsi
addq %r14, %rsi
movq -0x30(%rbp), %rdi
callq 0x5880
addq $0x98, %r14
decq %r12
jne 0x4e52
leaq -0x68(%rbp), %rbx
movq %rbx, %rdi
callq 0x2506
movq -0x20(%rbx), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x4f52
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2160
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4f71
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x2160
leaq -0xb8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4f90
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2160
leaq -0xd8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4faf
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x2160
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4fc3
movq %rax, %rbx
leaq -0xe8(%rbp), %rdi
callq 0x56c6
movq %rbx, %rdi
callq 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: displayDirectorSearchMenu()
void displayDirectorSearchMenu()
{
	clearScreen();	//Clear screen before displaying menu
	cout << "Search movies by: Director\n" << endl;
	cout << "Enter the full name of a director,\n"
		<< "or type '0' to return to the main menu." << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x5fe9(%rip), %rbx      # 0xafd0
leaq 0x3076(%rip), %rsi      # 0x8064
movl $0xa, %edx
movq %rbx, %rdi
callq 0x2180
leaq 0x35a3(%rip), %rsi      # 0x85a5
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x2180
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
leaq 0x3584(%rip), %rsi      # 0x85c1
movl $0x23, %edx
movq %rbx, %rdi
callq 0x2180
leaq 0x3594(%rip), %rsi      # 0x85e5
movl $0x27, %edx
movq %rbx, %rdi
callq 0x2180
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x20f0