// File: intheswim[P]FractalTubes/m3d.cpp
// Function: M3DDrawer::ShowInPreviewWindow(ShapeParams*, DrawParams*, pointData**, corePointData**)
bool M3DDrawer::ShowInPreviewWindow (struct ShapeParams *sp, struct DrawParams *dp,
                                     struct pointData ** pointData,
                                     struct corePointData ** corePoints)
{
	double x_real, y_real, z_real;
	unsigned long raw_color = 0;
	int mandel = 0, fraction = 0;
	double l = sp->l, r = sp->r;
	long col = 0;
	double y_median = sp->y_range / 2;
	int red, green, blue;
    
	float bright = 0, bright0 = 0; // brightness
	long double y1 = 0, alp = 0;
    
#ifdef USE_RUNTIME
	double tilt = set_tilt;
	double cos_tilt, sin_tilt;
#endif

    //	struct MiniMax minimax;
	double slope = atan (sp->y_range / (sp->alpha_range * sp->r));
	double x_norm, y_norm, z_norm;
    
	// trying to allocate space for 640*350=224000 pixels
	// space is neccesary to store z-cordinates
    
    double light_x = light_dir_x, light_y = light_dir_y, light_z = light_dir_z;
    
    double normalizer = sqrt (light_x * light_x + light_y * light_y + light_z * light_z);
	light_x /= normalizer;
	light_y /= normalizer;
	light_z /= normalizer;
    
#ifdef USE_RUNTIME
	  cos_tilt = cos (tilt);
	  sin_tilt = sin (tilt);
#endif
    
	SetMaterialType (moBoth) ; //Metal);    
    
	divisor = sqrt (800.0f * 600.0f / ((client_width) * (client_height)));
    
	sp->r /= divisor;
	sp->l /= divisor;
	sp->y_range /= divisor;
	y_median = y_median / divisor;
	l = sp->l, r = sp->r;
    
	SetGlobals (sp, dp);
        
	pix_count = 0;
    
    *pointData = new struct pointData [sp->total_points];
    
    long core_total = (sp->total_points/m_points_in_cycle);
    
    *corePoints = new struct corePointData [core_total];
    
    if (pointData == NULL || corePoints == NULL)
    {
        m_total_points = 0;
		    return (false);
    }
    
    memset(*corePoints, 0, sizeof(struct corePointData) * core_total);
        
    pix_count = 0;
    
    int core_cnt = 0;
    
    // initial y1 is 0;
    // r is
	while ((alp < sp->alpha_range) && (pix_count < sp->total_points))
    {
        long double alp2 = (((int)(pix_count / m_points_in_cycle)) * m_points_in_cycle) * sp->delta_alpha;
        
        long double beta = (pix_count % m_points_in_cycle) * (sp->delta_alpha * sp->coef);
        
        y1 = ((pix_count / m_points_in_cycle) * m_points_in_cycle) * sp->delta_y;
        
        GetPixelCoordinates (y1, r, l, alp2, beta, sp->coef, slope,
                             x_real, y_real, z_real,
                             x_norm, y_norm, z_norm);
        
        struct pointData *pd = &((*pointData)[pix_count]);
        
        if ((pix_count % m_points_in_cycle) == 0 /*half_cycle*/ && (core_cnt < core_total))
        {
            struct corePointData * cpd = &((*corePoints)[core_cnt]);
            
            alp2 = ((((pix_count / m_points_in_cycle) + 0.5f) * (double)m_points_in_cycle) + 0.5f) * sp->delta_alpha;
            
            //double extra = 0.5f / m_points_in_cycle;
            
            y1 = ((((pix_count / m_points_in_cycle) + 0.5f) * (double)m_points_in_cycle) + 0.5f) * sp->delta_y;
            
            double x_real2, y_real2, z_real2;
            double x_norm2, y_norm2, z_norm2;
            
            GetPixelCoordinates (y1, r, l, alp2, 0, sp->coef, slope,
                                 x_real2, y_real2, z_real2,
                                 x_norm2, y_norm2, z_norm2);

            
            cpd->x = (x_real2 - x_norm2 * l) / r;
            cpd->y = (y_real2 - y_norm2 * l) / r;
            cpd->z = (z_real2 - z_norm2 * l) / r;
            
            cpd->index = (int)pix_count;
            
            core_cnt++;
        }
        
        pd->x = x_real / (r);
        pd->y = y_real / (r);
        pd->z = z_real / (r);
        
        pd->normx = x_norm;
        pd->normy = y_norm;
        pd->normz = z_norm;        
                
        if (true)
        {            
            if (bright_k == 1)
            {
                bright0 = CalcBrightness (light_x, light_y, light_z, x_norm, y_norm, z_norm, 0, 0, 1);
            }
            else
            {
                bright0 = 50;
            }            
            
            // all following manipulations are to smooth the surface:
            // if actual brightness is too high, part of it goes as a bonus
            // to the next point
            
            bright += bright0;
            
            if (bright > 0)
            {
                col = (int)(bright + 0.5);
                
                if (col > 150)
                    col = 150;
                
                // SetPixel(hdc, xs, ys, color);
                if (dp->method == dmOnePoint)
                {
                    raw_color = GetMandelColor (*dp, *sp, alp, alp * sp->coef + alp * currentParams.skew, mandel, fraction);
                }
                else
                {
                    raw_color = GetMandelColor3 (*dp, *sp, alp, alp * sp->coef + alp * currentParams.skew, mandel, fraction);
                }
                
                GetColor (raw_color, col, red, green, blue);
                                
                if (raw_color != 0)
                {                    
                    pd->ucRed = red ;
                    pd->ucBlue = blue ;
                    pd->ucGreen = green ;
                }
                else
                {
                    pd->ucRed = 0;
                    pd->ucBlue = 0;
                    pd->ucGreen = 0;
                }
            }
            bright-=col;
        }
        
        y1 += sp->delta_y ;
        alp += sp->delta_alpha ;
        pix_count++;
    }
    
	pix_count = 0;

    return (true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movq $0x0, -0x50(%rbp)
movl $0x0, -0x54(%rbp)
movl $0x0, -0x58(%rbp)
movq -0x18(%rbp), %rax
movsd 0x48(%rax), %xmm0
movsd %xmm0, -0x60(%rbp)
movq -0x18(%rbp), %rax
movsd 0x40(%rax), %xmm0
movsd %xmm0, -0x68(%rbp)
movq $0x0, -0x70(%rbp)
movq -0x18(%rbp), %rax
movsd 0x10(%rax), %xmm0
movsd 0x4edb(%rip), %xmm1     # 0xe260
mulsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
movl $0x0, -0x88(%rbp)
movl $0x0, -0x8c(%rbp)
fldz
fld %st(0)
fstpt -0xa0(%rbp)
fstpt -0xb0(%rbp)
movq -0x18(%rbp), %rax
movsd 0x10(%rax), %xmm0
movq -0x18(%rbp), %rax
movsd 0x18(%rax), %xmm1
movq -0x18(%rbp), %rax
mulsd 0x40(%rax), %xmm1
divsd %xmm1, %xmm0
callq 0x3310
movq -0x1a0(%rbp), %rax
movsd %xmm0, -0xb8(%rbp)
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0xd8(%rbp)
movsd 0x18(%rax), %xmm0
movsd %xmm0, -0xe0(%rbp)
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0xe8(%rbp)
movsd -0xd8(%rbp), %xmm1
movsd -0xd8(%rbp), %xmm2
movsd -0xe0(%rbp), %xmm0
mulsd -0xe0(%rbp), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0xe8(%rbp), %xmm0
movsd -0xe8(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x32a0
movq -0x1a0(%rbp), %rdi
movsd %xmm0, -0xf0(%rbp)
movsd -0xf0(%rbp), %xmm1
movsd -0xd8(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0xd8(%rbp)
movsd -0xf0(%rbp), %xmm1
movsd -0xe0(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0xe0(%rbp)
movsd -0xf0(%rbp), %xmm1
movsd -0xe8(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0xe8(%rbp)
movl $0x2, %esi
callq 0xa050
movq -0x1a0(%rbp), %rax
movss 0x30(%rax), %xmm1
mulss 0x34(%rax), %xmm1
movss 0x4eed(%rip), %xmm0     # 0xe3c4
divss %xmm1, %xmm0
callq 0x6880
movq -0x1a0(%rbp), %rdi
movss %xmm0, 0x38(%rdi)
movss 0x38(%rdi), %xmm0
cvtss2sd %xmm0, %xmm1
movq -0x18(%rbp), %rax
movsd 0x40(%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rax)
movss 0x38(%rdi), %xmm0
cvtss2sd %xmm0, %xmm1
movq -0x18(%rbp), %rax
movsd 0x48(%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x48(%rax)
movss 0x38(%rdi), %xmm0
cvtss2sd %xmm0, %xmm1
movq -0x18(%rbp), %rax
movsd 0x10(%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rax)
movsd -0x78(%rbp), %xmm0
movss 0x38(%rdi), %xmm1
cvtss2sd %xmm1, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
movq -0x18(%rbp), %rax
movsd 0x48(%rax), %xmm0
movsd %xmm0, -0x60(%rbp)
movq -0x18(%rbp), %rax
movsd 0x40(%rax), %xmm0
movsd %xmm0, -0x68(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x9d30
movq -0x1a0(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl $0x38, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq -0x1a0(%rbp), %rcx
movq %rax, %rdx
movq -0x28(%rbp), %rax
movq %rdx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movslq 0x60(%rcx), %rcx
cqto
idivq %rcx
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
movl $0x28, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x28(%rbp)
je 0x961c
cmpq $0x0, -0x30(%rbp)
jne 0x9634
movq -0x1a0(%rbp), %rax
movq $0x0, 0x58(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x9d1a
movq -0x30(%rbp), %rax
movq (%rax), %rdi
imulq $0x28, -0xf8(%rbp), %rdx
xorl %esi, %esi
callq 0x3190
movq -0x1a0(%rbp), %rax
movq $0x0, 0x40(%rax)
movl $0x0, -0xfc(%rbp)
fldt -0xb0(%rbp)
movq -0x18(%rbp), %rax
fldl 0x18(%rax)
xorl %eax, %eax
fucompi %st(1), %st
fstp %st(0)
movb %al, -0x1a1(%rbp)
jbe 0x969b
jmp 0x9680
movq -0x1a0(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
setl %al
movb %al, -0x1a1(%rbp)
movb -0x1a1(%rbp), %al
testb $0x1, %al
jne 0x96aa
jmp 0x9d07
movq -0x1a0(%rbp), %rdi
movq 0x40(%rdi), %rax
movslq 0x60(%rdi), %rsi
movl %esi, %ecx
cqto
idivq %rsi
imull %ecx, %eax
movl %eax, -0x174(%rbp)
fildl -0x174(%rbp)
movq -0x18(%rbp), %rax
fldt 0x30(%rax)
fmulp %st, %st(1)
fstpt -0x110(%rbp)
movq 0x40(%rdi), %rax
movslq 0x60(%rdi), %rcx
cqto
idivq %rcx
movq %rdx, -0x170(%rbp)
fildll -0x170(%rbp)
movq -0x18(%rbp), %rax
fldt 0x30(%rax)
fldt 0x50(%rax)
fmulp %st, %st(1)
fmulp %st, %st(1)
fstpt -0x120(%rbp)
movq 0x40(%rdi), %rax
movslq 0x60(%rdi), %rcx
cqto
idivq %rcx
imulq %rcx, %rax
movq %rax, -0x168(%rbp)
fildll -0x168(%rbp)
movq -0x18(%rbp), %rax
fldt 0x20(%rax)
fmulp %st, %st(1)
fstpt -0xa0(%rbp)
fldt -0xa0(%rbp)
fstpl -0x180(%rbp)
movsd -0x180(%rbp), %xmm0
movsd -0x68(%rbp), %xmm1
movsd -0x60(%rbp), %xmm2
fldt -0x110(%rbp)
fldt -0x120(%rbp)
movq -0x18(%rbp), %rax
fldt 0x50(%rax)
movsd -0xb8(%rbp), %xmm3
movq %rsp, %rax
leaq -0xd0(%rbp), %rcx
movq %rcx, 0x30(%rax)
fstpt 0x20(%rax)
fstpt 0x10(%rax)
fstpt (%rax)
leaq -0x38(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq -0x48(%rbp), %rcx
leaq -0xc0(%rbp), %r8
leaq -0xc8(%rbp), %r9
callq 0xa9e0
movq -0x1a0(%rbp), %rcx
movq -0x28(%rbp), %rax
movq (%rax), %rax
imulq $0x38, 0x40(%rcx), %rdx
addq %rdx, %rax
movq %rax, -0x128(%rbp)
movq 0x40(%rcx), %rax
movslq 0x60(%rcx), %rcx
cqto
idivq %rcx
cmpq $0x0, %rdx
jne 0x9a32
movslq -0xfc(%rbp), %rax
cmpq -0xf8(%rbp), %rax
jge 0x9a32
movq -0x1a0(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rax
movslq -0xfc(%rbp), %rcx
leaq (%rcx,%rcx,4), %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, -0x130(%rbp)
movq 0x40(%rdi), %rax
movslq 0x60(%rdi), %rcx
movl %ecx, %edx
movl %edx, -0x1ac(%rbp)
cqto
idivq %rcx
movq %rax, %rcx
movl -0x1ac(%rbp), %eax
cvtsi2ss %rcx, %xmm0
movss 0x4a9e(%rip), %xmm2     # 0xe2dc
addss %xmm2, %xmm0
cvtss2sd %xmm0, %xmm0
cvtsi2sd %eax, %xmm1
mulsd %xmm1, %xmm0
movsd 0x4a0a(%rip), %xmm1     # 0xe260
addsd %xmm1, %xmm0
movsd %xmm0, -0x188(%rbp)
fldl -0x188(%rbp)
movq -0x18(%rbp), %rax
fldt 0x30(%rax)
fmulp %st, %st(1)
fstpt -0x110(%rbp)
movq 0x40(%rdi), %rax
movslq 0x60(%rdi), %rcx
movl %ecx, %edx
movl %edx, -0x1a8(%rbp)
cqto
idivq %rcx
movq %rax, %rcx
movl -0x1a8(%rbp), %eax
cvtsi2ss %rcx, %xmm0
addss %xmm2, %xmm0
cvtss2sd %xmm0, %xmm0
cvtsi2sd %eax, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x190(%rbp)
fldl -0x190(%rbp)
movq -0x18(%rbp), %rax
fldt 0x20(%rax)
fmulp %st, %st(1)
fstpt -0xa0(%rbp)
fldt -0xa0(%rbp)
fstpl -0x198(%rbp)
movsd -0x198(%rbp), %xmm0
movsd -0x68(%rbp), %xmm1
movsd -0x60(%rbp), %xmm2
fldt -0x110(%rbp)
movq -0x18(%rbp), %rax
fldt 0x50(%rax)
movsd -0xb8(%rbp), %xmm3
movq %rsp, %rax
leaq -0x160(%rbp), %rcx
movq %rcx, 0x30(%rax)
fstpt 0x20(%rax)
fldz
fstpt 0x10(%rax)
fstpt (%rax)
leaq -0x138(%rbp), %rsi
leaq -0x140(%rbp), %rdx
leaq -0x148(%rbp), %rcx
leaq -0x150(%rbp), %r8
leaq -0x158(%rbp), %r9
callq 0xa9e0
movq -0x1a0(%rbp), %rax
movsd -0x138(%rbp), %xmm1
movsd -0x150(%rbp), %xmm0
movsd -0x60(%rbp), %xmm2
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
divsd -0x68(%rbp), %xmm0
movq -0x130(%rbp), %rcx
movsd %xmm0, (%rcx)
movsd -0x140(%rbp), %xmm1
movsd -0x158(%rbp), %xmm0
movsd -0x60(%rbp), %xmm2
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
divsd -0x68(%rbp), %xmm0
movq -0x130(%rbp), %rcx
movsd %xmm0, 0x8(%rcx)
movsd -0x148(%rbp), %xmm1
movsd -0x160(%rbp), %xmm0
movsd -0x60(%rbp), %xmm2
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
divsd -0x68(%rbp), %xmm0
movq -0x130(%rbp), %rcx
movsd %xmm0, 0x10(%rcx)
movq 0x40(%rax), %rax
movl %eax, %ecx
movq -0x130(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0xfc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xfc(%rbp)
movq -0x1a0(%rbp), %rax
movsd -0x38(%rbp), %xmm0
divsd -0x68(%rbp), %xmm0
movq -0x128(%rbp), %rcx
movsd %xmm0, 0x8(%rcx)
movsd -0x40(%rbp), %xmm0
divsd -0x68(%rbp), %xmm0
movq -0x128(%rbp), %rcx
movsd %xmm0, 0x10(%rcx)
movsd -0x48(%rbp), %xmm0
divsd -0x68(%rbp), %xmm0
movq -0x128(%rbp), %rcx
movsd %xmm0, 0x18(%rcx)
movsd -0xc0(%rbp), %xmm0
movq -0x128(%rbp), %rcx
movsd %xmm0, 0x20(%rcx)
movsd -0xc8(%rbp), %xmm0
movq -0x128(%rbp), %rcx
movsd %xmm0, 0x28(%rcx)
movsd -0xd0(%rbp), %xmm0
movq -0x128(%rbp), %rcx
movsd %xmm0, 0x30(%rcx)
cmpl $0x1, 0x64(%rax)
jne 0x9b30
movq -0x1a0(%rbp), %rdi
movsd -0xd8(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movsd -0xe0(%rbp), %xmm1
cvtsd2ss %xmm1, %xmm1
movsd -0xe8(%rbp), %xmm2
cvtsd2ss %xmm2, %xmm2
movsd -0xc0(%rbp), %xmm3
cvtsd2ss %xmm3, %xmm3
movsd -0xc8(%rbp), %xmm4
cvtsd2ss %xmm4, %xmm4
movsd -0xd0(%rbp), %xmm5
cvtsd2ss %xmm5, %xmm5
xorps %xmm7, %xmm7
movss 0x47c8(%rip), %xmm8     # 0xe2e0
movaps %xmm7, %xmm6
movss %xmm8, (%rsp)
callq 0xaca0
movss %xmm0, -0x8c(%rbp)
jmp 0x9b40
movss 0x4890(%rip), %xmm0     # 0xe3c8
movss %xmm0, -0x8c(%rbp)
movss -0x8c(%rbp), %xmm0
addss -0x88(%rbp), %xmm0
movss %xmm0, -0x88(%rbp)
movss -0x88(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x9cab
movss -0x88(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x46e0(%rip), %xmm1     # 0xe260
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
cltq
movq %rax, -0x70(%rbp)
cmpq $0x96, -0x70(%rbp)
jle 0x9ba0
movq $0x96, -0x70(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0xb8(%rax)
jne 0x9bf2
movq -0x1a0(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
fldt -0xb0(%rbp)
fld %st(0)
fld %st(1)
fldt 0x50(%rdx)
flds 0x9a19(%rip)            # 0x135e8
fmulp %st, %st(4)
fmulp %st, %st(1)
faddp %st, %st(2)
movq %rsp, %rax
fxch %st(1)
fstpt 0x10(%rax)
fstpt (%rax)
leaq -0x54(%rbp), %rcx
leaq -0x58(%rbp), %r8
callq 0xa0e0
movq %rax, -0x50(%rbp)
jmp 0x9c35
movq -0x1a0(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
fldt -0xb0(%rbp)
fld %st(0)
fld %st(1)
fldt 0x50(%rdx)
flds 0x99d4(%rip)            # 0x135e8
fmulp %st, %st(4)
fmulp %st, %st(1)
faddp %st, %st(2)
movq %rsp, %rax
fxch %st(1)
fstpt 0x10(%rax)
fstpt (%rax)
leaq -0x54(%rbp), %rcx
leaq -0x58(%rbp), %r8
callq 0xa2c0
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
movq -0x70(%rbp), %rsi
leaq -0x7c(%rbp), %rdx
leaq -0x80(%rbp), %rcx
leaq -0x84(%rbp), %r8
callq 0xaef0
cmpq $0x0, -0x50(%rbp)
je 0x9c89
movl -0x7c(%rbp), %eax
movb %al, %cl
movq -0x128(%rbp), %rax
movb %cl, (%rax)
movl -0x84(%rbp), %eax
movb %al, %cl
movq -0x128(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x80(%rbp), %eax
movb %al, %cl
movq -0x128(%rbp), %rax
movb %cl, 0x1(%rax)
jmp 0x9ca9
movq -0x128(%rbp), %rax
movb $0x0, (%rax)
movq -0x128(%rbp), %rax
movb $0x0, 0x2(%rax)
movq -0x128(%rbp), %rax
movb $0x0, 0x1(%rax)
jmp 0x9cab
movq -0x1a0(%rbp), %rax
cvtsi2ssq -0x70(%rbp), %xmm1
movss -0x88(%rbp), %xmm0
subss %xmm1, %xmm0
movss %xmm0, -0x88(%rbp)
movq -0x18(%rbp), %rcx
fldt 0x20(%rcx)
fldt -0xa0(%rbp)
faddp %st, %st(1)
fstpt -0xa0(%rbp)
movq -0x18(%rbp), %rcx
fldt 0x30(%rcx)
fldt -0xb0(%rbp)
faddp %st, %st(1)
fstpt -0xb0(%rbp)
movq 0x40(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x40(%rax)
jmp 0x9663
movq -0x1a0(%rbp), %rax
movq $0x0, 0x40(%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
nopl (%rax,%rax)