// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui_draw.cpp
// Function: ImDrawList::PathArcToFast(ImVec2 const&, float, int, int)
void ImDrawList::PathArcToFast(const ImVec2& center, float radius, int a_min_of_12, int a_max_of_12)
{
    if (radius == 0.0f || a_min_of_12 > a_max_of_12)
    {
        _Path.push_back(center);
        return;
    }

    // For legacy reason the PathArcToFast() always takes angles where 2*PI is represented by 12,
    // but it is possible to set IM_DRAWLIST_ARCFAST_TESSELATION_MULTIPLIER to a higher value. This should compile to a no-op otherwise.
#if IM_DRAWLIST_ARCFAST_TESSELLATION_MULTIPLIER != 1
    a_min_of_12 *= IM_DRAWLIST_ARCFAST_TESSELLATION_MULTIPLIER;
    a_max_of_12 *= IM_DRAWLIST_ARCFAST_TESSELLATION_MULTIPLIER;
#endif

    _Path.reserve(_Path.Size + (a_max_of_12 - a_min_of_12 + 1));
    for (int a = a_min_of_12; a <= a_max_of_12; a++)
    {
        const ImVec2& c = _Data->ArcFastVtx[a % IM_ARRAYSIZE(_Data->ArcFastVtx)];
        _Path.push_back(ImVec2(center.x + c.x * radius, center.y + c.y * radius));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
setp %al
setne %dl
orb %al, %dl
movl %ecx, %edi
subl %r12d, %edi
setge %sil
movl 0x78(%rbx), %eax
testb %sil, %dl
jne 0x7706c
cmpl 0x7c(%rbx), %eax
jne 0x771d8
leal 0x1(%rax), %r12d
testl %eax, %eax
je 0x771e1
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x771e6
leal (%rdi,%rax), %r15d
incl %r15d
cmpl %r15d, 0x7c(%rbx)
movss %xmm0, -0x30(%rbp)
jge 0x770cb
movl %ecx, -0x2c(%rbp)
movslq %r15d, %rdi
shlq $0x3, %rdi
callq 0x41c63
movq %rax, %r13
movq 0x80(%rbx), %rsi
testq %rsi, %rsi
je 0x770b8
movslq 0x78(%rbx), %rdx
shlq $0x3, %rdx
movq %r13, %rdi
callq 0xc080
movq 0x80(%rbx), %rdi
callq 0x41d3c
movq %r13, 0x80(%rbx)
movl %r15d, 0x7c(%rbx)
movl -0x2c(%rbp), %ecx
movss -0x30(%rbp), %xmm0
movl 0x78(%rbx), %r15d
incl %ecx
movl %ecx, -0x2c(%rbp)
movq 0x38(%rbx), %rax
movslq %r12d, %rdi
imulq $0x2aaaaaab, %rdi, %rdx # imm = 0x2AAAAAAB
movq %rdx, %rsi
shrq $0x3f, %rsi
shrq $0x21, %rdx
addl %esi, %edx
shll $0x2, %edx
leal (%rdx,%rdx,2), %edx
subl %edx, %edi
movslq %edi, %rdx
movss 0x30(%rax,%rdx,8), %xmm1
mulss %xmm0, %xmm1
addss (%r14), %xmm1
movss 0x34(%rax,%rdx,8), %xmm2
mulss %xmm0, %xmm2
addss 0x4(%r14), %xmm2
cmpl 0x7c(%rbx), %r15d
jne 0x7713e
testl %r15d, %r15d
movss %xmm1, -0x38(%rbp)
movss %xmm2, -0x34(%rbp)
je 0x77147
movl %r15d, %eax
shrl $0x1f, %eax
addl %r15d, %eax
sarl %eax
addl %r15d, %eax
jmp 0x7714c
movq 0x80(%rbx), %r13
jmp 0x771ae
movl $0x8, %eax
incl %r15d
cmpl %r15d, %eax
cmovgl %eax, %r15d
movslq %r15d, %rdi
shlq $0x3, %rdi
callq 0x41c63
movq %rax, %r13
movq 0x80(%rbx), %rsi
testq %rsi, %rsi
je 0x7718d
movslq 0x78(%rbx), %rdx
shlq $0x3, %rdx
movq %r13, %rdi
callq 0xc080
movq 0x80(%rbx), %rdi
callq 0x41d3c
movq %r13, 0x80(%rbx)
movl %r15d, 0x7c(%rbx)
movl 0x78(%rbx), %r15d
movl -0x2c(%rbp), %ecx
movss -0x30(%rbp), %xmm0
movss -0x38(%rbp), %xmm1
movss -0x34(%rbp), %xmm2
movslq %r15d, %rax
movss %xmm1, (%r13,%rax,8)
movss %xmm2, 0x4(%r13,%rax,8)
movl 0x78(%rbx), %r15d
incl %r15d
movl %r15d, 0x78(%rbx)
incl %r12d
cmpl %r12d, %ecx
jne 0x770d4
jmp 0x7723e
movq 0x80(%rbx), %r15
jmp 0x77232
movl $0x8, %ecx
cmpl %r12d, %ecx
cmovgl %ecx, %r12d
movslq %r12d, %rdi
shlq $0x3, %rdi
callq 0x41c63
movq %rax, %r15
movq 0x80(%rbx), %rsi
testq %rsi, %rsi
je 0x77224
movslq 0x78(%rbx), %rdx
shlq $0x3, %rdx
movq %r15, %rdi
callq 0xc080
movq 0x80(%rbx), %rdi
callq 0x41d3c
movq %r15, 0x80(%rbx)
movl %r12d, 0x7c(%rbx)
movl 0x78(%rbx), %eax
cltq
movq (%r14), %rcx
movq %rcx, (%r15,%rax,8)
incl 0x78(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop