// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_draw.cpp
// Function: ImDrawList::PathArcToFast(ImVec2 const&, float, int, int)
void ImDrawList::PathArcToFast(const ImVec2& centre, float radius, int amin, int amax)
{
    static ImVec2 circle_vtx[12];
    static bool circle_vtx_builds = false;
    const int circle_vtx_count = IM_ARRAYSIZE(circle_vtx);
    if (!circle_vtx_builds)
    {
        for (int i = 0; i < circle_vtx_count; i++)
        {
            const float a = ((float)i / (float)circle_vtx_count) * 2*IM_PI;
            circle_vtx[i].x = cosf(a);
            circle_vtx[i].y = sinf(a);
        }
        circle_vtx_builds = true;
    }

    if (amin > amax) return;
    if (radius == 0.0f)
    {
        _Path.push_back(centre);
    }
    else
    {
        _Path.reserve(_Path.Size + (amax - amin + 1));
        for (int a = amin; a <= amax; a++)
        {
            const ImVec2& c = circle_vtx[a % circle_vtx_count];
            _Path.push_back(ImVec2(centre.x + c.x * radius, centre.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, %rbx
movq %rdi, %r14
movb 0x3145a(%rip), %al      # 0x5fd70
testb %al, %al
movss %xmm0, -0x30(%rbp)
je 0x2eb82
cmpb $0x0, 0x3144e(%rip)     # 0x5fd78
jne 0x2e98f
movl %ecx, -0x2c(%rbp)
xorl %r15d, %r15d
leaq 0x313d7(%rip), %r13     # 0x5fd10
xorps %xmm0, %xmm0
cvtsi2ss %r15d, %xmm0
divss 0x13e7b(%rip), %xmm0    # 0x427c4
addss %xmm0, %xmm0
mulss 0x13e73(%rip), %xmm0    # 0x427c8
movss %xmm0, -0x34(%rbp)
callq 0x74e0
movss %xmm0, (%r13,%r15,8)
movss -0x34(%rbp), %xmm0
callq 0x7050
movss %xmm0, 0x4(%r13,%r15,8)
incq %r15
cmpq $0xc, %r15
jne 0x2e939
movb $0x1, 0x313f1(%rip)     # 0x5fd78
movl -0x2c(%rbp), %ecx
movss -0x30(%rbp), %xmm0
movl %ecx, %edx
subl %r12d, %edx
jl 0x2eb73
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
movl 0x70(%r14), %eax
jne 0x2e9cd
jp 0x2e9cd
cmpl 0x74(%r14), %eax
jne 0x2eb17
leal 0x1(%rax), %ecx
testl %eax, %eax
je 0x2eb1d
movl %eax, %edx
shrl $0x1f, %edx
addl %eax, %edx
sarl %edx
addl %eax, %edx
jmp 0x2eb22
addl %edx, %eax
incl %eax
cmpl %eax, 0x74(%r14)
jge 0x2ea1a
movslq %eax, %r15
leaq (,%r15,8), %rdi
movl %ecx, -0x2c(%rbp)
callq 0x8589
movq %rax, %r13
movq 0x78(%r14), %rsi
movslq 0x70(%r14), %rdx
shlq $0x3, %rdx
movq %rax, %rdi
callq 0x7080
movq 0x78(%r14), %rdi
callq 0x9019
movss -0x30(%rbp), %xmm0
movl -0x2c(%rbp), %ecx
movq %r13, 0x78(%r14)
movl %r15d, 0x74(%r14)
incl %ecx
leaq 0x312ed(%rip), %r15     # 0x5fd10
movq %rbx, -0x40(%rbp)
movl %ecx, -0x2c(%rbp)
movslq %r12d, %rax
imulq $0x2aaaaaab, %rax, %rsi # imm = 0x2AAAAAAB
movq %rsi, %rdx
shrq $0x3f, %rdx
shrq $0x21, %rsi
addl %edx, %esi
shll $0x2, %esi
leal (%rsi,%rsi,2), %edx
subl %edx, %eax
cltq
movss (%r15,%rax,8), %xmm1
mulss %xmm0, %xmm1
addss (%rbx), %xmm1
movss 0x4(%r15,%rax,8), %xmm2
mulss %xmm0, %xmm2
addss 0x4(%rbx), %xmm2
movl 0x70(%r14), %eax
cmpl 0x74(%r14), %eax
jne 0x2ea8e
testl %eax, %eax
movss %xmm1, -0x34(%rbp)
movss %xmm2, -0x38(%rbp)
je 0x2ea94
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x2ea99
movq 0x78(%r14), %r13
jmp 0x2eaf2
movl $0x8, %ecx
incl %eax
cmpl %eax, %ecx
cmovgl %ecx, %eax
movslq %eax, %rbx
leaq (,%rbx,8), %rdi
callq 0x8589
movq %rax, %r13
movq 0x78(%r14), %rsi
movslq 0x70(%r14), %rdx
shlq $0x3, %rdx
movq %rax, %rdi
callq 0x7080
movq 0x78(%r14), %rdi
callq 0x9019
movq %r13, 0x78(%r14)
movl %ebx, 0x74(%r14)
movl 0x70(%r14), %eax
movq -0x40(%rbp), %rbx
movl -0x2c(%rbp), %ecx
movss -0x30(%rbp), %xmm0
movss -0x34(%rbp), %xmm1
movss -0x38(%rbp), %xmm2
leal 0x1(%rax), %edx
movl %edx, 0x70(%r14)
cltq
movss %xmm1, (%r13,%rax,8)
movss %xmm2, 0x4(%r13,%rax,8)
incl %r12d
cmpl %r12d, %ecx
jne 0x2ea2a
jmp 0x2eb73
movq 0x78(%r14), %r15
jmp 0x2eb63
movl $0x8, %edx
cmpl %ecx, %edx
cmovgl %edx, %ecx
movslq %ecx, %r12
leaq (,%r12,8), %rdi
callq 0x8589
movq %rax, %r15
movq 0x78(%r14), %rsi
movslq 0x70(%r14), %rdx
shlq $0x3, %rdx
movq %rax, %rdi
callq 0x7080
movq 0x78(%r14), %rdi
callq 0x9019
movq %r15, 0x78(%r14)
movl %r12d, 0x74(%r14)
movl 0x70(%r14), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x70(%r14)
cltq
movq (%rbx), %rcx
movq %rcx, (%r15,%rax,8)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ecx, %r15d
callq 0x7a1b
movss -0x30(%rbp), %xmm0
movl %r15d, %ecx
jmp 0x2e923
nop