// File: jamesliu516[P]amrdg2d/points_solid.cpp
// Function: newFlagpoint_1(double, double, int, pointxy*)
int newFlagpoint_1(double x, double y, int NumberPoint,PXYZ wallpnt[] )//Ӧ�����߷��� //in the solid flag==-1, out the solid flag=0
    //at the surface of the solid flag=2
{
    int j;
    double x1, y1, x2, y2;
    double dls1, dls2, nx, ny, pax, pay , pbx, pby, px, py, kslop, bs;
    int flag, xDirflag=0,yDirflag=0;
    const double smallp = 1e-10;
    x1=x;
    y1=20.2;
    x2=20.2;
    y2=y;

    for(j=0; j <= NumberPoint - 1; j++)
    {
        if(j == NumberPoint - 1)
        {
            if(fabs(wallpnt[j].y - wallpnt[0].y) < smallp )
            {
                if((wallpnt[0].x - x) * (wallpnt[j].x - x) +1.0 <= 1.0)
                {
                    if(fabs(wallpnt[j].y - y) < smallp )
                    { 
                        flag=2; 
                        return flag;
                    }
                }
            }
            else if(fabs(wallpnt[j].x - wallpnt[0].x) < smallp )
            {
                if((wallpnt[0].y - y) * (wallpnt[j].y - y) +1.0<= 1.0)
                {
                    if(fabs(wallpnt[j].x - x) < smallp )
                    { 
                        flag=2; 
                        return flag;
                    }
                }
            }
            else
            {
                kslop = (wallpnt[0].y-wallpnt[j].y)/(wallpnt[0].x-wallpnt[j].x);
                bs = wallpnt[j].y - kslop * wallpnt[j].x; 
                if((wallpnt[0].x - x) * (wallpnt[j].x - x) +1.0<= 1.0 
                    && fabs(y - kslop * x - bs) < smallp ) 
                {
                    flag=2;
                    return flag;
                }
            }

            dls1 = (wallpnt[j].x - x1) * (wallpnt[0].x - x1);

            nx = wallpnt[0].y - wallpnt[j].y;
            ny = -(wallpnt[0].x - wallpnt[j].x);
            px = 0.5 * (wallpnt[0].x + wallpnt[j].x);
            py = 0.5 * (wallpnt[0].y + wallpnt[j].y);
        }
        else
        { 
            if(fabs(wallpnt[j].y - wallpnt[j+1].y) < smallp )
            {
                if((wallpnt[j+1].x - x) * (wallpnt[j].x - x) +1.0<= 1.0)
                {
                    if(fabs(wallpnt[j].y - y) < smallp )
                    { 
                        flag=2; 
                        return flag;
                    }
                }
            }
            else if(fabs(wallpnt[j].x - wallpnt[j+1].x) < smallp )
            {
                if((wallpnt[j+1].y - y) * (wallpnt[j].y - y) +1.0<= 1.0)
                {
                    if(fabs(wallpnt[j].x - x) < smallp )
                    { 
                        flag=2; 
                        return flag;
                    }
                }
            }
            else
            {
                kslop = (wallpnt[j+1].y-wallpnt[j].y)/(wallpnt[j+1].x-wallpnt[j].x);
                bs = wallpnt[j].y - kslop * wallpnt[j].x; 
                if((wallpnt[j+1].x - x) * (wallpnt[j].x - x) +1.0<= 1.0 
                    && fabs(y - kslop * x - bs) < smallp ) 
                {
                    flag=2;
                    return flag;
                }
            }

            dls1 = (wallpnt[j].x - x1) * (wallpnt[j+1].x - x1);

            nx = wallpnt[j+1].y - wallpnt[j].y;
            ny = -(wallpnt[j+1].x - wallpnt[j].x);
            px = 0.5 * (wallpnt[j+1].x + wallpnt[j].x);
            py = 0.5 * (wallpnt[j+1].y + wallpnt[j].y);
        }

        pax = x - px;
        pay = y - py;
        pbx = x1 - px;
        pby = y1 - py;

        dls2 = (nx * pax + ny * pay) * (nx * pbx + ny * pby);

        if (dls1 <= 0.0 && dls2 <= 0.0) yDirflag++;
    }

    if(yDirflag % 2 == 0) flag = 0;
    else flag = -1;
    return flag;
}

// Assembly:
subq $0x48, %rsp
movsd %xmm0, 0x38(%rsp)
movsd %xmm1, 0x30(%rsp)
movl %edi, 0x2c(%rsp)
movq %rsi, 0x20(%rsp)
movl $0x0, -0x70(%rsp)
movl $0x0, -0x74(%rsp)
movsd 0x291df(%rip), %xmm0    # 0x3f410
movsd %xmm0, -0x80(%rsp)
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x291bd(%rip), %xmm0    # 0x3f408
movsd %xmm0, 0x8(%rsp)
movsd 0x291af(%rip), %xmm0    # 0x3f408
movsd %xmm0, (%rsp)
movsd 0x30(%rsp), %xmm0
movsd %xmm0, -0x8(%rsp)
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl 0x2c(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jg 0x16c10
movl 0x1c(%rsp), %eax
movl 0x2c(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x1668e
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm1
movq 0x20(%rsp), %rax
subsd 0x8(%rax), %xmm1
movaps 0x28f41(%rip), %xmm0    # 0x3f200
pand %xmm0, %xmm1
movsd 0x29145(%rip), %xmm0    # 0x3f410
ucomisd %xmm1, %xmm0
jbe 0x1636e
movq 0x20(%rsp), %rax
movsd (%rax), %xmm1
subsd 0x38(%rsp), %xmm1
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
subsd 0x38(%rsp), %xmm0
mulsd %xmm0, %xmm1
movsd 0x28d4d(%rip), %xmm0    # 0x3f058
addsd %xmm0, %xmm1
movsd 0x28d41(%rip), %xmm0    # 0x3f058
ucomisd %xmm1, %xmm0
jb 0x16369
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm1
subsd 0x30(%rsp), %xmm1
movaps 0x28ec0(%rip), %xmm0    # 0x3f200
pand %xmm0, %xmm1
movsd 0x290c4(%rip), %xmm0    # 0x3f410
ucomisd %xmm1, %xmm0
jbe 0x16367
movl $0x2, -0x6c(%rsp)
movl -0x6c(%rsp), %eax
movl %eax, 0x44(%rsp)
jmp 0x16c3b
jmp 0x16369
jmp 0x16592
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm1
movq 0x20(%rsp), %rax
subsd (%rax), %xmm1
movaps 0x28e6d(%rip), %xmm0    # 0x3f200
pand %xmm0, %xmm1
movsd 0x29071(%rip), %xmm0    # 0x3f410
ucomisd %xmm1, %xmm0
jbe 0x16443
movq 0x20(%rsp), %rax
movsd 0x8(%rax), %xmm1
subsd 0x30(%rsp), %xmm1
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
subsd 0x30(%rsp), %xmm0
mulsd %xmm0, %xmm1
movsd 0x28c77(%rip), %xmm0    # 0x3f058
addsd %xmm0, %xmm1
movsd 0x28c6b(%rip), %xmm0    # 0x3f058
ucomisd %xmm1, %xmm0
jb 0x1643e
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm1
subsd 0x38(%rsp), %xmm1
movaps 0x28deb(%rip), %xmm0    # 0x3f200
pand %xmm0, %xmm1
movsd 0x28fef(%rip), %xmm0    # 0x3f410
ucomisd %xmm1, %xmm0
jbe 0x1643c
movl $0x2, -0x6c(%rsp)
movl -0x6c(%rsp), %eax
movl %eax, 0x44(%rsp)
jmp 0x16c3b
jmp 0x1643e
jmp 0x16590
movq 0x20(%rsp), %rax
movsd 0x8(%rax), %xmm0
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
subsd 0x8(%rax), %xmm0
movq 0x20(%rsp), %rax
movsd (%rax), %xmm1
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
subsd (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rsp)
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm1
movsd -0x60(%rsp), %xmm0
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rsp)
movq 0x20(%rsp), %rax
movsd (%rax), %xmm1
subsd 0x38(%rsp), %xmm1
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
subsd 0x38(%rsp), %xmm0
mulsd %xmm0, %xmm1
movsd 0x28b41(%rip), %xmm0    # 0x3f058
addsd %xmm0, %xmm1
movsd 0x28b35(%rip), %xmm0    # 0x3f058
ucomisd %xmm1, %xmm0
jb 0x1658e
movsd 0x30(%rsp), %xmm0
movsd -0x60(%rsp), %xmm1
movsd 0x38(%rsp), %xmm2
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
subsd -0x68(%rsp), %xmm1
movaps 0x28c99(%rip), %xmm0    # 0x3f200
pand %xmm0, %xmm1
movsd 0x28e9d(%rip), %xmm0    # 0x3f410
ucomisd %xmm1, %xmm0
jbe 0x1658e
movl $0x2, -0x6c(%rsp)
movl -0x6c(%rsp), %eax
movl %eax, 0x44(%rsp)
jmp 0x16c3b
jmp 0x16590
jmp 0x16592
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
subsd 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
movsd (%rax), %xmm1
subsd 0x10(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rsp)
movq 0x20(%rsp), %rax
movsd 0x8(%rax), %xmm0
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
subsd 0x8(%rax), %xmm0
movsd %xmm0, -0x20(%rsp)
movq 0x20(%rsp), %rax
movsd (%rax), %xmm0
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
subsd (%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x28(%rsp)
movq 0x20(%rsp), %rax
movsd (%rax), %xmm1
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addsd (%rax), %xmm1
movsd 0x28af3(%rip), %xmm0    # 0x3f140
mulsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rsp)
movq 0x20(%rsp), %rax
movsd 0x8(%rax), %xmm1
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addsd 0x8(%rax), %xmm1
movsd 0x28ac1(%rip), %xmm0    # 0x3f140
mulsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rsp)
jmp 0x16b4b
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm1
movq 0x20(%rsp), %rax
movl 0x1c(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
subsd 0x8(%rax), %xmm1
movaps 0x28b3a(%rip), %xmm0    # 0x3f200
pand %xmm0, %xmm1
movsd 0x28d3e(%rip), %xmm0    # 0x3f410
ucomisd %xmm1, %xmm0
jbe 0x16786
movq 0x20(%rsp), %rax
movl 0x1c(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm1
subsd 0x38(%rsp), %xmm1
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
subsd 0x38(%rsp), %xmm0
mulsd %xmm0, %xmm1
movsd 0x28935(%rip), %xmm0    # 0x3f058
addsd %xmm0, %xmm1
movsd 0x28929(%rip), %xmm0    # 0x3f058
ucomisd %xmm1, %xmm0
jb 0x16781
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm1
subsd 0x30(%rsp), %xmm1
movaps 0x28aa8(%rip), %xmm0    # 0x3f200
pand %xmm0, %xmm1
movsd 0x28cac(%rip), %xmm0    # 0x3f410
ucomisd %xmm1, %xmm0
jbe 0x1677f
movl $0x2, -0x6c(%rsp)
movl -0x6c(%rsp), %eax
movl %eax, 0x44(%rsp)
jmp 0x16c3b
jmp 0x16781
jmp 0x169ff
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm1
movq 0x20(%rsp), %rax
movl 0x1c(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
subsd (%rax), %xmm1
movaps 0x28a44(%rip), %xmm0    # 0x3f200
pand %xmm0, %xmm1
movsd 0x28c48(%rip), %xmm0    # 0x3f410
ucomisd %xmm1, %xmm0
jbe 0x1687d
movq 0x20(%rsp), %rax
movl 0x1c(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm1
subsd 0x30(%rsp), %xmm1
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
subsd 0x30(%rsp), %xmm0
mulsd %xmm0, %xmm1
movsd 0x2883d(%rip), %xmm0    # 0x3f058
addsd %xmm0, %xmm1
movsd 0x28831(%rip), %xmm0    # 0x3f058
ucomisd %xmm1, %xmm0
jb 0x16878
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm1
subsd 0x38(%rsp), %xmm1
movaps 0x289b1(%rip), %xmm0    # 0x3f200
pand %xmm0, %xmm1
movsd 0x28bb5(%rip), %xmm0    # 0x3f410
ucomisd %xmm1, %xmm0
jbe 0x16876
movl $0x2, -0x6c(%rsp)
movl -0x6c(%rsp), %eax
movl %eax, 0x44(%rsp)
jmp 0x16c3b
jmp 0x16878
jmp 0x169fd
movq 0x20(%rsp), %rax
movl 0x1c(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
subsd 0x8(%rax), %xmm0
movq 0x20(%rsp), %rax
movl 0x1c(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm1
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
subsd (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rsp)
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm1
movsd -0x60(%rsp), %xmm0
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rsp)
movq 0x20(%rsp), %rax
movl 0x1c(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm1
subsd 0x38(%rsp), %xmm1
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
subsd 0x38(%rsp), %xmm0
mulsd %xmm0, %xmm1
movsd 0x286d4(%rip), %xmm0    # 0x3f058
addsd %xmm0, %xmm1
movsd 0x286c8(%rip), %xmm0    # 0x3f058
ucomisd %xmm1, %xmm0
jb 0x169fb
movsd 0x30(%rsp), %xmm0
movsd -0x60(%rsp), %xmm1
movsd 0x38(%rsp), %xmm2
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
subsd -0x68(%rsp), %xmm1
movaps 0x2882c(%rip), %xmm0    # 0x3f200
pand %xmm0, %xmm1
movsd 0x28a30(%rip), %xmm0    # 0x3f410
ucomisd %xmm1, %xmm0
jbe 0x169fb
movl $0x2, -0x6c(%rsp)
movl -0x6c(%rsp), %eax
movl %eax, 0x44(%rsp)
jmp 0x16c3b
jmp 0x169fd
jmp 0x169ff
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
subsd 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
movl 0x1c(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm1
subsd 0x10(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rsp)
movq 0x20(%rsp), %rax
movl 0x1c(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
subsd 0x8(%rax), %xmm0
movsd %xmm0, -0x20(%rsp)
movq 0x20(%rsp), %rax
movl 0x1c(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
subsd (%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x28(%rsp)
movq 0x20(%rsp), %rax
movl 0x1c(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm1
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addsd (%rax), %xmm1
movsd 0x28642(%rip), %xmm0    # 0x3f140
mulsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rsp)
movq 0x20(%rsp), %rax
movl 0x1c(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm1
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addsd 0x8(%rax), %xmm1
movsd 0x285ff(%rip), %xmm0    # 0x3f140
mulsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rsp)
movsd 0x38(%rsp), %xmm0
subsd -0x50(%rsp), %xmm0
movsd %xmm0, -0x30(%rsp)
movsd 0x30(%rsp), %xmm0
subsd -0x58(%rsp), %xmm0
movsd %xmm0, -0x38(%rsp)
movsd 0x10(%rsp), %xmm0
subsd -0x50(%rsp), %xmm0
movsd %xmm0, -0x40(%rsp)
movsd 0x8(%rsp), %xmm0
subsd -0x58(%rsp), %xmm0
movsd %xmm0, -0x48(%rsp)
movsd -0x20(%rsp), %xmm0
movsd -0x30(%rsp), %xmm2
movsd -0x28(%rsp), %xmm1
mulsd -0x38(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd -0x20(%rsp), %xmm1
movsd -0x40(%rsp), %xmm3
movsd -0x28(%rsp), %xmm2
mulsd -0x48(%rsp), %xmm2
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rsp)
xorps %xmm0, %xmm0
ucomisd -0x10(%rsp), %xmm0
jb 0x16bfe
xorps %xmm0, %xmm0
ucomisd -0x18(%rsp), %xmm0
jb 0x16bfe
movl -0x74(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rsp)
jmp 0x16c00
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x16272
movl -0x74(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x16c2b
movl $0x0, -0x6c(%rsp)
jmp 0x16c33
movl $0xffffffff, -0x6c(%rsp) # imm = 0xFFFFFFFF
movl -0x6c(%rsp), %eax
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
nop