// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_draw_list_stroke_poly_line
NK_API void
nk_draw_list_stroke_poly_line(struct nk_draw_list *list, const struct nk_vec2 *points,
    const unsigned int points_count, struct nk_color color, enum nk_draw_list_stroke closed,
    float thickness, enum nk_anti_aliasing aliasing)
{
    nk_size count;
    int thick_line;
    struct nk_colorf col;
    struct nk_colorf col_trans;
    NK_ASSERT(list);
    if (!list || points_count < 2) return;

    color.a = (nk_byte)((float)color.a * list->config.global_alpha);
    count = points_count;
    if (!closed) count = points_count-1;
    thick_line = thickness > 1.0f;

#ifdef NK_INCLUDE_COMMAND_USERDATA
    nk_draw_list_push_userdata(list, list->userdata);
#endif

    color.a = (nk_byte)((float)color.a * list->config.global_alpha);
    nk_color_fv(&col.r, color);
    col_trans = col;
    col_trans.a = 0;

    if (aliasing == NK_ANTI_ALIASING_ON) {
        /* ANTI-ALIASED STROKE */
        const float AA_SIZE = 1.0f;
        NK_STORAGE const nk_size pnt_align = NK_ALIGNOF(struct nk_vec2);
        NK_STORAGE const nk_size pnt_size = sizeof(struct nk_vec2);

        /* allocate vertices and elements  */
        nk_size i1 = 0;
        nk_size vertex_offset;
        nk_size index = list->vertex_count;

        const nk_size idx_count = (thick_line) ?  (count * 18) : (count * 12);
        const nk_size vtx_count = (thick_line) ? (points_count * 4): (points_count *3);

        void *vtx = nk_draw_list_alloc_vertices(list, vtx_count);
        nk_draw_index *ids = nk_draw_list_alloc_elements(list, idx_count);

        nk_size size;
        struct nk_vec2 *normals, *temp;
        if (!vtx || !ids) return;

        /* temporary allocate normals + points */
        vertex_offset = (nk_size)((nk_byte*)vtx - (nk_byte*)list->vertices->memory.ptr);
        nk_buffer_mark(list->vertices, NK_BUFFER_FRONT);
        size = pnt_size * ((thick_line) ? 5 : 3) * points_count;
        normals = (struct nk_vec2*) nk_buffer_alloc(list->vertices, NK_BUFFER_FRONT, size, pnt_align);
        if (!normals) return;
        temp = normals + points_count;

        /* make sure vertex pointer is still correct */
        vtx = (void*)((nk_byte*)list->vertices->memory.ptr + vertex_offset);

        /* calculate normals */
        for (i1 = 0; i1 < count; ++i1) {
            const nk_size i2 = ((i1 + 1) == points_count) ? 0 : (i1 + 1);
            struct nk_vec2 diff = nk_vec2_sub(points[i2], points[i1]);
            float len;

            /* vec2 inverted length  */
            len = nk_vec2_len_sqr(diff);
            if (len != 0.0f)
                len = NK_INV_SQRT(len);
            else len = 1.0f;

            diff = nk_vec2_muls(diff, len);
            normals[i1].x = diff.y;
            normals[i1].y = -diff.x;
        }

        if (!closed)
            normals[points_count-1] = normals[points_count-2];

        if (!thick_line) {
            nk_size idx1, i;
            if (!closed) {
                struct nk_vec2 d;
                temp[0] = nk_vec2_add(points[0], nk_vec2_muls(normals[0], AA_SIZE));
                temp[1] = nk_vec2_sub(points[0], nk_vec2_muls(normals[0], AA_SIZE));
                d = nk_vec2_muls(normals[points_count-1], AA_SIZE);
                temp[(points_count-1) * 2 + 0] = nk_vec2_add(points[points_count-1], d);
                temp[(points_count-1) * 2 + 1] = nk_vec2_sub(points[points_count-1], d);
            }

            /* fill elements */
            idx1 = index;
            for (i1 = 0; i1 < count; i1++) {
                struct nk_vec2 dm;
                float dmr2;
                nk_size i2 = ((i1 + 1) == points_count) ? 0 : (i1 + 1);
                nk_size idx2 = ((i1+1) == points_count) ? index: (idx1 + 3);

                /* average normals */
                dm = nk_vec2_muls(nk_vec2_add(normals[i1], normals[i2]), 0.5f);
                dmr2 = dm.x * dm.x + dm.y* dm.y;
                if (dmr2 > 0.000001f) {
                    float scale = 1.0f/dmr2;
                    scale = NK_MIN(100.0f, scale);
                    dm = nk_vec2_muls(dm, scale);
                }

                dm = nk_vec2_muls(dm, AA_SIZE);
                temp[i2*2+0] = nk_vec2_add(points[i2], dm);
                temp[i2*2+1] = nk_vec2_sub(points[i2], dm);

                ids[0] = (nk_draw_index)(idx2 + 0); ids[1] = (nk_draw_index)(idx1+0);
                ids[2] = (nk_draw_index)(idx1 + 2); ids[3] = (nk_draw_index)(idx1+2);
                ids[4] = (nk_draw_index)(idx2 + 2); ids[5] = (nk_draw_index)(idx2+0);
                ids[6] = (nk_draw_index)(idx2 + 1); ids[7] = (nk_draw_index)(idx1+1);
                ids[8] = (nk_draw_index)(idx1 + 0); ids[9] = (nk_draw_index)(idx1+0);
                ids[10]= (nk_draw_index)(idx2 + 0); ids[11]= (nk_draw_index)(idx2+1);
                ids += 12;
                idx1 = idx2;
            }

            /* fill vertices */
            for (i = 0; i < points_count; ++i) {
                const struct nk_vec2 uv = list->config.tex_null.uv;
                vtx = nk_draw_vertex(vtx, &list->config, points[i], uv, col);
                vtx = nk_draw_vertex(vtx, &list->config, temp[i*2+0], uv, col_trans);
                vtx = nk_draw_vertex(vtx, &list->config, temp[i*2+1], uv, col_trans);
            }
        } else {
            nk_size idx1, i;
            const float half_inner_thickness = (thickness - AA_SIZE) * 0.5f;
            if (!closed) {
                struct nk_vec2 d1 = nk_vec2_muls(normals[0], half_inner_thickness + AA_SIZE);
                struct nk_vec2 d2 = nk_vec2_muls(normals[0], half_inner_thickness);

                temp[0] = nk_vec2_add(points[0], d1);
                temp[1] = nk_vec2_add(points[0], d2);
                temp[2] = nk_vec2_sub(points[0], d2);
                temp[3] = nk_vec2_sub(points[0], d1);

                d1 = nk_vec2_muls(normals[points_count-1], half_inner_thickness + AA_SIZE);
                d2 = nk_vec2_muls(normals[points_count-1], half_inner_thickness);

                temp[(points_count-1)*4+0] = nk_vec2_add(points[points_count-1], d1);
                temp[(points_count-1)*4+1] = nk_vec2_add(points[points_count-1], d2);
                temp[(points_count-1)*4+2] = nk_vec2_sub(points[points_count-1], d2);
                temp[(points_count-1)*4+3] = nk_vec2_sub(points[points_count-1], d1);
            }

            /* add all elements */
            idx1 = index;
            for (i1 = 0; i1 < count; ++i1) {
                struct nk_vec2 dm_out, dm_in;
                const nk_size i2 = ((i1+1) == points_count) ? 0: (i1 + 1);
                nk_size idx2 = ((i1+1) == points_count) ? index: (idx1 + 4);

                /* average normals */
                struct nk_vec2 dm = nk_vec2_muls(nk_vec2_add(normals[i1], normals[i2]), 0.5f);
                float dmr2 = dm.x * dm.x + dm.y* dm.y;
                if (dmr2 > 0.000001f) {
                    float scale = 1.0f/dmr2;
                    scale = NK_MIN(100.0f, scale);
                    dm = nk_vec2_muls(dm, scale);
                }

                dm_out = nk_vec2_muls(dm, ((half_inner_thickness) + AA_SIZE));
                dm_in = nk_vec2_muls(dm, half_inner_thickness);
                temp[i2*4+0] = nk_vec2_add(points[i2], dm_out);
                temp[i2*4+1] = nk_vec2_add(points[i2], dm_in);
                temp[i2*4+2] = nk_vec2_sub(points[i2], dm_in);
                temp[i2*4+3] = nk_vec2_sub(points[i2], dm_out);

                /* add indexes */
                ids[0] = (nk_draw_index)(idx2 + 1); ids[1] = (nk_draw_index)(idx1+1);
                ids[2] = (nk_draw_index)(idx1 + 2); ids[3] = (nk_draw_index)(idx1+2);
                ids[4] = (nk_draw_index)(idx2 + 2); ids[5] = (nk_draw_index)(idx2+1);
                ids[6] = (nk_draw_index)(idx2 + 1); ids[7] = (nk_draw_index)(idx1+1);
                ids[8] = (nk_draw_index)(idx1 + 0); ids[9] = (nk_draw_index)(idx1+0);
                ids[10]= (nk_draw_index)(idx2 + 0); ids[11] = (nk_draw_index)(idx2+1);
                ids[12]= (nk_draw_index)(idx2 + 2); ids[13] = (nk_draw_index)(idx1+2);
                ids[14]= (nk_draw_index)(idx1 + 3); ids[15] = (nk_draw_index)(idx1+3);
                ids[16]= (nk_draw_index)(idx2 + 3); ids[17] = (nk_draw_index)(idx2+2);
                ids += 18;
                idx1 = idx2;
            }

            /* add vertices */
            for (i = 0; i < points_count; ++i) {
                const struct nk_vec2 uv = list->config.tex_null.uv;
                vtx = nk_draw_vertex(vtx, &list->config, temp[i*4+0], uv, col_trans);
                vtx = nk_draw_vertex(vtx, &list->config, temp[i*4+1], uv, col);
                vtx = nk_draw_vertex(vtx, &list->config, temp[i*4+2], uv, col);
                vtx = nk_draw_vertex(vtx, &list->config, temp[i*4+3], uv, col_trans);
            }
        }
        /* free temporary normals + points */
        nk_buffer_reset(list->vertices, NK_BUFFER_FRONT);
    } else {
        /* NON ANTI-ALIASED STROKE */
        nk_size i1 = 0;
        nk_size idx = list->vertex_count;
        const nk_size idx_count = count * 6;
        const nk_size vtx_count = count * 4;
        void *vtx = nk_draw_list_alloc_vertices(list, vtx_count);
        nk_draw_index *ids = nk_draw_list_alloc_elements(list, idx_count);
        if (!vtx || !ids) return;

        for (i1 = 0; i1 < count; ++i1) {
            float dx, dy;
            const struct nk_vec2 uv = list->config.tex_null.uv;
            const nk_size i2 = ((i1+1) == points_count) ? 0 : i1 + 1;
            const struct nk_vec2 p1 = points[i1];
            const struct nk_vec2 p2 = points[i2];
            struct nk_vec2 diff = nk_vec2_sub(p2, p1);
            float len;

            /* vec2 inverted length  */
            len = nk_vec2_len_sqr(diff);
            if (len != 0.0f)
                len = NK_INV_SQRT(len);
            else len = 1.0f;
            diff = nk_vec2_muls(diff, len);

            /* add vertices */
            dx = diff.x * (thickness * 0.5f);
            dy = diff.y * (thickness * 0.5f);

            vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(p1.x + dy, p1.y - dx), uv, col);
            vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(p2.x + dy, p2.y - dx), uv, col);
            vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(p2.x - dy, p2.y + dx), uv, col);
            vtx = nk_draw_vertex(vtx, &list->config, nk_vec2(p1.x - dy, p1.y + dx), uv, col);

            ids[0] = (nk_draw_index)(idx+0); ids[1] = (nk_draw_index)(idx+1);
            ids[2] = (nk_draw_index)(idx+2); ids[3] = (nk_draw_index)(idx+0);
            ids[4] = (nk_draw_index)(idx+2); ids[5] = (nk_draw_index)(idx+3);

            ids += 6;
            idx += 4;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movaps %xmm0, 0x70(%rsp)
