// File: /workspace/github_cpp_makefile_star2_O1/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 %sil
orb %al, %sil
movl %ecx, %eax
subl %edx, %eax
setge %dl
movl 0x78(%rdi), %r13d
testb %dl, %sil
jne 0x78803
movl 0x7c(%rbx), %eax
cmpl %eax, %r13d
jne 0x789ca
incl %r13d
testl %eax, %eax
je 0x78977
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x7897c
leal (%rax,%r13), %r15d
incl %r15d
cmpl %r15d, 0x7c(%rbx)
movss %xmm0, -0x30(%rbp)
jge 0x78862
movl %ecx, -0x2c(%rbp)
movslq %r15d, %rdi
shlq $0x3, %rdi
callq 0x424fb
movq %rax, %r13
movq 0x80(%rbx), %rsi
testq %rsi, %rsi
je 0x7884f
movslq 0x78(%rbx), %rdx
shlq $0x3, %rdx
movq %r13, %rdi
callq 0xc080
movq 0x80(%rbx), %rdi
callq 0x425d4
movq %r13, 0x80(%rbx)
movl %r15d, 0x7c(%rbx)
movl -0x2c(%rbp), %ecx
movss -0x30(%rbp), %xmm0
cmpl %r12d, %ecx
jl 0x789df
incl %ecx
movq %r14, -0x40(%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
movl 0x78(%rbx), %r15d
movl 0x7c(%rbx), %eax
cmpl %eax, %r15d
jne 0x78950
testl %eax, %eax
je 0x788d7
movl %eax, %edx
shrl $0x1f, %edx
addl %eax, %edx
sarl %edx
addl %eax, %edx
jmp 0x788dc
movl $0x8, %edx
incl %r15d
cmpl %r15d, %edx
cmovgl %edx, %r15d
cmpl %r15d, %eax
jge 0x78950
movss %xmm2, -0x34(%rbp)
movss %xmm1, -0x2c(%rbp)
movl %ecx, %r14d
movslq %r15d, %rdi
shlq $0x3, %rdi
callq 0x424fb
movq %rax, %r13
movq 0x80(%rbx), %rsi
testq %rsi, %rsi
je 0x7892f
movslq 0x78(%rbx), %rdx
shlq $0x3, %rdx
movq %r13, %rdi
callq 0xc080
movq 0x80(%rbx), %rdi
callq 0x425d4
movq %r13, 0x80(%rbx)
movl %r15d, 0x7c(%rbx)
movl %r14d, %ecx
movq -0x40(%rbp), %r14
movss -0x30(%rbp), %xmm0
movss -0x2c(%rbp), %xmm1
movss -0x34(%rbp), %xmm2
movq 0x80(%rbx), %rax
movslq 0x78(%rbx), %rdx
movss %xmm1, (%rax,%rdx,8)
movss %xmm2, 0x4(%rax,%rdx,8)
incl 0x78(%rbx)
incl %r12d
cmpl %r12d, %ecx
jne 0x78871
jmp 0x789df
movl $0x8, %ecx
cmpl %r13d, %ecx
cmovgl %ecx, %r13d
cmpl %r13d, %eax
jge 0x789ca
movslq %r13d, %rdi
shlq $0x3, %rdi
callq 0x424fb
movq %rax, %r15
movq 0x80(%rbx), %rsi
testq %rsi, %rsi
je 0x789bf
movslq 0x78(%rbx), %rdx
shlq $0x3, %rdx
movq %r15, %rdi
callq 0xc080
movq 0x80(%rbx), %rdi
callq 0x425d4
movq %r15, 0x80(%rbx)
movl %r13d, 0x7c(%rbx)
movq 0x80(%rbx), %rax
movslq 0x78(%rbx), %rcx
movq (%r14), %rdx
movq %rdx, (%rax,%rcx,8)
incl 0x78(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq