LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/src/Opcode.cc
// Function: Opcode::Opcode(unsigned char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned short, unsigned short, std::function<void ()>)
Opcode::Opcode(uint8_t opcode, std::string label, uint16_t machineCycles, uint16_t length, std::function<void()> exec) {
    this->opcode = opcode;
    this->label = label;
    this->machineCycles = machineCycles;
    this->length = length;
    this->exec = exec;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r13
movl %r8d, %ebx
movl %ecx, %r14d
movq %rdi, %r12
addq $0x8, %rdi
leaq 0x18(%r12), %rax
movq %rax, -0x30(%rbp)
movq %rax, 0x8(%r12)
movq $0x0, 0x10(%r12)
movb $0x0, 0x18(%r12)
leaq 0x30(%r12), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r12)
movups %xmm0, 0x40(%r12)
movb %sil, (%r12)
movq %rdi, -0x38(%rbp)
movq %rdx, %rsi
callq 0xc920
movw %r14w, 0x28(%r12)
movw %bx, 0x2a(%r12)
movq %r15, %rdi
movq %r13, %rsi
callq 0x3d57a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x40(%r12), %rax
testq %rax, %rax
je 0x3d52e
movq %r15, %rdi
movq %r15, %rsi
movl $0x3, %edx
callq *%rax
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0xca08
movq %rbx, %rdi
callq 0xc560
movq %rax, %rdi
callq 0x3a5b4
nop
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/src/PPU.cc
// Function: PPU::PPU(CPU*, Memory*)
PPU::PPU(CPU *cpu, Memory *memory) {
  this->cpu = cpu;
  this->memory = memory;
  this->LY = 0x90;
  this->currentFrame = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rsi, 0x18(%rdi)
movq %rdx, 0x10(%rdi)
movb $-0x70, 0x20(%rdi)
movq $0x0, 0x8(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/src/PPU.cc
// Function: PPU::execute()
void PPU::execute() {
  // Set current LY Value for CPU
  if (memory->read(0xFF40) & 0x80) {
    memory->write(0xFF44, this->LY);
  } else {
    memory->write(0xFF44, 0);
  }

  // Determine LCDMode based on LY State
  if (this->LY < 144) {
    if (cpu->cyclesLeft > 94) {
      this->LCDMode = 2;
    } else if (cpu->cyclesLeft > 22) {
      this->LCDMode = 3;
    } else if (cpu->cyclesLeft < 22) {
      this->LCDMode = 0;
    }
  } else {
    this->LCDMode = 1;
  }

  // Update PPU and CPU state based on both
  //  CPU's current States
  if (cpu->cyclesLeft <= 0) { // End of current scanline
    if (this->LY == 143) {
      // VBlank Area
      uint8_t IF = memory->read(0xFF0F);
      IF |= 0x01;
      memory->write(0xFF0F, IF);

      this->LY = 144;
      this->currentFrame++;
      cpu->cyclesLeft += 114;   // Account for Extra Cycles Taken
    } else {
      this->LY = (this->LY + 1) % 154;
      cpu->cyclesLeft += 114;
    }
  }

  // Execute CPU
  cpu->execute();

  // TODO: Perform PPU functions based on current LCD Mode
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movl $0xff40, %esi           # imm = 0xFF40
callq 0x3d1ac
movq 0x10(%rbx), %rdi
sarb $0x7, %al
andb 0x20(%rbx), %al
movzbl %al, %edx
movl $0xff44, %esi           # imm = 0xFF44
callq 0x3d1b8
movzbl 0x20(%rbx), %ecx
movzwl %cx, %eax
movb $0x1, %dl
cmpl $0x8f, %eax
ja 0x3d6cf
movq 0x18(%rbx), %rdx
movl 0x8(%rdx), %esi
movb $0x2, %dl
cmpl $0x5e, %esi
jg 0x3d6cf
movb $0x3, %dl
cmpl $0x16, %esi
jg 0x3d6cf
je 0x3d6d1
xorl %edx, %edx
movb %dl, (%rbx)
movq 0x18(%rbx), %rdx
movl 0x8(%rdx), %esi
testl %esi, %esi
jg 0x3d736
cmpb $-0x71, %cl
jne 0x3d717
movq 0x10(%rbx), %rdi
movl $0xff0f, %esi           # imm = 0xFF0F
callq 0x3d1ac
orb $0x1, %al
movq 0x10(%rbx), %rdi
movzbl %al, %edx
movl $0xff0f, %esi           # imm = 0xFF0F
callq 0x3d1b8
movb $-0x70, 0x20(%rbx)
incq 0x8(%rbx)
movq 0x18(%rbx), %rdx
movl 0x8(%rdx), %esi
addq $0x8, %rdx
jmp 0x3d731
addq $0x8, %rdx
incl %eax
imull $0x1aa, %eax, %ecx      # imm = 0x1AA
shrl $0x10, %ecx
imull $0x9a, %ecx, %ecx
subl %ecx, %eax
movb %al, 0x20(%rbx)
addl $0x72, %esi
movl %esi, (%rdx)
movq 0x18(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x31610
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/src/main.cc
// Function: handleEventPolling(CPU*)
void handleEventPolling(CPU *cpu) {
  SDL_Event windowEvent;

  while (SDL_PollEvent(&windowEvent) != 0) {
    ImGui_ImplSDL2_ProcessEvent(&windowEvent);

    // Check if close button was clicked
    if (windowEvent.type == SDL_QUIT) {
      std::cout << "Quitting...\n";
      cpu->stop();
      return;
    }

    switch (windowEvent.type) {
    // Handle Key Presses
    case SDL_KEYDOWN:
      if (windowEvent.key.keysym.sym == SDL_KeyCode::SDLK_s) {
        if (keystate.step_instr_hold == 0)
          keystate.step_instr = true;
        keystate.step_instr_hold++;
      }
      if (windowEvent.key.keysym.sym == SDL_KeyCode::SDLK_m) {
        if (keystate.step_frame_hold == 0)
          keystate.step_frame = true;
        keystate.step_frame_hold++;
      }


      break;
    case SDL_KEYUP:
      // TODO: Key Press Here
      if (windowEvent.key.keysym.sym == SDL_KeyCode::SDLK_s) {
        keystate.step_instr = false;
        keystate.step_instr_hold = 0;
      }
      if (windowEvent.key.keysym.sym == SDL_KeyCode::SDLK_m) {
        keystate.step_frame = false;
        keystate.step_frame_hold = 0;
      }

      break;

    default:
      break;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq -0x48(%rbp), %rdi
callq 0xc8e0
testl %eax, %eax
je 0x3d839
leaq -0x48(%rbp), %r14
movq %r14, %rdi
callq 0xaf64c
movl -0x48(%rbp), %eax
cmpl $0x300, %eax            # imm = 0x300
je 0x3d7b0
cmpl $0x301, %eax            # imm = 0x301
je 0x3d790
cmpl $0x100, %eax            # imm = 0x100
jne 0x3d807
jmp 0x3d819
movl -0x34(%rbp), %eax
cmpl $0x6d, %eax
je 0x3d7f6
cmpl $0x73, %eax
jne 0x3d807
movb $0x0, 0xc03bc(%rip)     # 0xfdb60
movl $0x0, 0xc03b6(%rip)     # 0xfdb64
jmp 0x3d807
movl -0x34(%rbp), %eax
cmpl $0x6d, %eax
je 0x3d7db
cmpl $0x73, %eax
jne 0x3d807
movl 0xc03a1(%rip), %ecx     # 0xfdb64
testl %ecx, %ecx
jne 0x3d7ce
movb $0x1, 0xc0392(%rip)     # 0xfdb60
incl %ecx
movl %ecx, 0xc038e(%rip)     # 0xfdb64
cmpl $0x6d, %eax
jne 0x3d807
movl 0xc0387(%rip), %eax     # 0xfdb68
testl %eax, %eax
jne 0x3d7ec
movb $0x1, 0xc0375(%rip)     # 0xfdb61
incl %eax
movl %eax, 0xc0374(%rip)     # 0xfdb68
jmp 0x3d807
movb $0x0, 0xc0364(%rip)     # 0xfdb61
movl $0x0, 0xc0361(%rip)     # 0xfdb68
movq %r14, %rdi
callq 0xc8e0
testl %eax, %eax
jne 0x3d76b
jmp 0x3d839
movq 0xbb6c8(%rip), %rdi     # 0xf8ee8
leaq 0x79811(%rip), %rsi     # 0xb7038
movl $0xc, %edx
callq 0xc830
movq %rbx, %rdi
callq 0x31a7a
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/src/../include/imgui_club/imgui_memory_editor/imgui_memory_editor.h
// Function: MemoryEditor::DrawWindow(char const*, void*, unsigned long, unsigned long)
void DrawWindow(const char* title, void* mem_data, size_t mem_size, size_t base_display_addr = 0x0000)
    {
        Sizes s;
        CalcSizes(s, mem_size, base_display_addr);
        ImGui::SetNextWindowSizeConstraints(ImVec2(0.0f, 0.0f), ImVec2(s.WindowWidth, FLT_MAX));

        Open = true;
        if (ImGui::Begin(title, &Open, ImGuiWindowFlags_NoScrollbar))
        {
            if (ImGui::IsWindowHovered(ImGuiHoveredFlags_RootAndChildWindows) && ImGui::IsMouseReleased(ImGuiMouseButton_Right))
                ImGui::OpenPopup("context");
            DrawContents(mem_data, mem_size, base_display_addr);
            if (ContentsWidthChanged)
            {
                CalcSizes(s, mem_size, base_display_addr);
                ImGui::SetWindowSize(ImVec2(s.WindowWidth, ImGui::GetWindowSize().y));
            }
        }
        ImGui::End();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r14
movq %rcx, %r13
movq %rdx, -0x38(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdi, %r15
xorps %xmm0, %xmm0
leaq -0x70(%rbp), %r12
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
xorl %ebx, %ebx
movq %rbx, 0x20(%r12)
movq %r12, %rsi
movq %rcx, %rdx
movq %r8, %rcx
callq 0x3f05a
leaq -0x40(%rbp), %rdi
movq %rbx, (%rdi)
movss 0x24(%r12), %xmm0
leaq -0x48(%rbp), %rsi
movss %xmm0, (%rsi)
movl $0x7f7fffff, 0x4(%rsi)  # imm = 0x7F7FFFFF
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x556c3
movb $0x1, (%r15)
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movl $0x8, %edx
callq 0x4c3ad
testb %al, %al
je 0x3f046
movl $0x3, %edi
callq 0x551af
testb %al, %al
je 0x3efee
movl $0x1, %edi
callq 0x526c7
testb %al, %al
je 0x3efee
leaq 0x7b2a2(%rip), %rdi     # 0xba289
xorl %esi, %esi
callq 0x57da5
movq %r15, %rdi
movq -0x38(%rbp), %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x3f1a6
cmpb $0x1, 0x38(%r15)
jne 0x3f046
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x3f05a
movss 0x24(%r12), %xmm0
movss %xmm0, -0x30(%rbp)
callq 0x55478
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
leaq -0x40(%rbp), %rdi
movss -0x30(%rbp), %xmm1
movss %xmm1, (%rdi)
movss %xmm0, 0x4(%rdi)
xorl %esi, %esi
callq 0x55491
callq 0x51ace
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/src/../include/imgui_club/imgui_memory_editor/imgui_memory_editor.h
// Function: MemoryEditor::DrawContents(void*, unsigned long, unsigned long)::UserData::Callback(ImGuiInputTextCallbackData*)
static int Callback(ImGuiInputTextCallbackData* data)
                        {
                            UserData* user_data = (UserData*)data->UserData;
                            if (!data->HasSelection())
                                user_data->CursorPos = data->CursorPos;
                            if (data->SelectionStart == 0 && data->SelectionEnd == data->BufTextLen)
                            {
                                // When not editing a byte, always rewrite its content (this is a bit tricky, since InputText technically "owns" the master copy of the buffer we edit it in there)
                                data->DeleteChars(0, data->BufTextLen);
                                data->InsertChars(0, user_data->CurrentBufOverwrite);
                                data->SelectionStart = 0;
                                data->SelectionEnd = 2;
                                data->CursorPos = 0;
                            }
                            return 0;
                        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movl 0x30(%rdi), %ecx
movl 0x34(%rdi), %eax
cmpl %eax, %ecx
jne 0x3fe63
movl 0x2c(%rbx), %edx
movl %edx, 0x4(%r14)
testl %ecx, %ecx
jne 0x3fe96
movl 0x20(%rbx), %edx
cmpl %edx, %eax
jne 0x3fe96
movq %rbx, %rdi
xorl %esi, %esi
callq 0x9e06a
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x9e0e2
movl $0x2, 0x34(%rbx)
movq $0x0, 0x2c(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/src/../include/imgui_club/imgui_memory_editor/imgui_memory_editor.h
// Function: MemoryEditor::FormatBinary(unsigned char const*, int) const
const char* FormatBinary(const uint8_t* buf, int width) const
    {
        IM_ASSERT(width <= 64);
        size_t out_n = 0;
        static char out_buf[64 + 8 + 1];
        int n = width / 8;
        for (int j = n - 1; j >= 0; --j)
        {
            for (int i = 0; i < 8; ++i)
                out_buf[out_n++] = (buf[j] & (1 << (7 - i))) ? '1' : '0';
            out_buf[out_n++] = ' ';
        }
        IM_ASSERT(out_n < IM_ARRAYSIZE(out_buf));
        out_buf[out_n] = 0;
        return out_buf;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x41, %edx
jge 0x40a79
cmpl $0x8, %edx
jl 0x40a64
shrl $0x3, %edx
xorl %r9d, %r9d
leaq 0xbd25d(%rip), %rax     # 0xfdc80
leaq -0x1(%rdx), %rdi
movl $0x7, %r8d
movq %r9, %rcx
movzbl (%rsi,%rdi), %r9d
btl %r8d, %r9d
setae %r9b
xorb $0x31, %r9b
movb %r9b, (%rcx,%rax)
incq %rcx
addl $-0x1, %r8d
jb 0x40a30
leaq 0x1(%rcx), %r9
movb $0x20, (%rcx,%rax)
cmpq $0x1, %rdx
movq %rdi, %rdx
jg 0x40a23
incq %rcx
jmp 0x40a66
xorl %ecx, %ecx
cmpq $0x49, %rcx
jae 0x40a98
leaq 0xbd20d(%rip), %rax     # 0xfdc80
movb $0x0, (%rcx,%rax)
popq %rbp
retq
leaq 0x76bcd(%rip), %rdi     # 0xb764d
leaq 0x768f1(%rip), %rsi     # 0xb7378
leaq 0x76bcb(%rip), %rcx     # 0xb7659
movl $0x269, %edx            # imm = 0x269
callq 0xc140
leaq 0x76bfd(%rip), %rdi     # 0xb769c
leaq 0x768d2(%rip), %rsi     # 0xb7378
leaq 0x76bac(%rip), %rcx     # 0xb7659
movl $0x273, %edx            # imm = 0x273
callq 0xc140
nop
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/src/../include/imgui_club/imgui_memory_editor/imgui_memory_editor.h
// Function: MemoryEditor::EndianessCopyBigEndian(void*, void*, unsigned long, int)
static void* EndianessCopyBigEndian(void* _dst, void* _src, size_t s, int is_little_endian)
    {
        if (is_little_endian)
        {
            uint8_t* dst = (uint8_t*)_dst;
            uint8_t* src = (uint8_t*)_src + s - 1;
            for (int i = 0, n = (int)s; i < n; ++i)
                memcpy(dst++, src--, 1);
            return _dst;
        }
        else
        {
            return memcpy(_dst, _src, s);
        }
    }

// Assembly:
testl %ecx, %ecx
je 0xc080
testl %edx, %edx
jle 0x40ade
pushq %rbp
movq %rsp, %rbp
decq %rsi
xorl %eax, %eax
movb (%rsi,%rdx), %cl
movb %cl, (%rdi,%rax)
incq %rax
decq %rsi
cmpl %eax, %edx
jne 0x40acd
popq %rbp
movq %rdi, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: SetClipboardTextFn_DefaultImpl(void*, char const*)
static void SetClipboardTextFn_DefaultImpl(void*, const char* text)
{
    ImGuiContext& g = *GImGui;
    g.ClipboardHandlerData.clear();
    const char* text_end = text + strlen(text);
    g.ClipboardHandlerData.resize((int)(text_end - text) + 1);
    memcpy(&g.ClipboardHandlerData[0], text, (size_t)(text_end - text));
    g.ClipboardHandlerData[(int)(text_end - text)] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0xbcb41(%rip), %r12     # 0xfdcd0
movq 0x30b8(%r12), %rdi
testq %rdi, %rdi
je 0x411ce
movq $0x0, 0x30b0(%r12)
testq %r12, %r12
je 0x411b5
decl 0x3b4(%r12)
movq 0xbcb24(%rip), %rsi     # 0xfdce0
callq *0xb8356(%rip)          # 0xf9518
movq $0x0, 0x30b8(%r12)
movq %rbx, %rdi
callq 0xc350
movq %rax, %r14
leal 0x1(%rax), %r13d
movl 0x30b4(%r12), %eax
cmpl %r14d, %eax
jg 0x4129d
testl %eax, %eax
je 0x41204
movl %eax, %r15d
shrl $0x1f, %r15d
addl %eax, %r15d
sarl %r15d
addl %eax, %r15d
jmp 0x4120a
movl $0x8, %r15d
cmpl %r13d, %r15d
cmovlel %r13d, %r15d
cmpl %r15d, %eax
jge 0x4129d
movslq %r15d, %rdi
movq 0xbcaac(%rip), %rax     # 0xfdcd0
testq %rax, %rax
je 0x4122f
incl 0x3b4(%rax)
movq 0xbcaaa(%rip), %rsi     # 0xfdce0
callq *0xb82d4(%rip)          # 0xf9510
movq 0x30b8(%r12), %rsi
testq %rsi, %rsi
je 0x4128d
movslq 0x30b0(%r12), %rdx
movq %rax, -0x30(%rbp)
movq %rax, %rdi
callq 0xc080
movq 0x30b8(%r12), %rdi
testq %rdi, %rdi
je 0x4127c
movq 0xbca5f(%rip), %rax     # 0xfdcd0
testq %rax, %rax
je 0x4127c
decl 0x3b4(%rax)
movq 0xbca5d(%rip), %rsi     # 0xfdce0
callq *0xb828f(%rip)          # 0xf9518
movq -0x30(%rbp), %rax
movq %rax, 0x30b8(%r12)
movl %r15d, 0x30b4(%r12)
movl %r13d, 0x30b0(%r12)
testl %r14d, %r14d
js 0x412ea
movq 0x30b8(%r12), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xc080
cmpl %r14d, 0x30b0(%r12)
jle 0x412ea
movq 0x30b8(%r12), %rax
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movb $0x0, (%rax,%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7a387(%rip), %rdi     # 0xbb678
leaq 0x7a393(%rip), %rsi     # 0xbb68b
leaq 0x7b499(%rip), %rcx     # 0xbc798
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiIO::AddInputCharactersUTF8(char const*)
void ImGuiIO::AddInputCharactersUTF8(const char* utf8_chars)
{
    while (*utf8_chars != 0)
    {
        unsigned int c = 0;
        utf8_chars += ImTextCharFromUtf8(&c, utf8_chars, NULL);
        if (c != 0)
            InputQueueCharacters.push_back((ImWchar)c);
    }
}

// Assembly:
cmpb $0x0, (%rsi)
je 0x41854
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x0, -0x2c(%rbp)
leaq -0x2c(%rbp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x41855
movl %eax, %r12d
movl -0x2c(%rbp), %r15d
testl %r15d, %r15d
je 0x41837
movl 0x1548(%r14), %r13d
movl 0x154c(%r14), %eax
cmpl %eax, %r13d
jne 0x4181d
testl %eax, %eax
je 0x41781
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x41786
movl $0x8, %ecx
incl %r13d
cmpl %r13d, %ecx
cmovgl %ecx, %r13d
cmpl %r13d, %eax
jge 0x4181d
movq 0xbc530(%rip), %rax     # 0xfdcd0
testq %rax, %rax
je 0x417ab
incl 0x3b4(%rax)
movslq %r13d, %rdi
addq %rdi, %rdi
movq 0xbc528(%rip), %rsi     # 0xfdce0
callq *0xb7d52(%rip)          # 0xf9510
movq 0x1550(%r14), %rsi
testq %rsi, %rsi
je 0x4180f
movslq 0x1548(%r14), %rdx
addq %rdx, %rdx
movq %rax, -0x38(%rbp)
movq %rax, %rdi
callq 0xc080
movq 0x1550(%r14), %rdi
testq %rdi, %rdi
je 0x417fe
movq 0xbc4dd(%rip), %rax     # 0xfdcd0
testq %rax, %rax
je 0x417fe
decl 0x3b4(%rax)
movq 0xbc4db(%rip), %rsi     # 0xfdce0
callq *0xb7d0d(%rip)          # 0xf9518
movq -0x38(%rbp), %rax
movq %rax, 0x1550(%r14)
movl %r13d, 0x154c(%r14)
movq 0x1550(%r14), %rax
movslq 0x1548(%r14), %rcx
movw %r15w, (%rax,%rcx,2)
incl 0x1548(%r14)
movslq %r12d, %rax
addq %rax, %rbx
cmpb $0x0, (%rbx)
jne 0x41734
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImLineClosestPoint(ImVec2 const&, ImVec2 const&, ImVec2 const&)
ImVec2 ImLineClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2& p)
{
    ImVec2 ap = p - a;
    ImVec2 ab_dir = b - a;
    float dot = ap.x * ab_dir.x + ap.y * ab_dir.y;
    if (dot < 0.0f)
        return a;
    float ab_len_sqr = ab_dir.x * ab_dir.x + ab_dir.y * ab_dir.y;
    if (dot > ab_len_sqr)
        return b;
    return a + ab_dir * dot / ab_len_sqr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movss (%rdi), %xmm0
movss 0x4(%rdi), %xmm1
movss (%rdx), %xmm4
movss 0x4(%rdx), %xmm5
subss %xmm0, %xmm4
subss %xmm1, %xmm5
movss (%rsi), %xmm3
movss 0x4(%rsi), %xmm2
subss %xmm0, %xmm3
subss %xmm1, %xmm2
mulss %xmm2, %xmm5
mulss %xmm3, %xmm4
addss %xmm5, %xmm4
xorps %xmm5, %xmm5
ucomiss %xmm4, %xmm5
jbe 0x41c62
movsd (%rdi), %xmm0
jmp 0x41c9a
movaps %xmm2, %xmm6
mulss %xmm2, %xmm6
movaps %xmm3, %xmm5
mulss %xmm3, %xmm5
addss %xmm6, %xmm5
ucomiss %xmm5, %xmm4
jbe 0x41c7f
movsd (%rsi), %xmm0
jmp 0x41c9a
mulss %xmm4, %xmm3
mulss %xmm4, %xmm2
divss %xmm5, %xmm3
divss %xmm5, %xmm2
addss %xmm3, %xmm0
addss %xmm2, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImBezierCubicClosestPointCasteljau(ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec2 const&, float)
ImVec2 ImBezierCubicClosestPointCasteljau(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& p, float tess_tol)
{
    IM_ASSERT(tess_tol > 0.0f);
    ImVec2 p_last = p1;
    ImVec2 p_closest;
    float p_closest_dist2 = FLT_MAX;
    ImBezierCubicClosestPointCasteljauStep(p, p_closest, p_last, p_closest_dist2, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y, p4.x, p4.y, tess_tol, 0);
    return p_closest;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x41d1a
movq (%rdi), %r9
leaq -0x18(%rbp), %rax
movq %r9, (%rax)
leaq -0x20(%rbp), %rbx
movq $0x0, (%rbx)
leaq -0xc(%rbp), %r9
movl $0x7f7fffff, (%r9)      # imm = 0x7F7FFFFF
movss (%rdi), %xmm8
movss 0x4(%rdi), %xmm1
movss (%rsi), %xmm2
movss 0x4(%rsi), %xmm3
movss (%rdx), %xmm4
movss 0x4(%rdx), %xmm5
movss (%rcx), %xmm6
movss 0x4(%rcx), %xmm7
movss %xmm0, (%rsp)
movq %r8, %rdi
movq %rbx, %rsi
movq %rax, %rdx
movq %r9, %rcx
movaps %xmm8, %xmm0
xorl %r8d, %r8d
callq 0x41d39
movsd (%rbx), %xmm0
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
leaq 0x764d2(%rip), %rdi     # 0xb81f3
leaq 0x7643d(%rip), %rsi     # 0xb8165
leaq 0x764d4(%rip), %rcx     # 0xb8203
movl $0x4a7, %edx            # imm = 0x4A7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImTriangleContainsPoint(ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec2 const&)
bool ImTriangleContainsPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p)
{
    bool b1 = ((p.x - b.x) * (a.y - b.y) - (p.y - b.y) * (a.x - b.x)) < 0.0f;
    bool b2 = ((p.x - c.x) * (b.y - c.y) - (p.y - c.y) * (b.x - c.x)) < 0.0f;
    bool b3 = ((p.x - a.x) * (c.y - a.y) - (p.y - a.y) * (c.x - a.x)) < 0.0f;
    return ((b1 == b2) && (b2 == b3));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movss (%rcx), %xmm2
movss 0x4(%rcx), %xmm1
movss (%rsi), %xmm7
movss 0x4(%rsi), %xmm0
movaps %xmm2, %xmm5
subss %xmm7, %xmm5
movss (%rdi), %xmm4
movss 0x4(%rdi), %xmm3
movaps %xmm3, %xmm8
subss %xmm0, %xmm8
mulss %xmm5, %xmm8
movaps %xmm1, %xmm5
subss %xmm0, %xmm5
movaps %xmm4, %xmm6
subss %xmm7, %xmm6
mulss %xmm5, %xmm6
subss %xmm6, %xmm8
movss (%rdx), %xmm6
movss 0x4(%rdx), %xmm5
movaps %xmm2, %xmm9
subss %xmm6, %xmm9
subss %xmm5, %xmm0
mulss %xmm9, %xmm0
movaps %xmm1, %xmm9
subss %xmm5, %xmm9
subss %xmm6, %xmm7
mulss %xmm9, %xmm7
subss %xmm7, %xmm0
xorps %xmm7, %xmm7
ucomiss %xmm0, %xmm7
seta %al
ucomiss %xmm8, %xmm7
setbe %cl
cmpb %al, %cl
je 0x420ce
subss %xmm4, %xmm2
subss %xmm3, %xmm5
mulss %xmm2, %xmm5
subss %xmm4, %xmm6
subss %xmm3, %xmm1
mulss %xmm6, %xmm1
subss %xmm1, %xmm5
xorps %xmm1, %xmm1
cmpnltps %xmm1, %xmm5
cmpltps %xmm1, %xmm0
xorps %xmm5, %xmm0
movd %xmm0, %eax
jmp 0x420d0
xorl %eax, %eax
andb $0x1, %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImTriangleBarycentricCoords(ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec2 const&, float&, float&, float&)
void ImTriangleBarycentricCoords(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p, float& out_u, float& out_v, float& out_w)
{
    ImVec2 v0 = b - a;
    ImVec2 v1 = c - a;
    ImVec2 v2 = p - a;
    const float denom = v0.x * v1.y - v1.x * v0.y;
    out_v = (v2.x * v1.y - v1.x * v2.y) / denom;
    out_w = (v0.x * v2.y - v2.x * v0.y) / denom;
    out_u = 1.0f - out_v - out_w;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x10(%rbp), %rax
movss (%rsi), %xmm0
movss 0x4(%rsi), %xmm2
movss (%rdi), %xmm6
movss 0x4(%rdi), %xmm7
subss %xmm6, %xmm0
subss %xmm7, %xmm2
movss (%rdx), %xmm4
movss 0x4(%rdx), %xmm3
subss %xmm6, %xmm4
subss %xmm7, %xmm3
movss (%rcx), %xmm5
movss 0x4(%rcx), %xmm1
subss %xmm6, %xmm5
subss %xmm7, %xmm1
movaps %xmm0, %xmm6
mulss %xmm3, %xmm6
mulss %xmm5, %xmm3
mulss %xmm2, %xmm5
mulss %xmm4, %xmm2
subss %xmm2, %xmm6
mulss %xmm1, %xmm4
subss %xmm4, %xmm3
divss %xmm6, %xmm3
movss %xmm3, (%r9)
mulss %xmm0, %xmm1
subss %xmm5, %xmm1
divss %xmm6, %xmm1
movss %xmm1, (%rax)
movss 0x74e8c(%rip), %xmm0    # 0xb6fe4
subss (%r9), %xmm0
subss %xmm1, %xmm0
movss %xmm0, (%r8)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImStrncpy(char*, char const*, unsigned long)
void ImStrncpy(char* dst, const char* src, size_t count)
{
    if (count < 1)
        return;
    if (count > 1)
        strncpy(dst, src, count - 1);
    dst[count - 1] = 0;
}

// Assembly:
testq %rdx, %rdx
je 0x424b1
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
cmpq $0x1, %rdx
je 0x424a7
leaq -0x1(%rbx), %rdx
movq %r14, %rdi
callq 0xc110
movb $0x0, -0x1(%r14,%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImStrdupcpy(char*, unsigned long*, char const*)
char* ImStrdupcpy(char* dst, size_t* p_dst_size, const char* src)
{
    size_t dst_buf_size = p_dst_size ? *p_dst_size : strlen(dst) + 1;
    size_t src_size = strlen(src) + 1;
    if (dst_buf_size < src_size)
    {
        IM_FREE(dst);
        dst = (char*)IM_ALLOC(src_size);
        if (p_dst_size)
            *p_dst_size = src_size;
    }
    return (char*)memcpy(dst, (const void*)src, src_size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rsi, %rsi
je 0x42543
movq (%r14), %r13
jmp 0x42551
movq %r15, %rdi
callq 0xc350
movq %rax, %r13
incq %r13
movq %rbx, %rdi
callq 0xc350
movq %rax, %r12
incq %r12
cmpq %r12, %r13
jae 0x425b8
testq %r15, %r15
je 0x4257b
movq 0xbb760(%rip), %rax     # 0xfdcd0
testq %rax, %rax
je 0x4257b
decl 0x3b4(%rax)
movq 0xbb75e(%rip), %rsi     # 0xfdce0
movq %r15, %rdi
callq *0xb6f8d(%rip)          # 0xf9518
movq 0xbb73e(%rip), %rax     # 0xfdcd0
testq %rax, %rax
je 0x4259d
incl 0x3b4(%rax)
movq 0xbb73c(%rip), %rsi     # 0xfdce0
movq %r12, %rdi
callq *0xb6f63(%rip)          # 0xf9510
movq %rax, %r15
testq %r14, %r14
je 0x425b8
movq %r12, (%r14)
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc080
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::MemFree(void*)
void ImGui::MemFree(void* ptr)
{
    if (ptr)
        if (ImGuiContext* ctx = GImGui)
            ctx->IO.MetricsActiveAllocations--;
    return GImAllocatorFreeFunc(ptr, GImAllocatorUserData);
}

// Assembly:
testq %rdi, %rdi
je 0x425f0
movq 0xbb6f0(%rip), %rax     # 0xfdcd0
testq %rax, %rax
je 0x425f0
pushq %rbp
movq %rsp, %rbp
decl 0x3b4(%rax)
popq %rbp
movq 0xb6f21(%rip), %rax     # 0xf9518
movq 0xbb6e2(%rip), %rsi     # 0xfdce0
jmpq *%rax
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImStristr(char const*, char const*, char const*, char const*)
const char* ImStristr(const char* haystack, const char* haystack_end, const char* needle, const char* needle_end)
{
    if (!needle_end)
        needle_end = needle + strlen(needle);

    const char un0 = (char)toupper(*needle);
    while ((!haystack_end && *haystack) || (haystack_end && haystack < haystack_end))
    {
        if (toupper(*haystack) == un0)
        {
            const char* b = needle + 1;
            for (const char* a = haystack + 1; b < needle_end; a++, b++)
                if (toupper(*a) != toupper(*b))
                    break;
            if (b == needle_end)
                return haystack;
        }
        haystack++;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %rcx, -0x30(%rbp)
testq %rcx, %rcx
jne 0x426a5
movq %r14, %rdi
callq 0xc350
addq %r14, %rax
movq %rax, -0x30(%rbp)
movsbl (%r14), %edi
callq 0xc160
movsbl %al, %r13d
movq %rbx, -0x40(%rbp)
movl %r13d, -0x34(%rbp)
testq %rbx, %rbx
je 0x426c6
cmpq %rbx, %r15
jb 0x426cc
jmp 0x4272c
cmpb $0x0, (%r15)
je 0x4272c
movsbl (%r15), %edi
callq 0xc160
cmpl %r13d, %eax
jne 0x42727
movq %r12, -0x48(%rbp)
movl $0x1, %r13d
leaq (%r14,%r13), %rbx
cmpq -0x30(%rbp), %rbx
jae 0x42711
movsbl (%r15,%r13), %edi
callq 0xc160
movq %r14, %r12
movl %eax, %r14d
movsbl (%rbx), %edi
callq 0xc160
incq %r13
cmpl %eax, %r14d
movq %r12, %r14
je 0x426e4
cmpq -0x30(%rbp), %rbx
movq -0x48(%rbp), %r12
cmoveq %r15, %r12
movq -0x40(%rbp), %rbx
movl -0x34(%rbp), %r13d
je 0x4272f
incq %r15
jmp 0x426ba
xorl %r12d, %r12d
movq %r12, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImStrTrimBlanks(char*)
void ImStrTrimBlanks(char* buf)
{
    char* p = buf;
    while (p[0] == ' ' || p[0] == '\t')     // Leading blanks
        p++;
    char* p_start = p;
    while (*p != 0)                         // Find end of string
        p++;
    while (p > p_start && (p[-1] == ' ' || p[-1] == '\t'))  // Trailing blanks
        p--;
    if (p_start != buf)                     // Copy memory if we had leading blanks
        memmove(buf, p_start, p - p_start);
    buf[p - p_start] = 0;                   // Zero terminate
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
xorl %ebx, %ebx
movq %rdi, %rax
movq %rdi, %rsi
movzbl (%rsi), %ecx
cmpl $0x9, %ecx
je 0x4275d
cmpl $0x20, %ecx
jne 0x42768
incq %rsi
incq %rax
decq %rbx
jmp 0x42750
leaq -0x1(%rsi), %r14
cmpb $0x0, 0x1(%r14)
leaq 0x1(%r14), %r14
jne 0x4276c
cmpq %rsi, %r14
jbe 0x42796
movzbl -0x1(%r14), %ecx
cmpl $0x20, %ecx
je 0x4278b
cmpl $0x9, %ecx
jne 0x42796
decq %r14
cmpq %rsi, %r14
ja 0x4277c
movq %rsi, %r14
testq %rbx, %rbx
je 0x427a6
movq %r14, %rdx
subq %rax, %rdx
callq 0xc130
movb $0x0, (%r14,%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImFormatString(char*, unsigned long, char const*, ...)
int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...)
{
    va_list args;
    va_start(args, fmt);
#ifdef IMGUI_USE_STB_SPRINTF
    int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args);
#else
    int w = vsnprintf(buf, buf_size, fmt, args);
#endif
    va_end(args);
    if (buf == NULL)
        return w;
    if (w == -1 || w >= (int)buf_size)
        w = (int)buf_size - 1;
    buf[w] = 0;
    return w;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0xe0(%rbp), %rsi
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x4281f
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
leaq -0x30(%rbp), %rcx
movq %rsi, 0x10(%rcx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, (%rcx)
movq %r14, %rsi
callq 0xc5c0
testq %rbx, %rbx
je 0x42864
leal -0x1(%r14), %ecx
cmpl %r14d, %eax
movl %ecx, %edx
cmovll %eax, %edx
cmpl $-0x1, %eax
cmovel %ecx, %edx
movslq %edx, %rax
movb $0x0, (%rbx,%rax)
movl %edx, %eax
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImFormatStringV(char*, unsigned long, char const*, __va_list_tag*)
int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args)
{
#ifdef IMGUI_USE_STB_SPRINTF
    int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args);
#else
    int w = vsnprintf(buf, buf_size, fmt, args);
#endif
    if (buf == NULL)
        return w;
    if (w == -1 || w >= (int)buf_size)
        w = (int)buf_size - 1;
    buf[w] = 0;
    return w;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0xc5c0
testq %rbx, %rbx
je 0x428a2
leal -0x1(%r14), %ecx
cmpl %r14d, %eax
movl %ecx, %edx
cmovll %eax, %edx
cmpl $-0x1, %eax
cmovel %ecx, %edx
movslq %edx, %rax
movb $0x0, (%rbx,%rax)
movl %edx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImHashData(void const*, unsigned long, unsigned int)
ImGuiID ImHashData(const void* data_p, size_t data_size, ImU32 seed)
{
    ImU32 crc = ~seed;
    const unsigned char* data = (const unsigned char*)data_p;
    const ImU32* crc32_lut = GCrc32LookupTable;
    while (data_size-- != 0)
        crc = (crc >> 8) ^ crc32_lut[(crc & 0xFF) ^ *data++];
    return ~crc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edx, %eax
testq %rsi, %rsi
je 0x428da
notl %eax
xorl %ecx, %ecx
leaq 0x75123(%rip), %rdx     # 0xb79e0
movzbl %al, %r8d
shrl $0x8, %eax
movzbl (%rdi,%rcx), %r9d
xorl %r8d, %r9d
xorl (%rdx,%r9,4), %eax
incq %rcx
cmpq %rcx, %rsi
jne 0x428bd
notl %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImHashStr(char const*, unsigned long, unsigned int)
ImGuiID ImHashStr(const char* data_p, size_t data_size, ImU32 seed)
{
    seed = ~seed;
    ImU32 crc = seed;
    const unsigned char* data = (const unsigned char*)data_p;
    const ImU32* crc32_lut = GCrc32LookupTable;
    if (data_size != 0)
    {
        while (data_size-- != 0)
        {
            unsigned char c = *data++;
            if (c == '#' && data_size >= 2 && data[0] == '#' && data[1] == '#')
                crc = seed;
            crc = (crc >> 8) ^ crc32_lut[(crc & 0xFF) ^ c];
        }
    }
    else
    {
        while (unsigned char c = *data++)
        {
            if (c == '#' && data[0] == '#' && data[1] == '#')
                crc = seed;
            crc = (crc >> 8) ^ crc32_lut[(crc & 0xFF) ^ c];
        }
    }
    return ~crc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
notl %edx
testq %rsi, %rsi
je 0x4293d
decq %rsi
addq $0x2, %rdi
leaq 0x750eb(%rip), %rcx     # 0xb79e0
movl %edx, %r8d
movzbl -0x2(%rdi), %r9d
cmpl $0x23, %r9d
setne %al
cmpq $0x2, %rsi
setb %r10b
orb %al, %r10b
jne 0x4291e
cmpb $0x23, -0x1(%rdi)
jne 0x4291e
cmpb $0x23, (%rdi)
cmovel %edx, %r8d
movl %r8d, %eax
shrl $0x8, %eax
movzbl %r8b, %r8d
xorl %r9d, %r8d
xorl (%rcx,%r8,4), %eax
incq %rdi
movl %eax, %r8d
addq $-0x1, %rsi
jb 0x428f8
jmp 0x42978
addq $0x2, %rdi
leaq 0x75098(%rip), %rcx     # 0xb79e0
movl %edx, %eax
movzbl -0x2(%rdi), %esi
testl %esi, %esi
je 0x42971
cmpl $0x23, %esi
jne 0x42963
cmpb $0x23, -0x1(%rdi)
jne 0x42963
cmpb $0x23, (%rdi)
cmovel %edx, %eax
movzbl %al, %r8d
shrl $0x8, %eax
xorl %esi, %r8d
xorl (%rcx,%r8,4), %eax
incq %rdi
testl %esi, %esi
jne 0x4294a
notl %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImFileLoadToMemory(char const*, char const*, unsigned long*, int)
void*   ImFileLoadToMemory(const char* filename, const char* mode, size_t* out_file_size, int padding_bytes)
{
    IM_ASSERT(filename && mode);
    if (out_file_size)
        *out_file_size = 0;

    ImFileHandle f;
    if ((f = ImFileOpen(filename, mode)) == NULL)
        return NULL;

    size_t file_size = (size_t)ImFileGetSize(f);
    if (file_size == (size_t)-1)
    {
        ImFileClose(f);
        return NULL;
    }

    void* file_data = IM_ALLOC(file_size + padding_bytes);
    if (file_data == NULL)
    {
        ImFileClose(f);
        return NULL;
    }
    if (ImFileRead(file_data, 1, file_size, f) != file_size)
    {
        ImFileClose(f);
        IM_FREE(file_data);
        return NULL;
    }
    if (padding_bytes > 0)
        memset((void*)(((char*)file_data) + file_size), 0, (size_t)padding_bytes);

    ImFileClose(f);
    if (out_file_size)
        *out_file_size = file_size;

    return file_data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x42b23
testq %rsi, %rsi
je 0x42b23
movl %ecx, %r15d
movq %rdx, %rbx
testq %rdx, %rdx
je 0x42a46
movq $0x0, (%rbx)
callq 0xc9a0
testq %rax, %rax
je 0x42b0e
movq %rax, %r12
movq %rax, %rdi
callq 0x42996
cmpq $-0x1, %rax
je 0x42ada
movq %rax, %r13
movslq %r15d, %rax
movq %rax, -0x30(%rbp)
leaq (%rax,%r13), %rdi
movq 0xbb256(%rip), %rax     # 0xfdcd0
testq %rax, %rax
je 0x42a85
incl 0x3b4(%rax)
movq 0xbb254(%rip), %rsi     # 0xfdce0
callq *0xb6a7e(%rip)          # 0xf9510
testq %rax, %rax
je 0x42ada
movq %rax, %r14
movl $0x1, %esi
movq %rax, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq 0xc480
cmpq %r13, %rax
jne 0x42ae4
testl %r15d, %r15d
jle 0x42ac8
movq %r14, %rdi
addq %r13, %rdi
xorl %esi, %esi
movq -0x30(%rbp), %rdx
callq 0xc260
movq %r12, %rdi
callq 0xc3b0
testq %rbx, %rbx
je 0x42b11
movq %r13, (%rbx)
jmp 0x42b11
movq %r12, %rdi
callq 0xc3b0
jmp 0x42b0e
movq %r12, %rdi
callq 0xc3b0
movq 0xbb1dd(%rip), %rax     # 0xfdcd0
testq %rax, %rax
je 0x42afe
decl 0x3b4(%rax)
movq 0xbb1db(%rip), %rsi     # 0xfdce0
movq %r14, %rdi
callq *0xb6a0a(%rip)          # 0xf9518
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7575a(%rip), %rdi     # 0xb8284
leaq 0x75634(%rip), %rsi     # 0xb8165
leaq 0x7575d(%rip), %rcx     # 0xb8295
movl $0x5f7, %edx            # imm = 0x5F7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImTextStrFromUtf8(unsigned short*, int, char const*, char const*, char const**)
int ImTextStrFromUtf8(ImWchar* buf, int buf_size, const char* in_text, const char* in_text_end, const char** in_text_remaining)
{
    ImWchar* buf_out = buf;
    ImWchar* buf_end = buf + buf_size;
    while (buf_out < buf_end - 1 && (!in_text_end || in_text < in_text_end) && *in_text)
    {
        unsigned int c;
        in_text += ImTextCharFromUtf8(&c, in_text, in_text_end);
        if (c == 0)
            break;
        *buf_out++ = (ImWchar)c;
    }
    *buf_out = 0;
    if (in_text_remaining)
        *in_text_remaining = in_text;
    return (int)(buf_out - buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, -0x40(%rbp)
movq %rcx, %r13
movq %rdx, %r12
movq %rdi, %r14
movslq %esi, %rax
leaq (%rdi,%rax,2), %r15
addq $-0x2, %r15
leaq -0x2c(%rbp), %rbx
movq %rdi, -0x38(%rbp)
testq %r13, %r13
sete %al
cmpq %r13, %r12
setb %cl
cmpq %r15, %r14
jae 0x42bb5
orb %cl, %al
je 0x42bb5
cmpb $0x0, (%r12)
je 0x42bb5
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x41855
movl -0x2c(%rbp), %ecx
testl %ecx, %ecx
je 0x42bac
movw %cx, (%r14)
addq $0x2, %r14
cltq
addq %rax, %r12
testl %ecx, %ecx
jne 0x42b73
movw $0x0, (%r14)
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x42bc7
movq %r12, (%rax)
subq -0x38(%rbp), %r14
shrq %r14
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImTextCountCharsFromUtf8(char const*, char const*)
int ImTextCountCharsFromUtf8(const char* in_text, const char* in_text_end)
{
    int char_count = 0;
    while ((!in_text_end || in_text < in_text_end) && *in_text)
    {
        unsigned int c;
        in_text += ImTextCharFromUtf8(&c, in_text, in_text_end);
        if (c == 0)
            break;
        char_count++;
    }
    return char_count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %r15
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
leaq -0x24(%rbp), %r12
testq %r14, %r14
je 0x42c08
cmpq %r14, %r15
jae 0x42c32
cmpb $0x0, (%r15)
je 0x42c32
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x41855
cltq
addq %rax, %r15
movl -0x24(%rbp), %eax
incl %ebx
testl %eax, %eax
jne 0x42bfe
cmpl $0x1, %eax
sbbl $-0x1, %ebx
jmp 0x42c34
incl %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImTextStrToUtf8(char*, int, unsigned short const*, unsigned short const*)
int ImTextStrToUtf8(char* buf, int buf_size, const ImWchar* in_text, const ImWchar* in_text_end)
{
    char* buf_out = buf;
    const char* buf_end = buf + buf_size;
    while (buf_out < buf_end - 1 && (!in_text_end || in_text < in_text_end) && *in_text)
    {
        unsigned int c = (unsigned int)(*in_text++);
        if (c < 0x80)
            *buf_out++ = (char)c;
        else
            buf_out += ImTextCharToUtf8(buf_out, (int)(buf_end - buf_out - 1), c);
    }
    *buf_out = 0;
    return (int)(buf_out - buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq %esi, %rsi
leaq (%rdi,%rsi), %r8
decq %r8
movq %rdi, %rax
cmpq %rdi, %r8
jbe 0x42d47
addq %rdi, %rsi
movq %rdi, %rax
testq %rcx, %rcx
sete %r9b
cmpq %rcx, %rdx
setb %r10b
orb %r9b, %r10b
cmpb $0x1, %r10b
jne 0x42d47
movzwl (%rdx), %r9d
testw %r9w, %r9w
je 0x42d47
cmpw $0x7f, %r9w
ja 0x42cbe
movb %r9b, (%rax)
incq %rax
jmp 0x42d3a
movl %eax, %r11d
notl %r11d
addl %esi, %r11d
movzwl %r9w, %r10d
cmpl $0x7ff, %r10d           # imm = 0x7FF
ja 0x42cf6
cmpl $0x2, %r11d
jl 0x42cfc
movl %r9d, %r10d
shrl $0x6, %r10d
orb $-0x40, %r10b
movb %r10b, (%rax)
movl $0x2, %r10d
movl $0x1, %r11d
jmp 0x42d2b
cmpl $0x3, %r11d
jge 0x42d01
xorl %r10d, %r10d
jmp 0x42d37
movl %r10d, %r11d
shrl $0xc, %r11d
orb $-0x20, %r11b
movb %r11b, (%rax)
shrl $0x6, %r10d
andb $0x3f, %r10b
orb $-0x80, %r10b
movb %r10b, 0x1(%rax)
movl $0x3, %r10d
movl $0x2, %r11d
andb $0x3f, %r9b
orb $-0x80, %r9b
movb %r9b, (%rax,%r11)
addq %r10, %rax
addq $0x2, %rdx
cmpq %r8, %rax
jb 0x42c86
movb $0x0, (%rax)
subl %edi, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImTextCountUtf8BytesFromStr(unsigned short const*, unsigned short const*)
int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_end)
{
    int bytes_count = 0;
    while ((!in_text_end || in_text < in_text_end) && *in_text)
    {
        unsigned int c = (unsigned int)(*in_text++);
        if (c < 0x80)
            bytes_count++;
        else
            bytes_count += ImTextCountUtf8BytesFromChar(c);
    }
    return bytes_count;
}

// Assembly:
testq %rsi, %rsi
setne %cl
cmpq %rsi, %rdi
setae %dl
xorl %eax, %eax
testb %dl, %cl
jne 0x42db1
pushq %rbp
movq %rsp, %rbp
addq $0x2, %rdi
xorl %eax, %eax
movl $0x1, %ecx
movzwl -0x2(%rdi), %edx
testw %dx, %dx
je 0x42db0
testq %rsi, %rsi
sete %r8b
movzwl %dx, %edx
cmpl $0x800, %edx            # imm = 0x800
movl $0x3, %r9d
sbbl $0x0, %r9d
cmpl $0x80, %edx
cmovbl %ecx, %r9d
addl %r9d, %eax
cmpq %rsi, %rdi
setb %dl
orb %r8b, %dl
addq $0x2, %rdi
testb %dl, %dl
jne 0x42d6f
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImAlphaBlendColors(unsigned int, unsigned int)
IMGUI_API ImU32 ImAlphaBlendColors(ImU32 col_a, ImU32 col_b)
{
    float t = ((col_b >> IM_COL32_A_SHIFT) & 0xFF) / 255.f;
    int r = ImLerp((int)(col_a >> IM_COL32_R_SHIFT) & 0xFF, (int)(col_b >> IM_COL32_R_SHIFT) & 0xFF, t);
    int g = ImLerp((int)(col_a >> IM_COL32_G_SHIFT) & 0xFF, (int)(col_b >> IM_COL32_G_SHIFT) & 0xFF, t);
    int b = ImLerp((int)(col_a >> IM_COL32_B_SHIFT) & 0xFF, (int)(col_b >> IM_COL32_B_SHIFT) & 0xFF, t);
    return IM_COL32(r, g, b, 0xFF);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, %eax
shrl $0x18, %eax
cvtsi2ss %eax, %xmm0
movl $0xff, %eax
movl %edi, %ecx
andl %eax, %ecx
movl %esi, %edx
andl %eax, %edx
cvtsi2ss %ecx, %xmm1
subl %ecx, %edx
cvtsi2ss %edx, %xmm2
divss 0x74a6a(%rip), %xmm0    # 0xb7848
mulss %xmm0, %xmm2
addss %xmm1, %xmm2
cvttss2si %xmm2, %ecx
movl %edi, %edx
shrl $0x8, %edx
andl %eax, %edx
movl %esi, %r8d
shrl $0x8, %r8d
andl %eax, %r8d
xorps %xmm1, %xmm1
cvtsi2ss %edx, %xmm1
subl %edx, %r8d
xorps %xmm2, %xmm2
cvtsi2ss %r8d, %xmm2
mulss %xmm0, %xmm2
addss %xmm1, %xmm2
shrl $0x10, %edi
andl %eax, %edi
shrl $0x10, %esi
andl %eax, %esi
xorps %xmm1, %xmm1
cvtsi2ss %edi, %xmm1
subl %edi, %esi
cvtsi2ss %esi, %xmm3
cvttss2si %xmm2, %eax
mulss %xmm0, %xmm3
addss %xmm1, %xmm3
cvttss2si %xmm3, %edx
shll $0x10, %edx
shll $0x8, %eax
orl %ecx, %eax
orl %edx, %eax
orl $0xff000000, %eax       # imm = 0xFF000000
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::ColorConvertU32ToFloat4(unsigned int)
ImVec4 ImGui::ColorConvertU32ToFloat4(ImU32 in)
{
    float s = 1.0f / 255.0f;
    return ImVec4(
        ((in >> IM_COL32_R_SHIFT) & 0xFF) * s,
        ((in >> IM_COL32_G_SHIFT) & 0xFF) * s,
        ((in >> IM_COL32_B_SHIFT) & 0xFF) * s,
        ((in >> IM_COL32_A_SHIFT) & 0xFF) * s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0xff, %eax
movl %edi, %ecx
andl %eax, %ecx
cvtsi2ss %ecx, %xmm0
movss 0x749e6(%rip), %xmm2    # 0xb784c
mulss %xmm2, %xmm0
movl %edi, %ecx
shrl $0x8, %ecx
andl %eax, %ecx
cvtsi2ss %ecx, %xmm1
mulss %xmm2, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movl %edi, %ecx
shrl $0x10, %ecx
andl %eax, %ecx
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
mulss %xmm2, %xmm1
shrl $0x18, %edi
cvtsi2ss %edi, %xmm3
mulss %xmm2, %xmm3
unpcklps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::ColorConvertFloat4ToU32(ImVec4 const&)
ImU32 ImGui::ColorConvertFloat4ToU32(const ImVec4& in)
{
    ImU32 out;
    out  = ((ImU32)IM_F32_TO_INT8_SAT(in.x)) << IM_COL32_R_SHIFT;
    out |= ((ImU32)IM_F32_TO_INT8_SAT(in.y)) << IM_COL32_G_SHIFT;
    out |= ((ImU32)IM_F32_TO_INT8_SAT(in.z)) << IM_COL32_B_SHIFT;
    out |= ((ImU32)IM_F32_TO_INT8_SAT(in.w)) << IM_COL32_A_SHIFT;
    return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movss (%rdi), %xmm4
movss 0x4(%rdi), %xmm5
movss 0x74131(%rip), %xmm0    # 0xb6fe4
movaps %xmm0, %xmm2
minss %xmm4, %xmm2
xorps %xmm1, %xmm1
cmpltss %xmm1, %xmm4
andnps %xmm2, %xmm4
movss 0x7497b(%rip), %xmm2    # 0xb7848
mulss %xmm2, %xmm4
movss 0x7412b(%rip), %xmm3    # 0xb7004
addss %xmm3, %xmm4
cvttss2si %xmm4, %eax
movaps %xmm0, %xmm4
minss %xmm5, %xmm4
cmpltss %xmm1, %xmm5
andnps %xmm4, %xmm5
mulss %xmm2, %xmm5
addss %xmm3, %xmm5
cvttss2si %xmm5, %ecx
shll $0x8, %ecx
orl %eax, %ecx
movss 0x8(%rdi), %xmm4
movaps %xmm0, %xmm5
minss %xmm4, %xmm5
cmpltss %xmm1, %xmm4
andnps %xmm5, %xmm4
mulss %xmm2, %xmm4
addss %xmm3, %xmm4
cvttss2si %xmm4, %edx
shll $0x10, %edx
movss 0xc(%rdi), %xmm4
minss %xmm4, %xmm0
cmpltss %xmm1, %xmm4
andnps %xmm0, %xmm4
mulss %xmm2, %xmm4
addss %xmm3, %xmm4
cvttss2si %xmm4, %eax
shll $0x18, %eax
orl %edx, %eax
orl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::ColorConvertRGBtoHSV(float, float, float, float&, float&, float&)
void ImGui::ColorConvertRGBtoHSV(float r, float g, float b, float& out_h, float& out_s, float& out_v)
{
    float K = 0.f;
    if (g < b)
    {
        ImSwap(g, b);
        K = -1.f;
    }
    if (r < g)
    {
        ImSwap(r, g);
        K = -2.f / 6.f - K;
    }

    const float chroma = r - (g < b ? g : b);
    out_h = ImFabs(K + (g - b) / (6.f * chroma + 1e-20f));
    out_s = chroma / (r + 1e-20f);
    out_v = r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movaps %xmm2, %xmm3
maxss %xmm1, %xmm3
movaps %xmm1, %xmm4
minss %xmm2, %xmm4
cmpltss %xmm2, %xmm1
movss 0x74067(%rip), %xmm2    # 0xb6fd0
andps %xmm1, %xmm2
movss 0x748dc(%rip), %xmm5    # 0xb7850
subss %xmm2, %xmm5
movaps %xmm3, %xmm1
maxss %xmm0, %xmm1
movaps %xmm0, %xmm6
minss %xmm3, %xmm6
cmpltss %xmm3, %xmm0
movaps %xmm0, %xmm3
andnps %xmm2, %xmm3
andps %xmm5, %xmm0
orps %xmm3, %xmm0
movaps %xmm6, %xmm2
minss %xmm4, %xmm2
movaps %xmm1, %xmm3
subss %xmm2, %xmm3
subss %xmm4, %xmm6
movss 0x7405b(%rip), %xmm2    # 0xb700c
mulss %xmm3, %xmm2
movss 0x74897(%rip), %xmm4    # 0xb7854
addss %xmm4, %xmm2
divss %xmm2, %xmm6
addss %xmm0, %xmm6
andps 0x74800(%rip), %xmm6    # 0xb77d0
movss %xmm6, (%rdi)
addss %xmm1, %xmm4
divss %xmm4, %xmm3
movss %xmm3, (%rsi)
movss %xmm1, (%rdx)
popq %rbp
retq