LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdx, %rbx
movq %rdi, 0x18(%rsp)
movslq %esi, %r14
pushq $0x1
popq %r15
xorl %r12d, %r12d
movq $0x0, 0x8(%rsp)
xorl %r13d, %r13d
movq %r14, 0x10(%rsp)
movq %rdx, 0x20(%rsp)
cmpq %r14, %r15
jge 0x669f
movq (%rbx,%r15,8), %rbp
testq %r13, %r13
jne 0x6617
cmpb $0x2d, (%rbp)
jne 0x6612
movq %r12, %rbx
leaq 0x1(%rbp), %r14
xorl %r12d, %r12d
movzbl (%r14), %eax
incq %r14
incq %r12
cmpl $0x3d, %eax
je 0x65c4
testl %eax, %eax
jne 0x65b1
movq %r12, 0x28(%rsp)
movq %rbp, 0x30(%rsp)
movq %r12, %rdi
movq %rbp, %rsi
callq 0x640b
testq %rax, %rax
je 0x666c
movq %rax, %r13
cmpb $0x3d, -0x1(%r14)
jne 0x664f
movq %r14, %rdi
callq 0x4140
movq 0x18(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbp, %rcx
movq %rax, %r8
movq %r14, %r9
callq 0x6477
xorl %r13d, %r13d
jmp 0x6657
xorl %r13d, %r13d
jmp 0x6664
movq %rbp, %rdi
callq 0x4140
movq 0x18(%rsp), %rdi
movq %r13, %rsi
movq 0x8(%rsp), %rdx
movq %r12, %rcx
movq %rax, %r8
movq %rbp, %r9
callq 0x6477
xorl %r13d, %r13d
movq $0x0, 0x8(%rsp)
leaq 0x5e8d(%rip), %r12      # 0xc4da
jmp 0x6664
movq %rbp, %rbx
movq %r12, 0x8(%rsp)
movq 0x10(%rsp), %r14
movq %rbx, %r12
movq 0x20(%rsp), %rbx
incq %r15
jmp 0x658f
leaq 0x38(%rsp), %rbx
leaq 0x28(%rsp), %rsi
leaq 0x7(%rsp), %rdx
movq %rbx, %rdi
callq 0x89f0
movq (%rbx), %rsi
leaq 0x5dde(%rip), %rdi      # 0xc46b
callq 0x8dbc
movq %rbx, %rdi
callq 0x4160
movq 0x10(%rsp), %r14
cmpq %r14, %r15
setge %al
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/misohena[P]drawstars/./vmath.h
// Function: Mat4<float>::perspective(float, float, float, float, float)
static Mat4 perspective(Element fovYDeg, Element screenW, Element screenH, Element nearZ, Element farZ)
    {
        const Element fovYRad = fovYDeg * DEG2RAD;
        const Element aspectRatio = screenH / screenW;

        const Element h = 1.0 / std::tan(fovYRad / 2.0);
        const Element w = h * aspectRatio;
        const Element zNearFar = nearZ - farZ;
        return Mat4(
            w, 0, 0, 0,
            0, h, 0, 0,
            0, 0, (farZ+nearZ)/zNearFar, -1,
            0, 0, 2*nearZ*farZ/zNearFar, 0);
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movss %xmm4, 0xc(%rsp)
movss %xmm3, 0x8(%rsp)
movq %rdi, %rbx
cvtss2sd %xmm0, %xmm0
mulsd 0x3802(%rip), %xmm0     # 0xc138
cvtsd2ss %xmm0, %xmm0
divss %xmm1, %xmm2
movss %xmm2, 0x4(%rsp)
cvtss2sd %xmm0, %xmm0
mulsd 0x3808(%rip), %xmm0     # 0xc158
callq 0x41c0
movsd 0x3703(%rip), %xmm1     # 0xc060
divsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm0
movss 0x4(%rsp), %xmm5
mulss %xmm0, %xmm5
movss 0x8(%rsp), %xmm3
movaps %xmm3, %xmm1
movss 0xc(%rsp), %xmm4
subss %xmm4, %xmm1
movaps %xmm3, %xmm2
addss %xmm4, %xmm2
divss %xmm1, %xmm2
addss %xmm3, %xmm3
mulss %xmm4, %xmm3
divss %xmm1, %xmm3
movss %xmm5, (%rbx)
xorps %xmm1, %xmm1
movups %xmm1, 0x4(%rbx)
movss %xmm0, 0x14(%rbx)
movups %xmm1, 0x18(%rbx)
movss %xmm2, 0x28(%rbx)
movss 0x365e(%rip), %xmm0     # 0xc018
movlps %xmm0, 0x2c(%rbx)
andl $0x0, 0x34(%rbx)
movss %xmm3, 0x38(%rbx)
andl $0x0, 0x3c(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/misohena[P]drawstars/drawstars.cpp
// Function: std::shared_ptr<OptionTypeBase> makeType<std::basic_string_view<char, std::char_traits<char>>, char const (&) [2]>(std::basic_string_view<char, std::char_traits<char>> Options::*, char const (&) [2])
std::shared_ptr<OptionTypeBase> makeType(T Options::*pm, Args&&... args)
{
    if constexpr (std::is_enum_v<T>) {
        return std::make_shared<OptionEnum<T>>(pm, std::forward<Args>(args)...);
    }
    else{
        return std::make_shared<OptionType<T>>(pm, std::forward<Args>(args)...);
    }
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rsi, (%rax)
movq %rsp, %rdi
movq %rax, %rsi
callq 0x94e8
leaq 0x8(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x93fc
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0x36ee(%rip), %rsi      # 0xc5ac
movq %rax, %rdi
callq 0x4360
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x8f71
leaq 0x2c(%rsp), %r14
andl $0x0, (%r14)
leaq 0x28(%rsp), %r15
andl $0x0, (%r15)
pushq $0x4
popq %r12
pushq $0x1
popq %r13
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rax, %rcx
callq 0x4440
movq 0x8(%rsp), %rcx
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x4440
movl (%r14), %esi
movl (%r15), %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 0x8f71
leaq 0x10(%rsp), %rdi
callq 0xac26
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %eax
imull 0x10(%rsp), %eax
imulq $0x18, %rax, %rsi
movq 0x8(%rsp), %rcx
pushq $0x1
popq %rdx
callq 0x4440
cmpq $0x1, %rax
je 0x8f71
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xac26
leaq 0x8(%rsp), %rdi
callq 0x94cc
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0xac8e
leaq 0x18(%rsp), %rdi
callq 0x9478
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x94cc
leaq 0x18(%rsp), %rdi
callq 0x9478
movq %rbx, %rdi
callq 0x4520
// File: /workspace/github_cpp_makefile_star2_O2/misohena[P]drawstars/./image.h
// Function: Image<ColorRGB<double>>::operator=(Image<ColorRGB<double>>&&)
Image &operator=(Image &&rhs)
    {
        width_ = rhs.width_;
        height_ = rhs.height_;
        pixels_ = std::move(rhs.pixels_);
        return *this;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rax
movq %rax, (%rdi)
addq $0x8, %rsi
addq $0x8, %rdi
callq 0xacbe
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
leaq 0x3543(%rip), %rsi      # 0xc538
callq 0x4360
movq %rax, %rbx
movq %rax, (%rsp)
testq %rax, %rax
je 0x905e
movl (%r14), %eax
leaq 0xc(%rsp), %rdi
movl %eax, (%rdi)
movl 0x4(%r14), %eax
leaq 0x8(%rsp), %r15
movl %eax, (%r15)
pushq $0x4
popq %r12
pushq $0x1
popq %r13
movq %r12, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x4590
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x4590
movq 0x8(%r14), %rdi
movl 0x4(%r14), %eax
imull (%r14), %eax
imulq $0x18, %rax, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x4590
testq %rbx, %rbx
setne %bl
movq %rsp, %rdi
callq 0x94cc
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rcx, %r14
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r15
movq 0x18(%rdi), %r13
movq 0x20(%rdi), %rbp
cmpq %rbp, %r13
je 0xa1e1
movq (%r13), %rdi
movq 0x8(%r13), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0xa22f
testb %al, %al
jne 0xa1c7
addq $0x18, %r13
jmp 0xa1a5
movl 0x10(%r13), %eax
movq 0x8(%r15), %rcx
movl %eax, (%rbx,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x4180
movq %rax, %rbx
leaq 0x2380(%rip), %rsi      # 0xc573
movq %rax, %rdi
callq 0x4570
movq 0x7de6(%rip), %rsi      # 0x11fe8
movq 0x7dcf(%rip), %rdx      # 0x11fd8
movq %rbx, %rdi
callq 0x44e0
movq %rax, %r14
movq %rbx, %rdi
callq 0x4220
movq %r14, %rdi
callq 0x4520
// File: /workspace/github_cpp_makefile_star2_O2/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 0x20fe(%rip), %rsi      # 0xc586
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 0x42d0
popq %rcx
popq %rdx
cmpl $0x6, %eax
jne 0xa51a
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)
andq $0x0, 0x18(%rdi)
andl $0x0, 0x20(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
callq 0x4200
cmpq $-0x1, %rax
je 0xa51a
cvtsi2sd %rax, %xmm0
movq 0x8(%r14), %rax
movsd %xmm0, (%rbx,%rax)
addq $0x58, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x4180
movq %rax, %rbx
leaq 0x206c(%rip), %rsi      # 0xc598
movq %rax, %rdi
callq 0x4570
movq 0x7aad(%rip), %rsi      # 0x11fe8
movq 0x7a96(%rip), %rdx      # 0x11fd8
movq %rbx, %rdi
callq 0x44e0
movq %rax, %r14
movq %rbx, %rdi
callq 0x4220
movq %r14, %rdi
callq 0x4520
nop
// File: /workspace/github_cpp_makefile_star2_O2/misohena[P]drawstars/drawstars.cpp
// Function: void drawStarsOnEquirectangular<Range<GaiaStar>>(Image<ColorRGB<double>>&, Range<GaiaStar>, float, float, StarAppearanceOptions const&)
void drawStarsOnEquirectangular(ImageType &canvas, Range stars, float minMag, float maxMag, const StarAppearanceOptions &starAppearanceOptions)
{
    for(const auto &star : stars){
        const auto mag = star.mag();
        if(!(mag >= minMag && mag <= maxMag)){
            continue;
        }
        drawStarOnEquirectangular(canvas, star, starAppearanceOptions);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movss %xmm1, 0x4(%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movss %xmm0, (%rsp)
cmpq %r14, %r15
je 0xad9f
movss 0x8(%r15), %xmm2
ucomiss %xmm0, %xmm2
jb 0xad99
movss 0x4(%rsp), %xmm1
ucomiss %xmm2, %xmm1
jb 0xad99
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xadab
movss (%rsp), %xmm0
addq $0x18, %r15
jmp 0xad6b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xadfa
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 0xaf0c
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/misohena[P]drawstars/drawstars.cpp
// Function: StarAppearance calculateStarAppearance<GaiaStar>(GaiaStar 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, %r15
movq %rsi, %r14
movq %rdi, %rbx
movss 0x8(%rsi), %xmm1
mulss 0x11eb(%rip), %xmm1     # 0xc004
movss 0x11e7(%rip), %xmm0     # 0xc008
callq 0x4480
movaps %xmm0, %xmm3
movss 0x10(%r15), %xmm1
movss 0x14(%r15), %xmm2
ucomiss %xmm1, %xmm0
jbe 0xae80
mulss %xmm2, %xmm2
movaps %xmm3, %xmm0
mulss %xmm2, %xmm0
divss %xmm1, %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0xae57
sqrtss %xmm0, %xmm2
jmp 0xae6e
movss %xmm3, 0x10(%rsp)
callq 0x4540
xorps %xmm1, %xmm1
movss 0x10(%rsp), %xmm3
movaps %xmm0, %xmm2
movss 0x18(%r15), %xmm0
minss %xmm2, %xmm0
cmpltss %xmm1, %xmm2
andnps %xmm0, %xmm2
movaps %xmm2, 0x10(%rsp)
movss 0x4(%r15), %xmm0
mulss %xmm3, %xmm0
addss (%r15), %xmm0
movss 0x8(%r15), %xmm1
ucomiss 0x1173(%rip), %xmm1     # 0xc014
jne 0xaea5
jnp 0xaeaa
callq 0x4480
movss 0xc(%r15), %xmm1
minss %xmm0, %xmm1
movss %xmm1, 0xc(%rsp)
movq %r14, %rdi
callq 0xb2be
cvtss2sd %xmm0, %xmm0
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x59e9
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_O2/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 0xd6a(%rip), %xmm0      # 0xc034
jb 0xb2da
movss 0xd64(%rip), %xmm1      # 0xc038
ucomiss %xmm0, %xmm1
jbe 0xb2da
retq
movss 0xc(%rdi), %xmm0
subss 0x10(%rdi), %xmm0
movss 0xd50(%rip), %xmm1      # 0xc03c
ucomiss %xmm0, %xmm1
jae 0xb2fc
jbe 0xb343
movss 0xd45(%rip), %xmm0      # 0xc040
retq
pushq %rax
cvtss2sd %xmm0, %xmm0
movsd 0xe5f(%rip), %xmm1      # 0xc168
mulsd %xmm0, %xmm1
addsd 0xe5b(%rip), %xmm1      # 0xc170
mulsd %xmm0, %xmm1
addsd 0xe57(%rip), %xmm1      # 0xc178
mulsd %xmm0, %xmm1
addsd 0xe53(%rip), %xmm1      # 0xc180
movsd 0xd53(%rip), %xmm0      # 0xc088
callq 0x4500
cvtsd2ss %xmm0, %xmm0
addq $0x8, %rsp
retq
ucomiss 0xcfe(%rip), %xmm0      # 0xc048
jbe 0xb355
movss 0xcf0(%rip), %xmm0      # 0xc044
retq
addss 0xcef(%rip), %xmm0      # 0xc04c
mulss 0xceb(%rip), %xmm0      # 0xc050
divss 0xce7(%rip), %xmm0      # 0xc054
addss 0xccb(%rip), %xmm0      # 0xc040
retq
// File: /workspace/github_cpp_makefile_star2_O2/misohena[P]drawstars/drawstars.cpp
// Function: void fillCircle<PixelPlotter>(Image<ColorRGB<double>>&, float, float, float, PixelPlotter)
void fillCircle(ImageType &canvas, float cx, float cy, float radius, F funcPlot)
{
    const float canvasW = canvas.width();
    const float canvasH = canvas.height();
    const int xmin = static_cast<int>(clamp(std::floor(cx - radius), 0.0f, canvasW));
    const int xmax = static_cast<int>(clamp(std::ceil(cx + radius), 0.0f, canvasW));
    const int ymin = static_cast<int>(clamp(std::floor(cy - radius), 0.0f, canvasH));
    const int ymax = static_cast<int>(clamp(std::ceil(cy + radius), 0.0f, canvasH));
    for(int py = ymin; py < ymax; ++py){
        for(int px = xmin; px < xmax; ++px){
            const float pxf = px + 0.5f;
            const float pyf = py + 0.5f;
            const float dx = pxf - cx;
            const float dy = pyf - cy;
            const float dist = std::sqrt(dx*dx + dy*dy);
            funcPlot(canvas.at(px, py), pxf, pyf, cx, cy, dist);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movss %xmm2, (%rsp)
movss %xmm1, 0x4(%rsp)
movq %rdi, %rbx
movl (%rdi), %eax
cvtsi2ss %rax, %xmm1
movaps %xmm1, 0x20(%rsp)
movl 0x4(%rdi), %eax
cvtsi2ss %rax, %xmm1
movaps %xmm1, 0x10(%rsp)
movss %xmm0, 0x8(%rsp)
leaq 0x70(%rsp), %r14
subss %xmm2, %xmm0
callq 0x4110
movaps 0x20(%rsp), %xmm1
minss %xmm0, %xmm1
xorps %xmm2, %xmm2
cmpltss %xmm2, %xmm0
andnps %xmm1, %xmm0
cvttss2si %xmm0, %eax
movl %eax, 0xc(%rsp)
movss 0x8(%rsp), %xmm0
addss (%rsp), %xmm0
callq 0x41b0
movaps 0x20(%rsp), %xmm1
minss %xmm0, %xmm1
cmpltss 0x799(%rip), %xmm0      # 0xc05c
andnps %xmm1, %xmm0
cvttss2si %xmm0, %r15d
movss 0x4(%rsp), %xmm0
subss (%rsp), %xmm0
callq 0x4110
movaps 0x10(%rsp), %xmm1
minss %xmm0, %xmm1
cmpltss 0x76f(%rip), %xmm0      # 0xc05c
andnps %xmm1, %xmm0
cvttss2si %xmm0, %r12d
movss (%rsp), %xmm0
addss 0x4(%rsp), %xmm0
callq 0x41b0
movaps 0x10(%rsp), %xmm1
minss %xmm0, %xmm1
cmpltss 0x745(%rip), %xmm0      # 0xc05c
andnps %xmm1, %xmm0
cvttss2si %xmm0, %r13d
cmpl %r13d, %r12d
jge 0xb9a9
cvtsi2ss %r12d, %xmm0
addss 0x6e7(%rip), %xmm0      # 0xc01c
movss %xmm0, (%rsp)
subss 0x4(%rsp), %xmm0
mulss %xmm0, %xmm0
movss %xmm0, 0x10(%rsp)
movl 0xc(%rsp), %ebp
cmpl %r15d, %ebp
jge 0xb9a1
cvtsi2ss %ebp, %xmm0
addss 0x6bd(%rip), %xmm0      # 0xc01c
movaps %xmm0, %xmm1
movss 0x8(%rsp), %xmm2
subss %xmm2, %xmm1
mulss %xmm1, %xmm1
addss 0x10(%rsp), %xmm1
sqrtss %xmm1, %xmm4
movl (%rbx), %eax
imull %r12d, %eax
addl %ebp, %eax
imulq $0x18, %rax, %rsi
addq 0x8(%rbx), %rsi
movq %r14, %rdi
movss (%rsp), %xmm1
movss 0x4(%rsp), %xmm3
callq 0xb376
incl %ebp
jmp 0xb94e
incl %r12d
jmp 0xb91f
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x25a2
movq %rax, 0x8(%rbx)
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x21f0
leaq 0x2ac3(%rip), %rsi      # 0x508a
leaq 0x8(%rsp), %rdi
callq 0x2080
testl %eax, %eax
jne 0x2601
movq %rsp, %rsi
movq %r14, %rdi
callq 0x2110
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x33b8
movq %rsp, %rsi
movq %r14, %rdi
callq 0x2110
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x33b8
movq 0x8(%rbx), %r14
subq (%rbx), %r14
shrq $0x3, %r14
leaq 0x8(%rsp), %rdi
callq 0x20c0
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x2623
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x2674
movq %rax, 0x8(%rbx)
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x21f0
leaq 0x29f5(%rip), %rsi      # 0x508e
leaq 0x8(%rsp), %rdi
callq 0x2080
testl %eax, %eax
jne 0x26bd
movq %rsp, %rsi
movq %r14, %rdi
callq 0x2110
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x33b8
movq 0x8(%rbx), %r14
subq (%rbx), %r14
shrq $0x3, %r14
leaq 0x8(%rsp), %rdi
callq 0x20c0
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x26df
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O2/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
movsd 0x8(%rdi), %xmm3
movapd %xmm0, %xmm1
subsd %xmm3, %xmm1
movapd 0x287c(%rip), %xmm4     # 0x5010
xorpd %xmm1, %xmm4
movsd 0x28b0(%rip), %xmm2     # 0x5050
subsd %xmm3, %xmm2
mulsd %xmm3, %xmm2
mulsd %xmm4, %xmm2
movl (%rdi), %edx
xorl %esi, %esi
shlq $0x4, %rdx
movl %esi, %esi
cmpq %rsi, %rcx
jbe 0x27f4
movsd %xmm0, 0x18(%rdi)
movsd %xmm1, 0x20(%rdi)
movq %rsi, %r8
shlq $0x6, %r8
movsd 0x8(%rax,%r8), %xmm3
mulsd %xmm2, %xmm3
movsd %xmm3, 0x10(%rdi)
mulsd 0x59bc(%rip), %xmm3     # 0x81a0
movq 0x28(%rax,%r8), %r8
movsd %xmm3, 0x8(%r8,%rdx)
incl %esi
jmp 0x27b4
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
movsd 0x8(%rdi), %xmm1
movsd 0x18(%rdi), %xmm3
subsd %xmm1, %xmm3
movq 0x28(%rdi), %rsi
xorl %r8d, %r8d
xorpd %xmm0, %xmm0
movsd 0x2828(%rip), %xmm2     # 0x5050
movl %r8d, %r8d
cmpq %r8, %rcx
jbe 0x2874
movsd %xmm3, 0x20(%rdi)
movq %r8, %r9
shlq $0x6, %r9
movsd 0x8(%rax,%r9), %xmm4
movsd 0x18(%rax,%r9), %xmm5
movq %r8, %r9
shlq $0x4, %r9
movapd %xmm2, %xmm6
subsd %xmm4, %xmm6
mulsd %xmm4, %xmm6
mulsd (%rsi,%r9), %xmm6
subsd %xmm4, %xmm5
mulsd %xmm5, %xmm6
subsd %xmm6, %xmm0
incl %r8d
jmp 0x2828
movq (%rdx), %rax
movq 0x8(%rdx), %rcx
subq %rax, %rcx
sarq $0x6, %rcx
decq %rcx
subsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm2, %xmm0
movl (%rdi), %edx
xorl %esi, %esi
shlq $0x4, %rdx
movl %esi, %esi
cmpq %rsi, %rcx
jbe 0x28cf
movq %rsi, %r8
shlq $0x6, %r8
movsd 0x8(%rax,%r8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rdi)
mulsd 0x58e1(%rip), %xmm1     # 0x81a0
movq 0x28(%rax,%r8), %r8
movsd %xmm1, 0x8(%r8,%rdx)
incl %esi
jmp 0x2899
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
sarq $0x6, %rcx
movl (%rdi), %edx
xorl %esi, %esi
xorpd %xmm0, %xmm0
shlq $0x4, %rdx
movl %esi, %esi
cmpq %rsi, %rcx
jbe 0x2914
movq %rsi, %rdi
shlq $0x6, %rdi
movsd 0x8(%rax,%rdi), %xmm1
movq 0x28(%rax,%rdi), %rdi
mulsd (%rdi,%rdx), %xmm1
addsd %xmm1, %xmm0
incl %esi
jmp 0x28ee
callq 0x2728
movsd %xmm0, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x2748, %rsp           # imm = 0x2748
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r14
leaq 0x28(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
andq $0x0, 0x38(%rdi)
leaq 0x38(%rsp), %rdi
callq 0x33da
movl %ebp, 0xc(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x2210
movl %eax, %esi
leaq 0x13c0(%rsp), %rdi
callq 0x38d8
xorps %xmm0, %xmm0
movhps 0x26d6(%rip), %xmm0     # xmm0 = xmm0[0,1],mem[0,1]
leaq 0x20(%rsp), %r12
movaps %xmm0, (%r12)
leaq 0x13c0(%rsp), %rbp
movq 0x5645(%rip), %r13      # 0x7fd8
subl $0x1, %r15d
jb 0x29d4
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
callq 0x3910
movq %r12, %rdi
movq %rbp, %rsi
callq 0x3430
movq 0x30(%r14), %rax
movsd %xmm0, -0x10(%rax)
movq %r13, %rdi
callq 0x2270
movq %rax, %rdi
callq 0x20d0
jmp 0x2993
movl 0xc(%rsp), %eax
movl %eax, (%r14)
leaq 0x38(%rsp), %rdi
callq 0x3438
addq $0x2748, %rsp           # imm = 0x2748
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x2a0d
jmp 0x2a00
jmp 0x2a00
movq %rax, %r14
leaq 0x38(%rsp), %rdi
callq 0x3438
movq %rbx, %rdi
callq 0x38a4
movq %r14, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x2a5c
movq %rax, 0x8(%rbx)
movq 0x18(%rdi), %r15
xorl %eax, %eax
movq %rsp, %r14
movl %eax, %r12d
movq -0x18(%r15), %rax
movq -0x10(%r15), %rcx
subq %rax, %rcx
sarq $0x6, %rcx
decq %rcx
cmpq %r12, %rcx
jbe 0x2aa3
movq %r12, %rcx
shlq $0x6, %rcx
movsd 0x8(%rax,%rcx), %xmm0
movsd %xmm0, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3d2c
leal 0x1(%r12), %eax
jmp 0x2a65
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movq 0x10(%rdi), %rcx
xorl %esi, %esi
movl %esi, %esi
cmpq %rsi, %rdx
jbe 0x2af3
movq (%rcx), %rdi
movsd (%rax,%rsi,8), %xmm0
movq %rsi, %r8
shlq $0x6, %r8
movsd %xmm0, 0x8(%rdi,%r8)
incl %esi
jmp 0x2ad2
pushq $0x1
popq %r15
pushq $0x18
popq %r12
movl %r15d, %r15d
movq 0x18(%rbx), %rax
subq %rcx, %rax
cqto
idivq %r12
cmpq %r15, %rax
jbe 0x2b5a
leal -0x1(%r15), %eax
imulq $0x18, %rax, %r14
addq %rcx, %r14
xorl %eax, %eax
imulq $0x18, %r15, %r13
movl %eax, %ebp
movq (%rcx,%r13), %rdi
movq 0x8(%rcx,%r13), %rax
subq %rdi, %rax
sarq $0x6, %rax
decq %rax
cmpq %rbp, %rax
jbe 0x2b55
movq %rbp, %rax
shlq $0x6, %rax
addq %rax, %rdi
movq %r14, %rsi
callq 0x28d0
leal 0x1(%rbp), %eax
movq 0x10(%rbx), %rcx
jmp 0x2b20
incl %r15d
jmp 0x2afb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
callq 0x2c9a
movsd 0x5622(%rip), %xmm0     # 0x81a8
movsd (%rbx), %xmm1
mulsd %xmm0, %xmm1
addsd 0x8(%rbx), %xmm1
addsd 0x24b5(%rip), %xmm0     # 0x5050
divsd %xmm0, %xmm1
movsd %xmm1, (%rbx)
xorl %eax, %eax
movl %eax, %r13d
movq 0x10(%rbx), %r14
movq 0x18(%rbx), %r12
movq -0x18(%r12), %rdi
movq -0x10(%r12), %rax
subq %rdi, %rax
sarq $0x6, %rax
decq %rax
cmpq %r13, %rax
jbe 0x2bee
addq $0x18, %r14
movq %r13, %rax
shlq $0x6, %rax
addq %rax, %rdi
movq (%r15), %rax
movsd (%rax,%r13,8), %xmm0
movq %r14, %rsi
callq 0x276e
leal 0x1(%r13), %eax
jmp 0x2ba5
subq %r14, %r12
xorl %eax, %eax
movq %r14, %rcx
movq 0x20(%rcx), %rdx
subq 0x18(%rcx), %rdx
movl %eax, %r15d
sarq $0x6, %rdx
decq %rdx
cmpq %r15, %rdx
jbe 0x2c33
movq %r15, %rdi
shlq $0x6, %rdi
addq -0x30(%r14,%r12), %rdi
movq 0x18(%rbx), %rsi
addq $-0x18, %rsi
movq %rcx, %rdx
callq 0x27f6
leal 0x1(%r15), %eax
movq 0x10(%rbx), %rcx
jmp 0x2bf6
xorl %r14d, %r14d
pushq $0x18
popq %r15
movl %r14d, %r14d
movq 0x18(%rbx), %rax
subq %rcx, %rax
cqto
idivq %r15
decq %rax
cmpq %r14, %rax
jbe 0x2c90
xorl %eax, %eax
imulq $0x18, %r14, %r12
movl %eax, %r13d
movq (%rcx,%r12), %rdi
movq 0x8(%rcx,%r12), %rax
subq %rdi, %rax
sarq $0x6, %rax
decq %rax
cmpq %r13, %rax
jbe 0x2c8b
movq %r13, %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x26f4
leal 0x1(%r13), %eax
movq 0x10(%rbx), %rcx
jmp 0x2c57
incl %r14d
jmp 0x2c3a
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
movq (%rsi), %rdx
xorl %esi, %esi
xorpd %xmm0, %xmm0
movsd 0x2397(%rip), %xmm1     # 0x5058
movl %esi, %esi
cmpq %rsi, %rcx
jbe 0x2ceb
movsd (%rdx,%rsi,8), %xmm2
movq %rsi, %r8
shlq $0x6, %r8
subsd 0x20(%rax,%r8), %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm2
addsd %xmm2, %xmm0
incl %esi
jmp 0x2cc1
movsd %xmm0, 0x8(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wkohlenberg[P]simple_NN/src/main.cpp
// Function: Net::Net(std::vector<unsigned int, std::allocator<unsigned int>> const&)
Net::Net(const vector<unsigned> &topology)
{
  // Get the number of layers
  unsigned numLayers = topology.size();
  for (unsigned layerNum = 0; layerNum < numLayers; layerNum++)
  {
    m_layers.push_back(Layer());
    // Get the number of outputs per neuron
    unsigned numOutputs = layerNum == topology.size() ? 0 : topology[layerNum+1];

    // Create Neuron with neuron outputs and index
    for (unsigned neuronNum = 0; neuronNum <= topology[layerNum]; neuronNum++)    // = is adding a bias node
    {
      m_layers.back().push_back(Neuron(numOutputs, neuronNum));
    }

    // Set output of the bias node to 1.0
    m_layers.back().back().setOutputVal(1.0);
  }

  // Init variables
  m_avgError = 0.0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r15
leaq 0x10(%rdi), %rax
movq %rax, 0x8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movq %rdi, 0x10(%rsp)
andq $0x0, 0x20(%rdi)
movq 0x8(%rsi), %rax
subq (%rsi), %rax
shrq $0x2, %rax
movl %eax, %eax
movq %rax, 0x18(%rsp)
xorl %r14d, %r14d
leaq 0x20(%rsp), %r13
cmpq 0x18(%rsp), %r14
je 0x2dda
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x3ee6
movq %r13, %rdi
callq 0x3448
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
xorl %ebp, %ebp
movl $0x0, %ebx
cmpq %r14, %rcx
je 0x2db0
movl 0x4(%rax,%r14,4), %ebx
jmp 0x2db0
movq %r13, %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x2920
addq $-0x18, %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x40f8
leaq 0x48(%rsp), %rdi
callq 0x38a4
incl %ebp
movq (%r15), %rax
movq 0x10(%rsp), %rcx
movq 0x18(%rcx), %r12
cmpl (%rax,%r14,4), %ebp
jbe 0x2d86
movq -0x10(%r12), %rax
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, -0x38(%rax)
incq %r14
jmp 0x2d37
movq 0x10(%rsp), %rax
andq $0x0, (%rax)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x3448
jmp 0x2e13
movq %rax, %rbx
jmp 0x2e13
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x38a4
movq 0x8(%rsp), %rdi
callq 0x346a
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
xorl %r13d, %r13d
movq %rsp, %r15
leaq 0x2233(%rip), %r12      # 0x5088
movl %r13d, %r13d
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r13, %rcx
jbe 0x2e9c
movsd (%rax,%r13,8), %xmm0
movq %r15, %rdi
callq 0x348b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2310
movq %r15, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2300
incl %r13d
jmp 0x2e55
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x2ebc
movq %rax, %r14
movq %rsp, %rdi
callq 0x20c0
jmp 0x2ebf
movq %rax, %r14
movq %rbx, %rdi
callq 0x20c0
movq %r14, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O2/wkohlenberg[P]simple_NN/src/mnist.cpp
// Function: readLabels(std::vector<int, std::allocator<int>>&, bool)
int readLabels(vector<int>&vLabels, bool training)
{
	string	filePath = "../database/";
	int samples = 0;

	if (training)
	{
		filePath.append("train-labels-idx1-ubyte");
		samples = 60000;
	}
	else
	{
		filePath.append("t10k-labels-idx1-ubyte");
		samples = 10000;
	}

	// Open the label file, training or test
	ifstream labelFile;
	labelFile.open(filePath.c_str());
	if (!labelFile.is_open())
	{
		cout << "Couldn't open or find the file." << endl;
		return 1;
	}

	// Read the header
	uint32_t magic;
	uint32_t nLabels;
	uint8_t label;
	labelFile.read(reinterpret_cast<char *>(&magic), sizeof(magic));
	labelFile.read(reinterpret_cast<char *>(&nLabels), sizeof(nLabels));

	if (!((endianSwap(magic) == 2049) && (endianSwap(nLabels) == samples)))
	{
		cout << "No corresponding header..." << endl;
		return 2;
	}

	for (int i = 0; i < samples; i++)
	{
		labelFile.read(reinterpret_cast<char *>(&label), sizeof(label));
		vLabels.push_back(int(label));
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movl %esi, %ebp
movq %rdi, %rbx
leaq 0xc1f(%rip), %rsi       # 0x5141
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x34ae
testl %ebp, %ebp
je 0x454d
movl $0xea60, %ebp           # imm = 0xEA60
leaq 0xc0d(%rip), %rsi       # 0x514e
leaq 0x10(%rsp), %rdi
callq 0x2300
jmp 0x4563
movl $0x2710, %ebp           # imm = 0x2710
leaq 0xc0d(%rip), %rsi       # 0x5166
leaq 0x10(%rsp), %rdi
callq 0x2300
leaq 0x30(%rsp), %rdi
callq 0x21d0
movq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x2100
leaq 0xa8(%rsp), %rdi
callq 0x2050
testb %al, %al
je 0x4608
leaq 0x30(%rsp), %rdi
leaq 0xc(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0x21e0
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0x21e0
cmpl $0x1080000, 0xc(%rsp)   # imm = 0x1080000
jne 0x4627
movl 0x8(%rsp), %eax
bswapl %eax
cmpl %ebp, %eax
jne 0x4627
leaq 0x30(%rsp), %r14
leaq 0x3(%rsp), %r15
pushq $0x1
popq %r12
leaq 0x4(%rsp), %r13
subl $0x1, %ebp
jb 0x466d
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x21e0
movzbl 0x3(%rsp), %eax
movl %eax, 0x4(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4a28
jmp 0x45db
movq 0x39c9(%rip), %rdi      # 0x7fd8
leaq 0xb67(%rip), %rsi       # 0x517d
callq 0x21a0
movq %rax, %rdi
callq 0x20d0
pushq $0x1
jmp 0x4644
movq 0x39aa(%rip), %rdi      # 0x7fd8
leaq 0xb68(%rip), %rsi       # 0x519d
callq 0x21a0
movq %rax, %rdi
callq 0x20d0
pushq $0x2
popq %rbx
leaq 0x30(%rsp), %rdi
callq 0x2060
leaq 0x10(%rsp), %rdi
callq 0x20c0
movl %ebx, %eax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
jmp 0x4645
jmp 0x4673
movq %rax, %rbx
jmp 0x468b
jmp 0x467e
jmp 0x467e
jmp 0x467e
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2060
leaq 0x10(%rsp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0x4903
movq %rax, 0x8(%r14)
movslq %edx, %rax
movq (%rbx), %rcx
imulq $0x18, %rax, %r12
movq 0x8(%rcx,%r12), %rax
subq (%rcx,%r12), %rax
shrq $0x2, %rax
movl %eax, %r13d
xorl %r15d, %r15d
cmpq %r15, %r13
je 0x4943
movq (%rbx), %rdi
addq %r12, %rdi
movq %r15, %rsi
callq 0x4a06
movq %r14, %rdi
movq %rax, %rsi
callq 0x49e8
incq %r15
jmp 0x4920
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
cmpq %rcx, %rax
je 0x4971
andl $0x0, (%rax)
addq $0x4, %rax
jmp 0x4963
movslq %edx, %rsi
movq %rbx, %rdi
callq 0x4a06
movl (%rax), %ebp
xorl %r15d, %r15d
movl %r15d, %r15d
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x2, %rax
cmpq %r15, %rax
jbe 0x49af
cmpl %r15d, %ebp
jne 0x49aa
movq %r14, %rdi
movq %r15, %rsi
callq 0x4a06
movl $0x1, (%rax)
incl %r15d
jmp 0x4981
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/kaiming[P]Chamber-Crawler-3k/Board/board.cc
// Function: Board::assignChambers()
void Board::assignChambers() {
    // Iterate through floor
    for (auto it_y = floors[floorNum-1].begin(); it_y != floors[floorNum-1].end(); ++it_y) {
        for (auto it_x = it_y->begin(); it_x != it_y->end(); ++it_x) {
            // Check if walkable tile and unidentified chamber floor
            if (std::dynamic_pointer_cast<WalkableTile>(*it_x) && (*it_x)->getType() == '.' && std::static_pointer_cast<WalkableTile>(*it_x)->getRoom() < 0) {
                // Begin depth first search algorithm, call helper function
                // Determine current chamber
                int chamberNum = static_cast<int>(chambers.size()) + 1;
                std::vector<std::shared_ptr<WalkableTile>> chamber; 
                
                // Enter recursive function
                tileDFS((*it_x)->getCoord().first, (*it_x)->getCoord().second, chamberNum, chamber);
                
                // Store current chamber
                chambers.emplace_back(chamber);
            } 

        }
    } // Finished identifying tiles to their chambers
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movslq 0x108(%rdi), %rax
movq (%rdi), %rcx
imulq $0x18, %rax, %rdx
movq -0x18(%rcx,%rdx), %r14
leaq 0x40(%rsp), %r15
leaq 0x18(%rsp), %rbx
movq %rdi, 0x8(%rsp)
leaq 0xe0(%rdi), %rdx
movq %rdx, 0x30(%rsp)
leaq 0x10(%rsp), %r13
cltq
imulq $0x18, %rax, %rax
cmpq -0x10(%rcx,%rax), %r14
je 0xce3e
movq (%r14), %r12
cmpq 0x8(%r14), %r12
je 0xce27
movq %r13, %rdi
movq %r12, %rsi
callq 0x12363
cmpq $0x0, 0x10(%rsp)
je 0xce16
movq (%r12), %rdi
callq 0x173b8
cmpb $0x2e, %al
jne 0xce16
leaq 0x38(%rsp), %rdi
movq %r12, %rsi
callq 0x9ce1
movq 0x38(%rsp), %rdi
callq 0x17482
movl %eax, %ebp
movq %r15, %rdi
callq 0x6c00
movq %rbx, %rdi
callq 0x6c00
testl %ebp, %ebp
jns 0xce1e
movq %r15, %rbx
movq 0x8(%rsp), %rcx
movq 0xe8(%rcx), %rax
subq 0xe0(%rcx), %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
movq %rax, %r15
andq $0x0, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq (%r12), %rdi
callq 0x173bc
movq %rax, %rbp
movq (%r12), %rdi
callq 0x173bc
incl %r15d
shrq $0x20, %rax
movq 0x8(%rsp), %rdi
movl %ebp, %esi
movl %eax, %edx
movl %r15d, %ecx
movq %r13, %r8
callq 0xdeec
movq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0x123b8
movq %r13, %rdi
callq 0x6a84
movq %rbx, %r15
leaq 0x18(%rsp), %rbx
jmp 0xce1e
movq %rbx, %rdi
callq 0x6c00
addq $0x10, %r12
jmp 0xcd35
addq $0x18, %r14
movq 0x8(%rsp), %rcx
movl 0x108(%rcx), %eax
movq (%rcx), %rcx
jmp 0xcd21
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xce51
jmp 0xce51
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6a84
jmp 0xce78
movq %rax, %r14
movq %r15, %rdi
callq 0x6c00
jmp 0xce70
movq %rax, %r14
movq %rbx, %rdi
callq 0x6c00
movq %r14, %rdi
callq 0x5390
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq (%rsi), %rdi
callq 0x17482
testl %eax, %eax
js 0xe287
movq (%rbx), %rsi
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x17424
cmpq $0x0, (%r14)
je 0xe28b
xorl %ebp, %ebp
jmp 0xe2db
xorl %ebp, %ebp
jmp 0xe2e5
movq (%rbx), %rsi
leaq 0x10(%rsp), %rdi
callq 0x1745c
cmpq $0x0, 0x10(%rsp)
je 0xe2a4
xorl %ebp, %ebp
jmp 0xe2d1
movq (%rbx), %rsi
movq %rsp, %rdi
callq 0x17440
movb $0x1, %bpl
cmpq $0x0, (%rsp)
jne 0xe2c3
movq (%rbx), %rdi
callq 0x17478
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x6c00
xorb $0x1, %bpl
leaq 0x18(%rsp), %rdi
callq 0x6c00
leaq 0x28(%rsp), %rdi
callq 0x6c00
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6c00
jmp 0xe302
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x6c00
jmp 0xe311
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x6c00
movq %rbx, %rdi
callq 0x5390
nop