LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_draw.cpp
// Function: ImDrawData::ScaleClipRects(ImVec2 const&)
void ImDrawData::ScaleClipRects(const ImVec2& scale)
{
    for (int i = 0; i < CmdListsCount; i++)
    {
        ImDrawList* cmd_list = CmdLists[i];
        for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++)
        {
            ImDrawCmd* cmd = &cmd_list->CmdBuffer[cmd_i];
            cmd->ClipRect = ImVec4(cmd->ClipRect.x * scale.x, cmd->ClipRect.y * scale.y, cmd->ClipRect.z * scale.x, cmd->ClipRect.w * scale.y);
        }
    }
}

// Assembly:
movslq 0x10(%rdi), %rax
testq %rax, %rax
jle 0x30c75
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rdi
movslq (%rdi), %r8
testq %r8, %r8
jle 0x30c6c
movq 0x8(%rdi), %rdi
shlq $0x4, %r8
leaq (%r8,%r8,2), %r8
xorl %r9d, %r9d
movss (%rsi), %xmm0
movss 0x4(%rsi), %xmm1
movss 0x4(%rdi,%r9), %xmm2
mulss %xmm0, %xmm2
movss 0x8(%rdi,%r9), %xmm3
mulss %xmm1, %xmm3
mulss 0xc(%rdi,%r9), %xmm0
mulss 0x10(%rdi,%r9), %xmm1
movss %xmm2, 0x4(%rdi,%r9)
movss %xmm3, 0x8(%rdi,%r9)
movss %xmm0, 0xc(%rdi,%r9)
movss %xmm1, 0x10(%rdi,%r9)
addq $0x30, %r9
cmpq %r9, %r8
jne 0x30c1a
incq %rdx
cmpq %rax, %rdx
jne 0x30bff
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_draw.cpp
// Function: ImFontConfig::ImFontConfig()
ImFontConfig::ImFontConfig()
{
    FontData = NULL;
    FontDataSize = 0;
    FontDataOwnedByAtlas = true;
    FontNo = 0;
    SizePixels = 0.0f;
    OversampleH = 3;
    OversampleV = 1;
    PixelSnapH = false;
    GlyphExtraSpacing = ImVec2(0.0f, 0.0f);
    GlyphRanges = NULL;
    MergeMode = false;
    MergeGlyphCenterV = false;
    DstFont = NULL;
    memset(Name, 0, sizeof(Name));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movq %rax, (%rdi)
movl $0x0, 0x8(%rdi)
movb $0x1, 0xc(%rdi)
movaps 0x11b4f(%rip), %xmm0    # 0x427e0
movups %xmm0, 0x10(%rdi)
movb $0x0, 0x20(%rdi)
movq %rax, 0x24(%rdi)
movq %rax, 0x60(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x4a(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_draw.cpp
// Function: ImFontAtlas::ClearInputData()
void    ImFontAtlas::ClearInputData()
{
    for (int i = 0; i < ConfigData.Size; i++)
        if (ConfigData[i].FontData && ConfigData[i].FontDataOwnedByAtlas)
        {
            ImGui::MemFree(ConfigData[i].FontData);
            ConfigData[i].FontData = NULL;
        }

    // When clearing this we lose access to the font name and other information used to build the font.
    for (int i = 0; i < Fonts.Size; i++)
        if (Fonts[i]->ConfigData >= ConfigData.Data && Fonts[i]->ConfigData < ConfigData.Data + ConfigData.Size)
        {
            Fonts[i]->ConfigData = NULL;
            Fonts[i]->ConfigDataCount = 0;
        }
    ConfigData.clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x40(%rdi), %eax
testl %eax, %eax
jle 0x30d90
movq 0x48(%rbx), %rcx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rcx,%r14), %rdi
testq %rdi, %rdi
je 0x30d81
cmpb $0x1, 0xc(%rcx,%r14)
jne 0x30d81
callq 0x9019
movslq 0x40(%rbx), %rax
cmpq %rax, %r15
jge 0x30e00
movq 0x48(%rbx), %rcx
movq $0x0, (%rcx,%r14)
incq %r15
movslq %eax, %rdx
addq $0x68, %r14
cmpq %rdx, %r15
jl 0x30d52
movslq 0x30(%rbx), %rcx
testq %rcx, %rcx
jle 0x30ddc
movq 0x38(%rbx), %rdx
movq 0x48(%rbx), %rdi
cltq
imulq $0x68, %rax, %rax
addq %rdi, %rax
xorl %esi, %esi
movq (%rdx,%rsi,8), %r8
movq 0x18(%r8), %r9
cmpq %rdi, %r9
jb 0x30dd2
cmpq %rax, %r9
jae 0x30dd2
movq $0x0, 0x18(%r8)
movq (%rdx,%rsi,8), %r8
movl $0x0, 0x20(%r8)
incq %rsi
cmpq %rsi, %rcx
jne 0x30dac
jmp 0x30de0
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x30df5
xorl %r14d, %r14d
movq %r14, 0x40(%rbx)
callq 0x9019
movq %r14, 0x48(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xdfd9(%rip), %rdi      # 0x3ede0
leaq 0xdcb5(%rip), %rsi      # 0x3eac3
leaq 0x16546(%rip), %rcx     # 0x4735b
movl $0x31c, %edx            # imm = 0x31C
callq 0x7140
nop
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_draw.cpp
// Function: ImFontAtlas::ClearTexData()
void    ImFontAtlas::ClearTexData()
{
    if (TexPixelsAlpha8)
        ImGui::MemFree(TexPixelsAlpha8);
    if (TexPixelsRGBA32)
        ImGui::MemFree(TexPixelsRGBA32);
    TexPixelsAlpha8 = NULL;
    TexPixelsRGBA32 = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x30e37
callq 0x9019
movq 0x10(%rbx), %rdi
addq $0x8, %rbx
testq %rdi, %rdi
je 0x30e49
callq 0x9019
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_draw.cpp
// Function: ImFontAtlas::ClearFonts()
void    ImFontAtlas::ClearFonts()
{
    for (int i = 0; i < Fonts.Size; i++)
    {
        Fonts[i]->~ImFont();
        ImGui::MemFree(Fonts[i]);
    }
    Fonts.clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x30(%rdi)
jle 0x30e98
xorl %r14d, %r14d
movq 0x38(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x3526a
movslq 0x30(%rbx), %rax
cmpq %rax, %r14
jge 0x30eb6
movq 0x38(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x9019
incq %r14
movslq 0x30(%rbx), %rax
cmpq %rax, %r14
jl 0x30e69
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x30eb1
xorl %r14d, %r14d
movq %r14, 0x30(%rbx)
callq 0x9019
movq %r14, 0x38(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xdf23(%rip), %rdi      # 0x3ede0
leaq 0xdbff(%rip), %rsi      # 0x3eac3
leaq 0xe3be(%rip), %rcx      # 0x3f289
movl $0x31c, %edx            # imm = 0x31C
callq 0x7140
nop
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_draw.cpp
// Function: ImFontAtlas::AddFontDefault(ImFontConfig const*)
ImFont* ImFontAtlas::AddFontDefault(const ImFontConfig* font_cfg_template)
{
    ImFontConfig font_cfg = font_cfg_template ? *font_cfg_template : ImFontConfig();
    if (!font_cfg_template)
    {
        font_cfg.OversampleH = font_cfg.OversampleV = 1;
        font_cfg.PixelSnapH = true;
    }
    if (font_cfg.Name[0] == '\0') strcpy(font_cfg.Name, "<default>");

    const char* ttf_compressed_base85 = GetDefaultCompressedFontDataTTFBase85();
    ImFont* font = AddFontFromMemoryCompressedBase85TTF(ttf_compressed_base85, 13.0f, &font_cfg, GetGlyphRangesDefault());
    return font;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, %rax
testq %rsi, %rsi
je 0x30f77
leaq -0x68(%rbp), %rdx
movl $0xd, %ecx
movq %rdx, %rdi
rep  movsq (%rsi), %es:(%rdi)
cmpb $0x0, 0x3a(%rdx)
jne 0x30fc9
jmp 0x30fb5
xorl %ecx, %ecx
movq %rcx, -0x68(%rbp)
movl $0x0, -0x60(%rbp)
movb $0x1, %dl
movb %dl, -0x5c(%rbp)
movq %rcx, -0x58(%rbp)
movq %rcx, -0x44(%rbp)
movq %rcx, -0x8(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, -0x38(%rbp)
movups %xmm0, -0x28(%rbp)
movups %xmm0, -0x1e(%rbp)
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, -0x50(%rbp)
movb %dl, -0x48(%rbp)
movabsq $0x746c75616665643c, %rcx # imm = 0x746C75616665643C
movq %rcx, -0x2e(%rbp)
movw $0x3e, -0x26(%rbp)
leaq 0x128a0(%rip), %rsi     # 0x43870
leaq 0x11905(%rip), %rcx     # 0x428dc
movss 0x117ed(%rip), %xmm0    # 0x427cc
leaq -0x68(%rbp), %rdx
movq %rax, %rdi
callq 0x33efa
addq $0x70, %rsp
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_draw.cpp
// Function: ImFontAtlas::GetTexDataAsRGBA32(unsigned char**, int*, int*, int*)
void    ImFontAtlas::GetTexDataAsRGBA32(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel)
{
    // Convert to RGBA32 format on demand
    // Although it is likely to be the most commonly used format, our font rendering is 1 channel / 8 bpp
    if (!TexPixelsRGBA32)
    {
        unsigned char* pixels;
        GetTexDataAsAlpha8(&pixels, NULL, NULL);
        TexPixelsRGBA32 = (unsigned int*)ImGui::MemAlloc((size_t)(TexWidth * TexHeight * 4));
        const unsigned char* src = pixels;
        unsigned int* dst = TexPixelsRGBA32;
        for (int n = TexWidth * TexHeight; n > 0; n--)
            *dst++ = ((unsigned int)(*src++) << 24) | 0x00FFFFFF;
    }

    *out_pixels = (unsigned char*)TexPixelsRGBA32;
    if (out_width) *out_width = TexWidth;
    if (out_height) *out_height = TexHeight;
    if (out_bytes_per_pixel) *out_bytes_per_pixel = 4;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
movq 0x10(%rdi), %rax
testq %rax, %rax
jne 0x33c84
leaq -0x30(%rbp), %rsi
movq %r15, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x30ed6
movl 0x18(%r15), %eax
imull 0x1c(%r15), %eax
shll $0x2, %eax
movslq %eax, %rdi
callq 0x8589
movq %rax, 0x10(%r15)
movl 0x1c(%r15), %ecx
imull 0x18(%r15), %ecx
testl %ecx, %ecx
jle 0x33c84
movq -0x30(%rbp), %rdx
incl %ecx
xorl %esi, %esi
movzbl (%rdx,%rsi), %edi
shll $0x18, %edi
orl $0xffffff, %edi         # imm = 0xFFFFFF
movl %edi, (%rax,%rsi,4)
decl %ecx
incq %rsi
cmpl $0x1, %ecx
ja 0x33c6a
movq %rax, (%r13)
testq %r12, %r12
je 0x33c95
movl 0x18(%r15), %eax
movl %eax, (%r12)
testq %r14, %r14
je 0x33ca1
movl 0x1c(%r15), %eax
movl %eax, (%r14)
testq %rbx, %rbx
je 0x33cac
movl $0x4, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_draw.cpp
// Function: ImFontAtlas::AddFontFromMemoryCompressedBase85TTF(char const*, float, ImFontConfig const*, unsigned short const*)
ImFont* ImFontAtlas::AddFontFromMemoryCompressedBase85TTF(const char* compressed_ttf_data_base85, float size_pixels, const ImFontConfig* font_cfg, const ImWchar* glyph_ranges)
{
    int compressed_ttf_size = (((int)strlen(compressed_ttf_data_base85) + 4) / 5) * 4;
    void* compressed_ttf = ImGui::MemAlloc(compressed_ttf_size);
    Decode85((const unsigned char*)compressed_ttf_data_base85, (unsigned int*)compressed_ttf);
    ImFont* font = AddFontFromMemoryCompressedTTF(compressed_ttf, compressed_ttf_size, size_pixels, font_cfg, glyph_ranges);
    ImGui::MemFree(compressed_ttf);
    return font;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, -0x38(%rbp)
movq %rdx, %r14
movss %xmm0, -0x2c(%rbp)
movq %rsi, %r12
movq %rdi, %r15
movq %rsi, %rdi
callq 0x72e0
addl $0x4, %eax
cltq
imulq $0x66666667, %rax, %r13 # imm = 0x66666667
movq %r13, %rax
shrq $0x3f, %rax
shrq $0x21, %r13
addl %eax, %r13d
shll $0x2, %r13d
movslq %r13d, %rdi
callq 0x8589
movq %rax, %rbx
movb (%r12), %cl
testb %cl, %cl
je 0x33ff2
addq $0x5, %r12
movq %rbx, %rax
movsbl %cl, %edx
xorl %ecx, %ecx
cmpb $0x5c, %dl
setge %cl
xorl $-0x23, %ecx
addl %edx, %ecx
movsbl -0x4(%r12), %esi
xorl %edx, %edx
cmpl $0x5c, %esi
setge %dl
xorl $-0x23, %edx
addl %esi, %edx
movsbl -0x3(%r12), %edi
xorl %esi, %esi
cmpl $0x5c, %edi
setge %sil
xorl $-0x23, %esi
addl %edi, %esi
movsbl -0x2(%r12), %edi
xorl %r8d, %r8d
cmpl $0x5c, %edi
setge %r8b
xorl $-0x23, %r8d
addl %edi, %r8d
movsbl -0x1(%r12), %edi
xorl %r9d, %r9d
cmpl $0x5c, %edi
setge %r9b
xorl $-0x23, %r9d
addl %edi, %r9d
imull $0x55, %r9d, %edi
addl %r8d, %edi
imull $0x55, %edi, %edi
addl %esi, %edi
imull $0x55, %edi, %esi
addl %edx, %esi
imull $0x55, %esi, %edx
addl %ecx, %edx
movl %edx, (%rax)
addq $0x4, %rax
movb (%r12), %cl
addq $0x5, %r12
testb %cl, %cl
jne 0x33f61
movq %r15, %rdi
movq %rbx, %rsi
movl %r13d, %edx
movss -0x2c(%rbp), %xmm0
movq %r14, %rcx
movq -0x38(%rbp), %r8
callq 0x3421e
movq %rax, %r14
movq %rbx, %rdi
callq 0x9019
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_draw.cpp
// Function: ImFontAtlas::AddFontFromFileTTF(char const*, float, ImFontConfig const*, unsigned short const*)
ImFont* ImFontAtlas::AddFontFromFileTTF(const char* filename, float size_pixels, const ImFontConfig* font_cfg_template, const ImWchar* glyph_ranges)
{
    int data_size = 0;
    void* data = ImLoadFileToMemory(filename, "rb", &data_size, 0);
    if (!data)
    {
        IM_ASSERT(0); // Could not load file.
        return NULL;
    }
    ImFontConfig font_cfg = font_cfg_template ? *font_cfg_template : ImFontConfig();
    if (font_cfg.Name[0] == '\0')
    {
        // Store a short copy of filename into into the font name for convenience
        const char* p;
        for (p = filename + strlen(filename); p > filename && p[-1] != '/' && p[-1] != '\\'; p--) {}
        snprintf(font_cfg.Name, IM_ARRAYSIZE(font_cfg.Name), "%s", p);
    }
    return AddFontFromMemoryTTF(data, data_size, size_pixels, &font_cfg, glyph_ranges);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %rbx
movq %rdx, %r13
movss %xmm0, -0x2c(%rbp)
movq %rsi, %r12
movq %rdi, %r14
leaq -0x30(%rbp), %rdx
movl $0x0, (%rdx)
leaq 0xaa33(%rip), %rsi      # 0x3ea9e
movq %r12, %rdi
xorl %ecx, %ecx
callq 0x8ed8
testq %rax, %rax
je 0x34154
movq %rax, %r15
testq %r13, %r13
je 0x340ab
leaq -0x98(%rbp), %rax
movl $0xd, %ecx
movq %rax, %rdi
movq %r13, %rsi
rep  movsq (%rsi), %es:(%rdi)
cmpb $0x0, 0x3a(%rax)
jne 0x34128
leaq -0x5e(%rbp), %r13
jmp 0x340ed
xorl %eax, %eax
leaq -0x5e(%rbp), %r13
movq %rax, -0x3a(%r13)
movl $0x0, -0x32(%r13)
movb $0x1, -0x2e(%r13)
movaps 0xe717(%rip), %xmm0     # 0x427e0
movups %xmm0, -0x2a(%r13)
movb $0x0, -0x1a(%r13)
movq %rax, -0x16(%r13)
movq %rax, 0x26(%r13)
xorps %xmm0, %xmm0
movups %xmm0, -0xa(%r13)
movups %xmm0, 0x6(%r13)
movups %xmm0, 0x10(%r13)
movq %r12, %rdi
callq 0x72e0
addq %r12, %rax
movq %rax, %rcx
cmpq %r12, %rax
jbe 0x34112
movzbl -0x1(%rcx), %edx
cmpl $0x5c, %edx
je 0x34112
leaq -0x1(%rcx), %rax
cmpl $0x2f, %edx
jne 0x340f8
leaq 0xe314(%rip), %rdx      # 0x4242d
movl $0x20, %esi
movq %r13, %rdi
xorl %eax, %eax
callq 0x73d0
movl -0x30(%rbp), %edx
leaq -0x98(%rbp), %rcx
movq %r14, %rdi
movq %r15, %rsi
movss -0x2c(%rbp), %xmm0
movq %rbx, %r8
callq 0x34174
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xaae7(%rip), %rdi      # 0x3ec42
leaq 0x12634(%rip), %rsi     # 0x46796
leaq 0x12867(%rip), %rcx     # 0x469d0
movl $0x452, %edx            # imm = 0x452
callq 0x7140
nop
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_draw.cpp
// Function: ImFontAtlas::AddFontFromMemoryTTF(void*, int, float, ImFontConfig const*, unsigned short const*)
ImFont* ImFontAtlas::AddFontFromMemoryTTF(void* ttf_data, int ttf_size, float size_pixels, const ImFontConfig* font_cfg_template, const ImWchar* glyph_ranges)
{
    ImFontConfig font_cfg = font_cfg_template ? *font_cfg_template : ImFontConfig();
    IM_ASSERT(font_cfg.FontData == NULL);
    font_cfg.FontData = ttf_data;
    font_cfg.FontDataSize = ttf_size;
    font_cfg.SizePixels = size_pixels;
    if (glyph_ranges)
        font_cfg.GlyphRanges = glyph_ranges;
    return AddFont(&font_cfg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rsi, %r9
movq %rdi, %rax
testq %rcx, %rcx
je 0x341c1
movq %rcx, %r10
leaq -0x68(%rbp), %r11
movl $0xd, %ecx
movq %r11, %rdi
movq %r10, %rsi
rep  movsq (%rsi), %es:(%rdi)
cmpq $0x0, (%r11)
je 0x341f7
leaq 0x1288b(%rip), %rdi     # 0x46a34
leaq 0x125e6(%rip), %rsi     # 0x46796
leaq 0x12899(%rip), %rcx     # 0x46a50
movl $0x464, %edx            # imm = 0x464
callq 0x7140
movb $0x1, -0x5c(%rbp)
movl $0x0, -0x58(%rbp)
movabsq $0x100000003, %rcx      # imm = 0x100000003
movq %rcx, -0x50(%rbp)
movb $0x0, -0x48(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x44(%rbp)
movq %rcx, -0x8(%rbp)
xorps %xmm1, %xmm1
movups %xmm1, -0x38(%rbp)
movups %xmm1, -0x28(%rbp)
movups %xmm1, -0x1e(%rbp)
movq %r9, -0x68(%rbp)
movl %edx, -0x60(%rbp)
movss %xmm0, -0x54(%rbp)
testq %r8, %r8
je 0x3420c
movq %r8, -0x38(%rbp)
leaq -0x68(%rbp), %rsi
movq %rax, %rdi
callq 0x33cbc
addq $0x70, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/stb_truetype.h
// Function: stbtt_PackSetOversampling(stbtt_pack_context*, unsigned int, unsigned int)
STBTT_DEF void stbtt_PackSetOversampling(stbtt_pack_context *spc, unsigned int h_oversample, unsigned int v_oversample)
{
   STBTT_assert(h_oversample <= STBTT_MAX_OVERSAMPLE);
   STBTT_assert(v_oversample <= STBTT_MAX_OVERSAMPLE);
   if (h_oversample <= STBTT_MAX_OVERSAMPLE)
      spc->h_oversample = h_oversample;
   if (v_oversample <= STBTT_MAX_OVERSAMPLE)
      spc->v_oversample = v_oversample;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x9, %esi
jae 0x34871
cmpl $0x9, %edx
jae 0x34890
movl %esi, 0x20(%rdi)
movl %edx, 0x24(%rdi)
popq %rbp
retq
leaq 0x1245b(%rip), %rdi     # 0x46cd3
leaq 0x12466(%rip), %rsi     # 0x46ce5
leaq 0x12476(%rip), %rcx     # 0x46cfc
movl $0xa79, %edx            # imm = 0xA79
callq 0x7140
leaq 0x124b6(%rip), %rdi     # 0x46d4d
leaq 0x12447(%rip), %rsi     # 0x46ce5
leaq 0x12457(%rip), %rcx     # 0x46cfc
movl $0xa7a, %edx            # imm = 0xA7A
callq 0x7140
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_draw.cpp
// Function: ImFont::FindGlyph(unsigned short) const
const ImFont::Glyph* ImFont::FindGlyph(unsigned short c) const
{
    if (c < IndexLookup.Size)
    {
        const int i = IndexLookup[c];
        if (i != -1)
            return &Glyphs[i];
    }
    return FallbackGlyph;
}

// Assembly:
cmpl %esi, 0x68(%rdi)
jle 0x34d04
movq 0x70(%rdi), %rax
movzwl %si, %ecx
movslq (%rax,%rcx,4), %rax
cmpq $-0x1, %rax
je 0x34d04
cmpl %eax, 0x38(%rdi)
jle 0x34d09
leaq (%rax,%rax,4), %rax
shlq $0x3, %rax
addq 0x40(%rdi), %rax
retq
movq 0x48(%rdi), %rax
retq
pushq %rbp
movq %rsp, %rbp
leaq 0xa0cc(%rip), %rdi      # 0x3ede0
leaq 0x9da8(%rip), %rsi      # 0x3eac3
leaq 0x127f5(%rip), %rcx     # 0x47517
movl $0x31d, %edx            # imm = 0x31D
callq 0x7140
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_draw.cpp
// Function: ImFont::Clear()
void    ImFont::Clear()
{
    FontSize = 0.0f;
    DisplayOffset = ImVec2(0.0f, 1.0f);
    ConfigData = NULL;
    ConfigDataCount = 0;
    Ascent = Descent = 0.0f;
    ContainerAtlas = NULL;
    Glyphs.clear();
    FallbackGlyph = NULL;
    FallbackXAdvance = 0.0f;
    IndexXAdvance.clear();
    IndexLookup.clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
movl %eax, (%rdi)
movabsq $0x3f80000000000000, %rcx # imm = 0x3F80000000000000
movq %rcx, 0x8(%rdi)
movq $0x0, 0x30(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movl %eax, 0x28(%rdi)
movq 0x40(%rdi), %rdi
testq %rdi, %rdi
je 0x35223
xorl %r14d, %r14d
movq %r14, 0x38(%rbx)
callq 0x9019
movq %r14, 0x40(%rbx)
movq $0x0, 0x48(%rbx)
movl $0x0, 0x50(%rbx)
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x3524b
xorl %r14d, %r14d
movq %r14, 0x58(%rbx)
callq 0x9019
movq %r14, 0x60(%rbx)
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x35264
xorl %r14d, %r14d
movq %r14, 0x68(%rbx)
callq 0x9019
movq %r14, 0x70(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_draw.cpp
// Function: stb__match(unsigned char*, unsigned int)
static void stb__match(unsigned char *data, unsigned int length)
{
    // INVERSE of memmove... write each byte before copying the next...
    IM_ASSERT (stb__dout + length <= stb__barrier);
    if (stb__dout + length > stb__barrier) { stb__dout += length; return; }
    if (data < stb__barrier4) { stb__dout = stb__barrier+1; return; }
    while (length--) *stb__dout++ = *data++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x29295(%rip), %rax     # 0x5fda0
movl %esi, %ecx
leaq (%rax,%rcx), %r8
movq 0x29278(%rip), %rdx     # 0x5fd90
cmpq %rdx, %r8
ja 0x36b4f
cmpq %rdi, 0x29274(%rip)     # 0x5fd98
jbe 0x36b2b
incq %rdx
jmp 0x36b46
testl %esi, %esi
je 0x36b4d
xorl %edx, %edx
movb (%rdi,%rdx), %sil
movb %sil, (%rax,%rdx)
incq %rdx
cmpl %edx, %ecx
jne 0x36b31
addq %rdx, %rax
movq %rax, %rdx
movq %rdx, 0x29253(%rip)     # 0x5fda0
popq %rbp
retq
leaq 0x106d9(%rip), %rdi     # 0x4722f
leaq 0xfc39(%rip), %rsi      # 0x46796
leaq 0x106ee(%rip), %rcx     # 0x47252
movl $0x7e3, %edx            # imm = 0x7E3
callq 0x7140
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_draw.cpp
// Function: stb__lit(unsigned char*, unsigned int)
static void stb__lit(unsigned char *data, unsigned int length)
{
    IM_ASSERT (stb__dout + length <= stb__barrier);
    if (stb__dout + length > stb__barrier) { stb__dout += length; return; }
    if (data < stb__barrier2) { stb__dout = stb__barrier+1; return; }
    memcpy(stb__dout, data, length);
    stb__dout += length;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rax
movq 0x29222(%rip), %rdi     # 0x5fda0
movl %esi, %edx
leaq (%rdi,%rdx), %rbx
movq 0x29205(%rip), %rcx     # 0x5fd90
cmpq %rcx, %rbx
ja 0x36bb7
cmpq %rax, 0x291e9(%rip)     # 0x5fd80
jbe 0x36ba1
incq %rcx
movq %rcx, %rbx
jmp 0x36ba9
movq %rax, %rsi
callq 0x7080
movq %rbx, 0x291f0(%rip)     # 0x5fda0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x10671(%rip), %rdi     # 0x4722f
leaq 0xfbd1(%rip), %rsi      # 0x46796
leaq 0x106b5(%rip), %rcx     # 0x47281
movl $0x7eb, %edx            # imm = 0x7EB
callq 0x7140
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_impl_sdl.cpp
// Function: ImGui_ImplSdl_ProcessEvent(SDL_Event*)
bool ImGui_ImplSdl_ProcessEvent(SDL_Event* event)
{
    ImGuiIO& io = ImGui::GetIO();
    switch (event->type)
    {
    case SDL_MOUSEWHEEL:
        {
            if (event->wheel.y > 0)
                g_MouseWheel = 1;
            if (event->wheel.y < 0)
                g_MouseWheel = -1;
            return true;
        }
    case SDL_MOUSEBUTTONDOWN:
        {
            if (event->button.button == SDL_BUTTON_LEFT) g_MousePressed[0] = true;
            if (event->button.button == SDL_BUTTON_RIGHT) g_MousePressed[1] = true;
            if (event->button.button == SDL_BUTTON_MIDDLE) g_MousePressed[2] = true;
            return true;
        }
    case SDL_TEXTINPUT:
        {
            ImGuiIO& io = ImGui::GetIO();
            io.AddInputCharactersUTF8(event->text.text);
            return true;
        }
    case SDL_KEYDOWN:
    case SDL_KEYUP:
        {
            int key = event->key.keysym.sym & ~SDLK_SCANCODE_MASK;
            io.KeysDown[key] = (event->type == SDL_KEYDOWN);
            io.KeyShift = ((SDL_GetModState() & KMOD_SHIFT) != 0);
            io.KeyCtrl = ((SDL_GetModState() & KMOD_CTRL) != 0);
            io.KeyAlt = ((SDL_GetModState() & KMOD_ALT) != 0);
            return true;
        }
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0xb0ca
movq %rax, %r14
movl (%rbx), %ecx
xorl %eax, %eax
cmpl $0x400, %ecx            # imm = 0x400
jg 0x3704a
leal -0x300(%rcx), %edx
cmpl $0x2, %edx
jae 0x3706c
movslq 0x14(%rbx), %rax
andq $-0x40000001, %rax      # imm = 0xBFFFFFFF
cmpl $0x300, %ecx            # imm = 0x300
sete 0x100(%r14,%rax)
callq 0x76d0
testb $0x3, %al
setne 0xfe(%r14)
callq 0x76d0
testb $-0x40, %al
setne 0xfd(%r14)
callq 0x76d0
testl $0x300, %eax            # imm = 0x300
setne 0xff(%r14)
jmp 0x37088
cmpl $0x401, %ecx            # imm = 0x401
je 0x3708f
cmpl $0x403, %ecx            # imm = 0x403
jne 0x3708a
cmpl $0x0, 0x14(%rbx)
jle 0x370ad
movl $0x3f800000, 0x28d5e(%rip) # imm = 0x3F800000
jmp 0x37088
cmpl $0x303, %ecx            # imm = 0x303
jne 0x3708a
callq 0xb0ca
addq $0xc, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x8254
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
movzbl 0x10(%rbx), %ecx
movb $0x1, %al
cmpl $0x3, %ecx
je 0x370c6
cmpl $0x2, %ecx
je 0x370bd
cmpl $0x1, %ecx
jne 0x3708a
movb $0x1, 0x28d21(%rip)     # 0x5fdcc
jmp 0x3708a
movb $0x1, %al
jns 0x3708a
movl $0xbf800000, 0x28d0d(%rip) # imm = 0xBF800000
jmp 0x3708a
movb $0x1, 0x28d0a(%rip)     # 0x5fdce
jmp 0x3708a
movb $0x1, 0x28d00(%rip)     # 0x5fdcd
jmp 0x3708a
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_impl_sdl.cpp
// Function: ImGui_ImplSdl_InvalidateDeviceObjects()
void ImGui_ImplSdl_InvalidateDeviceObjects()
{
    if (g_VboHandle) glDeleteBuffers(1, &g_VboHandle);
    if (g_ElementsHandle) glDeleteBuffers(1, &g_ElementsHandle);

    glDetachShader(g_ShaderHandle, g_VertHandle);
    glDeleteShader(g_VertHandle);
    g_VertHandle = 0;

    glDetachShader(g_ShaderHandle, g_FragHandle);
    glDeleteShader(g_FragHandle);
    g_FragHandle = 0;

    glDeleteProgram(g_ShaderHandle);
    g_ShaderHandle = 0;

    if (g_FontTexture)
    {
        glDeleteTextures(1, &g_FontTexture);
        ImGui::GetIO().Fonts->TexID = 0;
        g_FontTexture = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl $0x0, 0x28a65(%rip)     # 0x5fdb4
je 0x37362
leaq 0x28a5c(%rip), %rsi     # 0x5fdb4
movl $0x1, %edi
callq 0x7830
cmpl $0x0, 0x28a5b(%rip)     # 0x5fdc4
je 0x3737c
leaq 0x28a52(%rip), %rsi     # 0x5fdc4
movl $0x1, %edi
callq 0x7830
movl 0x28a26(%rip), %edi     # 0x5fda8
movl 0x28a48(%rip), %esi     # 0x5fdd0
callq 0x7380
movl 0x28a3d(%rip), %edi     # 0x5fdd0
callq 0x7820
xorl %ebx, %ebx
movl %ebx, 0x28a30(%rip)     # 0x5fdd0
movl 0x28a02(%rip), %edi     # 0x5fda8
movl 0x28a28(%rip), %esi     # 0x5fdd4
callq 0x7380
movl 0x28a1d(%rip), %edi     # 0x5fdd4
callq 0x7820
movl %ebx, 0x28a12(%rip)     # 0x5fdd4
movl 0x289e0(%rip), %edi     # 0x5fda8
callq 0x7600
movl %ebx, 0x289d5(%rip)     # 0x5fda8
cmpl %ebx, 0x289ff(%rip)     # 0x5fdd8
je 0x37409
leaq 0x289f6(%rip), %rsi     # 0x5fdd8
movl $0x1, %edi
callq 0x77a0
callq 0xb0ca
movq 0x88(%rax), %rax
movq $0x0, (%rax)
movl $0x0, 0x289cf(%rip)     # 0x5fdd8
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/joypad.cpp
// Function: Joypad::read(unsigned char)
u8 Joypad::read(u8 request) {
  // Directions
  if (!bitTest(request, 5)) {
    return directions;
  }

  // Buttons
  else if (!bitTest(request, 4)) {
    return buttons;
  }

  return 0xFF;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testb $0x20, %sil
jne 0x3779b
movb 0x1(%rdi), %al
jmp 0x377a6
andl $0x10, %esi
xorl %eax, %eax
negl %esi
sbbl %eax, %eax
orb (%rdi), %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/mmu.cpp
// Function: MMU::reset()
void MMU::reset() {
  memory.resize(0x10000, 0);
  ram.resize(0x2000, 0);  // external RAM

  // Setup MBC info
  mbc.romOffset = 0x4000;
  mbc.romBank = 0;
  mbc.mode = 0;
  mbc.ramOffset = 0;
  mbc.type = 0;  // this will be determined in load()
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
addq $0x8, %rdi
xorl %r14d, %r14d
leaq -0x12(%rbp), %rdx
movb %r14b, (%rdx)
movl $0x10000, %esi          # imm = 0x10000
callq 0x37c56
leaq 0x50(%rbx), %rdi
leaq -0x11(%rbp), %rdx
movb %r14b, (%rdx)
movl $0x2000, %esi           # imm = 0x2000
callq 0x37c56
movl $0x4000, 0x2(%rbx)      # imm = 0x4000
movb %r14b, 0x6(%rbx)
movw $0x0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/mmu.cpp
// Function: MMU::load(char*)
bool MMU::load(char *filename) {
  romFilename = filename;

  std::ifstream file;
  file.open(filename, std::ios::binary);
  if (!file.is_open()) {
    return false;
  }

  // Get file size and read ROM into vector
  file.seekg(0, file.end);
  u32 romSize = file.tellg();
  rom.resize(romSize, 0);
  file.seekg(0, file.beg);
  file.read((char *)(&rom[0]), romSize);
  file.close();

  // Map ROM to memory
  memory.assign(rom.begin(),
                rom.begin() + (0x7FFF > rom.size() ? rom.size() : 0x7FFF));

  // Get MBC type from ROM header
  mbc.type = rom[0x147];

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, 0x68(%rdi)
leaq -0x230(%rbp), %r15
movq %r15, %rdi
callq 0x72a0
movq %r15, %rdi
movq %r14, %rsi
movl $0x4, %edx
callq 0x7550
leaq -0x1b8(%rbp), %rdi
callq 0x7770
movl %eax, %r14d
testb %al, %al
je 0x37962
leaq -0x230(%rbp), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x7250
leaq -0x230(%rbp), %rdi
callq 0x7100
leaq 0x38(%rbx), %r12
movl %eax, %r15d
leaq -0x21(%rbp), %rdx
movb $0x0, (%rdx)
movq %r12, %rdi
movq %r15, %rsi
callq 0x37c56
leaq -0x230(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7250
movq (%r12), %rsi
leaq -0x230(%rbp), %rdi
movq %r15, %rdx
callq 0x7360
leaq -0x230(%rbp), %rdi
callq 0x74a0
leaq 0x8(%rbx), %rdi
movq 0x38(%rbx), %rsi
movq 0x40(%rbx), %rdx
subq %rsi, %rdx
movl $0x7fff, %eax           # imm = 0x7FFF
cmpq %rax, %rdx
cmovaeq %rax, %rdx
addq %rsi, %rdx
callq 0x37e96
movq 0x38(%rbx), %rax
movb 0x147(%rax), %al
movb %al, (%rbx)
leaq -0x230(%rbp), %rdi
callq 0x7040
movl %r14d, %eax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x37989
jmp 0x37989
jmp 0x37989
jmp 0x37989
movq %rax, %rbx
leaq -0x230(%rbp), %rdi
callq 0x7040
movq %rbx, %rdi
callq 0x74c0
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/mmu.cpp
// Function: MMU::read8(unsigned short)
u8 MMU::read8(u16 addr) {
  // ROM, switched bank
  if (addr >= 0x4000 && addr <= 0x7FFF) {
    return rom[mbc.romOffset + (addr & 0x3FFF)];
  }

  // RAM, switched bank
  else if (addr >= 0xA000 && addr <= 0x8FFF) {
    return ram[mbc.ramOffset + (addr & 0x1FFF)];
  }

  // Shadow of working RAM, less final 512 bytes
  else if (addr >= 0xE000 && addr <= 0xFDFF) {
    return memory[addr - 0x1000];
  }

  // Joypad
  else if (addr == 0xFF00) {
    return joypad->read(memory[0xFF00]);
  }

  // Default
  else {
    return memory[addr];
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movswl %si, %eax
cmpl $0x4000, %eax           # imm = 0x4000
jl 0x379c4
movzwl 0x2(%rdi), %eax
movzwl %si, %ecx
andl $0x3fff, %ecx           # imm = 0x3FFF
addq 0x38(%rdi), %rcx
movb (%rax,%rcx), %al
jmp 0x37a0a
leal 0x2000(%rsi), %eax
movzwl %ax, %eax
cmpl $0x1dff, %eax           # imm = 0x1DFF
ja 0x379e4
movq 0x8(%rdi), %rax
movzwl %si, %ecx
movb -0x1000(%rax,%rcx), %al
jmp 0x37a0a
movzwl %si, %eax
cmpl $0xff00, %eax           # imm = 0xFF00
jne 0x37a03
movq 0x8(%rdi), %rax
movq 0x70(%rdi), %rdi
movzbl 0xff00(%rax), %esi
popq %rbp
jmp 0x3778c
movq 0x8(%rdi), %rcx
movb (%rcx,%rax), %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/gpu.cpp
// Function: GPU::renderScanline()
void GPU::renderScanline() {
  u8 control = mmu->memory[LCDC];
  if (bitTest(control, LCDC_BG_ENABLE)) {
    renderBackground();
  }
  if (bitTest(control, LCDC_OBJ_ENABLE)) {
    renderSprites();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rax), %rax
movzbl 0xff40(%rax), %r14d
testb $0x1, %r14b
je 0x38253
movq %rbx, %rdi
callq 0x3829c
testb $0x2, %r14b
jne 0x3825e
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x383c8
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/cpu.cpp
// Function: CPU::updateDivider(unsigned char)
void CPU::updateDivider(u8 cycles) {
  timerCounter += cycles;
  if (timerCounter >= 256) {
    timerCounter = 0;
    mmu.memory[DIV] = 0;
  } else {
    mmu.memory[DIV]++;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
addl 0x2a4(%rdi), %esi
movl %esi, 0x2a4(%rdi)
cmpl $0x100, %esi            # imm = 0x100
jl 0x3a99b
movl $0x0, 0x2a4(%rdi)
movq 0x20(%rdi), %rax
movb $0x0, 0xff04(%rax)
jmp 0x3a9a5
movq 0x20(%rdi), %rax
incb 0xff04(%rax)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/cpu.cpp
// Function: CPU::updateTimer(unsigned char)
void CPU::updateTimer(u8 cycles) {
  // Return if timer disabled
  if (!bitTest(mmu.memory[TAC], 2)) {
    return;
  }

  // Handle timer input clock selection changes
  if (timerMode != (mmu.memory[TAC] & 0x3)) {
    timerMode = mmu.memory[TAC] & 0x3;
    switch (timerMode) {
      case 0:
        timerCycles = 1024;  // clock / inc rate == 4194304÷4096 == 1024 cycles
        break;
      case 1:
        timerCycles = 16;
        break;
      case 2:
        timerCycles = 64;
        break;
      case 3:
        timerCycles = 256;
        break;
      default:
        break;
    }
  }

  timerCounter += cycles;

  if (timerCounter >= timerCycles) {
    timerCounter = 0;
    // Check for timer overflow
    if (mmu.memory[TIMA] >= 0xFF) {
      mmu.memory[TIMA] = 0;
      // Request interrupt
      // todo: I think there is a 4 cycle delay here
      bitSet(mmu.memory[IF], 2);
    } else {
      mmu.memory[TIMA]++;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x20(%rdi), %rax
movzbl 0xff07(%rax), %ecx
testb $0x4, %cl
je 0x3aa40
andl $0x3, %ecx
cmpl %ecx, 0x29c(%rdi)
jne 0x3aa04
movl 0x2a0(%rdi), %ecx
movzbl %sil, %edx
addl 0x2a4(%rdi), %edx
movl %edx, 0x2a4(%rdi)
cmpl %ecx, %edx
jl 0x3aa40
movl $0x0, 0x2a4(%rdi)
movb 0xff05(%rax), %cl
cmpb $-0x1, %cl
je 0x3aa2e
incb %cl
movb %cl, 0xff05(%rax)
jmp 0x3aa40
movl %ecx, 0x29c(%rdi)
movzbl %cl, %ecx
leaq 0xe070(%rip), %rdx      # 0x48a84
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x400, 0x2a0(%rdi)     # imm = 0x400
movl $0x400, %ecx            # imm = 0x400
jmp 0x3a9d1
movb $0x0, 0xff05(%rax)
movq 0x20(%rdi), %rax
orb $0x4, 0xff0f(%rax)
popq %rbp
retq
movl $0x40, 0x2a0(%rdi)
movl $0x40, %ecx
jmp 0x3a9d1
movl $0x100, 0x2a0(%rdi)     # imm = 0x100
movl $0x100, %ecx            # imm = 0x100
jmp 0x3a9d1
movl $0x10, 0x2a0(%rdi)
movl $0x10, %ecx
jmp 0x3a9d1
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/cpu.cpp
// Function: CPU::checkInterrupts()
void CPU::checkInterrupts() {
  if (!ime || eiDelay) {  // IME disabled or the last instruction was EI
    eiDelay = false;
    return;
  }
  u8 requested = mmu.read8(IF);
  if (requested > 0) {
    u8 enabled = mmu.read8(IE);
    for (u8 i = 0; i < 5; i++) {
      if (bitTest(requested, i)) {
        if (bitTest(enabled, i)) {
          doInterrupt(i);
        }
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0x10(%rdi)
jne 0x3aa98
cmpb $0x1, 0x11(%rbx)
jne 0x3aaa5
movb $0x0, 0x11(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rbx), %r14
movq %r14, %rdi
movl $0xff0f, %esi           # imm = 0xFF0F
callq 0x379a0
testb %al, %al
je 0x3aa9c
movl %eax, %r15d
movq %r14, %rdi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x379a0
movzbl %r15b, %r15d
movzbl %al, %r12d
xorl %r14d, %r14d
movl $0x1, %eax
movl %r14d, %ecx
shll %cl, %eax
btl %r14d, %r15d
jae 0x3aaf6
andl %r12d, %eax
je 0x3aaf6
movzbl %r14b, %esi
movq %rbx, %rdi
callq 0x3ab02
incl %r14d
cmpl $0x5, %r14d
jne 0x3aad5
jmp 0x3aa9c
nop
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/cpu.cpp
// Function: CPU::doInterrupt(unsigned char)
void CPU::doInterrupt(u8 interrupt) {
  ime = false;  // IME = disabled

  // Reset bit in Interrupt Request Register
  u8 flags = mmu.memory[IF];
  bitClear(flags, interrupt);
  mmu.memory[IF] = flags;

  reg.sp -= 2;
  mmu.write16(reg.sp, reg.pc);  // Push PC to the stack

  // Interrupts have specific service routines at defined memory locations
  switch (interrupt) {
    case 0:
      reg.pc = 0x40;
      break;

    case 1:
      reg.pc = 0x48;
      break;

    case 2:
      reg.pc = 0x50;
      break;

    case 4:
      reg.pc = 0x60;
      break;

    default:
      break;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movb $0x0, 0x10(%rdi)
addq $0x18, %rdi
movq 0x20(%rbx), %rax
movl $0x1, %edx
movl %r14d, %ecx
shll %cl, %edx
notb %dl
andb %dl, 0xff0f(%rax)
movzwl 0xa(%rbx), %eax
addl $-0x2, %eax
movw %ax, 0xa(%rbx)
movzwl 0x8(%rbx), %edx
movzwl %ax, %esi
callq 0x37c1e
cmpb $0x4, %r14b
ja 0x3ab67
movzbl %r14b, %eax
movl $0x17, %ecx
btl %eax, %ecx
jae 0x3ab67
leaq 0xdf35(%rip), %rcx      # 0x48a94
movzwl (%rcx,%rax,2), %eax
movw %ax, 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/cpu.cpp
// Function: void CPU::incrementReg<unsigned char>(unsigned char&)
void CPU::incrementReg(t &reg1) {
  reg1++;
  bool carry = bitTest(reg.f, FLAG_CARRY);
  reg.f = 0;
  if (carry) {
    bitSet(reg.f, FLAG_CARRY);
  }
  if (reg1 == 0) {
    bitSet(reg.f, FLAG_ZERO);
  }
  if ((reg1 & 0xF) == 0) {
    bitSet(reg.f, FLAG_HALF_CARRY);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
incb (%rsi)
movb (%rdi), %al
andb $0x10, %al
movb %al, (%rdi)
movb (%rsi), %cl
testb %cl, %cl
jne 0x3abee
orb $-0x80, %al
movb %al, (%rdi)
movb (%rsi), %cl
testb $0xf, %cl
jne 0x3abf7
orb $0x20, %al
movb %al, (%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/cpu.cpp
// Function: void CPU::decrementReg<unsigned char>(unsigned char&)
void CPU::decrementReg(t &reg1) {
  reg1--;
  bool carry = bitTest(reg.f, FLAG_CARRY);
  reg.f = 0;
  bitSet(reg.f, FLAG_SUBTRACT);
  if (carry) {
    bitSet(reg.f, FLAG_CARRY);
  }
  if (reg1 == 0) {
    bitSet(reg.f, FLAG_ZERO);
  }
  if ((reg1 & 0xF) == 0xF) {
    bitSet(reg.f, FLAG_HALF_CARRY);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
decb (%rsi)
movb (%rdi), %cl
andb $0x10, %cl
leal 0x40(%rcx), %eax
movb %al, (%rdi)
movb (%rsi), %dl
testb %dl, %dl
jne 0x3ac19
orb $-0x40, %cl
movb %cl, (%rdi)
movb (%rsi), %dl
movl %ecx, %eax
notb %dl
testb $0xf, %dl
jne 0x3ac24
orb $0x20, %al
movb %al, (%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/cpu.cpp
// Function: void CPU::rotateLeft<unsigned char>(unsigned char&)
void CPU::rotateLeft(t &reg1) {
  bool prevCarry = bitTest(reg.f, FLAG_CARRY);
  reg.f = 0;
  bool carry = bitTest(reg1, 7);
  reg1 <<= 1;
  reg1 += prevCarry;
  if (carry) {
    bitSet(reg.f, FLAG_CARRY);
  }
  if (reg1 == 0) {
    bitSet(reg.f, FLAG_ZERO);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %al
movb $0x0, (%rdi)
movb (%rsi), %cl
leal (%rcx,%rcx), %edx
shrb $0x4, %al
andb $0x1, %al
orb %dl, %al
movb %al, (%rsi)
testb %cl, %cl
jns 0x3ac9e
orb $0x10, (%rdi)
movb (%rsi), %al
testb %al, %al
jne 0x3aca5
orb $-0x80, (%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/cpu.cpp
// Function: void CPU::rotateRight<unsigned char>(unsigned char&)
void CPU::rotateRight(t &reg1) {
  bool prevCarry = bitTest(reg.f, FLAG_CARRY);
  reg.f = 0;
  bool carry = bitTest(reg1, 0);
  reg1 >>= 1;
  reg1 += (prevCarry << 7);
  if (carry) {
    bitSet(reg.f, FLAG_CARRY);
  }
  if (reg1 == 0) {
    bitSet(reg.f, FLAG_ZERO);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %al
movb $0x0, (%rdi)
movb (%rsi), %cl
movl %ecx, %edx
shrb %dl
shlb $0x3, %al
andb $-0x80, %al
orb %dl, %al
movb %al, (%rsi)
testb $0x1, %cl
je 0x3acca
orb $0x10, (%rdi)
movb (%rsi), %al
testb %al, %al
jne 0x3acd1
orb $-0x80, (%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/cpu.cpp
// Function: void CPU::addCarry<unsigned char>(unsigned char)
void CPU::addCarry(t n) {
  u8 prevCarry = bitTest(reg.f, FLAG_CARRY);
  reg.f = 0;

  if (reg.a + n + prevCarry > 0xFF) {
    bitSet(reg.f, FLAG_CARRY);
  }

  if ((reg.a & 0x0F) + (n & 0x0F) + prevCarry > 0x0F) {
    bitSet(reg.f, FLAG_HALF_CARRY);
  }

  reg.a += n + prevCarry;

  if (reg.a == 0) {
    bitSet(reg.f, FLAG_ZERO);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %ecx
movb $0x0, (%rdi)
movzbl 0x1(%rdi), %eax
leal (%rax,%rsi), %edx
shrl $0x4, %ecx
andl $0x1, %ecx
addl %ecx, %edx
cmpl $0x100, %edx            # imm = 0x100
setae %r8b
shlb $0x4, %r8b
movl %eax, %r10d
andl $0xf, %r10d
movl %esi, %r9d
andl $0xf, %r9d
addl %r10d, %r9d
addl %ecx, %r9d
leal 0x20(%r8), %r10d
cmpl $0x10, %r9d
movzbl %r8b, %r11d
movzbl %r10b, %r8d
cmovbl %r11d, %r8d
cmpl $0xff, %edx
ja 0x3ad78
cmpl $0x10, %r9d
jb 0x3ad7b
movb %r8b, (%rdi)
addl %esi, %ecx
addb %al, %cl
movb %cl, 0x1(%rdi)
jne 0x3ad8b
orb $-0x80, %r8b
movb %r8b, (%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/cpu.cpp
// Function: void CPU::subtractCarry<unsigned char>(unsigned char)
void CPU::subtractCarry(t n) {
  u8 prevCarry = bitTest(reg.f, FLAG_CARRY);
  if (reg.a < n + prevCarry) {
    bitSet(reg.f, FLAG_CARRY);
  }
  if ((reg.a & 0x0F) < ((n + prevCarry) & 0x0F)) {
    bitSet(reg.f, FLAG_HALF_CARRY);
  }
  bitSet(reg.f, FLAG_SUBTRACT);
  reg.a -= (n + prevCarry);
  if (reg.a == 0) {
    bitSet(reg.f, FLAG_ZERO);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %eax
btl $0x4, %eax
adcl $0x0, %esi
movzbl 0x1(%rdi), %ecx
movl %eax, %edx
orb $0x10, %dl
cmpl %ecx, %esi
movzbl %dl, %edx
cmovbel %eax, %edx
movl %ecx, %eax
andl $0xf, %eax
movl %esi, %r8d
andl $0xf, %r8d
movl %edx, %r9d
orb $0x20, %r9b
cmpl %eax, %r8d
movzbl %r9b, %eax
cmovbel %edx, %eax
movl %eax, %edx
orb $0x40, %dl
movb %dl, (%rdi)
subb %sil, %cl
movb %cl, 0x1(%rdi)
jne 0x3addc
orb $-0x40, %al
movb %al, (%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/cpu.cpp
// Function: void CPU::subtract<unsigned short>(unsigned short)
void CPU::subtract(t n) {
  reg.f = 0;
  if (reg.a < n) {
    bitSet(reg.f, FLAG_CARRY);
  }
  if ((reg.a & 0xF) < (n & 0xF)) {
    bitSet(reg.f, FLAG_HALF_CARRY);
  }
  bitSet(reg.f, FLAG_SUBTRACT);
  reg.a -= n;
  if (reg.a == 0) {
    bitSet(reg.f, FLAG_ZERO);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl 0x1(%rdi), %eax
cmpw %si, %ax
setb %cl
shlb $0x4, %cl
movl %eax, %edx
andl $0xf, %edx
movl %esi, %r8d
andl $0xf, %r8d
leal 0x20(%rcx), %r9d
cmpw %dx, %r8w
movzbl %cl, %edx
movzbl %r9b, %ecx
cmovbel %edx, %ecx
leal 0x40(%rcx), %edx
movb %dl, (%rdi)
subb %sil, %al
movb %al, 0x1(%rdi)
jne 0x3aed9
orb $-0x40, %cl
movb %cl, (%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/cpu.cpp
// Function: void CPU::rotateLeftCarry<unsigned char>(unsigned char&)
void CPU::rotateLeftCarry(t &reg1) {
  reg.f = 0;
  // High bit is shifted into carry flag
  if (bitTest(reg1, 7)) {
    bitSet(reg.f, FLAG_CARRY);
  }
  reg.a <<= 1;  // Shift register left, low bit becomes 0
  if (bitTest(reg.f, FLAG_CARRY)) {
    reg1++;
  }
  if (reg1 == 0) {
    bitSet(reg.f, FLAG_ZERO);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x0, (%rdi)
movb (%rsi), %cl
movl %ecx, %eax
shrb $0x3, %al
andb $0x10, %al
movb %al, (%rdi)
shlb 0x1(%rdi)
movb (%rsi), %al
testb %cl, %cl
jns 0x3af4b
incb %al
movb %al, (%rsi)
testb %al, %al
jne 0x3af52
orb $-0x80, (%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/main.cpp
// Function: handleSdlEvents()
void handleSdlEvents() {
  // Handle keydown, window close, etc
  SDL_Event event;
  while (SDL_PollEvent(&event)) {
    ImGui_ImplSdl_ProcessEvent(&event);
    switch (event.type) {
      case SDL_KEYDOWN:
        handleKeyPress(event.key.keysym.sym);
      case SDL_CONTROLLERBUTTONDOWN:
      case SDL_KEYUP:
      case SDL_CONTROLLERBUTTONUP:
        g_joypad.handleEvent(event);
        break;

      case SDL_CONTROLLERDEVICEADDED:
        // todo
        break;

      case SDL_CONTROLLERDEVICEREMOVED:
        // todo
        break;

      case SDL_QUIT:
        g_quit = true;
        break;

      default:
        break;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
leaq -0x48(%rbp), %rdi
callq 0x7810
testl %eax, %eax
je 0x3b2ac
leaq -0x48(%rbp), %rbx
leaq 0x37c91(%rip), %r14     # 0x72ec0
movq %rbx, %rdi
callq 0x36fd6
movl -0x48(%rbp), %eax
cmpl $0x650, %eax            # imm = 0x650
jg 0x3b258
cmpl $0x100, %eax            # imm = 0x100
je 0x3b264
cmpl $0x300, %eax            # imm = 0x300
je 0x3b26d
cmpl $0x301, %eax            # imm = 0x301
je 0x3b275
jmp 0x3b2a0
addl $0xfffff9af, %eax       # imm = 0xFFFFF9AF
cmpl $0x2, %eax
jb 0x3b275
jmp 0x3b2a0
movb $0x1, 0x37ce5(%rip)     # 0x72f50
jmp 0x3b2a0
movl -0x34(%rbp), %edi
callq 0x3bf86
movq -0x18(%rbp), %rax
movq %rax, 0x30(%rsp)
movups -0x48(%rbp), %xmm0
movups -0x38(%rbp), %xmm1
movups -0x28(%rbp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r14, %rdi
callq 0x3762c
movq %rbx, %rdi
callq 0x7810
testl %eax, %eax
jne 0x3b22f
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/main.cpp
// Function: imguiRegisters()
void imguiRegisters() {
  // Position to the right of disassembly window
  ImGui::SetNextWindowPos(ImVec2(DISASM_WINDOW_WIDTH, 0.0f));
  ImGui::SetNextWindowSize(ImVec2(REG_WINDOW_WIDTH, REG_WINDOW_HEIGHT));
  ImGui::Begin("reg", nullptr,
               ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize);
  ImGui::Text(
      "af = %04X\nbc = %04X\nde = %04X\nhl = %04X\nsp = %04X\npc = %04X",
      g_cpu.reg.af, g_cpu.reg.bc, g_cpu.reg.de, g_cpu.reg.hl, g_cpu.reg.sp,
      g_cpu.reg.pc);
  ImGui::End();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
leaq -0x10(%rbp), %rbx
movq $0x43960000, (%rbx)     # imm = 0x43960000
movq %rbx, %rdi
xorl %esi, %esi
callq 0x153a7
movabsq $0x42f0000042c80000, %rax # imm = 0x42F0000042C80000
movq %rax, (%rbx)
leaq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0xc42a
leaq 0xe768(%rip), %rdi      # 0x49c54
xorl %esi, %esi
movl $0x6, %edx
callq 0xc44d
movzwl 0x248f9(%rip), %esi     # 0x5fdf8
movzwl 0x248f4(%rip), %edx     # 0x5fdfa
movzwl 0x248ef(%rip), %ecx     # 0x5fdfc
movzwl 0x248e9(%rip), %r8d     # 0x5fdfe
movzwl 0x248e5(%rip), %r9d     # 0x5fe02
movzwl 0x248dc(%rip), %eax     # 0x5fe00
movl %eax, (%rsp)
leaq 0xe72a(%rip), %rdi      # 0x49c58
xorl %eax, %eax
callq 0x15c0a
callq 0xcc43
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/main.cpp
// Function: imguiLcdStatus()
void imguiLcdStatus() {
  // Position to the right of disassembly window, below register window
  ImGui::SetNextWindowPos(ImVec2(DISASM_WINDOW_WIDTH, REG_WINDOW_HEIGHT));
  ImGui::SetNextWindowSize(ImVec2(REG_WINDOW_WIDTH, LCD_STATUS_WINDOW_HEIGHT));
  ImGui::Begin("lcd stat", nullptr,
               ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize);
  ImGui::Text(
      "%02X FF40 LCDC\n"
      "%02X FF41 STAT\n"
      "%02X FF42 SCY\n"
      "%02X FF43 SCX\n"
      "%02X FF44 LY\n"
      "%02X FF45 LYC\n"
      "%02X FF46 DMA\n"
      "%02X FF47 BGP\n"
      "%02X FF48 OBP0\n"
      "%02X FF49 OBP1\n"
      "%02X FF4A WY\n"
      "%02X FF4B WX\n",
      g_cpu.mmu.memory[0xFF40], g_cpu.mmu.memory[0xFF41],
      g_cpu.mmu.memory[0xFF42], g_cpu.mmu.memory[0xFF43],
      g_cpu.mmu.memory[0xFF44], g_cpu.mmu.memory[0xFF45],
      g_cpu.mmu.memory[0xFF46], g_cpu.mmu.memory[0xFF47],
      g_cpu.mmu.memory[0xFF48], g_cpu.mmu.memory[0xFF49],
      g_cpu.mmu.memory[0xFF4A], g_cpu.mmu.memory[0xFF4B]);
  ImGui::End();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movabsq $0x42f0000043960000, %rax # imm = 0x42F0000043960000
leaq -0x30(%rbp), %rbx
movq %rax, (%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x153a7
movabsq $0x4348000042c80000, %rax # imm = 0x4348000042C80000
movq %rax, (%rbx)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0xc42a
leaq 0xe70b(%rip), %rdi      # 0x49c94
xorl %esi, %esi
movl $0x6, %edx
callq 0xc44d
movq 0x2487c(%rip), %rax     # 0x5fe18
movzbl 0xff40(%rax), %esi
movzbl 0xff41(%rax), %edx
movzbl 0xff42(%rax), %ecx
movzbl 0xff43(%rax), %r8d
movzbl 0xff44(%rax), %r9d
movzbl 0xff45(%rax), %r10d
movzbl 0xff46(%rax), %r11d
movzbl 0xff47(%rax), %ebx
movzbl 0xff48(%rax), %r14d
movzbl 0xff49(%rax), %r15d
movzbl 0xff4a(%rax), %r12d
movzbl 0xff4b(%rax), %r13d
subq $0x8, %rsp
leaq 0xe69a(%rip), %rdi      # 0x49c9d
xorl %eax, %eax
pushq %r13
pushq %r12
pushq %r15
pushq %r14
pushq %rbx
pushq %r11
pushq %r10
callq 0x15c0a
addq $0x40, %rsp
callq 0xcc43
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/main.cpp
// Function: imguiHelp()
void imguiHelp() {
  ImGui::SetNextWindowPos(ImVec2(DISASM_WINDOW_WIDTH+REG_WINDOW_WIDTH, 0.0f));
  ImGui::Begin("controls", nullptr,
               ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize);
  ImGui::Text(
      "A: z\n"
      "B: x\n"
      "Select: space\n"
      "Start: enter\n"
      "Directions: arrows\n"
      "Fullscreen: f\n");
  ImGui::End();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq -0x8(%rbp), %rdi
movq $0x43c80000, (%rdi)     # imm = 0x43C80000
xorl %esi, %esi
callq 0x153a7
leaq 0xe327(%rip), %rdi      # 0x49dc1
xorl %esi, %esi
movl $0x6, %edx
callq 0xc44d
leaq 0xe31d(%rip), %rdi      # 0x49dca
xorl %eax, %eax
callq 0x15c0a
callq 0xcc43
addq $0x10, %rsp
popq %rbp
retq