movl %r8d, %r12d
movl %ecx, %r13d
movl %edx, %r8d
movq %rsi, %r15
movq %rdi, %r14
testq %rdi, %rdi
jne 0x29107
movq 0x5ef21(%rip), %rax     # 0x87ff0
movq (%rax), %rdi
leaq 0x48cb3(%rip), %rsi     # 0x71d8c
leaq 0x48cca(%rip), %rdx     # 0x71daa
movl $0x26bc, %ecx           # imm = 0x26BC
xorl %eax, %eax
movq %r8, %rbp
movl %r9d, %ebx
callq 0x12d80
movq 0x5eef7(%rip), %rax     # 0x87ff0
movq (%rax), %rdi
callq 0x13780
movl %ebx, %r9d
movq %rbp, %r8
movq %r14, 0x48(%rsp)
testq %r14, %r14
sete %al
cmpl $0x2, %r8d
setb %cl
orb %al, %cl
je 0x2912f
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r13d, %eax
shrl $0x18, %eax
movzbl %al, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movq 0x48(%rsp), %r14
leaq 0x70(%r14), %rax
movq %rax, 0x68(%rsp)
movss 0x70(%r14), %xmm1
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movl %r8d, %edx
leal -0x1(%r8), %esi
movl %r12d, 0xc(%rsp)
testl %r12d, %r12d
movq %rdx, 0x10(%rsp)
movq %rdx, %r12
cmoveq %rsi, %r12
movl $0xff, %ecx
andl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movd %r13d, %xmm0
shrl $0x10, %r13d
pxor %xmm2, %xmm2
punpcklbw %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
punpcklwd %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3]
cvtdq2ps %xmm0, %xmm1
movaps 0x45415(%rip), %xmm0    # 0x6e5c0
mulps %xmm0, %xmm1
movaps %xmm1, 0x30(%rsp)
andl %ecx, %r13d
shll $0x8, %eax
orl %r13d, %eax
movd %eax, %xmm1
punpcklbw %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3],xmm1[4],xmm2[4],xmm1[5],xmm2[5],xmm1[6],xmm2[6],xmm1[7],xmm2[7]
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
cvtdq2ps %xmm1, %xmm1
mulps %xmm0, %xmm1
movaps %xmm1, 0x50(%rsp)
movl 0xcc(%r14), %ebx
cmpl $0x1, %r9d
jne 0x296fa
movq %rsi, 0x80(%rsp)
movaps 0x70(%rsp), %xmm0
ucomiss 0x456bc(%rip), %xmm0    # 0x6e8b4
leal (,%r8,4), %eax
movl $0x12, %ecx
movl $0xc, %ebp
cmovaq %rcx, %rbp
leal (%r8,%r8,2), %esi
cmoval %eax, %esi
movq %r12, 0x90(%rsp)
imulq %r12, %rbp
movq %r14, %rdi
movq %r8, %r12
callq 0x29b9c
movq %rax, %r13
movq %r14, %rdi
movq %rbp, %rsi
callq 0x29c1f
testq %r13, %r13
je 0x2911d
movq %rax, %rbp
testq %rax, %rax
je 0x2911d
movq %r12, 0x40(%rsp)
xorl %r12d, %r12d
movaps 0x70(%rsp), %xmm0
ucomiss 0x45651(%rip), %xmm0    # 0x6e8b4
seta %r12b
movq 0x48(%rsp), %r14
movq 0xb8(%r14), %rdi
movq 0x40(%rdi), %rax
movq %rax, 0x20(%rsp)
xorl %esi, %esi
callq 0x13e70
shll $0x4, %r12d
addq $0x18, %r12
imulq 0x10(%rsp), %r12
movq 0xb8(%r14), %rdi
movl $0x4, %ecx
xorl %esi, %esi
movq %r12, %rdx
callq 0x25548
testq %rax, %rax
je 0x2911d
subq 0x20(%rsp), %r13
movq 0x48(%rsp), %r12
movq 0xb8(%r12), %rcx
addq 0x40(%rcx), %r13
movq 0x90(%rsp), %r14
testq %r14, %r14
movq 0x10(%rsp), %r11
je 0x293a7
movq %r14, %rcx
negq %rcx
movl $0x1, %edx
xorl %esi, %esi
movss 0x455c3(%rip), %xmm0    # 0x6e8b4
xorps %xmm1, %xmm1
movss 0x455e4(%rip), %xmm2    # 0x6e8e0
movss 0x455e0(%rip), %xmm3    # 0x6e8e4
movaps 0x45265(%rip), %xmm4    # 0x6e570
cmpq %rdx, %r11
movq %rdx, %rdi
cmoveq %rsi, %rdi
movss (%r15,%rdi,8), %xmm6
movss 0x4(%r15,%rdi,8), %xmm5
subss -0x8(%r15,%rdx,8), %xmm6
subss -0x4(%r15,%rdx,8), %xmm5
movaps %xmm5, %xmm8
mulss %xmm5, %xmm8
movaps %xmm6, %xmm7
mulss %xmm6, %xmm7
addss %xmm8, %xmm7
ucomiss %xmm1, %xmm7
movaps %xmm0, %xmm8
jne 0x29350
jnp 0x2937f
movd %xmm7, %edi
shrl %edi
movl $0x5f375a84, %r8d       # imm = 0x5F375A84
subl %edi, %r8d
movd %r8d, %xmm8
mulss %xmm2, %xmm7
mulss %xmm8, %xmm7
mulss %xmm8, %xmm7
addss %xmm3, %xmm7
mulss %xmm8, %xmm7
movaps %xmm7, %xmm8
xorps %xmm4, %xmm6
unpcklps %xmm6, %xmm5            # xmm5 = xmm5[0],xmm6[0],xmm5[1],xmm6[1]
unpcklps %xmm8, %xmm8            # xmm8 = xmm8[0,0,1,1]
mulps %xmm5, %xmm8
movlps %xmm8, -0x8(%rax,%rdx,8)
leaq (%rcx,%rdx), %rdi
incq %rdi
incq %rdx
cmpq $0x1, %rdi
jne 0x2930b
cmpl $0x0, 0xc(%rsp)
movq 0x80(%rsp), %rsi
jne 0x293c6
movq 0x40(%rsp), %rcx
addl $-0x2, %ecx
movq (%rax,%rcx,8), %rcx
movq %rcx, (%rax,%rsi,8)
movaps 0x50(%rsp), %xmm7
unpcklps 0x451de(%rip), %xmm7    # xmm7 = xmm7[0],mem[0],xmm7[1],mem[1]
leaq (%rax,%r11,8), %rcx
movaps 0x70(%rsp), %xmm8
ucomiss 0x454d0(%rip), %xmm8    # 0x6e8b4
jbe 0x29981
movaps %xmm7, %xmm9
addss 0x454cd(%rip), %xmm8    # 0x6e8c4
mulss 0x454b0(%rip), %xmm8    # 0x6e8b0
cmpl $0x0, 0xc(%rsp)
jne 0x294aa
movss 0x454a1(%rip), %xmm0    # 0x6e8b4
addss %xmm8, %xmm0
movsd (%rax), %xmm2
shufps $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movaps %xmm0, %xmm3
mulps %xmm2, %xmm3
movsd (%r15), %xmm1
addps %xmm3, %xmm1
movlps %xmm1, (%rcx)
movaps %xmm8, %xmm1
shufps $0x0, %xmm8, %xmm1      # xmm1 = xmm1[0,0],xmm8[0,0]
mulps %xmm1, %xmm2
movsd (%r15), %xmm4
addps %xmm2, %xmm4
movlps %xmm4, 0x8(%rcx)
movsd (%r15), %xmm4
subps %xmm2, %xmm4
movlps %xmm4, 0x10(%rcx)
movsd (%r15), %xmm2
subps %xmm3, %xmm2
movlps %xmm2, 0x18(%rcx)
leal (,%rsi,4), %edx
movsd (%rax,%rsi,8), %xmm2
mulps %xmm2, %xmm0
movsd (%r15,%rsi,8), %xmm3
addps %xmm0, %xmm3
movlps %xmm3, (%rcx,%rdx,8)
mulps %xmm2, %xmm1
movsd (%r15,%rsi,8), %xmm2
addps %xmm1, %xmm2
movlps %xmm2, 0x8(%rcx,%rdx,8)
movsd (%r15,%rsi,8), %xmm2
subps %xmm1, %xmm2
movlps %xmm2, 0x10(%rcx,%rdx,8)
movsd (%r15,%rsi,8), %xmm1
subps %xmm0, %xmm1
movlps %xmm1, 0x18(%rcx,%rdx,8)
testq %r14, %r14
je 0x2962c
movss 0x453f9(%rip), %xmm0    # 0x6e8b4
addss %xmm8, %xmm0
shufps $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
shufps $0x0, %xmm8, %xmm8      # xmm8 = xmm8[0,0,0,0]
negq %r14
movl $0x1, %edx
movaps 0x450f8(%rip), %xmm1    # 0x6e5d0
movss 0x45408(%rip), %xmm2    # 0x6e8e8
movss 0x453cc(%rip), %xmm3    # 0x6e8b4
movss 0x453fc(%rip), %xmm4    # 0x6e8ec
movq %rbx, %r8
movq %r14, %rsi
leaq 0x4(%r8), %rdi
cmpq %rdx, %r11
movq %rdx, %r9
movl $0x0, %r10d
cmoveq %r10, %r9
cmoveq %rbx, %rdi
movsd -0x8(%rax,%rdx,8), %xmm6
movsd (%rax,%r9,8), %xmm5
addps %xmm6, %xmm5
mulps %xmm1, %xmm5
movaps %xmm5, %xmm7
mulps %xmm5, %xmm7
shufps $0x55, %xmm7, %xmm7     # xmm7 = xmm7[1,1,1,1]
movaps %xmm5, %xmm6
mulss %xmm5, %xmm6
addss %xmm7, %xmm6
ucomiss %xmm2, %xmm6
jbe 0x2954f
movaps %xmm3, %xmm7
divss %xmm6, %xmm7
movaps %xmm4, %xmm6
minss %xmm7, %xmm6
shufps $0x0, %xmm6, %xmm6      # xmm6 = xmm6[0,0,0,0]
mulps %xmm6, %xmm5
movq %r9, %r10
shlq $0x5, %r10
movaps %xmm0, %xmm6
mulps %xmm5, %xmm6
movsd (%r15,%r9,8), %xmm7
addps %xmm6, %xmm7
movlps %xmm7, (%rcx,%r10)
mulps %xmm8, %xmm5
movsd (%r15,%r9,8), %xmm7
addps %xmm5, %xmm7
movlps %xmm7, 0x8(%rcx,%r10)
movsd (%r15,%r9,8), %xmm7
subps %xmm5, %xmm7
movlps %xmm7, 0x10(%rcx,%r10)
movsd (%r15,%r9,8), %xmm5
subps %xmm6, %xmm5
movlps %xmm5, 0x18(%rcx,%r10)
leal 0x1(%rdi), %r9d
movw %r9w, (%rbp)
leal 0x1(%r8), %r10d
movw %r10w, 0x2(%rbp)
leal 0x2(%r8), %r11d
movw %r11w, 0x4(%rbp)
movw %r11w, 0x6(%rbp)
leal 0x2(%rdi), %r14d
movw %r14w, 0x8(%rbp)
movw %r9w, 0xa(%rbp)
movw %r9w, 0xc(%rbp)
movw %r10w, 0xe(%rbp)
movw %r8w, 0x10(%rbp)
movw %r8w, 0x12(%rbp)
movw %di, 0x14(%rbp)
movw %r9w, 0x16(%rbp)
movw %r14w, 0x18(%rbp)
movw %r11w, 0x1a(%rbp)
addl $0x3, %r8d
movw %r8w, 0x1c(%rbp)
movw %r8w, 0x1e(%rbp)
leal 0x3(%rdi), %r8d
movw %r8w, 0x20(%rbp)
movw %r14w, 0x22(%rbp)
addq $0x24, %rbp
leaq (%rsi,%rdx), %r9
incq %r9
incq %rdx
movq %rdi, %r8
cmpq $0x1, %r9
movq 0x10(%rsp), %r11
jne 0x294f6
cmpl $0x0, 0x40(%rsp)
movq 0x68(%rsp), %r15
je 0x29b7c
leaq (%rax,%r11,8), %rbx
addq $0x18, %rbx
shlq $0x5, %r11
xorl %r14d, %r14d
movaps %xmm9, 0x20(%rsp)
movsd 0x90(%r12), %xmm1
movaps %xmm1, 0x10(%rsp)
movsd -0x18(%rbx,%r14), %xmm0
movq %r13, %rdi
movq %r15, %rsi
movaps 0x30(%rsp), %xmm2
movaps 0x20(%rsp), %xmm3
movq %r11, %r13
callq 0x29c72
movsd -0x10(%rbx,%r14), %xmm0
movq %rax, %rdi
movq %r15, %rsi
movaps 0x10(%rsp), %xmm1
movaps 0x30(%rsp), %xmm2
movaps 0x50(%rsp), %xmm3
callq 0x29c72
movsd -0x8(%rbx,%r14), %xmm0
movq %rax, %rdi
movq %r15, %rsi
movaps 0x10(%rsp), %xmm1
movaps 0x30(%rsp), %xmm2
movaps 0x50(%rsp), %xmm3
callq 0x29c72
movsd (%rbx,%r14), %xmm0
movq %rax, %rdi
movq %r15, %rsi
movaps 0x10(%rsp), %xmm1
movdqa 0x30(%rsp), %xmm2
movaps 0x20(%rsp), %xmm3
callq 0x29c72
movq %r13, %r11
movq %rax, %r13
addq $0x20, %r14
cmpq %r14, %r11
jne 0x29651
jmp 0x29b7c
leaq (%r12,%r12), %rax
leaq (%rax,%rax,2), %r13
leaq (,%r12,4), %rsi
movq %r14, %rdi
movq %rsi, 0xa8(%rsp)
callq 0x29b9c
movq %rax, %rbp
movq %r14, %rdi
movq %r13, %rsi
callq 0x29c1f
movq %rax, %r13
testq %rbp, %rbp
sete %al
testq %r13, %r13
sete %cl
testq %r12, %r12
sete %dl
orb %al, %dl
orb %cl, %dl
jne 0x2911d
movaps 0x70(%rsp), %xmm0
mulss 0x4515c(%rip), %xmm0    # 0x6e8b0
movaps %xmm0, 0x70(%rsp)
movq 0x10(%rsp), %rax
leaq -0x4(,%rax,4), %rax
movq %rax, 0xa0(%rsp)
movl $0x1, %r12d
xorl %r14d, %r14d
cmpq %r14, 0xa0(%rsp)
movl $0x0, %eax
cmovneq %r12, %rax
movss (%r15,%r14,2), %xmm7
movss 0x4(%r15,%r14,2), %xmm8
movss (%r15,%rax,8), %xmm4
movss 0x4(%r15,%rax,8), %xmm5
movaps %xmm4, 0x90(%rsp)
movaps %xmm4, %xmm2
subss %xmm7, %xmm2
movaps %xmm5, 0x80(%rsp)
movaps %xmm5, %xmm3
subss %xmm8, %xmm3
movaps %xmm3, %xmm1
mulss %xmm3, %xmm1
movaps %xmm2, %xmm0
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
ucomiss 0x45116(%rip), %xmm0    # 0x6e8f0
movss 0x450d2(%rip), %xmm6    # 0x6e8b4
jne 0x297e6
jnp 0x29816
movd %xmm0, %eax
shrl %eax
movl $0x5f375a84, %ecx       # imm = 0x5F375A84
subl %eax, %ecx
movd %ecx, %xmm1
mulss 0x450e1(%rip), %xmm0    # 0x6e8e0
mulss %xmm1, %xmm0
mulss %xmm1, %xmm0
addss 0x450d5(%rip), %xmm0    # 0x6e8e4
mulss %xmm1, %xmm0
movaps %xmm0, %xmm6
movq 0x48(%rsp), %rax
movsd 0x90(%rax), %xmm1
movaps %xmm1, 0x20(%rsp)
mulss %xmm6, %xmm2
mulss %xmm6, %xmm3
movaps 0x70(%rsp), %xmm0
mulss %xmm0, %xmm2
movaps %xmm2, 0x10(%rsp)
mulss %xmm0, %xmm3
movss %xmm3, 0xc(%rsp)
movaps %xmm7, %xmm0
addss %xmm3, %xmm0
movaps %xmm8, %xmm6
subss %xmm2, %xmm6
unpcklps %xmm6, %xmm0            # xmm0 = xmm0[0],xmm6[0],xmm0[1],xmm6[1]
movq %rbp, %rdi
movq 0x68(%rsp), %rbp
movq %rbp, %rsi
movaps %xmm7, 0xb0(%rsp)
movaps 0x30(%rsp), %xmm2
movss %xmm8, 0x40(%rsp)
movaps 0x50(%rsp), %xmm3
callq 0x29c72
movaps 0x90(%rsp), %xmm0
addss 0xc(%rsp), %xmm0
movaps 0x80(%rsp), %xmm1
subss 0x10(%rsp), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movq %rax, %rdi
movq %rbp, %rsi
movaps 0x20(%rsp), %xmm1
movaps 0x30(%rsp), %xmm2
movaps 0x50(%rsp), %xmm3
callq 0x29c72
movaps 0x90(%rsp), %xmm0
subss 0xc(%rsp), %xmm0
movaps 0x80(%rsp), %xmm1
addss 0x10(%rsp), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movq %rax, %rdi
movq %rbp, %rsi
movaps 0x20(%rsp), %xmm1
movaps 0x30(%rsp), %xmm2
movaps 0x50(%rsp), %xmm3
callq 0x29c72
movaps 0xb0(%rsp), %xmm0
subss 0xc(%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
addss 0x40(%rsp), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movq %rax, %rdi
movq %rbp, %rsi
movaps 0x20(%rsp), %xmm1
movdqa 0x30(%rsp), %xmm2
movaps 0x50(%rsp), %xmm3
callq 0x29c72
movq %rax, %rbp
leal (%rbx,%r14), %eax
movw %ax, (%r13)
leal (%rbx,%r14), %ecx
incl %ecx
movw %cx, 0x2(%r13)
leal 0x2(%rbx,%r14), %ecx
movw %cx, 0x4(%r13)
movw %ax, 0x6(%r13)
movw %cx, 0x8(%r13)
leal (%rbx,%r14), %eax
addl $0x3, %eax
movw %ax, 0xa(%r13)
addq $0xc, %r13
addq $0x4, %r14
incq %r12
cmpq %r14, 0xa8(%rsp)
jne 0x29777
jmp 0x2911d
cmpl $0x0, 0xc(%rsp)
jne 0x299ca
movsd (%rax), %xmm0
movsd (%r15), %xmm1
addps %xmm0, %xmm1
movlps %xmm1, (%rcx)
movsd (%rax), %xmm0
movsd (%r15), %xmm1
subps %xmm0, %xmm1
movlps %xmm1, 0x8(%rcx)
leal (%rsi,%rsi), %edx
movsd (%rax,%rsi,8), %xmm0
movsd (%r15,%rsi,8), %xmm1
addps %xmm0, %xmm1
movlps %xmm1, (%rcx,%rdx,8)
movsd (%r15,%rsi,8), %xmm1
subps %xmm0, %xmm1
movlps %xmm1, 0x8(%rcx,%rdx,8)
testq %r14, %r14
je 0x29ada
negq %r14
movl $0x1, %edx
xorl %esi, %esi
movaps 0x44bec(%rip), %xmm0    # 0x6e5d0
movss 0x44efc(%rip), %xmm1    # 0x6e8e8
movss 0x44ec0(%rip), %xmm2    # 0x6e8b4
movss 0x44ef0(%rip), %xmm3    # 0x6e8ec
movq %rbx, %r8
leaq 0x3(%r8), %rdi
cmpq %rdx, %r11
movq %rdx, %r9
cmoveq %rsi, %r9
cmoveq %rbx, %rdi
movsd -0x8(%rax,%rdx,8), %xmm5
movsd (%rax,%r9,8), %xmm4
addps %xmm5, %xmm4
mulps %xmm0, %xmm4
movaps %xmm4, %xmm6
mulps %xmm4, %xmm6
shufps $0x55, %xmm6, %xmm6     # xmm6 = xmm6[1,1,1,1]
movaps %xmm4, %xmm5
mulss %xmm4, %xmm5
addss %xmm6, %xmm5
ucomiss %xmm1, %xmm5
jbe 0x29a52
movaps %xmm2, %xmm6
divss %xmm5, %xmm6
movaps %xmm3, %xmm5
minss %xmm6, %xmm5
shufps $0x0, %xmm5, %xmm5      # xmm5 = xmm5[0,0,0,0]
mulps %xmm5, %xmm4
movq %r9, %r10
shlq $0x4, %r10
movsd (%r15,%r9,8), %xmm5
addps %xmm4, %xmm5
movlps %xmm5, (%rcx,%r10)
movsd (%r15,%r9,8), %xmm5
subps %xmm4, %xmm5
movlps %xmm5, 0x8(%rcx,%r10)
movw %di, (%rbp)
movw %r8w, 0x2(%rbp)
leal 0x2(%r8), %r9d
movw %r9w, 0x4(%rbp)
movw %r9w, 0x6(%rbp)
leal 0x2(%rdi), %r9d
movw %r9w, 0x8(%rbp)
movw %di, 0xa(%rbp)
leal 0x1(%rdi), %r9d
movw %r9w, 0xc(%rbp)
leal 0x1(%r8), %r10d
movw %r10w, 0xe(%rbp)
movw %r8w, 0x10(%rbp)
movw %r8w, 0x12(%rbp)
movw %di, 0x14(%rbp)
movw %r9w, 0x16(%rbp)
addq $0x18, %rbp
leaq (%r14,%rdx), %r9
incq %r9
incq %rdx
movq %rdi, %r8
cmpq $0x1, %r9
jne 0x299ff
cmpl $0x0, 0x40(%rsp)
movq 0x68(%rsp), %rbp
movaps %xmm7, 0x20(%rsp)
je 0x29b7c
leaq (%rax,%r11,8), %rbx
addq $0x8, %rbx
shlq $0x3, %r11
xorl %r14d, %r14d
movsd 0x90(%r12), %xmm1
movaps %xmm1, 0x10(%rsp)
movsd (%r15,%r14), %xmm0
movq %r13, %rdi
movq %rbp, %rsi
movaps 0x30(%rsp), %xmm2
movaps 0x50(%rsp), %xmm3
movq %r11, %r13
callq 0x29c72
movsd -0x8(%rbx,%r14,2), %xmm0
movq %rax, %rdi
movq %rbp, %rsi
movaps 0x10(%rsp), %xmm1
movaps 0x30(%rsp), %xmm2
movaps 0x20(%rsp), %xmm3
callq 0x29c72
movsd (%rbx,%r14,2), %xmm0
movq %rax, %rdi
movq %rbp, %rsi
movaps 0x10(%rsp), %xmm1
movdqa 0x30(%rsp), %xmm2
movaps 0x20(%rsp), %xmm3
callq 0x29c72
movq %r13, %r11
movq %rax, %r13
addq $0x8, %r14
cmpq %r14, %r11
jne 0x29afe
movq 0xb8(%r12), %rdi
xorl %esi, %esi
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x127a0