// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/libsquish/clusterfit.cpp
// Function: squish::ClusterFit::Compress4(void*)
void ClusterFit::Compress4( void* block )
{
    // declare variables
    int const count = m_colours->GetCount();
    Vec4 const two = VEC4_CONST( 2.0f );
    Vec4 const one = VEC4_CONST( 1.0f );
    Vec4 const onethird_onethird2( 1.0f/3.0f, 1.0f/3.0f, 1.0f/3.0f, 1.0f/9.0f );
    Vec4 const twothirds_twothirds2( 2.0f/3.0f, 2.0f/3.0f, 2.0f/3.0f, 4.0f/9.0f );
    Vec4 const twonineths = VEC4_CONST( 2.0f/9.0f );
    Vec4 const zero = VEC4_CONST( 0.0f );
    Vec4 const half = VEC4_CONST( 0.5f );
    Vec4 const grid( 31.0f, 63.0f, 31.0f, 0.0f );
    Vec4 const gridrcp( 1.0f/31.0f, 1.0f/63.0f, 1.0f/31.0f, 0.0f );

    // prepare an ordering using the principle axis
    ConstructOrdering( m_principle, 0 );

    // check all possible clusters and iterate on the total order
    Vec4 beststart = VEC4_CONST( 0.0f );
    Vec4 bestend = VEC4_CONST( 0.0f );
    Vec4 besterror = m_besterror;
    u8 bestindices[16];
    int bestiteration = 0;
    int besti = 0, bestj = 0, bestk = 0;

    // loop over iterations (we avoid the case that all points in first or last cluster)
    for( int iterationIndex = 0;; )
    {
        // first cluster [0,i) is at the start
        Vec4 part0 = VEC4_CONST( 0.0f );
        for( int i = 0; i < count; ++i )
        {
            // second cluster [i,j) is one third along
            Vec4 part1 = VEC4_CONST( 0.0f );
            for( int j = i;; )
            {
                // third cluster [j,k) is two thirds along
                Vec4 part2 = ( j == 0 ) ? m_points_weights[0] : VEC4_CONST( 0.0f );
                int kmin = ( j == 0 ) ? 1 : j;
                for( int k = kmin;; )
                {
                    // last cluster [k,count) is at the end
                    Vec4 part3 = m_xsum_wsum - part2 - part1 - part0;

                    // compute least squares terms directly
                    Vec4 const alphax_sum = MultiplyAdd( part2, onethird_onethird2, MultiplyAdd( part1, twothirds_twothirds2, part0 ) );
                    Vec4 const alpha2_sum = alphax_sum.SplatW();

                    Vec4 const betax_sum = MultiplyAdd( part1, onethird_onethird2, MultiplyAdd( part2, twothirds_twothirds2, part3 ) );
                    Vec4 const beta2_sum = betax_sum.SplatW();

                    Vec4 const alphabeta_sum = twonineths*( part1 + part2 ).SplatW();

                    // compute the least-squares optimal points
                    Vec4 factor = Reciprocal( NegativeMultiplySubtract( alphabeta_sum, alphabeta_sum, alpha2_sum*beta2_sum ) );
                    Vec4 a = NegativeMultiplySubtract( betax_sum, alphabeta_sum, alphax_sum*beta2_sum )*factor;
                    Vec4 b = NegativeMultiplySubtract( alphax_sum, alphabeta_sum, betax_sum*alpha2_sum )*factor;

                    // clamp to the grid
                    a = Min( one, Max( zero, a ) );
                    b = Min( one, Max( zero, b ) );
                    a = Truncate( MultiplyAdd( grid, a, half ) )*gridrcp;
                    b = Truncate( MultiplyAdd( grid, b, half ) )*gridrcp;

                    // compute the error (we skip the constant xxsum)
                    Vec4 e1 = MultiplyAdd( a*a, alpha2_sum, b*b*beta2_sum );
                    Vec4 e2 = NegativeMultiplySubtract( a, alphax_sum, a*b*alphabeta_sum );
                    Vec4 e3 = NegativeMultiplySubtract( b, betax_sum, e2 );
                    Vec4 e4 = MultiplyAdd( two, e3, e1 );

                    // apply the metric to the error term
                    Vec4 e5 = e4*m_metric;
                    Vec4 error = e5.SplatX() + e5.SplatY() + e5.SplatZ();

                    // keep the solution if it wins
                    if( CompareAnyLessThan( error, besterror ) )
                    {
                        beststart = a;
                        bestend = b;
                        besterror = error;
                        besti = i;
                        bestj = j;
                        bestk = k;
                        bestiteration = iterationIndex;
                    }

                    // advance
                    if( k == count )
                        break;
                    part2 += m_points_weights[k];
                    ++k;
                }

                // advance
                if( j == count )
                    break;
                part1 += m_points_weights[j];
                ++j;
            }

            // advance
            part0 += m_points_weights[i];
        }

        // stop if we didn't improve in this iteration
        if( bestiteration != iterationIndex )
            break;

        // advance if possible
        ++iterationIndex;
        if( iterationIndex == m_iterationCount )
            break;

        // stop if a new iteration is an ordering that has already been tried
        Vec3 axis = ( bestend - beststart ).GetVec3();
        if( !ConstructOrdering( axis, iterationIndex ) )
            break;
    }

    // save the block if necessary
    if( CompareAnyLessThan( besterror, m_besterror ) )
    {
        // remap the indices
        u8 const* order = ( u8* )m_order + 16*bestiteration;

        u8 unordered[16];
        for( int m = 0; m < besti; ++m )
            unordered[order[m]] = 0;
        for( int m = besti; m < bestj; ++m )
            unordered[order[m]] = 2;
        for( int m = bestj; m < bestk; ++m )
            unordered[order[m]] = 3;
        for( int m = bestk; m < count; ++m )
            unordered[order[m]] = 1;

        m_colours->RemapIndices( unordered, bestindices );

        // save the block
        WriteColourBlock4( beststart.GetVec3(), bestend.GetVec3(), bestindices, block );

        // save the error
        m_besterror = besterror;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rsi, 0x110(%rsp)
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movl (%rax), %ebp
movslq %ebp, %rax
movq %rax, 0x108(%rsp)
leaq 0x18(%rdi), %rsi
xorl %r12d, %r12d
xorl %edx, %edx
callq 0x70a7a
movsd 0x1c4(%rbx), %xmm0
movaps %xmm0, 0x20(%rsp)
movsd 0x1cc(%rbx), %xmm0
movaps %xmm0, 0xd0(%rsp)
leaq 0xa4(%rbx), %rax
movq %rax, 0x48(%rsp)
leaq 0xac(%rbx), %rax
movq %rax, 0x118(%rsp)
xorps %xmm5, %xmm5
leaq 0x30(%rsp), %r15
movl $0x0, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
xorl %ecx, %ecx
xorps %xmm0, %xmm0
movaps %xmm0, 0xc0(%rsp)
movaps %xmm0, 0xb0(%rsp)
movl %ecx, 0x18(%rsp)
movl %r12d, %eax
movq %rax, 0x50(%rsp)
testl %ebp, %ebp
jle 0x719da
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
xorl %r13d, %r13d
movaps %xmm0, 0x60(%rsp)
movq %r13, 0x58(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
cmpq $0x1, %r13
movq %r13, %r14
adcq $0x0, %r14
testq %r13, %r13
je 0x71404
xorps %xmm4, %xmm4
xorps %xmm3, %xmm3
jmp 0x71414
movsd 0xa4(%rbx), %xmm4
movsd 0xac(%rbx), %xmm3
movq %r14, %r12
shlq $0x4, %r12
addq 0x118(%rsp), %r12
movaps 0x90(%rsp), %xmm0
movaps %xmm0, %xmm1
mulps 0xd92b(%rip), %xmm1     # 0x7ed60
movaps 0x80(%rsp), %xmm2
movaps %xmm2, %xmm6
mulps 0xd929(%rip), %xmm6     # 0x7ed70
addps 0x70(%rsp), %xmm1
movaps %xmm1, 0x1a0(%rsp)
addps 0x60(%rsp), %xmm6
movaps %xmm6, 0x190(%rsp)
mulps 0xd918(%rip), %xmm0     # 0x7ed80
movaps %xmm0, 0x180(%rsp)
movaps %xmm2, %xmm0
mulss 0xd93d(%rip), %xmm0     # 0x7edb8
movaps 0xd90e(%rip), %xmm1     # 0x7ed90
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movaps %xmm1, 0x170(%rsp)
shufps $0x55, %xmm2, %xmm2     # xmm2 = xmm2[1,1,1,1]
movaps %xmm2, 0x160(%rsp)
mulss 0xd91b(%rip), %xmm2     # 0x7edbc
movss %xmm2, 0x1c(%rsp)
movsd 0x1a4(%rbx), %xmm0
movsd 0x1ac(%rbx), %xmm1
subps %xmm3, %xmm1
movaps %xmm3, %xmm2
shufps $0x55, %xmm3, %xmm2     # xmm2 = xmm2[1,1],xmm3[1,1]
subps 0x80(%rsp), %xmm1
subps %xmm4, %xmm0
subps 0x90(%rsp), %xmm0
subps 0x70(%rsp), %xmm0
subps 0x60(%rsp), %xmm1
movaps %xmm2, %xmm7
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
movaps %xmm4, %xmm6
mulps 0xd86e(%rip), %xmm6     # 0x7ed60
addps %xmm0, %xmm6
addps 0x180(%rsp), %xmm6
movaps %xmm6, %xmm9
movaps %xmm6, 0x120(%rsp)
movaps %xmm3, %xmm0
mulss 0xd8ac(%rip), %xmm0     # 0x7edc0
mulss 0xd8a8(%rip), %xmm7     # 0x7edc4
addss %xmm1, %xmm7
addss 0x1c(%rsp), %xmm7
movaps %xmm7, %xmm10
movaps %xmm3, 0x1c0(%rsp)
mulps 0xd867(%rip), %xmm3     # 0x7eda0
addps 0x190(%rsp), %xmm3
movaps %xmm3, %xmm6
movaps %xmm3, 0x220(%rsp)
movaps 0x160(%rsp), %xmm1
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
shufps $0xe2, %xmm1, %xmm0     # xmm0 = xmm0[2,0],xmm1[2,3]
addps %xmm0, %xmm2
movaps 0x170(%rsp), %xmm0
movaps %xmm0, %xmm7
addps %xmm2, %xmm7
mulps %xmm0, %xmm2
movaps %xmm7, %xmm1
movaps %xmm7, 0x210(%rsp)
shufps $0x1, %xmm2, %xmm1      # xmm1 = xmm1[1,0],xmm2[0,0]
shufps $0xe2, %xmm2, %xmm1     # xmm1 = xmm1[2,0],xmm2[2,3]
movaps %xmm3, %xmm0
shufps $0x55, %xmm6, %xmm0     # xmm0 = xmm0[1,1],xmm6[1,1]
movaps %xmm0, 0x140(%rsp)
mulss %xmm10, %xmm0
movaps %xmm2, %xmm8
mulss %xmm2, %xmm2
subss %xmm2, %xmm0
movss 0x5b6a(%rip), %xmm3     # 0x77114
movaps %xmm3, %xmm11
divss %xmm0, %xmm11
movaps %xmm6, %xmm0
mulss %xmm10, %xmm0
movaps %xmm10, 0x1e0(%rsp)
movaps %xmm7, %xmm2
shufps $0x55, %xmm7, %xmm2     # xmm2 = xmm2[1,1],xmm7[1,1]
mulss %xmm8, %xmm2
movaps %xmm8, 0x1f0(%rsp)
subss %xmm2, %xmm0
mulss %xmm11, %xmm0
mulps %xmm6, %xmm1
movaps %xmm1, %xmm6
shufps $0x55, %xmm1, %xmm6     # xmm6 = xmm6[1,1],xmm1[1,1]
subss %xmm1, %xmm6
maxss %xmm5, %xmm0
minss %xmm3, %xmm0
movss 0xd7b0(%rip), %xmm1     # 0x7edb0
mulss %xmm1, %xmm0
movaps %xmm4, 0x1d0(%rsp)
movaps %xmm4, %xmm1
mulps 0xd76a(%rip), %xmm1     # 0x7ed80
addps 0x1a0(%rsp), %xmm1
movaps %xmm1, 0x130(%rsp)
movaps %xmm10, %xmm2
shufps $0x0, %xmm10, %xmm2     # xmm2 = xmm2[0,0],xmm10[0,0]
movaps %xmm2, 0x200(%rsp)
mulps %xmm2, %xmm1
movaps %xmm8, %xmm2
shufps $0x0, %xmm8, %xmm2      # xmm2 = xmm2[0,0],xmm8[0,0]
movaps %xmm2, 0x150(%rsp)
mulps %xmm9, %xmm2
subps %xmm2, %xmm1
movss 0x8f2e(%rip), %xmm2     # 0x7a588
addss %xmm2, %xmm0
movaps 0xd6db(%rip), %xmm2     # 0x7ed40
shufps $0x1, %xmm0, %xmm2      # xmm2 = xmm2[1,0],xmm0[0,0]
mulss %xmm11, %xmm6
shufps $0x0, %xmm11, %xmm11    # xmm11 = xmm11[0,0,0,0]
movaps %xmm11, 0xf0(%rsp)
mulps %xmm11, %xmm1
xorps %xmm0, %xmm0
maxps %xmm0, %xmm1
movaps 0x90a3(%rip), %xmm0     # 0x7a730
minps %xmm0, %xmm1
movsd 0xd698(%rip), %xmm0     # 0x7ed30
mulps %xmm0, %xmm1
movaps 0xafce(%rip), %xmm0     # 0x7c670
addps %xmm0, %xmm1
shufps $0x24, %xmm2, %xmm1     # xmm1 = xmm1[0,1],xmm2[2,0]
movups %xmm1, 0x30(%rsp)
maxss %xmm5, %xmm6
minss %xmm3, %xmm6
movaps %xmm6, 0xe0(%rsp)
movq %r15, %rdi
callq 0x71b71
movaps %xmm1, %xmm2
movaps 0x140(%rsp), %xmm3
mulps 0x120(%rsp), %xmm3
movaps 0x130(%rsp), %xmm1
mulps 0x150(%rsp), %xmm1
subps %xmm1, %xmm3
movaps 0xe0(%rsp), %xmm1
mulss 0xd6b4(%rip), %xmm1     # 0x7edb0
mulps 0xf0(%rsp), %xmm3
addss 0x8e7c(%rip), %xmm1     # 0x7a588
movaps %xmm1, %xmm4
movaps 0xd62a(%rip), %xmm1     # 0x7ed40
shufps $0x1, %xmm4, %xmm1      # xmm1 = xmm1[1,0],xmm4[0,0]
maxps 0x619f(%rip), %xmm3     # 0x778c0
minps 0x9008(%rip), %xmm3     # 0x7a730
mulps 0xd601(%rip), %xmm3     # 0x7ed30
addps 0xaf3a(%rip), %xmm3     # 0x7c670
shufps $0x24, %xmm1, %xmm3     # xmm3 = xmm3[0,1],xmm1[2,0]
movsd 0xd60e(%rip), %xmm1     # 0x7ed50
mulps %xmm1, %xmm0
movaps %xmm0, 0xf0(%rsp)
movups %xmm3, 0x30(%rsp)
movaps %xmm2, 0x1b0(%rsp)
movss 0xd652(%rip), %xmm0     # 0x7edb4
mulss %xmm0, %xmm2
movaps %xmm2, 0xe0(%rsp)
movq %r15, %rdi
callq 0x71b71
movaps 0xe0(%rsp), %xmm12
movaps 0xf0(%rsp), %xmm10
mulps 0xd5c1(%rip), %xmm0     # 0x7ed50
movaps %xmm10, %xmm4
mulss %xmm10, %xmm4
movaps %xmm0, %xmm2
mulss %xmm0, %xmm2
mulss 0x1e0(%rsp), %xmm2
movaps 0x140(%rsp), %xmm9
mulss %xmm9, %xmm4
addss %xmm2, %xmm4
movaps %xmm10, %xmm3
mulss %xmm0, %xmm3
movaps 0x1f0(%rsp), %xmm6
mulss %xmm6, %xmm3
movaps 0x130(%rsp), %xmm11
movaps %xmm11, %xmm2
mulss %xmm10, %xmm2
subss %xmm2, %xmm3
movaps 0x120(%rsp), %xmm7
movaps %xmm7, %xmm2
mulss %xmm0, %xmm2
subss %xmm2, %xmm3
movaps %xmm1, %xmm2
mulss 0xd5b2(%rip), %xmm2     # 0x7edb4
addss %xmm3, %xmm3
addss %xmm4, %xmm3
movaps %xmm10, %xmm4
movss %xmm12, %xmm4           # xmm4 = xmm12[0],xmm4[1,2,3]
shufps $0x55, 0x210(%rsp), %xmm7 # xmm7 = xmm7[1,1],mem[1,1]
movaps %xmm0, %xmm5
movss %xmm2, %xmm5            # xmm5 = xmm2[0],xmm5[1,2,3]
shufps $0xe2, %xmm6, %xmm7     # xmm7 = xmm7[2,0],xmm6[2,3]
movaps %xmm4, %xmm6
mulps %xmm5, %xmm6
mulps %xmm5, %xmm7
mulps %xmm5, %xmm5
mulps 0x200(%rsp), %xmm5
movaps 0x220(%rsp), %xmm8
shufps $0x1, %xmm8, %xmm11     # xmm11 = xmm11[1,0],xmm8[0,0]
shufps $0xe2, %xmm8, %xmm11    # xmm11 = xmm11[2,0],xmm8[2,3]
mulps %xmm4, %xmm11
mulps %xmm4, %xmm4
mulps %xmm9, %xmm4
addps %xmm5, %xmm4
mulps 0x150(%rsp), %xmm6
subps %xmm11, %xmm6
subps %xmm7, %xmm6
mulss 0x1b4(%rbx), %xmm3
addps %xmm6, %xmm6
addps %xmm4, %xmm6
movsd 0x1b8(%rbx), %xmm5
shufps $0xe1, %xmm5, %xmm5     # xmm5 = xmm5[1,0,2,3]
mulps %xmm6, %xmm5
movaps %xmm5, %xmm4
shufps $0x55, %xmm5, %xmm4     # xmm4 = xmm4[1,1],xmm5[1,1]
addss %xmm3, %xmm4
addss %xmm5, %xmm4
shufps $0x0, %xmm4, %xmm4      # xmm4 = xmm4[0,0,0,0]
movaps 0x20(%rsp), %xmm3
unpcklpd 0xd0(%rsp), %xmm3       # xmm3 = xmm3[0],mem[0]
movaps %xmm4, %xmm5
cmpltps %xmm3, %xmm5
movmskps %xmm5, %eax
xorps %xmm5, %xmm5
testl %eax, %eax
je 0x7191a
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
mulss %xmm5, %xmm1
movaps 0x1b0(%rsp), %xmm3
shufps $0x55, %xmm3, %xmm3     # xmm3 = xmm3[1,1,1,1]
mulss %xmm5, %xmm3
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
unpcklps %xmm3, %xmm12           # xmm12 = xmm12[0],xmm3[0],xmm12[1],xmm3[1]
movlhps %xmm12, %xmm10          # xmm10 = xmm10[0],xmm12[0]
movlhps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
movaps %xmm4, 0x20(%rsp)
movaps %xmm4, 0xd0(%rsp)
movaps %xmm0, 0xc0(%rsp)
movaps %xmm10, 0xb0(%rsp)
movl %r14d, 0x14(%rsp)
movl %r13d, 0x10(%rsp)
movq 0x58(%rsp), %rax
movl %eax, 0xc(%rsp)
movq 0x50(%rsp), %rax
movl %eax, 0x18(%rsp)
cmpq %r14, %rbp
je 0x7194e
movsd -0x8(%r12), %xmm0
movsd (%r12), %xmm1
movaps 0x1d0(%rsp), %xmm4
addps %xmm0, %xmm4
movaps 0x1c0(%rsp), %xmm3
addps %xmm1, %xmm3
incq %r14
addq $0x10, %r12
jmp 0x714a7
cmpq %rbp, %r13
je 0x71998
movq %r13, %rax
shlq $0x4, %rax
movq 0x48(%rsp), %rcx
movsd (%rcx,%rax), %xmm0
movsd 0x8(%rcx,%rax), %xmm1
movaps 0x90(%rsp), %xmm2
addps %xmm0, %xmm2
movaps %xmm2, 0x90(%rsp)
movaps 0x80(%rsp), %xmm0
addps %xmm1, %xmm0
movaps %xmm0, 0x80(%rsp)
incq %r13
jmp 0x713ec
movq 0x58(%rsp), %r13
movq %r13, %rax
shlq $0x4, %rax
movq 0x48(%rsp), %rcx
movsd (%rcx,%rax), %xmm0
movsd 0x8(%rcx,%rax), %xmm1
movaps 0x70(%rsp), %xmm2
addps %xmm0, %xmm2
movaps %xmm2, 0x70(%rsp)
movaps 0x60(%rsp), %xmm0
addps %xmm1, %xmm0
movaps %xmm0, 0x60(%rsp)
incq %r13
cmpq %rbp, %r13
jne 0x713d4
movq 0x50(%rsp), %r14
movl 0x18(%rsp), %ecx
cmpl %r14d, %ecx
jne 0x71a31
leal 0x1(%r14), %r12d
cmpl 0x14(%rbx), %r12d
je 0x71a2e
movaps 0xc0(%rsp), %xmm0
subps 0xb0(%rsp), %xmm0
movlps %xmm0, 0x30(%rsp)
movhlps %xmm0, %xmm0            # xmm0 = xmm0[1,1]
movss %xmm0, 0x38(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x70a7a
xorps %xmm5, %xmm5
movl %r14d, %ecx
testb %al, %al
jne 0x713b0
jmp 0x71a31
movl %r14d, %ecx
movups 0x1c4(%rbx), %xmm0
movaps 0x20(%rsp), %xmm1
unpcklpd 0xd0(%rsp), %xmm1       # xmm1 = xmm1[0],mem[0]
movaps %xmm1, 0x20(%rsp)
cmpltps %xmm0, %xmm1
movmskps %xmm1, %eax
testl %eax, %eax
je 0x71b5f
shll $0x4, %ecx
movslq %ecx, %rax
addq %rbx, %rax
addq $0x24, %rax
movl 0xc(%rsp), %r9d
testl %r9d, %r9d
jle 0x71a8a
movl %r9d, %ecx
xorl %edx, %edx
movzbl (%rax,%rdx), %esi
movb $0x0, 0xa0(%rsp,%rsi)
incq %rdx
cmpq %rdx, %rcx
jne 0x71a76
movl 0x10(%rsp), %r8d
cmpl %r8d, %r9d
movl 0x14(%rsp), %edi
jge 0x71ab2
movslq %r9d, %rcx
movslq %r8d, %rdx
movzbl (%rax,%rcx), %esi
movb $0x2, 0xa0(%rsp,%rsi)
incq %rcx
cmpq %rcx, %rdx
jne 0x71a9e
cmpl %edi, %r8d
jge 0x71ad1
movslq %r8d, %rcx
movslq %edi, %rdx
movzbl (%rax,%rcx), %esi
movb $0x3, 0xa0(%rsp,%rsi)
incq %rcx
cmpq %rcx, %rdx
jne 0x71abd
cmpl %ebp, %edi
movq 0x108(%rsp), %rsi
jge 0x71af4
movslq %edi, %rcx
movzbl (%rax,%rcx), %edx
movb $0x1, 0xa0(%rsp,%rdx)
incq %rcx
cmpq %rcx, %rsi
jne 0x71ae0
movq 0x8(%rbx), %rdi
leaq 0xa0(%rsp), %rsi
leaq 0x30(%rsp), %r15
movq %r15, %rdx
callq 0x72196
leaq 0x248(%rsp), %rdi
movaps 0xb0(%rsp), %xmm0
movlps %xmm0, (%rdi)
movhlps %xmm0, %xmm0            # xmm0 = xmm0[1,1]
movss %xmm0, 0x8(%rdi)
leaq 0x238(%rsp), %rsi
movaps 0xc0(%rsp), %xmm0
movlps %xmm0, (%rsi)
movhlps %xmm0, %xmm0            # xmm0 = xmm0[1,1]
movss %xmm0, 0x8(%rsi)
movq %r15, %rdx
movq 0x110(%rsp), %rcx
callq 0x71d52
movaps 0x20(%rsp), %xmm0
movups %xmm0, 0x1c4(%rbx)
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq