// File: Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::ArrowButtonEx(char const*, int, ImVec2, int)
bool ImGui::ArrowButtonEx(const char* str_id, ImGuiDir dir, ImVec2 size, ImGuiButtonFlags flags)
{
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

    ImGuiContext& g = *GImGui;
    const ImGuiID id = window->GetID(str_id);
    const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size);
    const float default_size = GetFrameHeight();
    ItemSize(size, (size.y >= default_size) ? g.Style.FramePadding.y : -1.0f);
    if (!ItemAdd(bb, id))
        return false;

    if (window->DC.ItemFlags & ImGuiItemFlags_ButtonRepeat)
        flags |= ImGuiButtonFlags_Repeat;

    bool hovered, held;
    bool pressed = ButtonBehavior(bb, id, &hovered, &held, flags);

    // Render
    const ImU32 bg_col = GetColorU32((held && hovered) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
    const ImU32 text_col = GetColorU32(ImGuiCol_Text);
    RenderNavHighlight(bb, id);
    RenderFrame(bb.Min, bb.Max, bg_col, true, g.Style.FrameRounding);
    RenderArrow(window->DrawList, bb.Min + ImVec2(ImMax(0.0f, (size.x - g.FontSize) * 0.5f), ImMax(0.0f, (size.y - g.FontSize) * 0.5f)), text_col, dir);

    return pressed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movlpd %xmm0, -0xc(%rbp)
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movl %edx, -0x20(%rbp)
callq 0xeb270
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
testb $0x1, 0x93(%rax)
je 0x13ab79
movb $0x0, -0x1(%rbp)
jmp 0x13ae06
leaq 0xd83c0(%rip), %rax     # 0x212f40
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xc9910
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rdi
addq $0xd8, %rdi
movq %rdi, -0x88(%rbp)
leaq -0xc(%rbp), %rsi
callq 0x139090
movq -0x88(%rbp), %rsi
movlpd %xmm0, -0x4c(%rbp)
leaq -0x44(%rbp), %rdi
leaq -0x4c(%rbp), %rdx
callq 0xe8660
callq 0xdd050
movss %xmm0, -0x50(%rbp)
movss -0x8(%rbp), %xmm0
ucomiss -0x50(%rbp), %xmm0
jb 0x13abfa
movq -0x30(%rbp), %rax
movss 0x159c(%rax), %xmm0
movss %xmm0, -0x8c(%rbp)
jmp 0x13ac0c
movss 0x3737e(%rip), %xmm0    # 0x171f80
movss %xmm0, -0x8c(%rbp)
jmp 0x13ac0c
movss -0x8c(%rbp), %xmm0
leaq -0xc(%rbp), %rdi
callq 0xd6030
movl -0x34(%rbp), %esi
leaq -0x44(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0xd6250
testb $0x1, %al
jne 0x13ac3a
movb $0x0, -0x1(%rbp)
jmp 0x13ae06
movq -0x28(%rbp), %rax
movl 0x1cc(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x13ac57
movl -0x20(%rbp), %eax
orl $0x400, %eax            # imm = 0x400
movl %eax, -0x20(%rbp)
movl -0x34(%rbp), %esi
movl -0x20(%rbp), %r8d
leaq -0x44(%rbp), %rdi
leaq -0x51(%rbp), %rdx
leaq -0x52(%rbp), %rcx
callq 0x139df0
andb $0x1, %al
movb %al, -0x53(%rbp)
testb $0x1, -0x52(%rbp)
je 0x13ac8d
testb $0x1, -0x51(%rbp)
je 0x13ac8d
movl $0x17, %eax
movl %eax, -0x90(%rbp)
jmp 0x13aca6
movb -0x51(%rbp), %dl
movl $0x15, %eax
movl $0x16, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x90(%rbp)
movl -0x90(%rbp), %edi
movss 0x35f88(%rip), %xmm0    # 0x170c3c
movss %xmm0, -0xbc(%rbp)
callq 0xc76e0
movss -0xbc(%rbp), %xmm0
movl %eax, -0x58(%rbp)
xorl %edi, %edi
callq 0xc76e0
movl %eax, -0x5c(%rbp)
movl -0x34(%rbp), %esi
leaq -0x44(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
movl $0x1, %edx
movl %edx, -0xb8(%rbp)
callq 0xc91e0
movl -0xb8(%rbp), %esi
movq -0x44(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x3c(%rbp), %rax
movq %rax, -0x70(%rbp)
movl -0x58(%rbp), %edi
movq -0x30(%rbp), %rax
movss 0x15a0(%rax), %xmm2
movsd -0x68(%rbp), %xmm0
movsd -0x70(%rbp), %xmm1
callq 0xc8f20
movq -0x28(%rbp), %rax
movq 0x2b8(%rax), %rax
movq %rax, -0x98(%rbp)
movss -0xc(%rbp), %xmm1
movq -0x30(%rbp), %rax
movss 0x1980(%rax), %xmm0
subss %xmm0, %xmm1
movss 0x37281(%rip), %xmm0    # 0x171fd8
movss %xmm0, -0xb4(%rbp)
mulss %xmm0, %xmm1
xorps %xmm0, %xmm0
movss %xmm0, -0xb0(%rbp)
callq 0x139050
movss -0xb4(%rbp), %xmm2
movaps %xmm0, %xmm1
movss -0xb0(%rbp), %xmm0
movss %xmm1, -0xac(%rbp)
movss -0x8(%rbp), %xmm1
movq -0x30(%rbp), %rax
movss 0x1980(%rax), %xmm3
subss %xmm3, %xmm1
mulss %xmm2, %xmm1
callq 0x139050
movaps %xmm0, %xmm1
movss -0xac(%rbp), %xmm0
leaq -0x80(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0xbf4c0
movq -0xa8(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0x139090
movq -0x98(%rbp), %rdi
movlpd %xmm0, -0x78(%rbp)
movl -0x5c(%rbp), %esi
movl -0x1c(%rbp), %edx
movsd -0x78(%rbp), %xmm0
movss 0x35e43(%rip), %xmm1    # 0x170c3c
callq 0x11ca10
movb -0x53(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)