// File: /workspace/github_c_makefile_star2_O0/0x0203[P]schack_poc/./nuklear_xlib.h
// Function: nk_xsurf_stroke_curve
NK_INTERN void
nk_xsurf_stroke_curve(XSurface *surf, struct nk_vec2i p1,
    struct nk_vec2i p2, struct nk_vec2i p3, struct nk_vec2i p4,
    unsigned int num_segments, unsigned short line_thickness, struct nk_color col)
{
    unsigned int i_step;
    float t_step;
    struct nk_vec2i last = p1;

    XSetLineAttributes(surf->dpy, surf->gc, line_thickness, LineSolid, CapButt, JoinMiter);
    num_segments = NK_MAX(num_segments, 1);
    t_step = 1.0f/(float)num_segments;
    for (i_step = 1; i_step <= num_segments; ++i_step) {
        float t = t_step * (float)i_step;
        float u = 1.0f - t;
        float w1 = u*u*u;
        float w2 = 3*u*u*t;
        float w3 = 3*u*t*t;
        float w4 = t * t *t;
        float x = w1 * p1.x + w2 * p2.x + w3 * p3.x + w4 * p4.x;
        float y = w1 * p1.y + w2 * p2.y + w3 * p3.y + w4 * p4.y;
        nk_xsurf_stroke_line(surf, last.x, last.y, (short)x, (short)y, line_thickness,col);
        last.x = (short)x; last.y = (short)y;
    }
    XSetLineAttributes(surf->dpy, surf->gc, 1, LineSolid, CapButt, JoinMiter);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x18(%rbp), %eax
movw 0x10(%rbp), %ax
movl %esi, -0x4(%rbp)
movl %edx, -0x8(%rbp)
movl %ecx, -0xc(%rbp)
movl %r8d, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movl %r9d, -0x1c(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movzwl 0x10(%rbp), %edx
xorl %r9d, %r9d
movl $0x1, %r8d
movl %r9d, %ecx
callq 0x3310
cmpl $0x1, -0x1c(%rbp)
jae 0x32e6e
movl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x32e74
movl -0x1c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cvtsi2ss %rax, %xmm1
movss 0xf17e(%rip), %xmm0     # 0x42008
divss %xmm1, %xmm0
movss %xmm0, -0x24(%rbp)
movl $0x1, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
ja 0x3303c
movss -0x24(%rbp), %xmm0
movl -0x20(%rbp), %eax
cvtsi2ss %rax, %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0x2c(%rbp)
movss -0x2c(%rbp), %xmm1
movss 0xf13f(%rip), %xmm0     # 0x42008
subss %xmm1, %xmm0
movss %xmm0, -0x30(%rbp)
movss -0x30(%rbp), %xmm1
movaps %xmm1, %xmm0
mulss %xmm0, %xmm0
mulss %xmm1, %xmm0
movss %xmm0, -0x34(%rbp)
movss -0x30(%rbp), %xmm2
movss 0xf138(%rip), %xmm1     # 0x4202c
movaps %xmm2, %xmm0
mulss %xmm1, %xmm0
mulss %xmm2, %xmm0
movss -0x2c(%rbp), %xmm2
mulss %xmm2, %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x30(%rbp), %xmm0
mulss %xmm1, %xmm0
movss -0x2c(%rbp), %xmm1
mulss %xmm1, %xmm0
mulss %xmm1, %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0x2c(%rbp), %xmm1
movaps %xmm1, %xmm0
mulss %xmm0, %xmm0
mulss %xmm1, %xmm0
movss %xmm0, -0x40(%rbp)
movss -0x34(%rbp), %xmm0
movswl -0x4(%rbp), %eax
cvtsi2ss %eax, %xmm2
movss -0x38(%rbp), %xmm1
movswl -0x8(%rbp), %eax
cvtsi2ss %eax, %xmm3
mulss %xmm3, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss -0x3c(%rbp), %xmm1
movswl -0xc(%rbp), %eax
cvtsi2ss %eax, %xmm2
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
movss -0x40(%rbp), %xmm0
movswl -0x10(%rbp), %eax
cvtsi2ss %eax, %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x44(%rbp)
movss -0x34(%rbp), %xmm0
movswl -0x2(%rbp), %eax
cvtsi2ss %eax, %xmm2
movss -0x38(%rbp), %xmm1
movswl -0x6(%rbp), %eax
cvtsi2ss %eax, %xmm3
mulss %xmm3, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss -0x3c(%rbp), %xmm1
movswl -0xa(%rbp), %eax
cvtsi2ss %eax, %xmm2
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
movss -0x40(%rbp), %xmm0
movswl -0xe(%rbp), %eax
cvtsi2ss %eax, %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x48(%rbp)
movq -0x18(%rbp), %rdi
movswl -0x28(%rbp), %esi
movswl -0x26(%rbp), %edx
cvttss2si -0x44(%rbp), %ecx
cvttss2si -0x48(%rbp), %eax
movzwl 0x10(%rbp), %r9d
movl 0x18(%rbp), %r10d
movq %rsp, %r8
movl %r10d, (%r8)
movswl %cx, %ecx
movswl %ax, %r8d
callq 0x31d50
cvttss2si -0x44(%rbp), %eax
movw %ax, -0x28(%rbp)
movss -0x48(%rbp), %xmm0
cvttss2si %xmm0, %eax
movw %ax, -0x26(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x32e9a
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movl $0x1, %r8d
xorl %r9d, %r9d
movl %r8d, %edx
movl %r9d, %ecx
callq 0x3310
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)