// File: /workspace/github_cpp_makefile_star2_O1/intheswim[P]FractalTubes/m3d.cpp
// Function: M3DDrawer::InitRotationArray()
void M3DDrawer::InitRotationArray (void)
{
	const int in_rotation = PRESET_COUNT ;

	rotationArray = new struct DrawParams [in_rotation];
	spArray = new struct ShapeParams [in_rotation];
    
	memcpy (&spArray[0], &defShapeParams, sizeof (struct ShapeParams));
	memcpy (&rotationArray[0], &defParams, sizeof (struct DrawParams));
    
	memcpy (&spArray[1], &defShapeParams, sizeof (struct ShapeParams));
	memcpy (&spArray[2], &defShapeParams, sizeof (struct ShapeParams));
	memcpy (&spArray[3], &defShapeParams, sizeof (struct ShapeParams));
	memcpy (&spArray[4], &defShapeParams, sizeof (struct ShapeParams));
    
	//leave as is
	//********************************************************************
	memcpy (&rotationArray[1], &defParams, sizeof (struct DrawParams));
    
	// this one is julia set (picture #2)
	rotationArray[1].xCenter = -0.171035469619938; //0.0300786343590521;
	rotationArray[1].yCenter = -0.318802963959513; //0.520811231249443;
	rotationArray[1].xRadius = 0.000583506991765284; //7.3510528665225e-008;
    
	rotationArray[1].xCenter2 = -rotationArray[1].xCenter;
	rotationArray[1].yCenter2 = -rotationArray[1].yCenter;
	rotationArray[1].xRadius2 = rotationArray[1].xRadius;
    
    //	rotationArray[1].base = 0.94;
	rotationArray[1].method = dmTwoPoints;
    rotationArray[1].juliaSet = true;
	rotationArray[1].max_radius = 0.99;
	spArray[1].alpha_range = 5;
    
	GetJuliaSetParams (0, rotationArray[1].juliaRe, rotationArray[1].juliaIm);
    
	//********************************************************************
	memcpy (&rotationArray[2], &defParams, sizeof (struct DrawParams));
	rotationArray[2].xCenter = -1.0013121704951;
	rotationArray[2].yCenter = -0.304196021963963;
	rotationArray[2].xRadius = 1.0e-008;
    //	rotationArray[2].base = 0.91;
	rotationArray[2].method = dmOnePoint;
	rotationArray[2].xCenter2 = -0.11; //-0.104869104079861;
	rotationArray[2].yCenter2 = 0.0; //-0.92806604397287;
	rotationArray[2].xRadius2 = 0.41; //6e-011;
	rotationArray[2].max_radius = 3; //2.0386550422325;
    
	spArray[2].l = 70; //cx * 7 / 128; //70
	spArray[2].r = 300; //cx * 15 / 64; //300;
	spArray[2].alpha_range /= 1.95;
	spArray[2].y_range = 420; //cy * 21/51;
    
	//spArray[2].delta_y /=1.95;
	//rotationArray[2].stretchRatio /= 1.95;
    
	//********************************************************************
	memcpy (&rotationArray[3], &defParams, sizeof (struct DrawParams));
	spArray[3].l = 80; //cx/16; //80;
	spArray[3].r = 380; //cx * 19/64; //380;
	spArray[3].alpha_range = 2 * M_PI;
	spArray[3].y_range = 1000; //cy/1.024;
	//********************************************************************
	
	memcpy (&rotationArray[4], &defParams, sizeof (struct DrawParams));
    
	rotationArray[4].xCenter = -0.76295980213721;
	rotationArray[4].yCenter = -0.094826839433747;
	rotationArray[4].xRadius = 8.1706250576269e-009;
	rotationArray[4].method = dmTwoPoints;
	rotationArray[4].xCenter2 = -0.76518309844711;
	rotationArray[4].yCenter2 = -0.098669746089906;
	rotationArray[4].xRadius2 = 2.8644189916084e-008;
	rotationArray[4].max_radius = 0.0045964089747317;
    
	spArray[4].l = 70;
	spArray[4].r = 300;
	spArray[4].alpha_range = 1.2 * M_PI;
	spArray[4].y_range = 400;
    
	for (int i = 0; i < in_rotation; i++)
    {
		spArray[i].visible = true;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movl $0x410, %edi            # imm = 0x410
callq 0x3030
movq %rax, %r14
movq %rax, 0x48(%r15)
movl $0x230, %edi            # imm = 0x230
callq 0x3030
movq %rax, %rbx
movq %rax, 0x50(%r15)
leaq 0x6187(%rip), %r12      # 0xc430
movl $0xe, %ecx
movq %rax, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x60a2(%rip), %r15      # 0xc360
movl $0xd0, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3280
leaq 0x70(%rbx), %rdi
movl $0xe, %ecx
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xe0(%rbx), %rdi
movl $0xe, %ecx
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x150(%rbx), %rdi
movl $0xe, %ecx
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x1c0(%rbx), %rdi
movl $0xe, %ecx
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xd0(%r14), %rdi
movl $0xd0, %edx
movq %r15, %rsi
callq 0x3280
fldl 0x30db(%rip)            # 0x9408
fstpt 0x120(%r14)
fldl 0x30d6(%rip)            # 0x9410
fstpt 0x130(%r14)
fldl 0x30d1(%rip)            # 0x9418
fld %st(0)
fstpt 0x140(%r14)
fldl 0x30ca(%rip)            # 0x9420
fstpt 0x150(%r14)
fldl 0x30c5(%rip)            # 0x9428
fstpt 0x160(%r14)
fstpt 0x170(%r14)
movl $0x1, %ebp
movl %ebp, 0x188(%r14)
movb $0x1, 0xd0(%r14)
movabsq $0x3fefae147ae147ae, %rax # imm = 0x3FEFAE147AE147AE
movq %rax, 0x180(%r14)
movabsq $0x4014000000000000, %rax # imm = 0x4014000000000000
movq %rax, 0x88(%rbx)
fldl 0x3083(%rip)            # 0x9430
fstpt 0xe0(%r14)
fldl 0x307e(%rip)            # 0x9438
fstpt 0xf0(%r14)
leaq 0x1a0(%r14), %rdi
movl $0xd0, %edx
movq %r15, %rsi
callq 0x3280
fldl 0x3065(%rip)            # 0x9440
fstpt 0x1f0(%r14)
fldl 0x3060(%rip)            # 0x9448
fstpt 0x200(%r14)
fldl 0x305b(%rip)            # 0x9450
fstpt 0x210(%r14)
movl $0x0, 0x258(%r14)
fldl 0x304b(%rip)            # 0x9458
fstpt 0x220(%r14)
fldz
fstpt 0x230(%r14)
fldl 0x303d(%rip)            # 0x9460
fstpt 0x240(%r14)
movabsq $0x4008000000000000, %rax # imm = 0x4008000000000000
movq %rax, 0x250(%r14)
movabsq $0x4051800000000000, %r12 # imm = 0x4051800000000000
movq %r12, 0x128(%rbx)
movabsq $0x4072c00000000000, %r13 # imm = 0x4072C00000000000
movq %r13, 0x120(%rbx)
movsd 0xf8(%rbx), %xmm0
divsd 0x2ffb(%rip), %xmm0     # 0x9468
movsd %xmm0, 0xf8(%rbx)
movabsq $0x407a400000000000, %rax # imm = 0x407A400000000000
movq %rax, 0xf0(%rbx)
leaq 0x270(%r14), %rdi
movl $0xd0, %edx
movq %r15, %rsi
callq 0x3280
movabsq $0x4054000000000000, %rax # imm = 0x4054000000000000
movq %rax, 0x198(%rbx)
movabsq $0x4077c00000000000, %rax # imm = 0x4077C00000000000
movq %rax, 0x190(%rbx)
movabsq $0x401921fb54442d18, %rax # imm = 0x401921FB54442D18
movq %rax, 0x168(%rbx)
movabsq $0x408f400000000000, %rax # imm = 0x408F400000000000
movq %rax, 0x160(%rbx)
leaq 0x340(%r14), %rdi
movl $0xd0, %edx
movq %r15, %rsi
callq 0x3280
fldl 0x2f78(%rip)            # 0x9470
fstpt 0x390(%r14)
fldl 0x2f73(%rip)            # 0x9478
fstpt 0x3a0(%r14)
fldl 0x2f6e(%rip)            # 0x9480
fstpt 0x3b0(%r14)
movl %ebp, 0x3f8(%r14)
fldl 0x2f62(%rip)            # 0x9488
fstpt 0x3c0(%r14)
fldl 0x2f5d(%rip)            # 0x9490
fstpt 0x3d0(%r14)
fldl 0x2f58(%rip)            # 0x9498
fstpt 0x3e0(%r14)
movabsq $0x3f72d3af239bb416, %rax # imm = 0x3F72D3AF239BB416
movq %rax, 0x3f0(%r14)
movq %r12, 0x208(%rbx)
movq %r13, 0x200(%rbx)
movabsq $0x400e28c731eb6950, %rax # imm = 0x400E28C731EB6950
movq %rax, 0x1d8(%rbx)
movabsq $0x4079000000000000, %rax # imm = 0x4079000000000000
movq %rax, 0x1d0(%rbx)
movl $0x60, %eax
movb $0x1, (%rbx,%rax)
addq $0x70, %rax
cmpq $0x290, %rax            # imm = 0x290
jne 0x658d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq