// File: Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::RenderWindowOuterBorders(ImGuiWindow*)
static void ImGui::RenderWindowOuterBorders(ImGuiWindow* window)
{
    ImGuiContext& g = *GImGui;
    float rounding = window->WindowRounding;
    float border_size = window->WindowBorderSize;
    if (border_size > 0.0f && !(window->Flags & ImGuiWindowFlags_NoBackground))
        window->DrawList->AddRect(window->Pos, window->Pos + window->Size, GetColorU32(ImGuiCol_Border), rounding, ImDrawCornerFlags_All, border_size);

    int border_held = window->ResizeBorderHeld;
    if (border_held != -1)
    {
        const ImGuiResizeBorderDef& def = resize_border_def[border_held];
        ImRect border_r = GetResizeBorderRect(window, border_held, rounding, 0.0f);
        window->DrawList->PathArcTo(ImLerp(border_r.Min, border_r.Max, def.CornerPosN1) + ImVec2(0.5f, 0.5f) + def.InnerDir * rounding, rounding, def.OuterAngle - IM_PI * 0.25f, def.OuterAngle);
        window->DrawList->PathArcTo(ImLerp(border_r.Min, border_r.Max, def.CornerPosN2) + ImVec2(0.5f, 0.5f) + def.InnerDir * rounding, rounding, def.OuterAngle, def.OuterAngle + IM_PI * 0.25f);
        window->DrawList->PathStroke(GetColorU32(ImGuiCol_SeparatorActive), false, ImMax(2.0f, border_size)); // Thicker than usual
    }
    if (g.Style.FrameBorderSize > 0 && !(window->Flags & ImGuiWindowFlags_NoTitleBar))
    {
        float y = window->Pos.y + window->TitleBarHeight() - 1;
        window->DrawList->AddLine(ImVec2(window->Pos.x + border_size, y), ImVec2(window->Pos.x + window->Size.x - border_size, y), GetColorU32(ImGuiCol_Border), g.Style.FrameBorderSize);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq 0x12d51a(%rip), %rax    # 0x212f40
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movss 0x48(%rax), %xmm0
movss %xmm0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movss 0x4c(%rax), %xmm0
movss %xmm0, -0x18(%rbp)
movss -0x18(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0xe5acd
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0xe5acd
movq -0x8(%rbp), %rsi
movq 0x2b8(%rsi), %rax
movq %rax, -0xb8(%rbp)
movq %rsi, %rdi
addq $0x10, %rdi
movq %rdi, -0xb0(%rbp)
addq $0x18, %rsi
callq 0xc41b0
movlpd %xmm0, -0x20(%rbp)
movl $0x5, %edi
movss 0x8b19d(%rip), %xmm0    # 0x170c3c
callq 0xc76e0
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
movl %eax, %ecx
movss -0x14(%rbp), %xmm0
movss -0x18(%rbp), %xmm1
leaq -0x20(%rbp), %rdx
movl $0xf, %r8d
callq 0x112ef0
movq -0x8(%rbp), %rax
movsbl 0x98(%rax), %eax
movl %eax, -0x24(%rbp)
cmpl $-0x1, -0x24(%rbp)
je 0xe5cfd
movslq -0x24(%rbp), %rax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rax, %rcx
leaq 0x12d4c5(%rip), %rax    # 0x212fc0
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %esi
movss -0x14(%rbp), %xmm0
xorps %xmm1, %xmm1
callq 0xe5800
movlpd %xmm0, -0x40(%rbp)
leaq -0x38(%rbp), %rsi
movq %rsi, -0xe8(%rbp)
movlpd %xmm1, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x2b8(%rax), %rax
movq %rax, -0xf8(%rbp)
movq -0x30(%rbp), %rdx
addq $0x8, %rdx
leaq -0x40(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0xe5680
movlpd %xmm0, -0x58(%rbp)
leaq -0x60(%rbp), %rdi
movq %rdi, -0x100(%rbp)
movss 0x8c46b(%rip), %xmm1    # 0x171fd8
movss %xmm1, -0xdc(%rbp)
movaps %xmm1, %xmm0
callq 0xbf4c0
movq -0x100(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0xc41b0
movlpd %xmm0, -0x50(%rbp)
movq -0x30(%rbp), %rdi
movss -0x14(%rbp), %xmm0
callq 0xc2f50
movlpd %xmm0, -0x68(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0xc41b0
movq -0xf8(%rbp), %rdi
movlpd %xmm0, -0x48(%rbp)
movss -0x14(%rbp), %xmm0
movq -0x30(%rbp), %rax
movss 0x18(%rax), %xmm2
movss 0x8cc18(%rip), %xmm3    # 0x1727ec
movaps %xmm2, %xmm1
addss %xmm3, %xmm1
leaq -0x48(%rbp), %rsi
movl $0xa, %edx
callq 0x111ec0
movq -0xf0(%rbp), %rdi
movq -0xe8(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x2b8(%rax), %rax
movq %rax, -0xd0(%rbp)
movq -0x30(%rbp), %rdx
addq $0x10, %rdx
callq 0xe5680
movss -0xdc(%rbp), %xmm1
movlpd %xmm0, -0x80(%rbp)
leaq -0x88(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
movaps %xmm1, %xmm0
callq 0xbf4c0
movq -0xd8(%rbp), %rsi
leaq -0x80(%rbp), %rdi
callq 0xc41b0
movlpd %xmm0, -0x78(%rbp)
movq -0x30(%rbp), %rdi
movss -0x14(%rbp), %xmm0
callq 0xc2f50
movlpd %xmm0, -0x90(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0xc41b0
movq -0xd0(%rbp), %rdi
movlpd %xmm0, -0x70(%rbp)
movss -0x14(%rbp), %xmm0
movq -0x30(%rbp), %rax
movss 0x18(%rax), %xmm1
movq -0x30(%rbp), %rax
movss 0x8cb4e(%rip), %xmm2    # 0x1727e8
addss 0x18(%rax), %xmm2
leaq -0x70(%rbp), %rsi
movl $0xa, %edx
callq 0x111ec0
movq -0x8(%rbp), %rax
movq 0x2b8(%rax), %rax
movq %rax, -0xc8(%rbp)
movl $0x1d, %edi
movss 0x8af70(%rip), %xmm0    # 0x170c3c
callq 0xc76e0
movl %eax, -0xbc(%rbp)
movss -0x18(%rbp), %xmm1
movss 0x8c2e8(%rip), %xmm0    # 0x171fcc
callq 0xc88c0
movq -0xc8(%rbp), %rdi
movl -0xbc(%rbp), %esi
xorl %edx, %edx
callq 0xee720
movq -0x10(%rbp), %rax
movss 0x15a4(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0xe5dfe
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xe5dfe
movq -0x8(%rbp), %rax
movss 0x14(%rax), %xmm0
movss %xmm0, -0x10c(%rbp)
movq -0x8(%rbp), %rdi
callq 0xeb6f0
movaps %xmm0, %xmm1
movss -0x10c(%rbp), %xmm0
addss %xmm1, %xmm0
movss 0x8aee3(%rip), %xmm1    # 0x170c3c
subss %xmm1, %xmm0
movss %xmm0, -0x94(%rbp)
movq -0x8(%rbp), %rax
movq 0x2b8(%rax), %rax
movq %rax, -0x108(%rbp)
movq -0x8(%rbp), %rax
movss 0x10(%rax), %xmm0
addss -0x18(%rbp), %xmm0
movss -0x94(%rbp), %xmm1
leaq -0x9c(%rbp), %rdi
callq 0xbf4c0
movq -0x8(%rbp), %rax
movss 0x10(%rax), %xmm0
movq -0x8(%rbp), %rax
addss 0x18(%rax), %xmm0
subss -0x18(%rbp), %xmm0
movss -0x94(%rbp), %xmm1
leaq -0xa4(%rbp), %rdi
callq 0xbf4c0
movl $0x5, %edi
movss 0x8ae6b(%rip), %xmm0    # 0x170c3c
callq 0xc76e0
movq -0x108(%rbp), %rdi
movl %eax, %ecx
movq -0x10(%rbp), %rax
movss 0x15a4(%rax), %xmm0
leaq -0x9c(%rbp), %rsi
leaq -0xa4(%rbp), %rdx
callq 0x112e20
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw (%rax,%rax)