// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_draw_list_path_arc_to
NK_API void
nk_draw_list_path_arc_to(struct nk_draw_list *list, struct nk_vec2 center,
    float radius, float a_min, float a_max, unsigned int segments)
{
    unsigned int i = 0;
    NK_ASSERT(list);
    if (!list) return;
    if (radius == 0.0f) return;

    /*  This algorithm for arc drawing relies on these two trigonometric identities[1]:
            sin(a + b) = sin(a) * cos(b) + cos(a) * sin(b)
            cos(a + b) = cos(a) * cos(b) - sin(a) * sin(b)

        Two coordinates (x, y) of a point on a circle centered on
        the origin can be written in polar form as:
            x = r * cos(a)
            y = r * sin(a)
        where r is the radius of the circle,
            a is the angle between (x, y) and the origin.

        This allows us to rotate the coordinates around the
        origin by an angle b using the following transformation:
            x' = r * cos(a + b) = x * cos(b) - y * sin(b)
            y' = r * sin(a + b) = y * cos(b) + x * sin(b)

        [1] https://en.wikipedia.org/wiki/List_of_trigonometric_identities#Angle_sum_and_difference_identities
    */
    {const float d_angle = (a_max - a_min) / (float)segments;
    const float sin_d = (float)NK_SIN(d_angle);
    const float cos_d = (float)NK_COS(d_angle);

    float cx = (float)NK_COS(a_min) * radius;
    float cy = (float)NK_SIN(a_min) * radius;
    for(i = 0; i <= segments; ++i) {
        float new_cx, new_cy;
        const float x = center.x + cx;
        const float y = center.y + cy;
        nk_draw_list_path_line_to(list, nk_vec2(x, y));

        new_cx = cx * cos_d - cy * sin_d;
        new_cy = cy * cos_d + cx * sin_d;
        cx = new_cx;
        cy = new_cy;
    }}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
testq %rdi, %rdi
je 0x2a9e5
movaps %xmm0, %xmm4
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x2a8df
jnp 0x2a9dc
movl %esi, %ebx
movq %rdi, %r14
subss %xmm2, %xmm3
movl %esi, %eax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
divss %xmm0, %xmm3
movss %xmm3, 0x20(%rsp)
movaps %xmm3, %xmm0
movaps %xmm1, 0x10(%rsp)
movaps %xmm4, 0x40(%rsp)
movss %xmm2, 0xc(%rsp)
callq 0x122b0
movaps %xmm0, 0x30(%rsp)
movss 0x20(%rsp), %xmm0
callq 0x12770
movaps %xmm0, 0x20(%rsp)
movss 0xc(%rsp), %xmm0
callq 0x12770
movaps %xmm0, 0x50(%rsp)
movss 0xc(%rsp), %xmm0
callq 0x122b0
movaps 0x40(%rsp), %xmm2
movaps 0x10(%rsp), %xmm1
movaps 0x50(%rsp), %xmm3
unpcklps %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1]
shufps $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0]
mulps %xmm3, %xmm1
movaps 0x20(%rsp), %xmm0
shufps $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movaps %xmm0, 0x20(%rsp)
movaps 0x30(%rsp), %xmm0
shufps $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movaps %xmm0, 0x30(%rsp)
xorl %ebp, %ebp
movaps %xmm1, 0x10(%rsp)
movaps %xmm1, %xmm0
addps %xmm2, %xmm0
movq %r14, %rdi
callq 0x12970
movaps 0x40(%rsp), %xmm2
movaps 0x10(%rsp), %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
xorps 0x42bcd(%rip), %xmm0    # 0x6d570
movaps 0x10(%rsp), %xmm1
shufps $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0]
movss %xmm0, %xmm1            # xmm1 = xmm0[0],xmm1[1,2,3]
mulps 0x30(%rsp), %xmm1
movaps 0x10(%rsp), %xmm0
mulps 0x20(%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
movaps 0x10(%rsp), %xmm0
addps %xmm1, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps 0x10(%rsp), %xmm1
incl %ebp
cmpl %ebx, %ebp
jbe 0x2a97b
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x5c604(%rip), %rbx     # 0x86ff0
movq (%rbx), %rdi
leaq 0x463a6(%rip), %rsi     # 0x70d9c
leaq 0x463bd(%rip), %rdx     # 0x70dba
movl $0x284f, %ecx           # imm = 0x284F
xorl %eax, %eax
callq 0x12d80
movq (%rbx), %rdi
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x13780