// File: Ciaxur[P]yagb-emu/include/imgui/imgui_draw.cpp
// Function: ImDrawList::AddCircle(ImVec2 const&, float, unsigned int, int, float)
void ImDrawList::AddCircle(const ImVec2& center, float radius, ImU32 col, int num_segments, float thickness)
{
    if ((col & IM_COL32_A_MASK) == 0 || radius <= 0.0f)
        return;

    // Obtain segment count
    if (num_segments <= 0)
    {
        // Automatic segment count
        const int radius_idx = (int)radius;
        if (radius_idx < IM_ARRAYSIZE(_Data->CircleSegmentCounts))
            num_segments = _Data->CircleSegmentCounts[radius_idx]; // Use cached value
        else
            num_segments = IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC(radius, _Data->CircleSegmentMaxError);
    }
    else
    {
        // Explicit segment count (still clamp to avoid drawing insanely tessellated shapes)
        num_segments = ImClamp(num_segments, 3, IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_MAX);
    }

    // Because we are filling a closed shape we remove 1 from the count of segments/points
    const float a_max = (IM_PI * 2.0f) * ((float)num_segments - 1.0f) / (float)num_segments;
    if (num_segments == 12)
        PathArcToFast(center, radius - 0.5f, 0, 12 - 1);
    else
        PathArcTo(center, radius - 0.5f, 0.0f, a_max, num_segments - 1);
    PathStroke(col, true, thickness);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movss %xmm0, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movss %xmm1, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x18(%rbp), %eax
andl $0xff000000, %eax       # imm = 0xFF000000
cmpl $0x0, %eax
je 0x1134ce
xorps %xmm0, %xmm0
ucomiss -0x14(%rbp), %xmm0
jb 0x1134d3
jmp 0x1135f2
cmpl $0x0, -0x1c(%rbp)
jg 0x113543
cvttss2si -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x40, -0x24(%rbp)
jge 0x113500
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x24(%rbp), %rcx
movzbl 0x90(%rax,%rcx), %eax
movl %eax, -0x1c(%rbp)
jmp 0x113541
movq -0x30(%rbp), %rax
movss -0x14(%rbp), %xmm0
movq 0x38(%rax), %rax
subss 0x18(%rax), %xmm0
divss -0x14(%rbp), %xmm0
callq 0xd590
movaps %xmm0, %xmm1
movss 0x704dd(%rip), %xmm0    # 0x183a04
divss %xmm1, %xmm0
cvttss2si %xmm0, %edi
movl $0xc, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x10ed10
movl %eax, -0x1c(%rbp)
jmp 0x113558
movl -0x1c(%rbp), %edi
movl $0x3, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x10ed10
movl %eax, -0x1c(%rbp)
cvtsi2ssl -0x1c(%rbp), %xmm1
movss 0x5d6d7(%rip), %xmm0    # 0x170c3c
subss %xmm0, %xmm1
movss 0x70493(%rip), %xmm0    # 0x183a04
mulss %xmm1, %xmm0
cvtsi2ssl -0x1c(%rbp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x28(%rbp)
cmpl $0xc, -0x1c(%rbp)
jne 0x1135b0
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movss -0x14(%rbp), %xmm0
movss 0x5ea3a(%rip), %xmm1    # 0x171fd8
subss %xmm1, %xmm0
xorl %edx, %edx
movl $0xb, %ecx
callq 0x111da0
jmp 0x1135dc
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movss -0x14(%rbp), %xmm0
movss 0x5ea13(%rip), %xmm1    # 0x171fd8
subss %xmm1, %xmm0
movss -0x28(%rbp), %xmm2
movl -0x1c(%rbp), %edx
subl $0x1, %edx
xorps %xmm1, %xmm1
callq 0x111ec0
movq -0x30(%rbp), %rdi
movl -0x18(%rbp), %esi
movss -0x20(%rbp), %xmm0
movl $0x1, %edx
callq 0xee720
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)