LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/misohena[P]drawstars/drawstars.cpp
// Function: parseCommandLine(Options&, int, char**)
bool parseCommandLine(Options &options, int argc, char *argv[])
{
    const Option *unresolvedOpt = nullptr;
    std::string_view unresolvedName;
    for(int ai = 1; ai < argc; ++ai){
        const char * const arg = argv[ai];
        if(unresolvedOpt){
            emitOption(options, unresolvedOpt, unresolvedName, std::string_view(arg));
            unresolvedOpt = nullptr;
            unresolvedName = "";
        }
        else if(arg[0] == '-'){
            const char *p = arg + 1;
            for(;!(*p == '=' || *p == '\0'); ++p);
            const std::string_view name = std::string_view(arg, p - arg);
            const Option * const opt = findOption(name);
            if(!opt){
                error("Unknown option %s", std::string(name).c_str());
                return false;
            }
            if(opt->needsValue()){
                if(*p == '='){
                    emitOption(options, opt, name, std::string_view(p+1));
                }
                else{
                    unresolvedOpt = opt;
                    unresolvedName = name;
                }
            }
            else{
                emitOption(options, opt, name, std::string_view());
            }
        }
        else{
            //files_.push_back(arg);
        }
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, 0x28(%rsp)
cmpl $0x2, %esi
setl %r15b
jge 0x7992
andb $0x1, %r15b
movl %r15d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r14
movl %esi, %eax
movq %rax, 0x30(%rsp)
movl $0x1, %ebx
xorl %r12d, %r12d
movq $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movq %rdx, 0x10(%rsp)
movq (%r14,%rbx,8), %r13
testq %r12, %r12
jne 0x7a37
cmpb $0x2d, (%r13)
jne 0x7a32
movb %r15b, 0xf(%rsp)
leaq 0x1(%r13), %r14
xorl %r15d, %r15d
movzbl (%r14), %eax
incq %r14
incq %r15
cmpl $0x3d, %eax
je 0x79ea
testl %eax, %eax
jne 0x79d7
movq %r15, %rdi
movq %r13, %rsi
callq 0x7787
testq %rax, %rax
setne %bpl
je 0x7aad
movq %rax, %r12
cmpb $0x3d, -0x1(%r14)
jne 0x7a79
movq %r14, %rdi
callq 0x4140
movq 0x28(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
movq %rax, %r8
movq %r14, %r9
callq 0x7839
xorl %r12d, %r12d
jmp 0x7a83
movb $0x1, %bpl
jmp 0x7a74
movq %r13, %rdi
callq 0x4140
movq 0x28(%rsp), %rdi
movq %r12, %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq %rax, %r8
movq %r13, %r9
callq 0x7839
movb $0x1, %bpl
leaq 0x5a84(%rip), %rax      # 0xd4ea
movq %rax, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
xorl %r12d, %r12d
jmp 0x7a8d
movq %r13, 0x20(%rsp)
movq %r15, 0x18(%rsp)
movq 0x10(%rsp), %r14
movb 0xf(%rsp), %r15b
testb %bpl, %bpl
je 0x797c
incq %rbx
cmpq 0x30(%rsp), %rbx
setae %r15b
jne 0x79bb
jmp 0x797c
leaq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x45e0
jmp 0x7a2d
// File: /workspace/github_cpp_makefile_star2_O1/misohena[P]drawstars/./image.h
// Function: Image<ColorRGB<double>> readRawFile<Image<ColorRGB<double>>>(char const*)
ImageT readRawFile(const char *filename)
{
    ImageT image;
    if(File file = File(filename, "rb")){
        unsigned int w = 0, h = 0;
        std::fread(&w, sizeof(w), 1, file);
        std::fread(&h, sizeof(h), 1, file);
        if(w > 0 && h > 0 && w <= 65536 && h <= 65536){
            image.reset(w, h);
            if(std::fread(image.begin(), image.sizeInBytes(), 1, file) != 1){
                image.reset(0, 0);
            }
        }
    }
    return std::move(image);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq 0x2fda(%rip), %rsi      # 0xd5bc
movq %rax, %rdi
callq 0x4350
testq %rax, %rax
je 0xa6b6
movq %rax, %r14
xorl %eax, %eax
leaq 0x14(%rsp), %r15
movl %eax, (%r15)
leaq 0x10(%rsp), %r12
movl %eax, (%r12)
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %r14, %rcx
callq 0x4430
movl $0x4, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rcx
callq 0x4430
movl (%r15), %esi
movl (%r12), %edx
leal -0x1(%rsi), %eax
movl $0x10000, %ecx          # imm = 0x10000
cmpl %ecx, %eax
setb %al
leal -0x1(%rdx), %edi
cmpl %ecx, %edi
setb %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xa6a9
movq %rsp, %rdi
callq 0xb702
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %eax
imull (%rsp), %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
movl $0x1, %edx
movq %r14, %rcx
callq 0x4430
cmpq $0x1, %rax
je 0xa6a9
movq $0x0, (%rsp)
xorl %edi, %edi
callq 0x4030
movq 0x8(%rsp), %rdi
movq %rax, 0x8(%rsp)
testq %rdi, %rdi
je 0xa6a9
callq 0x4370
testq %r14, %r14
je 0xa6b6
movq %r14, %rdi
callq 0x42c0
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq (%rsp), %rcx
movq %rcx, (%rbx)
movq 0x8(%rsp), %rcx
movq %rax, 0x8(%rsp)
movq %rcx, 0x8(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x42c0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xa6fa
callq 0x4370
movq %rbx, %rdi
callq 0x4510
// File: /workspace/github_cpp_makefile_star2_O1/misohena[P]drawstars/./image.h
// Function: bool writeRawFile<Image<ColorRGB<double>>>(char const*, Image<ColorRGB<double>>&)
bool writeRawFile(const char *filename, ImageT &image)
{
    if(File file = File(filename, "wb")){
        const unsigned int w = image.width();
        const unsigned int h = image.height();
        std::fwrite(&w, sizeof(w), 1, file);
        std::fwrite(&h, sizeof(h), 1, file);
        std::fwrite(image.begin(), image.sizeInBytes(), 1, file);
        return true;
    }
    else{
        return false;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
leaq 0x2e33(%rip), %rsi      # 0xd548
callq 0x4350
movq %rax, %rbx
testq %rax, %rax
je 0xa780
movl (%r14), %eax
leaq 0xc(%rsp), %rdi
movl %eax, (%rdi)
movl 0x4(%r14), %eax
leaq 0x8(%rsp), %r15
movl %eax, (%r15)
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x4580
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x4580
movq 0x8(%r14), %rdi
movl 0x4(%r14), %eax
imull (%r14), %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x4580
testq %rbx, %rbx
je 0xa78d
movq %rbx, %rdi
callq 0x42c0
testq %rbx, %rbx
setne %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/misohena[P]drawstars/drawstars.cpp
// Function: OptionEnum<ProjectionMode>::setArgument(Options&, std::basic_string_view<char, std::char_traits<char>>) const
void setArgument(Options &options, std::string_view str) const override
    {
        for(const auto &nameVal : candidates){
            if(nameVal.first == str){
                options.*dst = nameVal.second;
                return;
            }
        }
        throw std::invalid_argument("Unknown value name");
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
movq 0x18(%rdi), %r13
movq 0x20(%rdi), %rbp
cmpq %rbp, %r13
sete %bl
je 0xaebe
movq %rcx, %r14
movq %rdx, %r12
movq %rdi, %r15
addq $0x10, %r13
movq -0x10(%r13), %rdx
cmpq %r12, %rdx
jne 0xaeaa
testq %rdx, %rdx
je 0xaef0
movq -0x8(%r13), %rdi
movq %r14, %rsi
callq 0x42f0
testl %eax, %eax
je 0xaef0
leaq -0x10(%r13), %rax
addq $0x18, %r13
addq $0x18, %rax
cmpq %rbp, %rax
sete %bl
jne 0xae8c
movl $0x10, %edi
callq 0x4160
movq %rax, %rbx
leaq 0x26b1(%rip), %rsi      # 0xd583
movq %rax, %rdi
callq 0x4560
movq 0x7107(%rip), %rsi      # 0x11fe8
movq 0x70f0(%rip), %rdx      # 0x11fd8
movq %rbx, %rdi
callq 0x44d0
movl (%r13), %eax
movq 0x8(%r15), %rcx
movq (%rsp), %rdx
movl %eax, (%rdx,%rcx)
testb $0x1, %bl
jne 0xaebe
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x4200
movq %r14, %rdi
callq 0x4510
// File: /workspace/github_cpp_makefile_star2_O1/misohena[P]drawstars/drawstars.cpp
// Function: OptionTime::setArgument(Options&, std::basic_string_view<char, std::char_traits<char>>) const
void setArgument(Options &options, std::string_view str) const override
    {
        int year, month, day, hour, min, sec;
        if(sscanf(str.data(), "%d-%d-%d %d:%d:%d", &year, &month, &day, &hour, &min, &sec) == 6){
            std::tm lt = {sec, min, hour, day, month-1, year-1900, 0, 0, 0};
            std::time_t unixSeconds = std::mktime(&lt);
            if(unixSeconds != -1){
                options.*dst = unixSeconds;
                return;
            }
        }
        throw std::invalid_argument("Invalid time syntax");
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %r10
leaq 0xc(%rsp), %r11
leaq 0x25d4(%rip), %rsi      # 0xd596
leaq 0x1c(%rsp), %rdx
leaq 0x18(%rsp), %rax
leaq 0x14(%rsp), %r8
leaq 0x10(%rsp), %r9
movq %rcx, %rdi
movq %rax, %rcx
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x42b0
addq $0x10, %rsp
cmpl $0x6, %eax
jne 0xb05f
movl 0x8(%rsp), %eax
leaq 0x20(%rsp), %rdi
movl %eax, (%rdi)
movl 0xc(%rsp), %eax
movl %eax, 0x4(%rdi)
movl 0x10(%rsp), %eax
movl %eax, 0x8(%rdi)
movl 0x14(%rsp), %eax
movl %eax, 0xc(%rdi)
movl 0x18(%rsp), %eax
decl %eax
movl %eax, 0x10(%rdi)
movl $0xfffff894, %eax       # imm = 0xFFFFF894
addl 0x1c(%rsp), %eax
movl %eax, 0x14(%rdi)
movq $0x0, 0x18(%rdi)
movl $0x0, 0x20(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
callq 0x41e0
cmpq $-0x1, %rax
je 0xb05f
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movq 0x8(%r14), %rax
movsd %xmm0, (%rbx,%rax)
addq $0x58, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x4160
movq %rax, %rbx
leaq 0x2535(%rip), %rsi      # 0xd5a8
movq %rax, %rdi
callq 0x4560
movq 0x6f66(%rip), %rsi      # 0x11fe8
movq 0x6f4f(%rip), %rdx      # 0x11fd8
movq %rbx, %rdi
callq 0x44d0
movq %rax, %r14
movq %rbx, %rdi
callq 0x4200
movq %r14, %rdi
callq 0x4510
// File: /workspace/github_cpp_makefile_star2_O1/misohena[P]drawstars/drawstars.cpp
// Function: void drawStarOnEquirectangular<GaiaStar>(Image<ColorRGB<double>>&, GaiaStar const&, StarAppearanceOptions const&)
void drawStarOnEquirectangular(ImageType &canvas, const StarType &star, const StarAppearanceOptions &starAppearanceOptions)
{
    const StarAppearance appearance = calculateStarAppearance(star, starAppearanceOptions);

    fillCircleOnEquirectangular(
        canvas,
        star.ra_deg(), star.dec_deg(),
        appearance.radius,
        PixelPlotter(appearance));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0xb7ce
movss (%rbx), %xmm0
movss 0x4(%rbx), %xmm1
movss 0x18(%r15), %xmm2
movups (%r15), %xmm3
movups 0x10(%r15), %xmm4
movups %xmm4, 0x10(%rsp)
movups %xmm3, (%rsp)
movq %r14, %rdi
callq 0xb8e6
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/misohena[P]drawstars/drawstars.cpp
// Function: StarAppearance calculateStarAppearance<HipStar>(HipStar const&, StarAppearanceOptions const&)
StarAppearance calculateStarAppearance(const Star &star, const StarAppearanceOptions &options)
{
    const float flux = mag2flux(star.mag());
    const float radius =
        flux > options.fluxIncRadius ?
        clamp(std::sqrt(options.radiusDefault * options.radiusDefault * flux / options.fluxIncRadius), 0.0f, options.radiusMax) :
        options.radiusDefault;
    const float fluxAdjusted = options.fluxOffset + options.fluxMultiplier * flux;
    const float fluxSaturated = std::min(options.fluxGamma==1.0 ? fluxAdjusted : std::pow(fluxAdjusted, options.fluxGamma), options.fluxMax);

    return {fluxSaturated * temperatureToRGB(star.teff()), radius};
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movss 0x8(%rsi), %xmm1
mulss 0x10d8(%rip), %xmm1     # 0xd004
movss 0x10d4(%rip), %xmm0     # 0xd008
callq 0x4470
movaps %xmm0, %xmm3
movss 0x10(%r14), %xmm1
movss 0x14(%r14), %xmm2
ucomiss %xmm1, %xmm0
jbe 0xbf96
mulss %xmm2, %xmm2
movaps %xmm3, %xmm0
mulss %xmm2, %xmm0
divss %xmm1, %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0xbf6d
xorps %xmm2, %xmm2
sqrtss %xmm0, %xmm2
jmp 0xbf84
movss %xmm3, 0x10(%rsp)
callq 0x4530
xorps %xmm1, %xmm1
movss 0x10(%rsp), %xmm3
movaps %xmm0, %xmm2
movss 0x18(%r14), %xmm0
minss %xmm2, %xmm0
cmpltss %xmm1, %xmm2
andnps %xmm0, %xmm2
movaps %xmm2, 0x10(%rsp)
movss 0x4(%r14), %xmm0
mulss %xmm3, %xmm0
addss (%r14), %xmm0
movss 0x8(%r14), %xmm1
ucomiss 0x1059(%rip), %xmm1     # 0xd010
jne 0xbfbb
jnp 0xbfc0
callq 0x4470
xorps %xmm1, %xmm1
cvtss2sd 0xc(%r15), %xmm1
mulsd 0x11bf(%rip), %xmm1     # 0xd190
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
addpd 0x1233(%rip), %xmm1     # 0xd210
movapd 0x123b(%rip), %xmm2     # 0xd220
divpd %xmm1, %xmm2
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1            # xmm1 = xmm1[1],xmm2[1]
addsd %xmm2, %xmm1
movss 0xc(%r14), %xmm2
mulsd 0x1195(%rip), %xmm1     # 0xd198
minss %xmm0, %xmm2
movss %xmm2, 0xc(%rsp)
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x6ab7
xorps %xmm0, %xmm0
cvtss2sd 0xc(%rsp), %xmm0
movsd 0x10(%r14), %xmm1
mulsd %xmm0, %xmm1
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd (%r14), %xmm0
movupd %xmm0, (%rbx)
movsd %xmm1, 0x10(%rbx)
movaps 0x10(%rsp), %xmm0
movss %xmm0, 0x18(%rbx)
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/misohena[P]drawstars/drawstars.cpp
// Function: GaiaStar::teff() const
float teff() const
    {
        if(teff_val >= 100 && teff_val < 50000){ // 3229.0 <= teff_val <= 9803.0
            return teff_val;
        }
        else{
            // see: https://github.com/langurmonkey/gaiasky/blob/cfab3a75051a0d521c69b54b5f937b8dafa38b02/core/src/gaiasky/data/group/DR2DataProvider.java#L290
            const float xp = bp - rp;
            return xp <= 1.5 ?
                // Gaia broad band photometry : 5.1.G_BP−G_RP as indicator ofTeﬀ / https://arxiv.org/abs/1008.0815
                std::pow(10, 3.999 + (-0.654+ (0.709 - 0.316*xp) * xp) * xp) :
                lint(xp, 1.5f, 15.0f, 3521.6f, 3000.0f);
        }
    }

// Assembly:
movss 0x14(%rdi), %xmm0
ucomiss 0x12d8(%rip), %xmm0     # 0xd038
jb 0xbd70
movss 0x12d2(%rip), %xmm1     # 0xd03c
ucomiss %xmm0, %xmm1
jbe 0xbd70
retq
movss 0xc(%rdi), %xmm0
subss 0x10(%rdi), %xmm0
movss 0x12be(%rip), %xmm1     # 0xd040
ucomiss %xmm0, %xmm1
jae 0xbd92
jbe 0xbdd9
movss 0x12b3(%rip), %xmm0     # 0xd044
retq
pushq %rax
cvtss2sd %xmm0, %xmm0
movsd 0x13c9(%rip), %xmm1     # 0xd168
mulsd %xmm0, %xmm1
addsd 0x13c5(%rip), %xmm1     # 0xd170
mulsd %xmm0, %xmm1
addsd 0x13c1(%rip), %xmm1     # 0xd178
mulsd %xmm0, %xmm1
addsd 0x13bd(%rip), %xmm1     # 0xd180
movsd 0x12bd(%rip), %xmm0     # 0xd088
callq 0x44f0
cvtsd2ss %xmm0, %xmm0
addq $0x8, %rsp
retq
ucomiss 0x126c(%rip), %xmm0     # 0xd04c
jbe 0xbdeb
movss 0x125e(%rip), %xmm0     # 0xd048
retq
addss 0x125d(%rip), %xmm0     # 0xd050
mulss 0x1259(%rip), %xmm0     # 0xd054
divss 0x1255(%rip), %xmm0     # 0xd058
addss 0x1239(%rip), %xmm0     # 0xd044
retq
// File: /workspace/github_cpp_makefile_star2_O1/wkohlenberg[P]simple_NN/src/main.cpp
// Function: TrainData::readInput(std::vector<double, std::allocator<double>>&)
unsigned int TrainData::readInput(vector<double> &input)
{
  // Clear input vector
  input.clear();

  string in;
  m_trainFile >> in;
  if (in.compare("in:") == 0)
  {
    double inputVal;
    m_trainFile >> inputVal;
    input.push_back(inputVal);
    m_trainFile >> inputVal;
    input.push_back(inputVal);
  }

  return input.size();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x2770
movq %rax, 0x8(%rbx)
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x2230
leaq 0x38f9(%rip), %rsi      # 0x6092
leaq 0x10(%rsp), %rdi
callq 0x2090
testl %eax, %eax
jne 0x2817
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x2130
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x27d2
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x27df
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x3ed2
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x2130
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x280a
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2817
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x3ed2
movq (%rbx), %r14
movq 0x8(%rbx), %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x2835
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21f0
subq %r14, %rbx
shrq $0x3, %rbx
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x284a
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x2864
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O1/wkohlenberg[P]simple_NN/src/main.cpp
// Function: TrainData::readTarget(std::vector<double, std::allocator<double>>&)
unsigned int TrainData::readTarget(vector<double> &target)
{
  // Clear target vector
  target.clear();

  string out;
  m_trainFile >> out;
  if (out.compare("out:") == 0)
  {
    double targetVal;
    m_trainFile >> targetVal;
    target.push_back(targetVal);
  }

  return target.size();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x28aa
movq %rax, 0x8(%rbx)
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x2230
leaq 0x37c3(%rip), %rsi      # 0x6096
leaq 0x10(%rsp), %rdi
callq 0x2090
testl %eax, %eax
jne 0x2919
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x2130
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x290c
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2919
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x3ed2
movq (%rbx), %r14
movq 0x8(%rbx), %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x2937
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21f0
subq %r14, %rbx
shrq $0x3, %rbx
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x294c
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x2966
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O1/wkohlenberg[P]simple_NN/src/main.cpp
// Function: Neuron::calculateOutputGradient(double, std::vector<Neuron, std::allocator<Neuron>>&)
void Neuron::calculateOutputGradient(double target, Layer &prevLayer)
{
  for (unsigned n = 0; n < prevLayer.size()-1; n++)
  {
    m_target = target;
    m_error = m_target - m_outputValue;
    double delta = -(m_target - m_outputValue);
    m_gradient = delta * derivativeSigmoid(m_outputValue) * prevLayer[n].m_outputValue;
    prevLayer[n].m_outputWeight[m_index].deltaWeight = m_gradient * eta;
  }
}

// Assembly:
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
sarq $0x6, %rcx
decq %rcx
je 0x2a71
movsd 0x8(%rdi), %xmm3
movapd %xmm0, %xmm1
subsd %xmm3, %xmm1
movapd 0x3602(%rip), %xmm4     # 0x6010
xorpd %xmm1, %xmm4
movsd 0x3636(%rip), %xmm2     # 0x6050
subsd %xmm3, %xmm2
mulsd %xmm3, %xmm2
mulsd %xmm4, %xmm2
movl (%rdi), %edx
addq $0x28, %rax
movl $0x1, %esi
shlq $0x4, %rdx
movsd -0x20(%rax), %xmm3
mulsd %xmm2, %xmm3
movsd 0x6772(%rip), %xmm4     # 0x91b8
mulsd %xmm3, %xmm4
movq (%rax), %r8
movsd %xmm4, 0x8(%r8,%rdx)
movl %esi, %r8d
addq $0x40, %rax
incl %esi
cmpq %r8, %rcx
ja 0x2a35
movsd %xmm0, 0x18(%rdi)
movsd %xmm1, 0x20(%rdi)
movsd %xmm3, 0x10(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/wkohlenberg[P]simple_NN/src/main.cpp
// Function: Neuron::calculateHiddenGradient(std::vector<Neuron, std::allocator<Neuron>> const&, std::vector<Neuron, std::allocator<Neuron>>&)
void Neuron::calculateHiddenGradient(const Layer &nextLayer, Layer &prevLayer)
{
  double sum = 0.;
  double delta = 0.;

  for (unsigned n = 0; n < nextLayer.size() - 1; n++)   // Exclude the bias node
  {
    m_error = m_target - m_outputValue;
    delta = -(nextLayer[n].m_target - nextLayer[n].m_outputValue);
    sum += m_outputWeight[n].weight * derivativeSigmoid(nextLayer[n].m_outputValue) * delta;
  }

  for (unsigned n = 0; n < prevLayer.size()-1; n++)
  {
    m_gradient = sum * Neuron::derivativeSigmoid(m_outputValue) * prevLayer[n].m_outputValue;
    prevLayer[n].m_outputWeight[m_index].deltaWeight = m_gradient*eta;
  }
}

// Assembly:
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
sarq $0x6, %rcx
decq %rcx
je 0x2aea
movsd 0x18(%rdi), %xmm0
subsd 0x8(%rdi), %xmm0
movsd %xmm0, 0x20(%rdi)
movq 0x28(%rdi), %rsi
xorpd %xmm0, %xmm0
movl $0x1, %r8d
xorl %r9d, %r9d
movsd 0x35a3(%rip), %xmm1     # 0x6050
movsd 0x8(%rax,%r9,4), %xmm2
movsd 0x18(%rax,%r9,4), %xmm3
subsd %xmm2, %xmm3
movapd %xmm1, %xmm4
subsd %xmm2, %xmm4
mulsd %xmm2, %xmm4
mulsd (%rsi,%r9), %xmm4
mulsd %xmm3, %xmm4
subsd %xmm4, %xmm0
movl %r8d, %r10d
addq $0x10, %r9
incl %r8d
cmpq %r10, %rcx
ja 0x2aad
jmp 0x2aee
xorpd %xmm0, %xmm0
movq (%rdx), %rax
movq 0x8(%rdx), %rcx
subq %rax, %rcx
sarq $0x6, %rcx
decq %rcx
je 0x2b5b
movsd 0x8(%rdi), %xmm1
movsd 0x3542(%rip), %xmm2     # 0x6050
subsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm2, %xmm0
movl (%rdi), %edx
addq $0x28, %rax
movl $0x1, %esi
shlq $0x4, %rdx
movsd -0x20(%rax), %xmm1
mulsd %xmm0, %xmm1
movsd 0x667e(%rip), %xmm2     # 0x91b8
mulsd %xmm1, %xmm2
movq (%rax), %r8
movsd %xmm2, 0x8(%r8,%rdx)
movl %esi, %r8d
addq $0x40, %rax
incl %esi
cmpq %r8, %rcx
ja 0x2b29
movsd %xmm1, 0x10(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/wkohlenberg[P]simple_NN/src/main.cpp
// Function: Neuron::feedForward(std::vector<Neuron, std::allocator<Neuron>> const&)
void Neuron::feedForward(const Layer &prevLayer)
{
  double sum = 0.0;
  // calculate the output*weights of neurons from previous Layer
  for (unsigned i = 0; i < prevLayer.size(); i++)
  {
    sum += prevLayer[i].getOutputVal() * prevLayer[i].m_outputWeight[m_index].weight;
  }

  m_outputValue = Neuron::sigmoid(sum);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
je 0x2ba3
sarq $0x6, %rcx
movl (%rbx), %edx
addq $0x28, %rax
xorpd %xmm0, %xmm0
movl $0x1, %esi
shlq $0x4, %rdx
movsd -0x20(%rax), %xmm1
movq (%rax), %rdi
mulsd (%rdi,%rdx), %xmm1
addsd %xmm1, %xmm0
movl %esi, %edi
addq $0x40, %rax
incl %esi
cmpq %rdi, %rcx
ja 0x2b83
jmp 0x2ba7
xorpd %xmm0, %xmm0
xorpd 0x3461(%rip), %xmm0     # 0x6010
callq 0x2320
movsd 0x3494(%rip), %xmm1     # 0x6050
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/wkohlenberg[P]simple_NN/src/main.cpp
// Function: Neuron::Neuron(unsigned int, unsigned int)
Neuron::Neuron(unsigned outputs, unsigned index)
{
  // Real random
  random_device rd;
  mt19937 gen(rd());
  uniform_real_distribution<> dis(0, 1);

  for (unsigned i = 0; i < outputs; i++)
  {
    m_outputWeight.push_back(Connection());
    m_outputWeight.back().weight = dis(gen);
    cout << m_outputWeight.back().weight << endl;
  }

  m_index = index;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2738, %rsp           # imm = 0x2738
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x28(%rdi), %r14
xorpd %xmm0, %xmm0
movupd %xmm0, 0x28(%rdi)
movq $0x0, 0x38(%rdi)
leaq 0x13b0(%rsp), %rdi
callq 0x3b76
leaq 0x13b0(%rsp), %rdi
callq 0x2250
movl %ebp, 0xc(%rsp)
movl %eax, %eax
movq %rax, 0x28(%rsp)
movl $0x1, %ecx
movq %rax, %rdx
shrq $0x1e, %rdx
xorl %eax, %edx
imull $0x6c078965, %edx, %eax # imm = 0x6C078965
addl %ecx, %eax
movq %rax, 0x28(%rsp,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x2c24
movq $0x270, 0x13a8(%rsp) # imm = 0x270
testl %r15d, %r15d
je 0x2ce3
leaq 0x28(%rsp), %r13
movq 0x6371(%rip), %rbp      # 0x8fd8
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
movq 0x30(%rbx), %rsi
cmpq 0x38(%rbx), %rsi
je 0x2c86
movupd %xmm0, (%rsi)
addq $0x10, 0x30(%rbx)
jmp 0x2c93
movq %r14, %rdi
leaq 0x10(%rsp), %rdx
callq 0x4012
movq %r13, %rdi
callq 0x4151
addsd 0x33b5(%rip), %xmm0     # 0x6058
movq 0x30(%rbx), %rax
movsd %xmm0, -0x10(%rax)
movq %rbp, %rdi
callq 0x22b0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
decl %r15d
jne 0x2c67
movl 0xc(%rsp), %eax
movl %eax, (%rbx)
leaq 0x13b0(%rsp), %rdi
callq 0x21c0
addq $0x2738, %rsp           # imm = 0x2738
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2d3f
jmp 0x2d13
movq %rax, %r15
jmp 0x2d23
jmp 0x2d13
movq %rax, %r15
leaq 0x13b0(%rsp), %rdi
callq 0x21c0
movq (%r14), %rdi
testq %rdi, %rdi
je 0x2d37
movq 0x38(%rbx), %rsi
subq %rdi, %rsi
callq 0x21f0
movq %r15, %rdi
callq 0x2310
movq %rax, %rdi
callq 0x3b6a
nop
// File: /workspace/github_cpp_makefile_star2_O1/wkohlenberg[P]simple_NN/src/main.cpp
// Function: Net::getOutputValLayer(std::vector<double, std::allocator<double>>&)
void Net::getOutputValLayer(vector<double> &results)
{
  results.clear();
  Layer &outputLayer = m_layers.back();
  for (unsigned i = 0; i < outputLayer.size()-1; i++) // No bias node output
  {
    results.push_back(outputLayer[i].getOutputVal());
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x2d85
movq %rax, 0x8(%rbx)
movq 0x18(%rdi), %r15
movq -0x10(%r15), %rax
subq -0x18(%r15), %rax
cmpq $0x40, %rax
je 0x2def
movl $0x1, %ebp
xorl %eax, %eax
movq %rsp, %r14
movq -0x18(%r15), %rcx
shlq $0x6, %rax
movsd 0x8(%rcx,%rax), %xmm0
movsd %xmm0, (%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2dcc
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2dd7
movq %rbx, %rdi
movq %r14, %rdx
callq 0x43bc
movl %ebp, %eax
movq -0x10(%r15), %rcx
subq -0x18(%r15), %rcx
sarq $0x6, %rcx
decq %rcx
incl %ebp
cmpq %rax, %rcx
ja 0x2da1
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/wkohlenberg[P]simple_NN/src/main.cpp
// Function: Net::feedForward(std::vector<double, std::allocator<double>> const&)
void Net::feedForward(const vector<double> &input)
{
  // Assign input values to input neurons
  for (unsigned i = 0; i < input.size(); i++)
  {
    m_layers[0][i].setOutputVal(input[i]);
  }

  // Start @ the first hidden layer after the input layer
  // Per neuron calculate the output*weights of the last layer
  for (unsigned layerNum = 1; layerNum < m_layers.size(); layerNum++)
  {
    Layer &prevLayer = m_layers[layerNum - 1];
    for (unsigned n = 0; n < m_layers[layerNum].size()-1; n++)
    {
      m_layers[layerNum][n].feedForward(prevLayer);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
je 0x2e3f
sarq $0x3, %rcx
movq 0x10(%rbx), %rdx
movq (%rdx), %rdx
movl $0x1, %esi
xorl %edi, %edi
movsd (%rax,%rdi), %xmm0
movsd %xmm0, 0x8(%rdx,%rdi,8)
movl %esi, %r8d
addq $0x8, %rdi
incl %esi
cmpq %r8, %rcx
ja 0x2e26
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r15, %rcx
cmpq $0x2, %rcx
jb 0x2eec
movl $0x1, %r12d
movl $0x1, %ecx
movq 0x10(%rbx), %rdx
leaq (%rcx,%rcx,2), %r13
movq (%rdx,%r13,8), %rcx
movq 0x8(%rdx,%r13,8), %rdx
subq %rcx, %rdx
cmpq $0x40, %rdx
je 0x2ece
leal -0x1(%r12), %edx
leaq (%rdx,%rdx,2), %rdx
leaq (%rax,%rdx,8), %r14
movl $0x1, %ebp
xorl %edi, %edi
shlq $0x6, %rdi
addq %rcx, %rdi
movq %r14, %rsi
callq 0x2b5c
movl %ebp, %edi
movq 0x10(%rbx), %rax
movq (%rax,%r13,8), %rcx
movq 0x8(%rax,%r13,8), %rax
subq %rcx, %rax
sarq $0x6, %rax
decq %rax
incl %ebp
cmpq %rdi, %rax
ja 0x2e9f
incl %r12d
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %r15, %rdx
movq %r12, %rcx
cmpq %r12, %rdx
ja 0x2e71
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/wkohlenberg[P]simple_NN/src/main.cpp
// Function: Net::backPropagation(std::vector<double, std::allocator<double>> const&)
void Net::backPropagation(const vector<double> &target)
{
  calcTotalError(target);
  averageError();

  for (unsigned n = 0; n < m_layers.back().size()-1; n++)
  {
    Layer &prevLayer = m_layers[1];
    m_layers.back()[n].calculateOutputGradient(target[n], prevLayer);
  }

  // Calculate the derivative of the hidden neurons
  Layer &hiddenLayer = m_layers[m_layers.size()-2];
  for (unsigned n = 0; n < m_layers[1].size()-1; n++) // Exclude the bias node
  {
    hiddenLayer[n].calculateHiddenGradient(m_layers.back(), m_layers[0]);
  }

  for (unsigned n = 0; n < m_layers.size()-1; n++)  // No output layer opdate...
  {
    for (unsigned i = 0; i < m_layers[n].size()-1; i++) // Exclude bias nodes
    {
      m_layers[n][i].updateWeights();
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x307e
movsd 0x62aa(%rip), %xmm0     # 0x91c0
movsd (%rbx), %xmm1
mulsd %xmm0, %xmm1
addsd 0x8(%rbx), %xmm1
addsd 0x3125(%rip), %xmm0     # 0x6050
divsd %xmm0, %xmm1
movsd %xmm1, (%rbx)
movq 0x18(%rbx), %r15
movq -0x18(%r15), %rax
movq -0x10(%r15), %rcx
subq %rax, %rcx
cmpq $0x40, %rcx
je 0x2f8d
movl $0x1, %ebp
xorl %ecx, %ecx
movq 0x10(%rbx), %rsi
addq $0x18, %rsi
movq %rcx, %rdi
shlq $0x6, %rdi
addq %rax, %rdi
movq (%r14), %rax
movsd (%rax,%rcx,8), %xmm0
callq 0x29e6
movl %ebp, %ecx
movq 0x18(%rbx), %r15
movq -0x18(%r15), %rax
movq -0x10(%r15), %rdx
subq %rax, %rdx
sarq $0x6, %rdx
decq %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x2f4f
movq 0x10(%rbx), %r14
movq 0x20(%r14), %rax
subq 0x18(%r14), %rax
cmpq $0x40, %rax
jne 0x2fa4
movq %r14, %rdx
jmp 0x2fe3
subq %r14, %r15
movl $0x1, %ebp
xorl %edi, %edi
movq %r14, %rdx
shlq $0x6, %rdi
addq -0x30(%r14,%r15), %rdi
movq 0x18(%rbx), %rsi
addq $-0x18, %rsi
callq 0x2a72
movl %ebp, %edi
movq 0x10(%rbx), %rdx
movq 0x20(%rdx), %rax
subq 0x18(%rdx), %rax
sarq $0x6, %rax
decq %rax
incl %ebp
cmpq %rdi, %rax
ja 0x2fb1
movq 0x18(%rbx), %rcx
subq %rdx, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
decq %rax
je 0x3073
xorl %ecx, %ecx
leaq (%rcx,%rcx,2), %rdi
movq (%rdx,%rdi,8), %rsi
movq 0x8(%rdx,%rdi,8), %rdi
subq %rsi, %rdi
sarq $0x6, %rdi
decq %rdi
je 0x3069
xorl %r8d, %r8d
movq %r8, %r10
shlq $0x6, %r10
movq 0x28(%rsi,%r10), %r9
movq 0x30(%rsi,%r10), %r10
subq %r9, %r10
je 0x305e
sarq $0x4, %r10
movl $0x1, %r11d
movsd (%r9), %xmm0
subsd 0x8(%r9), %xmm0
movsd %xmm0, (%r9)
movl %r11d, %ebx
addq $0x10, %r9
incl %r11d
cmpq %rbx, %r10
ja 0x303f
incq %r8
movl %r8d, %r9d
cmpq %r9, %rdi
ja 0x301f
incq %rcx
movl %ecx, %esi
cmpq %rsi, %rax
ja 0x3003
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/wkohlenberg[P]simple_NN/src/main.cpp
// Function: Net::calcTotalError(std::vector<double, std::allocator<double>> const&)
double Net::calcTotalError(const vector<double> &target)
{
  double sum = 0.;
  for (unsigned n = 0; n < m_layers.back().size()-1; n++)
  {
    sum += 0.5*pow(target[n]-m_layers.back()[n].getError(), 2);
  }

  m_error = sum;

  return sum;
}

// Assembly:
movq 0x18(%rdi), %rcx
movq -0x18(%rcx), %rax
movq -0x10(%rcx), %rcx
subq %rax, %rcx
sarq $0x6, %rcx
decq %rcx
je 0x30d6
movq (%rsi), %rdx
xorpd %xmm0, %xmm0
movl $0x1, %esi
xorl %r8d, %r8d
movsd 0x2fb3(%rip), %xmm1     # 0x6060
movsd (%rdx,%r8), %xmm2
subsd 0x20(%rax,%r8,8), %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm2
addsd %xmm2, %xmm0
movl %esi, %r9d
addq $0x8, %r8
incl %esi
cmpq %r9, %rcx
ja 0x30ad
jmp 0x30da
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/wkohlenberg[P]simple_NN/src/main.cpp
// Function: showVectorValues[abi:cxx11](std::vector<double, std::allocator<double>>)
string showVectorValues(vector<double> value)
{
  string vStr;
  for (unsigned int i = 0; i < value.size(); i++)
  {
    vStr.append(to_string(value[i]));
    vStr.append(" ");
  }

  return vStr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x3309
movq %rsi, %r14
movl $0x1, %r15d
xorl %ecx, %ecx
leaq 0x2e75(%rip), %r12      # 0x6102
leaq 0x8(%rsp), %r13
leaq 0x2df7(%rip), %rbp      # 0x6090
movsd (%rax,%rcx,8), %xmm0
movl $0x148, %edx            # imm = 0x148
movq %r13, %rdi
movq 0x5d13(%rip), %rsi      # 0x8fc0
movq %r12, %rcx
movb $0x1, %al
callq 0x3d00
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x20a0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x32e5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2340
movl %r15d, %ecx
movq (%r14), %rax
movq 0x8(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %r15d
cmpq %rcx, %rdx
ja 0x3299
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x333e
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3341
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x3341
movq %rax, %r14
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x3359
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x21f0
movq %r14, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O1/wkohlenberg[P]simple_NN/src/mnist.cpp
// Function: getInput(std::vector<int, std::allocator<int>>&, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>, int)
int getInput(vector<int> &input, vector<vector<int> > training, int index)
{
	input.clear();
	unsigned size = training[index].size();
	for (unsigned n = 0; n < size; n++)
	{
		input.push_back(training[index].at(n));
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0x4fd2
movq %rax, 0x8(%r14)
movslq %edx, %rax
movq (%rbx), %rcx
leaq (%rax,%rax,2), %r12
movq 0x8(%rcx,%r12,8), %r13
subq (%rcx,%r12,8), %r13
shrq $0x2, %r13
testl %r13d, %r13d
je 0x503a
xorl %ebp, %ebp
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r12,8), %rdx
movq 0x8(%rax,%r12,8), %rax
subq %rdx, %rax
sarq $0x2, %rax
cmpq %r15, %rax
jbe 0x504b
addq %rbp, %rdx
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x5026
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r14)
jmp 0x502e
movq %r14, %rdi
callq 0x54f0
incq %r15
addq $0x4, %rbp
cmpl %r15d, %r13d
jne 0x4ff3
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x119d(%rip), %rdi      # 0x61ef
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O1/wkohlenberg[P]simple_NN/src/mnist.cpp
// Function: getOutput(std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>, int)
int getOutput(vector<int> &output, vector<int> labels, int index)
{
	// Load vector ouput with zero's
	fill (output.begin(), output.end(), 0);

	int label = labels.at(index);
	for (unsigned i = 0; i < labels.size(); i++)
	{
		if (int(i)== label)
		{
			output.at(i) = 1;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq (%rdi), %r14
movq 0x8(%rdi), %rbx
cmpq %rbx, %r14
je 0x5093
movq %rbx, %rdx
subq %r14, %rdx
addq $-0x4, %rdx
andq $-0x4, %rdx
addq $0x4, %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2110
movslq %ebp, %rax
movq (%r15), %rdi
movq 0x8(%r15), %rdx
subq %rdi, %rdx
sarq $0x2, %rdx
cmpq %rax, %rdx
jbe 0x50f8
subq %r14, %rbx
sarq $0x2, %rbx
xorl %esi, %esi
xorl %ecx, %ecx
subl (%rdi,%rax,4), %ecx
movl $0x1, %eax
leal (%rcx,%rax), %edi
cmpl $0x1, %edi
jne 0x50d1
cmpq %rsi, %rbx
jbe 0x50e7
movl $0x1, (%r14,%rsi,4)
movl %eax, %esi
incl %eax
cmpq %rsi, %rdx
ja 0x50bc
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1101(%rip), %rdi      # 0x61ef
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2290
leaq 0x10f0(%rip), %rdi      # 0x61ef
movq %rax, %rsi
jmp 0x50f1
// File: /workspace/github_cpp_makefile_star2_O1/kaiming[P]Chamber-Crawler-3k/Board/board.cc
// Function: Board::isUnoccupied(std::shared_ptr<WalkableTile>)
bool Board::isUnoccupied(std::shared_ptr<WalkableTile> target) {
    // Check in chamber (not a doorway or hallway)
    if (target->getRoom() < 0 || target->getOccupant() || target->getGold() || target->getPotion() || target->isExit()) {
        return false;
    } else {
        return true;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq (%rsi), %rdi
callq 0x1af18
movl %eax, %ebx
movb $0x1, %bpl
testl %eax, %eax
js 0xf5e0
movq (%r14), %rsi
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x1ae4e
cmpq $0x0, (%r15)
je 0xf5e7
xorl %r15d, %r15d
xorl %eax, %eax
jmp 0xf620
movq (%r14), %rsi
leaq 0x18(%rsp), %rdi
callq 0x1aece
cmpq $0x0, 0x18(%rsp)
je 0xf603
movb $0x1, %r15b
xorl %eax, %eax
jmp 0xf61d
movq (%r14), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1ae8e
movb $0x1, %r15b
cmpq $0x0, 0x8(%rsp)
je 0xf66b
movb $0x1, %al
movb $0x1, %bpl
testb %al, %al
je 0xf633
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xf633
callq 0x78e4
testb %r15b, %r15b
je 0xf647
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xf647
callq 0x78e4
testl %ebx, %ebx
js 0xf65a
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xf65a
callq 0x78e4
xorb $0x1, %bpl
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rdi
callq 0x1af0e
movl %eax, %ebp
movb $0x1, %al
jmp 0xf620
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xf690
callq 0x78e4
jmp 0xf690
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xf6a4
callq 0x78e4
jmp 0xf6a4
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xf6b3
callq 0x78e4
movq %rbx, %rdi
callq 0x5390
nop
// File: /workspace/github_cpp_makefile_star2_O1/kaiming[P]Chamber-Crawler-3k/Board/board.cc
// Function: Board::changeFloor()
void Board::changeFloor() {
    // Change Floor
    floorNum += 1;

    // Check if floors[floorNum-1] is populated
    if (filled[floorNum-1]) {
        // Floor has been pre-generated
        player = playerSpawns[floorNum-1];
        player->setOccupant(playerPtr);
    } else {
        // Floor has not been pre-generated
        enemies.clear();
        chambers.clear();
        dragonHoards.clear();
        assignChambers();
        generateFloor();
    }

    player->getOccupant()->setAtk(defaultAtk);
    player->getOccupant()->setDef(defaultDef);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movslq 0x108(%rdi), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x108(%rdi)
leaq 0x3f(%rax), %rcx
testq %rax, %rax
cmovnsq %rax, %rcx
sarq $0x6, %rcx
shlq $0x3, %rcx
addq 0x18(%rdi), %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
leaq 0x3f(%rdx), %rsi
andq %rax, %rsi
xorl %edi, %edi
cmpq %rdx, %rsi
setbe %dil
movq -0x8(%rcx,%rdi,8), %rcx
btq %rax, %rcx
jae 0xf77d
movq 0x40(%rbx), %rcx
shlq $0x4, %rax
leaq (%rcx,%rax), %rsi
addq $0x8, %rsi
movq -0x8(%rsi), %rax
movq %rax, 0xb8(%rbx)
leaq 0xc0(%rbx), %rdi
callq 0xbc6e
movq 0xb8(%rbx), %rdi
movq 0xf8(%rbx), %rax
movq %rax, 0x18(%rsp)
movq 0x100(%rbx), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0xf80b
movq 0x16854(%rip), %rcx     # 0x25fc0
cmpb $0x0, (%rcx)
je 0xf807
incl 0x8(%rax)
jmp 0xf80b
movq 0x58(%rbx), %r15
movq 0x60(%rbx), %r12
cmpq %r15, %r12
je 0xf7a2
movq %r15, %r14
movq %r14, %rdi
callq 0x7700
addq $0x18, %r14
cmpq %r12, %r14
jne 0xf78d
movq %r15, 0x60(%rbx)
movq 0xe0(%rbx), %r15
movq 0xe8(%rbx), %r12
cmpq %r15, %r12
je 0xf7d0
movq %r15, %r14
movq %r14, %rdi
callq 0x7700
addq $0x18, %r14
cmpq %r12, %r14
jne 0xf7b8
movq %r15, 0xe8(%rbx)
movq 0x70(%rbx), %r15
movq 0x78(%rbx), %r12
cmpq %r15, %r12
je 0xf7f5
movq %r15, %r14
movq %r14, %rdi
callq 0x7700
addq $0x18, %r14
cmpq %r12, %r14
jne 0xf7e0
movq %r15, 0x78(%rbx)
movq %rbx, %rdi
callq 0xd72c
movq %rbx, %rdi
callq 0xd93e
jmp 0xf824
lock
incl 0x8(%rax)
leaq 0x18(%rsp), %rsi
callq 0x1ae7a
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xf824
callq 0x78e4
movq 0xb8(%rbx), %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x1ae4e
movq (%r14), %rdi
cvtsi2sdl 0xb0(%rbx), %xmm0
callq 0x16c32
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xf857
callq 0x78e4
movq 0xb8(%rbx), %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x1ae4e
movq (%r14), %rdi
xorps %xmm0, %xmm0
cvtsi2sdl 0xb4(%rbx), %xmm0
callq 0x16c42
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xf88d
callq 0x78e4
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
jmp 0xf8ad
jmp 0xf8a5
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xf8b7
callq 0x78e4
movq %rbx, %rdi
callq 0x5390
nop
// File: /workspace/github_cpp_makefile_star2_O1/kaiming[P]Chamber-Crawler-3k/Enemy/dragon.cc
// Function: Dragon::getAttacked(Player&)
bool Dragon::getAttacked(Player & p) {
    
    bool Killed = p.attack(*this);

    // Check if Dragon is dead
    if (Killed) {
        isAlive = false;
    }

    return Killed;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rax
movq %rsi, %rdi
movq %rbx, %rsi
callq *0x38(%rax)
testb %al, %al
je 0x16cc6
movb $0x0, 0x20(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/kaiming[P]Chamber-Crawler-3k/Enemy/dragon.cc
// Function: Dragon::attack(Shade&)
bool Dragon::attack(Shade & s) {
    // Determine attack success/fail
    if (std::rand() % 2 == 0) {
        // Attack failed
        return false;
    } // Else, attack proceeds
    
    // Calculate damage dealt
    double damage = std::ceil(100/(100 + s.getDef()) * this->getAtk());

    // Set new defender HP
    s.setHP(s.getHP() - damage);

    // Check if defender died
    if (s.getHP() <= 0) {
        s.setHP(0);
        return true;
    }

    // Defender alive otherwise
    return false;

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x5080
testb $0x1, %al
jne 0x16cdf
xorl %eax, %eax
jmp 0x16d4b
movq %rbx, %rdi
callq 0x16c26
movsd 0x6369(%rip), %xmm1     # 0x1d058
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movq %r14, %rdi
callq 0x16c20
mulsd (%rsp), %xmm0
callq 0x5050
movsd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x16c1a
subsd (%rsp), %xmm0
movq %rbx, %rdi
callq 0x16c2c
movq %rbx, %rdi
callq 0x16c1a
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
setae %al
jb 0x16d4b
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x16c2c
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/kaiming[P]Chamber-Crawler-3k/Enemy/dragon.cc
// Function: Dragon::attack(Drow&)
bool Dragon::attack(Drow & d) {
    // Determine attack success/fail
    if (std::rand() % 2 == 0) {
        // Attack failed
        return false;
    } // Else, attack proceeds
    
    // Calculate damage dealt
    double damage = std::ceil(100/(100 + d.getDef()) * this->getAtk());

    // Set new defender HP
    d.setHP(d.getHP() - damage);

    // Check if defender died
    if (d.getHP() <= 0) {
        d.setHP(0);
        return true;
    }

    // Defender alive otherwise
    return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x5080
testb $0x1, %al
jne 0x16d6b
xorl %eax, %eax
jmp 0x16dd7
movq %rbx, %rdi
callq 0x16c26
movsd 0x62dd(%rip), %xmm1     # 0x1d058
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movq %r14, %rdi
callq 0x16c20
mulsd (%rsp), %xmm0
callq 0x5050
movsd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x16c1a
subsd (%rsp), %xmm0
movq %rbx, %rdi
callq 0x16c2c
movq %rbx, %rdi
callq 0x16c1a
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
setae %al
jb 0x16dd7
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x16c2c
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/kaiming[P]Chamber-Crawler-3k/Enemy/dragon.cc
// Function: Dragon::attack(Vampire&)
bool Dragon::attack(Vampire & v) {
    // Determine attack success/fail
    if (std::rand() % 2 == 0) {
        // Attack failed
        return false;
    } // Else, attack proceeds
    
    // Calculate damage dealt
    double damage = std::ceil(100/(100 + v.getDef()) * this->getAtk());

    // Set new defender HP
    v.setHP(v.getHP() - damage);

    // Check if defender died
    if (v.getHP() <= 0) {
        v.setHP(0);
        return true;
    }

    // Defender alive otherwise
    return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x5080
testb $0x1, %al
jne 0x16df7
xorl %eax, %eax
jmp 0x16e63
movq %rbx, %rdi
callq 0x16c26
movsd 0x6251(%rip), %xmm1     # 0x1d058
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movq %r14, %rdi
callq 0x16c20
mulsd (%rsp), %xmm0
callq 0x5050
movsd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x16c1a
subsd (%rsp), %xmm0
movq %rbx, %rdi
callq 0x16c2c
movq %rbx, %rdi
callq 0x16c1a
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
setae %al
jb 0x16e63
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x16c2c
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/kaiming[P]Chamber-Crawler-3k/Enemy/dragon.cc
// Function: Dragon::attack(Troll&)
bool Dragon::attack(Troll & t) {
    // Determine attack success/fail
    if (std::rand() % 2 == 0) {
        // Attack failed
        return false;
    } // Else, attack proceeds
    
    // Calculate damage dealt
    double damage = std::ceil(100/(100 + t.getDef()) * this->getAtk());

    // Set new defender HP
    t.setHP(t.getHP() - damage);

    // Check if defender died
    if (t.getHP() <= 0) {
        t.setHP(0);
        return true;
    }

    // Defender alive otherwise
    return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x5080
testb $0x1, %al
jne 0x16e83
xorl %eax, %eax
jmp 0x16eef
movq %rbx, %rdi
callq 0x16c26
movsd 0x61c5(%rip), %xmm1     # 0x1d058
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movq %r14, %rdi
callq 0x16c20
mulsd (%rsp), %xmm0
callq 0x5050
movsd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x16c1a
subsd (%rsp), %xmm0
movq %rbx, %rdi
callq 0x16c2c
movq %rbx, %rdi
callq 0x16c1a
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
setae %al
jb 0x16eef
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x16c2c
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/kaiming[P]Chamber-Crawler-3k/Enemy/dragon.cc
// Function: Dragon::attack(Goblin&)
bool Dragon::attack(Goblin & g) {
    // Determine attack success/fail
    if (std::rand() % 2 == 0) {
        // Attack failed
        return false;
    } // Else, attack proceeds
    
    // Calculate damage dealt
    double damage = std::ceil(100/(100 + g.getDef()) * this->getAtk());

    // Set new defender HP
    g.setHP(g.getHP() - damage);

    // Check if defender died
    if (g.getHP() <= 0) {
        g.setHP(0);
        return true;
    }

    // Defender alive otherwise
    return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x5080
testb $0x1, %al
jne 0x16f0f
xorl %eax, %eax
jmp 0x16f7b
movq %rbx, %rdi
callq 0x16c26
movsd 0x6139(%rip), %xmm1     # 0x1d058
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movq %r14, %rdi
callq 0x16c20
mulsd (%rsp), %xmm0
callq 0x5050
movsd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x16c1a
subsd (%rsp), %xmm0
movq %rbx, %rdi
callq 0x16c2c
movq %rbx, %rdi
callq 0x16c1a
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
setae %al
jb 0x16f7b
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x16c2c
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop