LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/StringTools.cpp
// Function: StringTools::readlines(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
vstring StringTools::readlines(std::string filename)
{
    vstring lines;
    std::string line;
    std::ifstream file(filename.c_str());

    if (!file)
    {
        return lines;
    }

    while (getline(file, line))
    {
        lines.add(line);
    }
    file.close();
    return lines;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rsi, %r14
movq %rdi, %rbx
movl $0x80, %esi
callq 0x7748
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movq (%r14), %rsi
leaq -0x270(%rbp), %rdi
movl $0x8, %edx
callq 0x3460
movq -0x270(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x250(%rbp,%rax)
jne 0x70b0
leaq -0x58(%rbp), %r13
leaq -0x270(%rbp), %r14
leaq -0x48(%rbp), %r15
leaq -0x68(%rbp), %r12
leaq (%rax,%rbp), %rdi
addq $-0x270, %rdi           # imm = 0xFD90
movl $0xa, %esi
callq 0x3250
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3470
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x70a0
movq %r13, -0x68(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x3b60
movq %rbx, %rdi
movq %r12, %rsi
callq 0x770a
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0x7093
callq 0x3230
movq -0x270(%rbp), %rax
movq -0x18(%rax), %rax
jmp 0x7032
leaq -0x270(%rbp), %rdi
leaq -0x38(%rbp), %r15
callq 0x3090
leaq -0x270(%rbp), %rdi
callq 0x30c0
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x70ca
callq 0x3230
movq %rbx, %rax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x70f9
movq %rax, %r14
jmp 0x7108
movq %rax, %r14
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0x70fc
callq 0x3230
jmp 0x70fc
movq %rax, %r14
leaq -0x270(%rbp), %rdi
callq 0x30c0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x711a
callq 0x3230
movq %rbx, %rdi
callq 0x6b34
movq %r14, %rdi
callq 0x3430
movq %rax, %rdi
callq 0x3ac6
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/StringTools.cpp
// Function: StringTools::ltrim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string StringTools::ltrim(std::string instring, std::string whitespaces)
{
    size_t i = instring.find_first_not_of(whitespaces);
    if (i == std::string::npos)
    {
        return instring;
    }
    else
    {
        return instring.substr(i, instring.size());
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdx), %rsi
movq 0x8(%rdx), %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x33f0
cmpq $-0x1, %rax
je 0x75d4
movq 0x8(%r14), %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x3280
jmp 0x75ed
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x3b60
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/StringTools.cpp
// Function: StringTools::rtrim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string StringTools::rtrim(std::string instring, std::string whitespaces)
{
    size_t i = instring.find_last_not_of(whitespaces);
    if (i == std::string::npos)
    {
        return instring;
    }
    else
    {
        return instring.substr(0, i+1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdx), %rsi
movq 0x8(%rdx), %rcx
movq %r14, %rdi
movq $-0x1, %rdx
callq 0x33c0
cmpq $-0x1, %rax
je 0x7634
incq %rax
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x3280
jmp 0x764d
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x3b60
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/./MutableArray.h
// Function: MutableArray<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void add(T item)
    {
        if (_count >= _size)
        {
            // increasr the size of the array if we need
            _resize();
        }
        _items[_count++] = item;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
cmpq 0x10(%r14), %rdi
jb 0x772d
movq %r14, %rdi
callq 0x77c2
movq 0x8(%r14), %rdi
leaq 0x1(%rdi), %rax
movq %rax, 0x8(%r14)
shlq $0x5, %rdi
addq (%r14), %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x3140
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/./MutableArray.h
// Function: MutableArray<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::init(unsigned long)
void init(size_t size)
    {
        _count = 0;
        _size = size;
        _increment_size = _size;
        _items = new T[_size];
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq $0x0, 0x8(%rdi)
movq %rsi, 0x10(%rdi)
movq %rsi, 0x18(%rdi)
movq %rsi, %rax
shrq $0x3b, %rax
movq %rsi, %r15
shlq $0x5, %r15
xorl %edi, %edi
negq %rax
sbbq %rdi, %rdi
orq %r15, %rdi
orq $0x8, %rdi
callq 0x3030
movq %r14, (%rax)
leaq 0x8(%rax), %rcx
testq %r14, %r14
je 0x77b3
addq $0x18, %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x20, %rax
addq $-0x20, %r15
jne 0x779a
movq %rcx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/./MutableArray.h
// Function: MutableArray<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::_resize()
void _resize()
    {
        size_t new_size = _size + _increment_size;

        T *new_items = new T[new_size];
        std::copy(_items, _items+_size, new_items);

        _size = new_size;
        delete[] _items;
        _items = new_items;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r12
movq 0x10(%rdi), %rbx
movq 0x18(%rdi), %r13
addq %rbx, %r13
movq %r13, %rax
shrq $0x3b, %rax
movq %r13, %r15
shlq $0x5, %r15
xorl %edi, %edi
negq %rax
sbbq %rdi, %rdi
orq %r15, %rdi
orq $0x8, %rdi
callq 0x3030
movq %rax, %r14
movq %r13, (%rax)
testq %r13, %r13
je 0x7828
leaq 0x18(%r14), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x20, %rax
addq $-0x20, %r15
jne 0x780f
addq $0x8, %r14
movq (%r12), %r15
testq %rbx, %rbx
jle 0x7863
movq %r12, -0x30(%rbp)
incq %rbx
movq %r14, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x3140
addq $0x20, %r15
addq $0x20, %r12
decq %rbx
cmpq $0x1, %rbx
ja 0x783f
movq -0x30(%rbp), %r12
movq (%r12), %r15
movq %r13, 0x10(%r12)
testq %r15, %r15
je 0x78ae
movq %r12, %r13
leaq -0x8(%r15), %r12
movq -0x8(%r15), %rbx
testq %rbx, %rbx
je 0x78a3
shlq $0x5, %rbx
addq %rbx, %r15
addq $-0x10, %r15
negq %rbx
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x7899
callq 0x3230
addq $-0x20, %r15
addq $0x20, %rbx
jne 0x788b
movq %r12, %rdi
callq 0x32f0
movq %r13, %r12
movq %r14, (%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/Terrain.cpp
// Function: Terrain::_gen_terrain(int, int, int*)
void Terrain::_gen_terrain(int start, int length, int *height_map)
{
    int amp = (rand() % get_size().y/5) + 5;
    int period = (rand() % 40) + 10;
    int height = (rand() % get_size().y/10) + 5;
    int phase = rand() % get_size().x;

    for (int i = start; i < length; ++i)
    {
        height_map[i] = std::abs(amp*sin(((float)i/(float)period) - phase) + height) + 5;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, -0x50(%rbp)
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %r14
callq 0x30d0
movl %eax, -0x2c(%rbp)
movq %r14, %rdi
callq 0x9a66
movq %rax, -0x48(%rbp)
callq 0x30d0
movl %eax, -0x40(%rbp)
callq 0x30d0
movl %eax, -0x38(%rbp)
movq %r14, %rdi
callq 0x9a66
movq %rax, %r15
callq 0x30d0
movl %eax, %ebx
movq %r14, %rdi
callq 0x9a66
cmpl %r12d, %r13d
jge 0x7cd2
movq %rax, %rcx
movl %ebx, %eax
cltd
idivl %ecx
movl %edx, %ecx
shrq $0x20, %r15
movl -0x38(%rbp), %eax
cltd
idivl %r15d
movslq %edx, %rax
imulq $0x66666667, %rax, %rax # imm = 0x66666667
movq %rax, %rdx
shrq $0x20, %rdx
sarl $0x2, %edx
shrq $0x3f, %rax
leal (%rdx,%rax), %esi
addl $0x5, %esi
movslq -0x40(%rbp), %rax
imulq $0x66666667, %rax, %rdx # imm = 0x66666667
movq %rdx, %rdi
shrq $0x3f, %rdi
shrq $0x20, %rdx
sarl $0x4, %edx
addl %edi, %edx
shll $0x3, %edx
leal (%rdx,%rdx,4), %edx
negl %edx
leal (%rax,%rdx), %edi
addl $0xa, %edi
movq -0x48(%rbp), %r8
shrq $0x20, %r8
movl -0x2c(%rbp), %eax
cltd
idivl %r8d
movslq %edx, %rax
imulq $0x66666667, %rax, %rax # imm = 0x66666667
movq %rax, %rdx
shrq $0x20, %rdx
sarl %edx
shrq $0x3f, %rax
cvtsi2ss %edi, %xmm0
movss %xmm0, -0x2c(%rbp)
addl %edx, %eax
addl $0x5, %eax
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movss %xmm0, -0x48(%rbp)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x40(%rbp)
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
movsd %xmm0, -0x38(%rbp)
movslq %r13d, %rax
movslq %r12d, %rbx
movq -0x50(%rbp), %rcx
leaq (%rcx,%rax,4), %r14
movl %r13d, %r15d
subq %rax, %rbx
xorl %r12d, %r12d
leal (%r15,%r12), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss -0x2c(%rbp), %xmm0
subss -0x48(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x30b0
mulsd -0x40(%rbp), %xmm0
addsd -0x38(%rbp), %xmm0
andpd 0x4556(%rip), %xmm0     # 0xc210
addsd 0x455e(%rip), %xmm0     # 0xc220
cvttsd2si %xmm0, %eax
movl %eax, (%r14,%r12,4)
incq %r12
cmpq %r12, %rbx
jne 0x7c8a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/Terrain.cpp
// Function: Terrain::get_floor(int)
int Terrain::get_floor(int x)
{
    // the minimum y value is the top of the terrian
    int min = INT_MAX;
    LOOPV(i, this)
    {
        Point<int> tile_pos = get_child(i)->get_position();
        if (tile_pos.x == x && tile_pos.y < min)
        {
            min = tile_pos.y;
        }
    }
    return min;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x98f4
cmpq $0x0, 0x8(%rax)
je 0x7d47
movl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %r15d, %r15d
movq %r14, %rdi
movq %r15, %rsi
callq 0x993a
movq %rax, %rdi
callq 0x9a52
movq %rax, %r12
shrq $0x20, %r12
cmpl %r12d, %r13d
cmovll %r13d, %r12d
cmpl %ebx, %eax
cmovnel %r13d, %r12d
incq %r15
movq %r14, %rdi
callq 0x98f4
movl %r12d, %r13d
cmpq 0x8(%rax), %r15
jb 0x7d0a
jmp 0x7d4d
movl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/Terrain.cpp
// Function: Terrain::update(int)
void Terrain::update(int t)
{
    // update children
    LOOPV(i, this)
    {
        get_child(i)->update(t);
        if (get_child(i)->should_remove_from_parent() == true)
        {
            delete get_children()->remove(i);
            --i;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x98f4
cmpq $0x0, 0x8(%rax)
je 0x8018
xorl %r15d, %r15d
movq %r14, %rdi
movq %r15, %rsi
callq 0x993a
movq (%rax), %rcx
movq %rax, %rdi
movl %ebx, %esi
callq *0x10(%rcx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x993a
movq %rax, %rdi
callq 0x9a10
testb %al, %al
je 0x8003
movq %r14, %rdi
callq 0x98f4
movq 0x8(%rax), %rcx
cmpq %r15, %rcx
jbe 0x8000
movq (%rax), %rdx
movq (%rdx,%r15,8), %rdi
movq %r15, %rdx
movq (%rax), %rsi
movq 0x8(%rsi,%rdx,8), %r8
movq %r8, (%rsi,%rdx,8)
leaq 0x1(%rdx), %rsi
movq %rsi, %rdx
cmpq %rsi, %rcx
jne 0x7fd6
decq %rcx
movq %rcx, 0x8(%rax)
testq %rdi, %rdi
je 0x8000
movq (%rdi), %rax
callq *0x8(%rax)
decq %r15
incq %r15
movq %r14, %rdi
callq 0x98f4
cmpq 0x8(%rax), %r15
jb 0x7f8e
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/TextureTools.cpp
// Function: TextureTools::_init_map[abi:cxx11]()
std::map<std::string, std::string> TextureTools::_init_map()
{
    std::map<std::string, std::string> map;
    // add a hard coded test value
    map["debug"] = "___________\n***DEBUG***\n-----------";
    return map;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
movl $0x0, 0x8(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x428b(%rip), %rsi      # 0xc35f
leaq 0x4289(%rip), %rdx      # 0xc364
leaq -0x38(%rbp), %rdi
callq 0x574e
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x853c
movq 0x8(%rax), %rdx
leaq 0x4136(%rip), %rcx      # 0xc231
movl $0x23, %r8d
movq %rax, %rdi
xorl %esi, %esi
callq 0x3380
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x8119
callq 0x3230
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x813d
movq %rax, %r14
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x813d
callq 0x3230
movq 0x10(%rbx), %rsi
movq %rbx, %rdi
callq 0x865c
movq %r14, %rdi
callq 0x3430
movq %rax, %rdi
callq 0x3ac6
nop
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/TextureTools.cpp
// Function: TextureTools::get_texture(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string TextureTools::get_texture(std::string key)
{
    if (_texture_map.find(key) != _texture_map.end())
    {
        return _texture_map[key];
    }
    else
    {
        return "$NO KEY";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8daa(%rip), %rdi      # 0x11278
callq 0x8a8e
leaq 0x8da6(%rip), %rcx      # 0x11280
cmpq %rcx, %rax
je 0x8509
leaq 0x8d92(%rip), %rdi      # 0x11278
movq %r14, %rsi
callq 0x853c
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x3b60
jmp 0x8526
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x3d40(%rip), %rsi      # 0xc257
leaq 0x3d40(%rip), %rdx      # 0xc25e
movq %rbx, %rdi
callq 0x574e
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/Timer.cpp
// Function: Timer::start()
bool Timer::tick()
{
    // GET OUT OF THERE!!
    if (_force_break == true)
        return false;

    // tick if not reached count or override on
    if (get_tick_count() < get_ticks() || get_tick_overide() == true)
    {
        _wait();
        return true;
    }
    return false;
}

// Assembly:
cmpb $0x0, 0x19(%rdi)
jne 0x8bb8
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x14(%rbx), %eax
cmpl 0x10(%rbx), %eax
jl 0x8b91
cmpb $0x1, 0x18(%rbx)
jne 0x8bb2
movq %rbx, %rdi
callq 0x8b36
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x8bac
movl 0x14(%rbx), %edx
movq (%rdi), %rax
movq %rbx, %rsi
callq *(%rax)
cmpb $0x1, 0x19(%rbx)
jne 0x8b83
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/Timer.cpp
// Function: Timer::_wait()
void Timer::_wait()
{
    const std::clock_t start_time = std::clock();
    while ((static_cast<double>((clock() - start_time))/CLOCKS_PER_SEC) < get_delay())
    {
        // wait
    }
    ++_tick_counter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x3170
movq %rax, %r14
callq 0x3170
subq %r14, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x3700(%rip), %xmm0     # 0xc260
movsd 0x8(%rbx), %xmm1
ucomisd %xmm0, %xmm1
ja 0x8b48
incl 0x14(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/Bullet.cpp
// Function: Bullet::_init()
void Bullet::_init()
{
    _fcolor = ConsoleTools::yellow;
    // set inital velocity
    _velocity = Point<float>(_power*cosf(_angle), -_power*std::abs(sinf(_angle)));
    _launched = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x21, 0x58(%rdi)
movss 0x68(%rdi), %xmm0
movss 0x6c(%rdi), %xmm1
movss %xmm1, -0xc(%rbp)
callq 0x31c0
mulss -0xc(%rbp), %xmm0
movss %xmm0, -0xc(%rbp)
movss 0x6c(%rbx), %xmm0
xorps 0x35a3(%rip), %xmm0     # 0xc200
movaps %xmm0, -0x20(%rbp)
movss 0x68(%rbx), %xmm0
callq 0x31f0
andps 0x342e(%rip), %xmm0     # 0xc0a0
mulss -0x20(%rbp), %xmm0
movss -0xc(%rbp), %xmm1
movss %xmm1, 0x60(%rbx)
movss %xmm0, 0x64(%rbx)
movb $0x0, 0x70(%rbx)
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/Bullet.cpp
// Function: Bullet::fire()
void Bullet::fire()
{
    _init();
    _launched = true;
    _position = _start_pos;
    ConsoleTools::play_music("fire.wav");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movl $0x21, 0x58(%rdi)
movss 0x68(%rdi), %xmm0
movss 0x6c(%rdi), %xmm1
movss %xmm1, -0x14(%rbp)
callq 0x31c0
mulss -0x14(%rbp), %xmm0
movss %xmm0, -0x14(%rbp)
movss 0x6c(%rbx), %xmm0
xorps 0x352f(%rip), %xmm0     # 0xc200
movaps %xmm0, -0x30(%rbp)
movss 0x68(%rbx), %xmm0
callq 0x31f0
andps 0x33ba(%rip), %xmm0     # 0xc0a0
mulss -0x30(%rbp), %xmm0
movss -0x14(%rbp), %xmm1
movss %xmm1, 0x60(%rbx)
movss %xmm0, 0x64(%rbx)
movb $0x1, 0x70(%rbx)
movq 0x74(%rbx), %rax
movq %rax, 0x18(%rbx)
leaq -0x40(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x357b(%rip), %rsi      # 0xc290
leaq 0x357c(%rip), %rdx      # 0xc298
leaq -0x50(%rbp), %rbx
movq %rbx, %rdi
callq 0x574e
movq %rbx, %rdi
callq 0x399e
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x8d3e
callq 0x3230
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x8d58
callq 0x3230
movq %rbx, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/View.cpp
// Function: View::update(int)
void View::update(int t)
{
    LOOPV(i, this)
    {
        get_child(i)->update(t);
        // remove child if requested by child
        if (get_child(i)->should_remove_from_parent() == true)
        {
            delete get_children()->remove(i);
            --i;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x10(%rdi), %rax
cmpq $0x0, 0x8(%rax)
je 0x9a04
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
movq (%rax), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
movl %ebx, %esi
callq *0x10(%rax)
movq 0x10(%r14), %rax
movq 0x8(%rax), %rcx
cmpq %r15, %rcx
jbe 0x99e7
movq (%rax), %rdx
movq (%rdx,%r15,8), %rdi
cmpb $0x1, 0x30(%rdi)
movq %r15, %rdx
jne 0x99fc
movq (%rax), %rsi
movq 0x8(%rsi,%rdx,8), %r8
movq %r8, (%rsi,%rdx,8)
leaq 0x1(%rdx), %rsi
movq %rsi, %rdx
cmpq %rsi, %rcx
jne 0x99bb
decq %rcx
movq %rcx, 0x8(%rax)
testq %rdi, %rdi
je 0x99f1
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x99f1
cmpb $0x0, 0x30
je 0x99fc
decq %r15
movq 0x10(%r14), %rax
movq 0x8(%rax), %rcx
incq %r15
cmpq %rcx, %r15
jb 0x998f
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/Tank.cpp
// Function: Tank::_init()
void Tank::_init()
{
    // add a name above the tank
    Sprite *name_plate = new Sprite(_name);
    name_plate->set_position(Point<int>(-name_plate->get_size().x/4, -2));
    name_plate->set_fcolor(_fcolor);
    name_plate->set_bcolor(ConsoleTools::white);
    add_child(name_plate);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movl $0x60, %edi
callq 0x3260
movq %rax, %rbx
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x60(%r14), %rsi
movq 0x68(%r14), %rdx
addq %rsi, %rdx
leaq -0x38(%rbp), %rdi
callq 0x3b60
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x4ef4
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x9b83
callq 0x3230
movq %rbx, %rdi
callq 0x9a66
leal 0x3(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x2, %ecx
negl %ecx
movabsq $-0x200000000, %rsi     # imm = 0xFFFFFFFE00000000
orq %rcx, %rsi
movq %rbx, %rdi
callq 0x9a5c
movl 0x58(%r14), %esi
movq %rbx, %rdi
callq 0x68e6
movq %rbx, %rdi
movl $0x25, %esi
callq 0x68fa
movq %r14, %rdi
movq %rbx, %rsi
callq 0x98fe
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x9bf2
callq 0x3230
jmp 0x9bf2
movq %rax, %r14
movq %rbx, %rdi
callq 0x3230
movq %r14, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/DebugView.cpp
// Function: DebugView::draw()
void DebugView::draw()
{
    // don't draw if not in debug mode
    if (show == false)
    {
        return;
    }

    ConsoleTools::set_bcolor(ConsoleTools::magneta);
    int i = 0;
    for (map_iter it = _deb_map.begin(); it != _deb_map.end(); ++it)
    {
        ConsoleTools::set_cursor(_position.x, _position.y + i++);
        printf("%s\t:\t%0.3f\n", it->first.c_str(), it->second);
    }
    ConsoleTools::end_color();

    View::draw();
}

// Assembly:
cmpb $0x0, 0x31(%rdi)
je 0x9d67
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x23, %edi
callq 0x3858
movq 0x50(%rbx), %r14
leaq 0x40(%rbx), %r12
cmpq %r12, %r14
je 0x9d4c
xorl %esi, %esi
leaq 0x261e(%rip), %r15      # 0xc331
movl 0x18(%rbx), %edi
leal 0x1(%rsi), %r13d
addl 0x1c(%rbx), %esi
callq 0x38ec
movq 0x20(%r14), %rsi
xorps %xmm0, %xmm0
cvtss2sd 0x40(%r14), %xmm0
movq %r15, %rdi
movb $0x1, %al
callq 0x3060
movq %r14, %rdi
callq 0x3190
movq %rax, %r14
movl %r13d, %esi
cmpq %r12, %rax
jne 0x9d13
callq 0x3888
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9a1a
retq
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/Game.cpp
// Function: signal_handler(int)
void signal_handler(int signum)
{
    ConsoleTools::stop_music();
    ConsoleTools::end_color();
    ConsoleTools::clear_screen();
    std::exit(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x3982
callq 0x3888
callq 0x38c6
xorl %edi, %edi
callq 0x32e0
// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/Game.cpp
// Function: Game::~Game()
~Game()
    {
        // cleanup
        current_view = 0;

        if (intro_view != 0)
        {
            delete intro_view;
        }

        if (game_view != 0)
        {
            delete game_view;
        }

        if (end_view != 0)
        {
            delete end_view;
        }

        ConsoleTools::end_color();
        ConsoleTools::clear_screen();

        ConsoleTools::stop_music();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x6364(%rip), %rax      # 0x10d88
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0xaa3e
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xaa4d
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xaa5c
movq (%rdi), %rax
callq *0x8(%rax)
callq 0x3888
callq 0x38c6
callq 0x3982
movq $0x0, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq $0x0, 0x28(%rbx)
movq %rax, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O3/tbonelaforge[P]gradebook/Main.cpp
// Function: handleQuit(int&, Gradebook&)
void handleQuit(int &state, Gradebook &gradebook) {
    //program hangs if no semester (student) data and no prior Grades.dat
    if (state == 0) {
        transLog << "Quit" << endl;
        return;
    }
    
    cout << "Saving grades and exiting..." << endl;
    saveGrades(gradebook);
    state = 2;
    
    transLog << "Quit" << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, (%rdi)
je 0x2d73
movq %rsi, %r14
movq %rdi, %rbx
movq 0xa29e(%rip), %r15      # 0xcfc8
leaq 0x64f1(%rip), %rsi      # 0x9222
movl $0x1c, %edx
movq %r15, %rdi
callq 0x2210
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2130
movq %r14, %rdi
callq 0x256c
movl $0x2, (%rbx)
leaq 0xa46e(%rip), %rbx      # 0xd1e8
leaq 0x649c(%rip), %rsi      # 0x921d
movl $0x4, %edx
movq %rbx, %rdi
callq 0x2210
movq 0xa453(%rip), %rax      # 0xd1e8
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2130
// File: /workspace/github_cpp_makefile_star2_O3/tbonelaforge[P]gradebook/Main.cpp
// Function: handleOutputGrades(Gradebook&, bool)
void handleOutputGrades(Gradebook &gradebook, bool idMode) {
    ofstream outfile;
    outfile.open("Grades.out");
    GradebookPrinter::printGradebook(gradebook, cout, idMode);
    cout << "\nOutputing the complete gradebook to Grades.out..." << endl;
    GradebookPrinter::printGradebook(gradebook, outfile, idMode);
    cout << endl;
    
    transLog << "Output grades to Grades.out" << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movl %esi, %r14d
movq %rdi, %rbx
leaq -0x218(%rbp), %r15
movq %r15, %rdi
callq 0x22e0
leaq 0x63c5(%rip), %rsi      # 0x92aa
movq %r15, %rdi
movl $0x10, %edx
callq 0x2050
movzbl %r14b, %r14d
movq 0xa0cb(%rip), %rsi      # 0xcfc8
movq %rbx, %rdi
movl %r14d, %edx
callq 0x64f0
movq 0xa0b9(%rip), %r15      # 0xcfc8
leaq 0x6350(%rip), %rsi      # 0x9266
movl $0x32, %edx
movq %r15, %rdi
callq 0x2210
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq 0xa087(%rip), %r15      # 0xcfc8
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2130
leaq -0x218(%rbp), %rsi
movq %rbx, %rdi
movl %r14d, %edx
callq 0x64f0
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq 0xa047(%rip), %rdi      # 0xcfc8
callq 0x2040
movq %rax, %rdi
callq 0x2130
leaq 0xa253(%rip), %rbx      # 0xd1e8
leaq 0x62fd(%rip), %rsi      # 0x9299
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x2210
movq 0xa238(%rip), %rax      # 0xd1e8
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
leaq 0xa21d(%rip), %rdi      # 0xd1e8
callq 0x2040
movq %rax, %rdi
callq 0x2130
movq 0x9fe1(%rip), %rax      # 0xcfc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x210(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x218(%rbp,%rcx)
callq 0x2170
leaq -0x120(%rbp), %rdi
callq 0x2090
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x218(%rbp), %rdi
callq 0x2378
movq %rbx, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O3/tbonelaforge[P]gradebook/Main.cpp
// Function: handleCalculateGrades(Gradebook&, bool)
void handleCalculateGrades(Gradebook &gradebook, bool idMode) {
    cout << "Calculating the final grades for every student..." << endl;
    Student * student = gradebook.getHead();
    while (student != NULL) {
        student->calculateFinalAverage(
                                       gradebook.getProgramsWeight(),
                                       gradebook.getTestsWeight(),
                                       gradebook.getFinalExamWeight()
                                       );
        saveGrades(gradebook);
        student = student->next;
    }
    transLog << "Final grades calculated" << endl;
    
    handleOutputGrades(gradebook, idMode);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movq 0x8dfa(%rip), %r15      # 0xcfc8
leaq 0x5424(%rip), %rsi      # 0x95f9
movl $0x31, %edx
movq %r15, %rdi
callq 0x2210
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2130
movq %rbx, %rdi
callq 0x58a0
testq %rax, %rax
je 0x4257
movq %rax, %r15
movq %rbx, %rdi
callq 0x5f2a
movl %eax, %r12d
movq %rbx, %rdi
callq 0x5f34
movl %eax, %r13d
movq %rbx, %rdi
callq 0x5f3e
movq %r15, %rdi
movl %r12d, %esi
movl %r13d, %edx
movl %eax, %ecx
callq 0x64e0
movq %rbx, %rdi
callq 0x256c
movq (%r15), %r15
testq %r15, %r15
jne 0x4219
leaq 0x8f8a(%rip), %r15      # 0xd1e8
leaq 0x53c6(%rip), %rsi      # 0x962b
movl $0x17, %edx
movq %r15, %rdi
callq 0x2210
movq 0x8f6f(%rip), %rax      # 0xd1e8
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2130
movzbl %r14b, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2eb9
// File: /workspace/github_cpp_makefile_star2_O3/tbonelaforge[P]gradebook/Gradebook.cpp
// Function: Gradebook::deleteStudents()
void Gradebook::deleteStudents() {
    while (head != NULL) {
        Student * next = head->next;
        delete head;
        head = next;
    }
    while (index != NULL) {
        Node * next = index->next;
        delete index;
        index = next;
    }
    numStudents = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %r14
testq %r14, %r14
je 0x521a
movq (%r14), %r15
movq %r14, %rdi
callq 0x622e
movl $0x78, %esi
movq %r14, %rdi
callq 0x21d0
movq %r15, 0x38(%rbx)
movq %r15, %r14
testq %r15, %r15
jne 0x51f6
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x523d
movq 0x8(%rdi), %r14
movl $0x10, %esi
callq 0x21d0
movq %r14, 0x40(%rbx)
movq %r14, %rdi
testq %r14, %r14
jne 0x5223
movl $0x0, 0x48(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tbonelaforge[P]gradebook/Gradebook.cpp
// Function: Gradebook::initialize(int, int, int, int, int, int)
void Gradebook::initialize(int p, int t, int f, int pw, int tw, int fw) {
    makeEmpty();
    numPrograms = p;
    programRecorded = new bool[numPrograms];
    for (int i = 0; i < numPrograms; i++) {
        programRecorded[i] = false;
    }
    numTests = t;
    testRecorded = new bool[numTests];
    for (int i = 0; i < numTests; i++) {
        testRecorded[i] = false;
    }
    numFinals = f;
    finalExamRecorded = false;
    programsWeight = pw;
    testsWeight = tw;
    if (numFinals > 0) {
        finalExamWeight = fw;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, -0x30(%rbp)
movl %r8d, -0x2c(%rbp)
movl %ecx, %r15d
movl %edx, %r13d
movl %esi, %r14d
movq %rdi, %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, (%rdi)
xorl %ecx, %ecx
movq %rcx, 0x8(%rdi)
movl %eax, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movl %eax, 0x20(%rdi)
movb $0x0, 0x24(%rdi)
movq $-0x1, 0x28(%rdi)
movl %eax, 0x30(%rdi)
callq 0x51e0
movl %r14d, (%rbx)
movslq %r14d, %r12
movq %r12, %rdi
callq 0x2030
movq %rax, 0x8(%rbx)
testl %r12d, %r12d
jle 0x52c1
movl %r14d, %edx
movq %rax, %rdi
xorl %esi, %esi
callq 0x2100
movl %r13d, 0x10(%rbx)
movslq %r13d, %r14
movq %r14, %rdi
callq 0x2030
movq %rax, 0x18(%rbx)
testl %r14d, %r14d
jle 0x52e6
movl %r13d, %edx
movq %rax, %rdi
xorl %esi, %esi
callq 0x2100
movl %r15d, 0x20(%rbx)
movb $0x0, 0x24(%rbx)
movl -0x2c(%rbp), %eax
movl %eax, 0x28(%rbx)
movl -0x30(%rbp), %eax
movl %eax, 0x2c(%rbx)
testl %r15d, %r15d
jle 0x5305
movl 0x10(%rbp), %eax
movl %eax, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbonelaforge[P]gradebook/Gradebook.cpp
// Function: Gradebook::addToIndex(Student*)
void Gradebook::addToIndex(Student * newStudent) {
    Node * current = index;
    Node * previous = NULL;
    while (current != NULL) {
        if (current->student->getLastName() > newStudent->getLastName()) {
            break;
        }
        previous = current;
        current = current->next;
    }
    Node * newNode = new Node();
    newNode->student = newStudent;
    newNode->next = NULL;
    if (previous != NULL) {
        previous->next = newNode;
    } else {
        index = newNode;
    }
    newNode->next = current;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, -0x30(%rbp)
movq %rdi, -0x58(%rbp)
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0x5687
xorl %ecx, %ecx
movq %rcx, -0x60(%rbp)
movq %rax, %r15
movq (%rax), %rsi
leaq -0x50(%rbp), %rdi
callq 0x62ee
leaq -0x80(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x62ee
movq -0x48(%rbp), %r14
movq -0x80(%rbp), %r13
movq -0x78(%rbp), %r12
cmpq %r14, %r12
movq %r14, %rdx
cmovbq %r12, %rdx
testq %rdx, %rdx
je 0x5619
movq -0x50(%rbp), %rdi
movq %r13, %rsi
callq 0x20c0
movl %eax, %ebx
testl %eax, %eax
jne 0x563d
subq %r12, %r14
cmpq $-0x7fffffff, %r14      # imm = 0x80000001
movq $-0x80000000, %rax      # imm = 0x80000000
cmovlq %rax, %r14
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %r14
cmovgeq %rax, %r14
movl %r14d, %ebx
leaq -0x70(%rbp), %rax
cmpq %rax, %r13
je 0x5655
movq -0x70(%rbp), %rsi
incq %rsi
movq %r13, %rdi
callq 0x21d0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x566e
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21d0
testl %ebx, %ebx
jg 0x568f
movq 0x8(%r15), %rax
movq %r15, %rcx
testq %rax, %rax
jne 0x55cc
movq %r15, %r14
jmp 0x568a
xorl %r14d, %r14d
xorl %r15d, %r15d
jmp 0x5693
movq -0x60(%rbp), %r14
movq -0x58(%rbp), %rbx
addq $0x40, %rbx
movl $0x10, %edi
callq 0x21c0
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
leaq 0x8(%r14), %rcx
testq %r14, %r14
cmoveq %rbx, %rcx
movq %rax, (%rcx)
movq %r15, 0x8(%rax)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x56f1
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x2310
nop
// File: /workspace/github_cpp_makefile_star2_O3/tbonelaforge[P]gradebook/Gradebook.cpp
// Function: Gradebook::findStudentById(int)
Student * Gradebook::findStudentById(int id) {
    Student * current = head;
    while (current != NULL) {
        if (current->getId() == id) {
            return current;
        }
        current = current->next;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
addq $0x38, %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x5720
movq %rbx, %rdi
callq 0x62b6
cmpl %r14d, %eax
jne 0x570b
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tbonelaforge[P]gradebook/Gradebook.cpp
// Function: Gradebook::printStudents(std::ostream&) const
void Gradebook::printStudents(std::ostream& out) const {
    Student * current = head;
    while (current != NULL) {
        out << "Student " << current->getId() << ": " << current->getFirstName() << " " << current->getLastName() << endl;
        current = current->next;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x38(%rdi), %r14
testq %r14, %r14
je 0x5843
movq %rsi, %rbx
leaq 0x3bd7(%rip), %r15      # 0x9327
leaq -0x48(%rbp), %r12
movl $0x8, %edx
movq %rbx, %rdi
leaq 0x4331(%rip), %rsi      # 0x9a94
callq 0x2210
movq %r14, %rdi
callq 0x62b6
movq %rbx, %rdi
movl %eax, %esi
callq 0x2300
movq %rax, %r13
movl $0x2, %edx
movq %rax, %rdi
leaq 0x3962(%rip), %rsi      # 0x90ee
callq 0x2210
leaq -0x68(%rbp), %rdi
movq %r14, %rsi
callq 0x62c0
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %r13, %rdi
callq 0x2210
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2210
movq %r12, %rdi
movq %r14, %rsi
callq 0x62ee
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r13, %rdi
callq 0x2210
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r13, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2130
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x581e
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x5837
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21d0
movq (%r14), %r14
testq %r14, %r14
jne 0x5754
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5854
movq %rax, %rbx
jmp 0x5875
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x5875
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x588e
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O3/tbonelaforge[P]gradebook/Student.cpp
// Function: Student::Student(int, int, int)
Student::Student(int np, int nt, int nf) {
    numPrograms = np;
    numTests = nt;
    numFinals = nf;
    programGrades = new int[numPrograms];
    for (int i = 0; i < numPrograms; i++) {
        programGrades[i] = -1;
    }
    testGrades = new int[numTests];
    for (int i = 0; i < numTests; i++) {
        testGrades[i] = -1;
    } 
    finalExamGrade = -1;
    finalAverage = -1.0;
    next = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x20(%rdi), %rax
movq %rax, 0x10(%rdi)
xorl %eax, %eax
movq %rax, 0x18(%rdi)
movb %al, 0x20(%rdi)
leaq 0x40(%rdi), %rdx
movq %rdx, 0x30(%rdi)
movq %rax, 0x38(%rdi)
movb %al, 0x40(%rdi)
movl %esi, 0x50(%rdi)
movl %r14d, 0x54(%rdi)
movl %ecx, 0x58(%rdi)
movl %esi, %r13d
shlq $0x2, %r13
testl %esi, %esi
movq $-0x1, %r12
movq %r13, %rdi
cmovsq %r12, %rdi
callq 0x2030
movq %rax, 0x60(%rbx)
testl %r15d, %r15d
jle 0x61da
movq %rax, %rdi
movl $0xff, %esi
movq %r13, %rdx
callq 0x2100
movl %r14d, %r15d
shlq $0x2, %r15
testl %r14d, %r14d
cmovnsq %r15, %r12
movq %r12, %rdi
callq 0x2030
movq %rax, 0x68(%rbx)
testl %r14d, %r14d
jle 0x6209
movq %rax, %rdi
movl $0xff, %esi
movq %r15, %rdx
callq 0x2100
movabsq $-0x407fffff00000001, %rax # imm = 0xBF800000FFFFFFFF
movq %rax, 0x70(%rbx)
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tbonelaforge[P]gradebook/Student.cpp
// Function: Student::serialize(std::ostream&)
void Student::serialize(ostream& out) {
    out << id << " ";
    out << firstName << " ";
    out << lastName << " ";
    for (int i = 0; i < numPrograms; i++) {
        out << programGrades[i] << " ";
    }
    for (int i = 0; i < numTests; i++) {
        out << testGrades[i] << " ";
    }
    for (int i = 0; i < numFinals; i++) {
        out << finalExamGrade << " ";
    }
    out << finalAverage;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%rdi), %esi
movq %rbx, %rdi
callq 0x2300
leaq 0x2f5e(%rip), %r15      # 0x9327
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2210
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
movq %rbx, %rdi
callq 0x2210
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2210
movq 0x30(%r14), %rsi
movq 0x38(%r14), %rdx
movq %rbx, %rdi
callq 0x2210
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2210
cmpl $0x0, 0x50(%r14)
jle 0x6456
xorl %r12d, %r12d
leaq 0x2efd(%rip), %r15      # 0x9327
movq 0x60(%r14), %rax
movl (%rax,%r12,4), %esi
movq %rbx, %rdi
callq 0x2300
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2210
incq %r12
movslq 0x50(%r14), %rax
cmpq %rax, %r12
jl 0x642a
cmpl $0x0, 0x54(%r14)
jle 0x6493
xorl %r12d, %r12d
leaq 0x2ec0(%rip), %r15      # 0x9327
movq 0x68(%r14), %rax
movl (%rax,%r12,4), %esi
movq %rbx, %rdi
callq 0x2300
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2210
incq %r12
movslq 0x54(%r14), %rax
cmpq %rax, %r12
jl 0x6467
cmpl $0x0, 0x58(%r14)
jle 0x64c9
xorl %r12d, %r12d
leaq 0x2e83(%rip), %r15      # 0x9327
movl 0x70(%r14), %esi
movq %rbx, %rdi
callq 0x2300
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2210
incl %r12d
cmpl 0x58(%r14), %r12d
jl 0x64a4
cvtss2sd 0x74(%r14), %xmm0
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x22b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tbonelaforge[P]gradebook/GradebookPrinter.cpp
// Function: GradebookPrinter::print(std::ostream&)
void GradebookPrinter::print(ostream& out) {
    fillHeaders();
    fillStudentData();
    for (int i = 0; i < numRows; i++) {
        for (int j = 0; j < numColumns; j++) {
            out << centerString(cellContents[i][j], columnWidths[j]);
            if (j < numColumns - 1) {
                out << '|';
            }
        }
        out << endl;
        if (i < numRows - 1) {
            printRowSeparator(out);
            out << endl;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x6902
movq %r14, %rdi
callq 0x6f68
cmpl $0x0, 0x8(%r14)
jle 0x66c8
movq $0x0, -0x30(%rbp)
cmpl $0x0, 0xc(%r14)
jle 0x6645
movl $0x8, %r13d
xorl %r15d, %r15d
movq 0x10(%r14), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
leaq -0x60(%rbp), %rcx
movq %rcx, -0x70(%rbp)
movq -0x8(%rax,%r13), %rsi
movq (%rax,%r13), %rdx
addq %rsi, %rdx
leaq -0x70(%rbp), %r12
movq %r12, %rdi
callq 0x50a6
movq 0x18(%r14), %rax
movl (%rax,%r15,4), %edx
leaq -0x50(%rbp), %rdi
movq %r12, %rsi
callq 0x6ff0
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x2210
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x65f2
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x660b
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x21d0
movslq 0xc(%r14), %rax
movq %rax, %rcx
decq %rcx
cmpq %rcx, %r15
jge 0x6633
movb $0x7c, -0x50(%rbp)
movl $0x1, %edx
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
callq 0x2210
movl 0xc(%r14), %eax
incq %r15
cltq
addq $0x20, %r13
cmpq %rax, %r15
jl 0x6589
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2130
movslq 0x8(%r14), %rax
movq %rax, %rcx
decq %rcx
cmpq %rcx, -0x30(%rbp)
jge 0x66b2
movq %r14, %rdi
movq %rbx, %rsi
callq 0x71d6
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2130
movl 0x8(%r14), %eax
movq -0x30(%rbp), %rdx
incq %rdx
cltq
movq %rdx, -0x30(%rbp)
cmpq %rax, %rdx
jl 0x6575
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x66f8
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x66f8
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x6711
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x2310
nop
// File: /workspace/github_cpp_makefile_star2_O3/tbonelaforge[P]gradebook/GradebookPrinter.cpp
// Function: GradebookPrinter::GradebookPrinter(Gradebook&, bool)
GradebookPrinter::GradebookPrinter(Gradebook& gradebook, bool idMode) : gradebook(gradebook), idMode(idMode) {
    numRows = gradebook.getNumStudents() + 1; // Extra row for table header
    numColumns = gradebook.getNumPrograms() + gradebook.getNumTests() + gradebook.getNumFinals() + 3;
    cellContents = new string*[numRows];
    for (int i = 0; i < numRows; i++) {
        cellContents[i] = new string[numColumns];
    }
    columnWidths = new int[numColumns];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, (%rdi)
movb %dl, 0x20(%rdi)
movq %rsi, %rdi
callq 0x5896
incl %eax
movl %eax, 0x8(%rbx)
movq %r14, %rdi
callq 0x5314
movl %eax, %r15d
movq %r14, %rdi
callq 0x531c
movl %eax, %r12d
addl %r15d, %r12d
movq %r14, %rdi
callq 0x5326
movl %r12d, %ecx
addl %eax, %ecx
movl %ecx, -0x2c(%rbp)
leal (%rax,%r12), %r13d
addl $0x3, %r13d
movl %r13d, 0xc(%rbx)
movslq 0x8(%rbx), %r12
leaq (,%r12,8), %rdi
testq %r12, %r12
movq $-0x1, %rax
cmovsq %rax, %rdi
callq 0x2030
movq %rbx, -0x38(%rbp)
movq %rax, 0x10(%rbx)
testq %r12, %r12
jle 0x6811
movslq %r13d, %r15
movq %r15, %rax
shlq $0x5, %rax
movq %rax, -0x40(%rbp)
leaq 0x8(%rax), %r14
cmpl $-0x3, -0x2c(%rbp)
movq $-0x1, %rax
cmovlq %rax, %r14
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x2030
movq %r15, (%rax)
testl %r13d, %r13d
je 0x67f9
leaq 0x18(%rax), %rcx
movq -0x40(%rbp), %rdx
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rcx
addq $-0x20, %rdx
jne 0x67e0
addq $0x8, %rax
movq -0x38(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq %rax, (%rcx,%rbx,8)
incq %rbx
cmpq %r12, %rbx
jne 0x67c8
movl %r13d, %edi
shlq $0x2, %rdi
cmpl $-0x3, -0x2c(%rbp)
movq $-0x1, %rax
cmovlq %rax, %rdi
callq 0x2030
movq -0x38(%rbp), %rcx
movq %rax, 0x18(%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tbonelaforge[P]gradebook/GradebookPrinter.cpp
// Function: GradebookPrinter::~GradebookPrinter()
GradebookPrinter::~GradebookPrinter() {
    for (int i = 0; i < numRows; i++) {
        delete[] cellContents[i];
    }
    delete[] cellContents;
    delete[] columnWidths;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rdi), %eax
testl %eax, %eax
jle 0x68cc
xorl %r12d, %r12d
movq %rbx, -0x30(%rbp)
movq 0x10(%rbx), %rcx
movq (%rcx,%r12,8), %r14
testq %r14, %r14
je 0x68c1
movq -0x8(%r14), %rbx
testq %rbx, %rbx
je 0x68a3
leaq -0x10(%r14), %r13
movq %rbx, %r15
shlq $0x5, %r15
leaq (%r15,%r13), %rax
movq -0x10(%r13,%r15), %rdi
cmpq %rdi, %rax
je 0x689d
movq (%rax), %rsi
incq %rsi
callq 0x21d0
addq $-0x20, %r15
jne 0x6884
addq $-0x8, %r14
shlq $0x5, %rbx
orq $0x8, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2350
movq -0x30(%rbp), %rbx
movl 0x8(%rbx), %eax
incq %r12
movslq %eax, %rcx
cmpq %rcx, %r12
jl 0x6863
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x68da
callq 0x2260
movq 0x18(%rbx), %rdi
addq $0x8, %rsp
testq %rdi, %rdi
je 0x68f6
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2260
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tbonelaforge[P]gradebook/GradebookPrinter.cpp
// Function: GradebookPrinter::fillStudentData()
void GradebookPrinter::fillStudentData() {
    int i = 0;
    Student * student;
    string * studentRow;
    if (idMode) {
        student = gradebook.getHead();
        while (student != NULL) {
            studentRow = cellContents[1 + i];
            fillStudentRow(studentRow, student);
            i += 1;
            student = student->next;
        }
    } else {
        Node * current = gradebook.getIndex();
        while (current != NULL) {
            student = current->student;
            studentRow = cellContents[1 + i];
            fillStudentRow(studentRow, student);
            i += 1;
            current = current->next;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
cmpb $0x1, 0x20(%rbx)
jne 0x6fb2
callq 0x58a0
testq %rax, %rax
je 0x6fe5
movq %rax, %r14
movl $0x8, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r15), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x726e
movq (%r14), %r14
addq $0x8, %r15
testq %r14, %r14
jne 0x6f91
jmp 0x6fe5
callq 0x58aa
testq %rax, %rax
je 0x6fe5
movq %rax, %r14
movl $0x8, %r15d
movq (%r14), %rdx
movq 0x10(%rbx), %rax
movq (%rax,%r15), %rsi
movq %rbx, %rdi
callq 0x726e
movq 0x8(%r14), %r14
addq $0x8, %r15
testq %r14, %r14
jne 0x6fc5
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq