// File: Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::Scrollbar(ImGuiAxis)
void ImGui::Scrollbar(ImGuiAxis axis)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;

    const ImGuiID id = GetWindowScrollbarID(window, axis);
    KeepAliveID(id);

    // Calculate scrollbar bounding box
    ImRect bb = GetWindowScrollbarRect(window, axis);
    ImDrawCornerFlags rounding_corners = 0;
    if (axis == ImGuiAxis_X)
    {
        rounding_corners |= ImDrawCornerFlags_BotLeft;
        if (!window->ScrollbarY)
            rounding_corners |= ImDrawCornerFlags_BotRight;
    }
    else
    {
        if ((window->Flags & ImGuiWindowFlags_NoTitleBar) && !(window->Flags & ImGuiWindowFlags_MenuBar))
            rounding_corners |= ImDrawCornerFlags_TopRight;
        if (!window->ScrollbarX)
            rounding_corners |= ImDrawCornerFlags_BotRight;
    }
    float size_avail = window->InnerRect.Max[axis] - window->InnerRect.Min[axis];
    float size_contents = window->ContentSize[axis] + window->WindowPadding[axis] * 2.0f;
    ScrollbarEx(bb, id, axis, &window->Scroll[axis], size_avail, size_contents, rounding_corners);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
leaq 0xd78de(%rip), %rax     # 0x212f40
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x1ae0(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl -0x4(%rbp), %esi
callq 0x13b4d0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edi
callq 0xc9a90
movq -0x18(%rbp), %rdi
movl -0x4(%rbp), %esi
callq 0x13b520
movlpd %xmm0, -0x2c(%rbp)
movlpd %xmm1, -0x24(%rbp)
movl $0x0, -0x30(%rbp)
cmpl $0x0, -0x4(%rbp)
jne 0x13b6d3
movl -0x30(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
testb $0x1, 0x8d(%rax)
jne 0x13b6d1
movl -0x30(%rbp), %eax
orl $0x8, %eax
movl %eax, -0x30(%rbp)
jmp 0x13b714
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x13b6fc
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
jne 0x13b6fc
movl -0x30(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
testb $0x1, 0x8c(%rax)
jne 0x13b712
movl -0x30(%rbp), %eax
orl $0x8, %eax
movl %eax, -0x30(%rbp)
jmp 0x13b714
movq -0x18(%rbp), %rdi
addq $0x218, %rdi            # imm = 0x218
addq $0x8, %rdi
movslq -0x4(%rbp), %rsi
callq 0x15bb20
movss (%rax), %xmm0
movss %xmm0, -0x48(%rbp)
movq -0x18(%rbp), %rdi
addq $0x218, %rdi            # imm = 0x218
movslq -0x4(%rbp), %rsi
callq 0x15bb20
movss -0x48(%rbp), %xmm0
subss (%rax), %xmm0
movss %xmm0, -0x34(%rbp)
movq -0x18(%rbp), %rdi
addq $0x28, %rdi
movslq -0x4(%rbp), %rsi
callq 0x15bb20
movss (%rax), %xmm0
movss %xmm0, -0x44(%rbp)
movq -0x18(%rbp), %rdi
addq $0x40, %rdi
movslq -0x4(%rbp), %rsi
callq 0x15bb20
movss -0x44(%rbp), %xmm1
movss (%rax), %xmm0
addss %xmm0, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x38(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rdi
addq $0x5c, %rdi
movslq -0x4(%rbp), %rsi
callq 0x15bb20
movl -0x40(%rbp), %esi
movl -0x3c(%rbp), %edx
movq %rax, %rcx
movss -0x34(%rbp), %xmm0
movss -0x38(%rbp), %xmm1
movl -0x30(%rbp), %r8d
leaq -0x2c(%rbp), %rdi
callq 0x13b7e0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)