// File: /workspace/github_cpp_makefile_star2_O1/YiweiMao[P]tessDX/src/tessellator.cpp
// Function: CHLSLTessellator::QuadHLSLProcessTessFactors(float, float, float, float, float, float)
void CHLSLTessellator::QuadHLSLProcessTessFactors( float tessFactor_Ueq0, float tessFactor_Veq0, float tessFactor_Ueq1, float tessFactor_Veq1, 
                                               float insideTessFactorScaleU, float insideTessFactorScaleV )
{
    if( !(tessFactor_Ueq0 > 0) ||// NaN will pass
        !(tessFactor_Veq0 > 0) || 
        !(tessFactor_Ueq1 > 0) ||
        !(tessFactor_Veq1 > 0) )
    {
        m_LastUnRoundedComputedTessFactors[0] = tessFactor_Ueq0;
        m_LastUnRoundedComputedTessFactors[1] = tessFactor_Veq0;
        m_LastUnRoundedComputedTessFactors[2] = tessFactor_Ueq1;
        m_LastUnRoundedComputedTessFactors[3] = tessFactor_Veq1;
        m_LastUnRoundedComputedTessFactors[4] = 0;
        m_LastUnRoundedComputedTessFactors[5] = 0;
        m_LastComputedTessFactors[0] = 
        m_LastComputedTessFactors[1] = 
        m_LastComputedTessFactors[2] = 
        m_LastComputedTessFactors[3] = 
        m_LastComputedTessFactors[4] = 
        m_LastComputedTessFactors[5] = 0;
        return;
    }

    CleanupFloatTessFactor(tessFactor_Ueq0);// clamp to [1.0f..INF], NaN->1.0f
    CleanupFloatTessFactor(tessFactor_Veq0); 
    CleanupFloatTessFactor(tessFactor_Ueq1);
    CleanupFloatTessFactor(tessFactor_Veq1);

    // Save off tessFactors so they can be returned to app
    m_LastUnRoundedComputedTessFactors[0] = tessFactor_Ueq0;
    m_LastUnRoundedComputedTessFactors[1] = tessFactor_Veq0;
    m_LastUnRoundedComputedTessFactors[2] = tessFactor_Ueq1;
    m_LastUnRoundedComputedTessFactors[3] = tessFactor_Veq1;

    // Process outside tessFactors
    float outsideTessFactor[QUAD_EDGES] = {tessFactor_Ueq0, tessFactor_Veq0, tessFactor_Ueq1, tessFactor_Veq1};
    int edge, axis;
    TESSELLATOR_PARITY insideTessFactorParity[QUAD_AXES], outsideTessFactorParity[QUAD_EDGES];
    if( Pow2Partitioning() || IntegerPartitioning() )
    {
        for( edge = 0; edge < QUAD_EDGES; edge++ )
        {
            RoundUpTessFactor(outsideTessFactor[edge]);
            ClampTessFactor(outsideTessFactor[edge]); // clamp unbounded user input based on tessellation mode
            int edgeEven = isEven(outsideTessFactor[edge]);
            outsideTessFactorParity[edge] = edgeEven ? TESSELLATOR_PARITY_EVEN : TESSELLATOR_PARITY_ODD;
        }
    }
    else
    {
        SetTessellationParity(m_originalParity); // ClampTessFactor needs it
        for( edge = 0; edge < QUAD_EDGES; edge++ )
        {
            ClampTessFactor(outsideTessFactor[edge]); // clamp unbounded user input based on tessellation mode
            outsideTessFactorParity[edge] = m_originalParity;
        }
    }
    
    // Compute inside TessFactors
    float insideTessFactor[QUAD_AXES];
    if( m_quadInsideTessFactorReductionAxis == D3D11_TESSELLATOR_QUAD_REDUCTION_1_AXIS )
    {
        switch( m_insideTessFactorReduction )
        {
        case D3D11_TESSELLATOR_REDUCTION_MIN:
            insideTessFactor[U] = fmin(fmin(tessFactor_Veq0,tessFactor_Veq1),fmin(tessFactor_Ueq0,tessFactor_Ueq1));
            break;
        case D3D11_TESSELLATOR_REDUCTION_MAX:
            insideTessFactor[U] = fmax(fmax(tessFactor_Veq0,tessFactor_Veq1),fmax(tessFactor_Ueq0,tessFactor_Ueq1));
            break;
        case D3D11_TESSELLATOR_REDUCTION_AVERAGE:
            insideTessFactor[U] = (tessFactor_Veq0 + tessFactor_Veq1 + tessFactor_Ueq0 + tessFactor_Ueq1) / 4;
            break;
        }
        // Scale inside tessFactor based on user scale factor.

        ClampFloatTessFactorScale(insideTessFactorScaleU); // clamp scale value to [0..1], NaN->0
        insideTessFactor[U] = insideTessFactor[U]*insideTessFactorScaleU;

        // Compute inside parity
        if( Pow2Partitioning() || IntegerPartitioning() )
        {
            ClampTessFactor(insideTessFactor[U]); // clamp reduction + scale result that is based on unbounded user input
            m_LastUnRoundedComputedTessFactors[4] = m_LastUnRoundedComputedTessFactors[5] = insideTessFactor[U]; // Save off TessFactors so they can be returned to app
            RoundUpTessFactor(insideTessFactor[U]);
            insideTessFactorParity[U] = 
            insideTessFactorParity[V] = 
                (isEven(insideTessFactor[U]) || (FLOAT_ONE == insideTessFactor[U]) )
                ? TESSELLATOR_PARITY_EVEN : TESSELLATOR_PARITY_ODD;
        }
        else
        {
            ClampTessFactor(insideTessFactor[U]); // clamp reduction + scale result that is based on unbounded user input
            m_LastUnRoundedComputedTessFactors[4] = m_LastUnRoundedComputedTessFactors[5] = insideTessFactor[U]; // Save off TessFactors so they can be returned to app
            // no parity changes for fractional tessellation - just use what the user requested
            insideTessFactorParity[U] = insideTessFactorParity[V] = m_originalParity;
        }

        // To prevent snapping on edges, the "picture frame" comes
        // in using avg or max (and ignore inside TessFactor scaling) until it is at least 3.
        if( (TESSELLATOR_PARITY_ODD == insideTessFactorParity[U]) &&
            (insideTessFactor[U] < FLOAT_THREE) )
        {
            if(D3D11_TESSELLATOR_REDUCTION_MAX == m_insideTessFactorReduction)
            {
                insideTessFactor[U] = fmin(FLOAT_THREE,fmax(fmax(tessFactor_Veq0,tessFactor_Veq1),fmax(tessFactor_Ueq0,tessFactor_Ueq1)));
            }
            else
            {
                insideTessFactor[U] = fmin(FLOAT_THREE,(tessFactor_Veq0 + tessFactor_Veq1 + tessFactor_Ueq0 + tessFactor_Ueq1) / 4);
            }
            ClampTessFactor(insideTessFactor[U]); // clamp reduction result that is based on unbounded user input
            m_LastUnRoundedComputedTessFactors[4] = m_LastUnRoundedComputedTessFactors[5] = insideTessFactor[U]; // Save off TessFactors so they can be returned to app
            if( IntegerPartitioning())
            {
                RoundUpTessFactor(insideTessFactor[U]);
                insideTessFactorParity[U] = 
                insideTessFactorParity[V] = isEven(insideTessFactor[U]) ? TESSELLATOR_PARITY_EVEN : TESSELLATOR_PARITY_ODD;
            }
        }
        insideTessFactor[V] = insideTessFactor[U];
    }
    else
    {
        switch( m_insideTessFactorReduction )
        {
        case D3D11_TESSELLATOR_REDUCTION_MIN:
            insideTessFactor[U] = fmin(tessFactor_Veq0,tessFactor_Veq1);
            insideTessFactor[V] = fmin(tessFactor_Ueq0,tessFactor_Ueq1);
            break;
        case D3D11_TESSELLATOR_REDUCTION_MAX:
            insideTessFactor[U] = fmax(tessFactor_Veq0,tessFactor_Veq1);
            insideTessFactor[V] = fmax(tessFactor_Ueq0,tessFactor_Ueq1);
            break;
        case D3D11_TESSELLATOR_REDUCTION_AVERAGE:
            insideTessFactor[U] = (tessFactor_Veq0 + tessFactor_Veq1) / 2;
            insideTessFactor[V] = (tessFactor_Ueq0 + tessFactor_Ueq1) / 2;
            break;
        }
        // Scale inside tessFactors based on user scale factor.

        ClampFloatTessFactorScale(insideTessFactorScaleU); // clamp scale value to [0..1], NaN->0
        ClampFloatTessFactorScale(insideTessFactorScaleV);
        insideTessFactor[U] = insideTessFactor[U]*insideTessFactorScaleU;
        insideTessFactor[V] = insideTessFactor[V]*insideTessFactorScaleV;

        // Compute inside parity
        if( Pow2Partitioning() || IntegerPartitioning() )
        {
            for( axis = 0; axis < QUAD_AXES; axis++ )
            {
                ClampTessFactor(insideTessFactor[axis]); // clamp reduction + scale result that is based on unbounded user input
                m_LastUnRoundedComputedTessFactors[4+axis] = insideTessFactor[axis]; // Save off TessFactors so they can be returned to app
                RoundUpTessFactor(insideTessFactor[axis]);
                insideTessFactorParity[axis] = 
                    (isEven(insideTessFactor[axis]) || (FLOAT_ONE == insideTessFactor[axis]) )
                    ? TESSELLATOR_PARITY_EVEN : TESSELLATOR_PARITY_ODD;
            }
        }
        else
        {
            ClampTessFactor(insideTessFactor[U]); // clamp reduction + scale result that is based on unbounded user input
            ClampTessFactor(insideTessFactor[V]); // clamp reduction + scale result that is based on unbounded user input
            m_LastUnRoundedComputedTessFactors[4] = insideTessFactor[U]; // Save off TessFactors so they can be returned to app
            m_LastUnRoundedComputedTessFactors[5] = insideTessFactor[V]; // Save off TessFactors so they can be returned to app
             // no parity changes for fractional tessellation - just use what the user requested
            insideTessFactorParity[U] = insideTessFactorParity[V] = m_originalParity;
        }

        // To prevent snapping on edges, the "picture frame" comes
        // in using avg or max (and ignore inside TessFactor scaling) until it is at least 3.
        if( (TESSELLATOR_PARITY_ODD == insideTessFactorParity[U]) &&
            (insideTessFactor[U] < FLOAT_THREE) )
        {
            if(D3D11_TESSELLATOR_REDUCTION_MAX == m_insideTessFactorReduction)
            {
                insideTessFactor[U] = fmin(FLOAT_THREE,fmax(tessFactor_Veq0,tessFactor_Veq1));
            }
            else
            {
                insideTessFactor[U] = fmin(FLOAT_THREE,(tessFactor_Veq0 + tessFactor_Veq1) / 2);
            }
            ClampTessFactor(insideTessFactor[U]); // clamp reduction result that is based on unbounded user input
            m_LastUnRoundedComputedTessFactors[4] = insideTessFactor[U]; // Save off TessFactors so they can be returned to app
            if( IntegerPartitioning())
            {
                RoundUpTessFactor(insideTessFactor[U]);
                insideTessFactorParity[U] = isEven(insideTessFactor[U]) ? TESSELLATOR_PARITY_EVEN : TESSELLATOR_PARITY_ODD;
            }
        }

        if( (TESSELLATOR_PARITY_ODD == insideTessFactorParity[V]) &&
            (insideTessFactor[V] < FLOAT_THREE) )
        {
            if(D3D11_TESSELLATOR_REDUCTION_MAX == m_insideTessFactorReduction)
            {
                insideTessFactor[V] = fmin(FLOAT_THREE,fmax(tessFactor_Ueq0,tessFactor_Ueq1));
            }
            else
            {
                insideTessFactor[V] = fmin(FLOAT_THREE,(tessFactor_Ueq0 + tessFactor_Ueq1) / 2);
            }
            ClampTessFactor(insideTessFactor[V]);// clamp reduction result that is based on unbounded user input
            m_LastUnRoundedComputedTessFactors[5] = insideTessFactor[V]; // Save off TessFactors so they can be returned to app
            if( IntegerPartitioning())
            {
                RoundUpTessFactor(insideTessFactor[V]);
                insideTessFactorParity[V] = isEven(insideTessFactor[V]) ? TESSELLATOR_PARITY_EVEN : TESSELLATOR_PARITY_ODD;
            }
        }

        for( axis = 0; axis < QUAD_AXES; axis++ )
        {
            if( TESSELLATOR_PARITY_ODD == insideTessFactorParity[axis] )
            {
                // Ensure the first ring ("picture frame") interpolates in on all sides
                // as much as the side with the minimum TessFactor.  Prevents snapping to edge. 
                if( (insideTessFactor[axis] < FLOAT_THREE) && (insideTessFactor[axis] < insideTessFactor[(axis+1)&0x1]))
                {
                    insideTessFactor[axis] = fmin(insideTessFactor[(axis+1)&0x1],FLOAT_THREE);
                    m_LastUnRoundedComputedTessFactors[4+axis] = insideTessFactor[axis]; // Save off TessFactors so they can be returned to app
                }
            }
        }
    }

    // Save off TessFactors so they can be returned to app
    m_LastComputedTessFactors[0] = outsideTessFactor[Ueq0];
    m_LastComputedTessFactors[1] = outsideTessFactor[Veq0];
    m_LastComputedTessFactors[2] = outsideTessFactor[Ueq1];
    m_LastComputedTessFactors[3] = outsideTessFactor[Veq1];
    m_LastComputedTessFactors[4] = insideTessFactor[U];
    m_LastComputedTessFactors[5] = insideTessFactor[V];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
xorps %xmm6, %xmm6
ucomiss %xmm6, %xmm0
jbe 0x404a12
ucomiss %xmm6, %xmm1
jbe 0x404a12
ucomiss %xmm6, %xmm2
jbe 0x404a12
ucomiss %xmm6, %xmm3
jbe 0x404a12
movd %xmm0, %eax
movss 0xc17b1(%rip), %xmm8    # 0x4c6044
movaps %xmm8, %xmm9
testl $0x7fffff, %eax         # imm = 0x7FFFFF
notl %eax
jne 0x4048a4
movaps %xmm0, %xmm9
testl $0x7f800000, %eax       # imm = 0x7F800000
je 0x4048af
movaps %xmm0, %xmm9
movd %xmm1, %eax
movaps %xmm8, %xmm10
testl $0x7fffff, %eax         # imm = 0x7FFFFF
notl %eax
jne 0x4048c4
movaps %xmm1, %xmm10
movss %xmm5, 0x60(%rsp)
movss %xmm4, 0x64(%rsp)
testl $0x7f800000, %eax       # imm = 0x7F800000
je 0x4048db
movaps %xmm1, %xmm10
cmpltss %xmm8, %xmm0
cmpltss %xmm8, %xmm1
movd %xmm2, %eax
movaps %xmm8, %xmm6
testl $0x7fffff, %eax         # imm = 0x7FFFFF
notl %eax
jne 0x4048fb
movaps %xmm2, %xmm6
movaps %xmm0, %xmm7
andnps %xmm9, %xmm7
andps %xmm8, %xmm0
movaps %xmm1, %xmm9
andnps %xmm10, %xmm9
andps %xmm8, %xmm1
testl $0x7f800000, %eax       # imm = 0x7F800000
je 0x40491c
movaps %xmm2, %xmm6
orps %xmm0, %xmm7
orps %xmm1, %xmm9
cmpltss %xmm8, %xmm2
movaps %xmm2, %xmm4
andnps %xmm6, %xmm4
andps %xmm8, %xmm2
movd %xmm3, %eax
movaps %xmm8, %xmm0
testl $0x7fffff, %eax         # imm = 0x7FFFFF
notl %eax
jne 0x404947
movaps %xmm3, %xmm0
orps %xmm2, %xmm4
testl $0x7f800000, %eax       # imm = 0x7F800000
je 0x404954
movaps %xmm3, %xmm0
cmpltss %xmm8, %xmm3
movaps %xmm3, %xmm1
andnps %xmm0, %xmm1
andps %xmm8, %xmm3
orps %xmm1, %xmm3
movss %xmm7, 0x94(%rbx)
movss %xmm9, 0x98(%rbx)
movss %xmm4, 0x9c(%rbx)
movss %xmm3, 0xa0(%rbx)
movaps %xmm7, 0x50(%rsp)
movss %xmm7, 0x20(%rsp)
movaps %xmm9, 0x30(%rsp)
movss %xmm9, 0x24(%rsp)
movaps %xmm4, 0x10(%rsp)
movss %xmm4, 0x28(%rsp)
movaps %xmm3, 0x40(%rsp)
movss %xmm3, 0x2c(%rsp)
movl 0x6c(%rbx), %ebp
cmpl $0x1, %ebp
ja 0x404a4e
xorl %r15d, %r15d
leaq (%rsp,%r15), %r14
addq $0x20, %r14
testb $0x1, %bpl
je 0x4049ec
movl (%r14), %eax
testl $0x7fffff, %eax         # imm = 0x7FFFFF
je 0x4049fb
andl $0x7f800000, %eax       # imm = 0x7F800000
addl $0x800000, %eax         # imm = 0x800000
movl %eax, (%r14)
jmp 0x4049fb
movss (%r14), %xmm0
callq 0x4010c8
movss %xmm0, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40518c
addq $0x4, %r15
cmpq $0x10, %r15
jne 0x4049c5
jmp 0x404a71
movss %xmm0, 0x94(%rbx)
movss %xmm1, 0x98(%rbx)
movss %xmm2, 0x9c(%rbx)
movss %xmm3, 0xa0(%rbx)
xorl %eax, %eax
movq %rax, 0xa4(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x7c(%rbx)
movq %rax, 0x8c(%rbx)
jmp 0x405113
movl 0x60(%rbx), %eax
movl %eax, 0x64(%rbx)
xorl %r14d, %r14d
leaq (%rsp,%r14), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x40518c
addq $0x4, %r14
cmpq $0x10, %r14
jne 0x404a57
cmpl $0x0, 0x78(%rbx)
movl 0x74(%rbx), %r12d
movd 0x64(%rsp), %xmm6
movd %xmm6, %eax
je 0x404aed
cmpl $0x2, %r12d
movaps 0x50(%rsp), %xmm3
movaps 0x40(%rsp), %xmm2
movaps 0x30(%rsp), %xmm5
je 0x404b94
cmpl $0x1, %r12d
movaps 0x10(%rsp), %xmm4
je 0x404b5a
testl %r12d, %r12d
jne 0x404bbf
movaps %xmm5, %xmm0
cmpunordss %xmm5, %xmm0
movaps %xmm0, %xmm1
andps %xmm2, %xmm1
minss %xmm5, %xmm2
andnps %xmm2, %xmm0
orps %xmm1, %xmm0
movss %xmm0, (%rsp)
movaps %xmm3, %xmm0
cmpunordss %xmm3, %xmm0
movaps %xmm0, %xmm1
andps %xmm4, %xmm1
movaps %xmm4, %xmm2
minss %xmm3, %xmm2
jmp 0x404b8c
cmpl $0x2, %r12d
movaps 0x50(%rsp), %xmm4
movaps 0x40(%rsp), %xmm2
movaps 0x30(%rsp), %xmm3
je 0x404ed5
cmpl $0x1, %r12d
je 0x404e86
testl %r12d, %r12d
jne 0x404ef3
movaps %xmm3, %xmm0
cmpunordss %xmm3, %xmm0
movaps %xmm0, %xmm1
andps %xmm2, %xmm1
minss %xmm3, %xmm2
andnps %xmm2, %xmm0
orps %xmm1, %xmm0
movaps %xmm4, %xmm1
cmpunordss %xmm4, %xmm1
movaps %xmm1, %xmm2
movaps 0x10(%rsp), %xmm3
andps %xmm3, %xmm2
minss %xmm4, %xmm3
andnps %xmm3, %xmm1
orps %xmm2, %xmm1
movaps %xmm1, %xmm2
minss %xmm0, %xmm2
jmp 0x404ec2
movaps %xmm5, %xmm0
cmpunordss %xmm5, %xmm0
movaps %xmm0, %xmm1
andps %xmm2, %xmm1
maxss %xmm5, %xmm2
andnps %xmm2, %xmm0
orps %xmm1, %xmm0
movss %xmm0, (%rsp)
movaps %xmm3, %xmm0
cmpunordss %xmm3, %xmm0
movaps %xmm0, %xmm1
andps %xmm4, %xmm1
movaps %xmm4, %xmm2
maxss %xmm3, %xmm2
andnps %xmm2, %xmm0
orps %xmm1, %xmm0
jmp 0x404bb9
movaps %xmm5, %xmm0
addss %xmm2, %xmm0
movss 0xc14b9(%rip), %xmm1    # 0x4c605c
mulss %xmm1, %xmm0
movss %xmm0, (%rsp)
movaps %xmm3, %xmm0
addss 0x10(%rsp), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, 0x4(%rsp)
movl %eax, %ecx
notl %ecx
testl $0x7f800000, %ecx       # imm = 0x7F800000
sete %cl
testl $0x7fffff, %eax         # imm = 0x7FFFFF
setne %al
xorps %xmm0, %xmm0
ucomiss %xmm6, %xmm0
xorps %xmm1, %xmm1
ja 0x404bf7
andb %al, %cl
jne 0x404bf7
ucomiss 0xc145a(%rip), %xmm6    # 0x4c6044
movaps %xmm6, %xmm1
jbe 0x404bf7
movss 0xc144d(%rip), %xmm1    # 0x4c6044
movd 0x60(%rsp), %xmm2
movd %xmm2, %ecx
movl %ecx, %eax
notl %eax
testl $0x7f800000, %eax       # imm = 0x7F800000
sete %al
testl $0x7fffff, %ecx         # imm = 0x7FFFFF
setne %cl
ucomiss %xmm2, %xmm0
ja 0x404c33
andb %cl, %al
jne 0x404c33
ucomiss 0xc141e(%rip), %xmm2    # 0x4c6044
movaps %xmm2, %xmm0
jbe 0x404c33
movss 0xc1411(%rip), %xmm0    # 0x4c6044
leaq 0x4(%rsp), %r14
mulss -0x4(%r14), %xmm1
movss %xmm1, -0x4(%r14)
mulss (%r14), %xmm0
movss %xmm0, (%r14)
cmpl $0x1, %ebp
ja 0x404ccc
xorl %r13d, %r13d
leaq (%rsp,%r13), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x40518c
movss (%r15), %xmm0
movss %xmm0, 0xa4(%rbx,%r13)
testb $0x1, %bpl
je 0x404c93
movl (%r15), %eax
testl $0x7fffff, %eax         # imm = 0x7FFFFF
je 0x404c9d
andl $0x7f800000, %eax       # imm = 0x7F800000
addl $0x800000, %eax         # imm = 0x800000
movl %eax, (%r15)
jmp 0x404c9d
callq 0x4010c8
movss %xmm0, (%r15)
movss (%rsp,%r13), %xmm0
cvttss2si %xmm0, %eax
ucomiss 0xc1396(%rip), %xmm0    # 0x4c6044
setp %cl
setne %dl
orb %cl, %dl
andb %al, %dl
movzbl %dl, %eax
movl %eax, 0x8(%rsp,%r13)
addq $0x4, %r13
cmpq $0x4, %r13
je 0x404c56
jmp 0x404d0b
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x40518c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40518c
movss (%r15), %xmm0
movss %xmm0, 0xa4(%rbx)
movss 0x4(%r15), %xmm0
movss %xmm0, 0xa8(%rbx)
movl 0x60(%rbx), %eax
movl %eax, 0xc(%rsp)
movl %eax, 0x8(%rsp)
cmpl $0x1, 0x8(%rsp)
jne 0x404da2
movss 0xc1342(%rip), %xmm0    # 0x4c6060
ucomiss (%rsp), %xmm0
jbe 0x404da2
cmpl $0x1, %r12d
jne 0x404d4e
movaps 0x40(%rsp), %xmm2
movaps %xmm2, %xmm0
movaps 0x30(%rsp), %xmm3
maxss %xmm3, %xmm0
cmpunordss %xmm3, %xmm3
movaps %xmm3, %xmm1
andps %xmm2, %xmm1
andnps %xmm0, %xmm3
orps %xmm1, %xmm3
jmp 0x404d61
movaps 0x30(%rsp), %xmm3
addss 0x40(%rsp), %xmm3
mulss 0xc12fb(%rip), %xmm3    # 0x4c605c
minss 0xc12f7(%rip), %xmm3    # 0x4c6060
movq %rsp, %r15
movss %xmm3, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x40518c
movss (%r15), %xmm0
movss %xmm0, 0xa4(%rbx)
testl %ebp, %ebp
jne 0x404da2
callq 0x4010c8
movss %xmm0, (%rsp)
cvttss2si %xmm0, %eax
andl $0x1, %eax
movl %eax, 0x8(%rsp)
cmpl $0x1, 0xc(%rsp)
jne 0x404e3a
movss 0xc12ab(%rip), %xmm0    # 0x4c6060
ucomiss 0x4(%rsp), %xmm0
jbe 0x404e3a
cmpl $0x1, %r12d
jne 0x404de6
movaps 0x10(%rsp), %xmm3
movaps %xmm3, %xmm0
movaps 0x50(%rsp), %xmm2
maxss %xmm2, %xmm0
cmpunordss %xmm2, %xmm2
movaps %xmm2, %xmm1
andps %xmm3, %xmm1
andnps %xmm0, %xmm2
orps %xmm1, %xmm2
jmp 0x404df9
movaps 0x50(%rsp), %xmm2
addss 0x10(%rsp), %xmm2
mulss 0xc1263(%rip), %xmm2    # 0x4c605c
minss 0xc125f(%rip), %xmm2    # 0x4c6060
movss %xmm2, 0x4(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40518c
movss 0x4(%rsp), %xmm0
movss %xmm0, 0xa8(%rbx)
testl %ebp, %ebp
jne 0x404e3a
callq 0x4010c8
movss %xmm0, 0x4(%rsp)
cvttss2si %xmm0, %eax
andl $0x1, %eax
movl %eax, 0xc(%rsp)
xorl %eax, %eax
movss 0xc121c(%rip), %xmm0    # 0x4c6060
cmpl $0x1, 0x8(%rsp,%rax,4)
jne 0x404e78
movss (%rsp,%rax,4), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x404e78
movq %rax, %rcx
xorq $0x1, %rcx
movss (%rsp,%rcx,4), %xmm2
ucomiss %xmm1, %xmm2
jbe 0x404e78
minss %xmm0, %xmm2
movss %xmm2, (%rsp,%rax,4)
movss %xmm2, 0xa4(%rbx,%rax,4)
incq %rax
cmpq $0x1, %rax
je 0x404e44
jmp 0x4050c3
movaps %xmm3, %xmm0
cmpunordss %xmm3, %xmm0
movaps %xmm0, %xmm1
andps %xmm2, %xmm1
maxss %xmm3, %xmm2
andnps %xmm2, %xmm0
orps %xmm1, %xmm0
movaps %xmm4, %xmm1
cmpunordss %xmm4, %xmm1
movaps %xmm1, %xmm2
movaps 0x10(%rsp), %xmm3
andps %xmm3, %xmm2
maxss %xmm4, %xmm3
andnps %xmm3, %xmm1
orps %xmm2, %xmm1
movaps %xmm1, %xmm2
maxss %xmm0, %xmm2
cmpunordss %xmm0, %xmm0
movaps %xmm0, %xmm3
andps %xmm1, %xmm3
andnps %xmm2, %xmm0
orps %xmm3, %xmm0
jmp 0x404eee
movaps %xmm3, %xmm0
addss %xmm2, %xmm0
addss %xmm4, %xmm0
addss 0x10(%rsp), %xmm0
mulss 0xc1176(%rip), %xmm0    # 0x4c6064
movss %xmm0, (%rsp)
movl %eax, %ecx
notl %ecx
testl $0x7f800000, %ecx       # imm = 0x7F800000
sete %cl
testl $0x7fffff, %eax         # imm = 0x7FFFFF
setne %al
xorps %xmm0, %xmm0
ucomiss %xmm6, %xmm0
ja 0x404f28
andb %al, %cl
jne 0x404f28
ucomiss 0xc1129(%rip), %xmm6    # 0x4c6044
movaps %xmm6, %xmm0
jbe 0x404f28
movss 0xc111c(%rip), %xmm0    # 0x4c6044
movq %rsp, %r14
mulss (%r14), %xmm0
movss %xmm0, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40518c
movss (%r14), %xmm0
movss %xmm0, 0xa8(%rbx)
movss %xmm0, 0xa4(%rbx)
cmpl $0x1, %ebp
ja 0x404f8d
testb $0x1, %bpl
je 0x404fa6
movl (%rsp), %eax
testl $0x7fffff, %eax         # imm = 0x7FFFFF
movaps 0x50(%rsp), %xmm2
movaps 0x40(%rsp), %xmm3
movaps 0x10(%rsp), %xmm4
movaps 0x30(%rsp), %xmm5
je 0x404fc4
andl $0x7f800000, %eax       # imm = 0x7F800000
addl $0x800000, %eax         # imm = 0x800000
movl %eax, (%rsp)
jmp 0x404fc4
movl 0x60(%rbx), %eax
movaps 0x50(%rsp), %xmm2
movaps 0x40(%rsp), %xmm3
movaps 0x10(%rsp), %xmm4
movaps 0x30(%rsp), %xmm5
jmp 0x404fe1
callq 0x4010c8
movss %xmm0, (%rsp)
movaps 0x50(%rsp), %xmm2
movaps 0x40(%rsp), %xmm3
movaps 0x10(%rsp), %xmm4
movaps 0x30(%rsp), %xmm5
movss (%rsp), %xmm0
cvttss2si %xmm0, %eax
ucomiss 0xc1070(%rip), %xmm0    # 0x4c6044
setp %cl
setne %dl
orb %cl, %dl
andb %al, %dl
movzbl %dl, %eax
movl %eax, 0xc(%rsp)
movl %eax, 0x8(%rsp)
cmpl $0x1, %eax
jne 0x4050b8
movss 0xc1066(%rip), %xmm0    # 0x4c6060
ucomiss (%rsp), %xmm0
jbe 0x4050b8
cmpl $0x1, %r12d
jne 0x405054
movaps %xmm3, %xmm0
maxss %xmm5, %xmm0
cmpunordss %xmm5, %xmm5
movaps %xmm5, %xmm1
andps %xmm3, %xmm1
andnps %xmm0, %xmm5
orps %xmm1, %xmm5
movaps %xmm4, %xmm0
maxss %xmm2, %xmm0
cmpunordss %xmm2, %xmm2
movaps %xmm2, %xmm1
andps %xmm4, %xmm1
andnps %xmm0, %xmm2
orps %xmm1, %xmm2
movaps %xmm2, %xmm0
maxss %xmm5, %xmm0
cmpunordss %xmm5, %xmm5
movaps %xmm5, %xmm1
andps %xmm2, %xmm1
andnps %xmm0, %xmm5
orps %xmm1, %xmm5
jmp 0x40506b
addss %xmm3, %xmm5
addss %xmm5, %xmm2
addss %xmm2, %xmm4
mulss 0xc0ffc(%rip), %xmm4    # 0x4c6064
movaps %xmm4, %xmm5
minss 0xc0fed(%rip), %xmm5    # 0x4c6060
movq %rsp, %r14
movss %xmm5, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40518c
movss (%r14), %xmm0
movss %xmm0, 0xa8(%rbx)
movss %xmm0, 0xa4(%rbx)
testl %ebp, %ebp
jne 0x4050b8
callq 0x4010c8
cvttss2si %xmm0, %eax
movss %xmm0, (%rsp)
andl $0x1, %eax
movl %eax, 0xc(%rsp)
movl %eax, 0x8(%rsp)
movss (%rsp), %xmm0
movss %xmm0, 0x4(%rsp)
movss 0x20(%rsp), %xmm0
movss %xmm0, 0x7c(%rbx)
movss 0x24(%rsp), %xmm0
movss %xmm0, 0x80(%rbx)
movss 0x28(%rsp), %xmm0
movss %xmm0, 0x84(%rbx)
movss 0x2c(%rsp), %xmm0
movss %xmm0, 0x88(%rbx)
movss (%rsp), %xmm0
movss %xmm0, 0x8c(%rbx)
movss 0x4(%rsp), %xmm0
movss %xmm0, 0x90(%rbx)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq