// File: TBody[P]atomicpp/atomicpp/Spline/BicubicSpline.cpp
// Function: atomicpp::BicubicSpline::calculate_alpha_coeff()
std::vector<std::vector<grid_matrix>> BicubicSpline::calculate_alpha_coeff()
	{
	// For storing the value and derivative data at each grid-point
	// Have to use vector since the array size is non-constant
	int Lx = x_values.size();
	int Ly = y_values.size();

	grid_coeff = calculate_grid_coeff();

	std::vector<std::vector<grid_matrix>>
	alpha_coeff(Lx-1,std::vector<grid_matrix>(Ly-1,default_grid_matrix));

	const grid_matrix prematrix = {{
			{+1, +0, +0, +0},
			{+0, +0, +1, +0},
			{-3, +3, -2, -1},
			{+2, -2, +1, +1},
		}};
	const grid_matrix postmatrix = {{
			{+1, +0, -3, +2},
			{+0, +0, +3, -2},
			{+0, +1, -2, +1},
			{+0, +0, -1, +1},
		}};

	for(int x=0; x<Lx - 1; ++x){ //iterator over temperature dimension of grid, which is of length x_values.size()-1
		for(int y=0; y<Ly - 1; ++y){ //iterator over density dimension of grid, which is of length y_values.size()-1

			// double xs = grid_coeff[x+1][y+0].datapoint.first - grid_coeff[x+0][y+0].datapoint.first;
			// double ys = grid_coeff[x+0][y+1].datapoint.second - grid_coeff[x+0][y+0].datapoint.second;

			grid_matrix f_sub = {{
				{grid_coeff[x+0][y+0].f,   grid_coeff[x+0][y+1].f,   grid_coeff[x+0][y+0].fdy,   grid_coeff[x+0][y+1].fdy},
				{grid_coeff[x+1][y+0].f,   grid_coeff[x+1][y+1].f,   grid_coeff[x+1][y+0].fdy,   grid_coeff[x+1][y+1].fdy},
				{grid_coeff[x+0][y+0].fdx, grid_coeff[x+0][y+1].fdx, grid_coeff[x+0][y+0].fdxdy, grid_coeff[x+0][y+1].fdxdy},
				{grid_coeff[x+1][y+0].fdx, grid_coeff[x+1][y+1].fdx, grid_coeff[x+1][y+0].fdxdy, grid_coeff[x+1][y+1].fdxdy},
			}};


			// grid_coeff submatrix
			grid_matrix alpha_sub = default_grid_matrix;
			
			//Matrix multiply prematrix * f_sub * postmatrix to find alpha_sub
			//As per https://en.wikipedia.org/wiki/Bicubic_interpolation
			for (int i=0; i<4; ++i){
				for(int j=0; j<4; ++j){
					for(int k=0; k<4; ++k){
						for(int l=0; l<4; ++l){
							alpha_sub[i][j] += prematrix[i][l] * f_sub[l][k] * postmatrix[k][j];
						}
					}
				}
			}
			alpha_coeff[x][y] = alpha_sub;
			// if((x==0)and(y==0)){
			// std::printf("f_sub(%d, %d)\n [%f, %f, %f, %f;...\n%f, %f, %f, %f;...\n%f, %f, %f, %f;...\n%f, %f, %f, %f]\n\n",
			// 	x, y, 
			// 	grid_coeff[x+0][y+0].f,      grid_coeff[x+0][y+1].f,      grid_coeff[x+0][y+0].fdy,        grid_coeff[x+0][y+1].fdy,
			// 	grid_coeff[x+1][y+0].f,      grid_coeff[x+1][y+1].f,      grid_coeff[x+1][y+0].fdy,        grid_coeff[x+1][y+1].fdy,
			// 	grid_coeff[x+0][y+0].fdx, grid_coeff[x+0][y+1].fdx, grid_coeff[x+0][y+0].fdxdy, grid_coeff[x+0][y+1].fdxdy,
			// 	grid_coeff[x+1][y+0].fdx, grid_coeff[x+1][y+1].fdx, grid_coeff[x+1][y+0].fdxdy, grid_coeff[x+1][y+1].fdxdy);
			// std::printf("alpha_sub(%d, %d)\n [%f, %f, %f, %f;...\n%f, %f, %f, %f;...\n%f, %f, %f, %f;...\n%f, %f, %f, %f]\n\n",
			// 	x, y, 
			// 	alpha_sub[0][0], alpha_sub[0][1], alpha_sub[0][2], alpha_sub[0][3],
			// 	alpha_sub[1][0], alpha_sub[1][1], alpha_sub[1][2], alpha_sub[1][3],
			// 	alpha_sub[2][0], alpha_sub[2][1], alpha_sub[2][2], alpha_sub[2][3],
			// 	alpha_sub[3][0], alpha_sub[3][1], alpha_sub[3][2], alpha_sub[3][3]);
			// };	
		}
	}
	return alpha_coeff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x740, %rsp            # imm = 0x740
movq %rdi, -0x560(%rbp)
movq %rdi, %rax
movq %rax, -0x558(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x550(%rbp)
callq 0x1d4d0
movq -0x550(%rbp), %rdi
movl %eax, -0x14(%rbp)
addq $0x18, %rdi
callq 0x1d4d0
movq -0x550(%rbp), %rsi
movl %eax, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x548(%rbp)
callq 0x259b0
movq -0x550(%rbp), %rdi
movq -0x548(%rbp), %rsi
addq $0x60, %rdi
callq 0x26a10
movq -0x548(%rbp), %rdi
callq 0x26880
movb $0x0, -0x31(%rbp)
movl -0x14(%rbp), %eax
decl %eax
cltq
movq %rax, -0x540(%rbp)
movl -0x18(%rbp), %eax
decl %eax
cltq
movq %rax, -0x538(%rbp)
leaq -0x51(%rbp), %rdi
movq %rdi, -0x530(%rbp)
callq 0x1b010
movq -0x538(%rbp), %rsi
movq -0x530(%rbp), %rcx
leaq 0x2b8f7(%rip), %rdx     # 0x4f3b0
leaq -0x50(%rbp), %rdi
callq 0x264d0
jmp 0x23ac4
leaq -0x65(%rbp), %rdi
movq %rdi, -0x568(%rbp)
callq 0x26550
movq -0x560(%rbp), %rdi
movq -0x540(%rbp), %rsi
movq -0x568(%rbp), %rcx
leaq -0x50(%rbp), %rdx
callq 0x26570
jmp 0x23af4
leaq -0x65(%rbp), %rdi
callq 0x265f0
leaq -0x50(%rbp), %rdi
callq 0x1aca0
leaq -0x51(%rbp), %rdi
callq 0x1fe00
movb $0x1, -0x1f2(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x578(%rbp)
movq %rax, -0xf8(%rbp)
movups 0x15046(%rip), %xmm0    # 0x38b78
movaps %xmm0, -0x120(%rbp)
movups 0x15028(%rip), %xmm0    # 0x38b68
movaps %xmm0, -0x130(%rbp)
leaq -0x130(%rbp), %rax
movq %rax, -0x108(%rbp)
movq $0x4, -0x100(%rbp)
leaq -0x131(%rbp), %rdi
movq %rdi, -0x570(%rbp)
callq 0x58a0
movq -0x578(%rbp), %rdi
movq -0x570(%rbp), %rcx
movq -0x108(%rbp), %rsi
movq -0x100(%rbp), %rdx
callq 0x26a40
jmp 0x23b96
leaq -0xd8(%rbp), %rax
movq %rax, -0x588(%rbp)
movq %rax, -0xf8(%rbp)
movups 0x14fe6(%rip), %xmm0    # 0x38b98
movaps %xmm0, -0x160(%rbp)
movups 0x14fc8(%rip), %xmm0    # 0x38b88
movaps %xmm0, -0x170(%rbp)
leaq -0x170(%rbp), %rax
movq %rax, -0x148(%rbp)
movq $0x4, -0x140(%rbp)
leaq -0x171(%rbp), %rdi
movq %rdi, -0x580(%rbp)
callq 0x58a0
movq -0x588(%rbp), %rdi
movq -0x580(%rbp), %rcx
movq -0x148(%rbp), %rsi
movq -0x140(%rbp), %rdx
callq 0x26a40
jmp 0x23c16
leaq -0xc0(%rbp), %rax
movq %rax, -0x598(%rbp)
movq %rax, -0xf8(%rbp)
movups 0x14f86(%rip), %xmm0    # 0x38bb8
movaps %xmm0, -0x1a0(%rbp)
movups 0x14f68(%rip), %xmm0    # 0x38ba8
movaps %xmm0, -0x1b0(%rbp)
leaq -0x1b0(%rbp), %rax
movq %rax, -0x188(%rbp)
movq $0x4, -0x180(%rbp)
leaq -0x1b1(%rbp), %rdi
movq %rdi, -0x590(%rbp)
callq 0x58a0
movq -0x598(%rbp), %rdi
movq -0x590(%rbp), %rcx
movq -0x188(%rbp), %rsi
movq -0x180(%rbp), %rdx
callq 0x26a40
jmp 0x23c96
leaq -0xa8(%rbp), %rax
movq %rax, -0x5a8(%rbp)
movq %rax, -0xf8(%rbp)
movups 0x14f26(%rip), %xmm0    # 0x38bd8
movaps %xmm0, -0x1e0(%rbp)
movups 0x14f08(%rip), %xmm0    # 0x38bc8
movaps %xmm0, -0x1f0(%rbp)
leaq -0x1f0(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq $0x4, -0x1c0(%rbp)
leaq -0x1f1(%rbp), %rdi
movq %rdi, -0x5a0(%rbp)
callq 0x58a0
movq -0x5a8(%rbp), %rdi
movq -0x5a0(%rbp), %rcx
movq -0x1c8(%rbp), %rsi
movq -0x1c0(%rbp), %rdx
callq 0x26a40
jmp 0x23d16
movb $0x0, -0x1f2(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x90(%rbp)
movq $0x4, -0x88(%rbp)
leaq -0x1f3(%rbp), %rdi
movq %rdi, -0x5b0(%rbp)
callq 0x1c2e0
movq -0x5b0(%rbp), %rcx
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0x26ac0
jmp 0x23d69
leaq -0x1f3(%rbp), %rdi
callq 0x19390
leaq -0xf0(%rbp), %rax
movq %rax, -0x5c0(%rbp)
addq $0x60, %rax
movq %rax, -0x5b8(%rbp)
movq -0x5b8(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x5c8(%rbp)
callq 0x59b0
movq -0x5c0(%rbp), %rcx
movq -0x5c8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x5b8(%rbp)
jne 0x23d8e
leaq -0x1f1(%rbp), %rdi
callq 0x5930
leaq -0x1b1(%rbp), %rdi
callq 0x5930
leaq -0x171(%rbp), %rdi
callq 0x5930
leaq -0x131(%rbp), %rdi
callq 0x5930
movb $0x1, -0x382(%rbp)
leaq -0x280(%rbp), %rax
movq %rax, -0x5d8(%rbp)
movq %rax, -0x288(%rbp)
movups 0x14de6(%rip), %xmm0    # 0x38bf8
movaps %xmm0, -0x2b0(%rbp)
movups 0x14dc8(%rip), %xmm0    # 0x38be8
movaps %xmm0, -0x2c0(%rbp)
leaq -0x2c0(%rbp), %rax
movq %rax, -0x298(%rbp)
movq $0x4, -0x290(%rbp)
leaq -0x2c1(%rbp), %rdi
movq %rdi, -0x5d0(%rbp)
callq 0x58a0
movq -0x5d8(%rbp), %rdi
movq -0x5d0(%rbp), %rcx
movq -0x298(%rbp), %rsi
movq -0x290(%rbp), %rdx
callq 0x26a40
jmp 0x23e76
leaq -0x268(%rbp), %rax
movq %rax, -0x5e8(%rbp)
movq %rax, -0x288(%rbp)
movups 0x14d86(%rip), %xmm0    # 0x38c18
movaps %xmm0, -0x2f0(%rbp)
movups 0x14d68(%rip), %xmm0    # 0x38c08
movaps %xmm0, -0x300(%rbp)
leaq -0x300(%rbp), %rax
movq %rax, -0x2d8(%rbp)
movq $0x4, -0x2d0(%rbp)
leaq -0x301(%rbp), %rdi
movq %rdi, -0x5e0(%rbp)
callq 0x58a0
movq -0x5e8(%rbp), %rdi
movq -0x5e0(%rbp), %rcx
movq -0x2d8(%rbp), %rsi
movq -0x2d0(%rbp), %rdx
callq 0x26a40
jmp 0x23ef6
leaq -0x250(%rbp), %rax
movq %rax, -0x5f8(%rbp)
movq %rax, -0x288(%rbp)
movups 0x14d26(%rip), %xmm0    # 0x38c38
movaps %xmm0, -0x330(%rbp)
movups 0x14d08(%rip), %xmm0    # 0x38c28
movaps %xmm0, -0x340(%rbp)
leaq -0x340(%rbp), %rax
movq %rax, -0x318(%rbp)
movq $0x4, -0x310(%rbp)
leaq -0x341(%rbp), %rdi
movq %rdi, -0x5f0(%rbp)
callq 0x58a0
movq -0x5f8(%rbp), %rdi
movq -0x5f0(%rbp), %rcx
movq -0x318(%rbp), %rsi
movq -0x310(%rbp), %rdx
callq 0x26a40
jmp 0x23f76
leaq -0x238(%rbp), %rax
movq %rax, -0x608(%rbp)
movq %rax, -0x288(%rbp)
movups 0x14cc6(%rip), %xmm0    # 0x38c58
movaps %xmm0, -0x370(%rbp)
movups 0x14ca8(%rip), %xmm0    # 0x38c48
movaps %xmm0, -0x380(%rbp)
leaq -0x380(%rbp), %rax
movq %rax, -0x358(%rbp)
movq $0x4, -0x350(%rbp)
leaq -0x381(%rbp), %rdi
movq %rdi, -0x600(%rbp)
callq 0x58a0
movq -0x608(%rbp), %rdi
movq -0x600(%rbp), %rcx
movq -0x358(%rbp), %rsi
movq -0x350(%rbp), %rdx
callq 0x26a40
jmp 0x23ff6
movb $0x0, -0x382(%rbp)
leaq -0x280(%rbp), %rax
movq %rax, -0x220(%rbp)
movq $0x4, -0x218(%rbp)
leaq -0x383(%rbp), %rdi
movq %rdi, -0x610(%rbp)
callq 0x1c2e0
movq -0x610(%rbp), %rcx
movq -0x220(%rbp), %rsi
movq -0x218(%rbp), %rdx
leaq -0x210(%rbp), %rdi
callq 0x26ac0
jmp 0x2404c
leaq -0x383(%rbp), %rdi
callq 0x19390
leaq -0x280(%rbp), %rax
movq %rax, -0x620(%rbp)
addq $0x60, %rax
movq %rax, -0x618(%rbp)
movq -0x618(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x628(%rbp)
callq 0x59b0
movq -0x620(%rbp), %rcx
movq -0x628(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x618(%rbp)
jne 0x24071
leaq -0x381(%rbp), %rdi
callq 0x5930
leaq -0x341(%rbp), %rdi
callq 0x5930
leaq -0x301(%rbp), %rdi
callq 0x5930
leaq -0x2c1(%rbp), %rdi
callq 0x5930
movl $0x0, -0x388(%rbp)
movl -0x388(%rbp), %eax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x24ce8
movl $0x0, -0x38c(%rbp)
movl -0x38c(%rbp), %eax
movl -0x18(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x24cd2
movq -0x550(%rbp), %rdi
movb $0x1, -0x4fa(%rbp)
leaq -0x418(%rbp), %rax
movq %rax, -0x638(%rbp)
movq %rax, -0x420(%rbp)
addq $0x60, %rdi
movq %rdi, -0x640(%rbp)
movslq -0x388(%rbp), %rsi
callq 0x26930
movq %rax, %rdi
movslq -0x38c(%rbp), %rsi
callq 0x26950
movq -0x640(%rbp), %rdi
movsd 0x18(%rax), %xmm0
movsd %xmm0, -0x450(%rbp)
movslq -0x388(%rbp), %rsi
callq 0x26930
movq %rax, %rdi
movl -0x38c(%rbp), %eax
incl %eax
movslq %eax, %rsi
callq 0x26950
movq -0x640(%rbp), %rdi
movsd 0x18(%rax), %xmm0
movsd %xmm0, -0x448(%rbp)
movslq -0x388(%rbp), %rsi
callq 0x26930
movq %rax, %rdi
movslq -0x38c(%rbp), %rsi
callq 0x26950
movq -0x640(%rbp), %rdi
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0x440(%rbp)
movslq -0x388(%rbp), %rsi
callq 0x26930
movq %rax, %rdi
movl -0x38c(%rbp), %eax
incl %eax
movslq %eax, %rsi
callq 0x26950
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0x438(%rbp)
leaq -0x450(%rbp), %rax
movq %rax, -0x430(%rbp)
movq $0x4, -0x428(%rbp)
leaq -0x451(%rbp), %rdi
movq %rdi, -0x630(%rbp)
callq 0x58a0
movq -0x638(%rbp), %rdi
movq -0x630(%rbp), %rcx
movq -0x430(%rbp), %rsi
movq -0x428(%rbp), %rdx
callq 0x26a40
jmp 0x24248
movq -0x550(%rbp), %rdi
leaq -0x400(%rbp), %rax
movq %rax, -0x650(%rbp)
movq %rax, -0x420(%rbp)
addq $0x60, %rdi
movq %rdi, -0x658(%rbp)
movl -0x388(%rbp), %eax
incl %eax
movslq %eax, %rsi
callq 0x26930
movq %rax, %rdi
movslq -0x38c(%rbp), %rsi
callq 0x26950
movq -0x658(%rbp), %rdi
movsd 0x18(%rax), %xmm0
movsd %xmm0, -0x488(%rbp)
movl -0x388(%rbp), %eax
incl %eax
movslq %eax, %rsi
callq 0x26930
movq %rax, %rdi
movl -0x38c(%rbp), %eax
incl %eax
movslq %eax, %rsi
callq 0x26950
movq -0x658(%rbp), %rdi
movsd 0x18(%rax), %xmm0
movsd %xmm0, -0x480(%rbp)
movl -0x388(%rbp), %eax
incl %eax
movslq %eax, %rsi
callq 0x26930
movq %rax, %rdi
movslq -0x38c(%rbp), %rsi
callq 0x26950
movq -0x658(%rbp), %rdi
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0x478(%rbp)
movl -0x388(%rbp), %eax
incl %eax
movslq %eax, %rsi
callq 0x26930
movq %rax, %rdi
movl -0x38c(%rbp), %eax
incl %eax
movslq %eax, %rsi
callq 0x26950
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0x470(%rbp)
leaq -0x488(%rbp), %rax
movq %rax, -0x468(%rbp)
movq $0x4, -0x460(%rbp)
leaq -0x489(%rbp), %rdi
movq %rdi, -0x648(%rbp)
callq 0x58a0
movq -0x650(%rbp), %rdi
movq -0x648(%rbp), %rcx
movq -0x468(%rbp), %rsi
movq -0x460(%rbp), %rdx
callq 0x26a40
jmp 0x2438b
movq -0x550(%rbp), %rdi
leaq -0x3e8(%rbp), %rax
movq %rax, -0x668(%rbp)
movq %rax, -0x420(%rbp)
addq $0x60, %rdi
movq %rdi, -0x670(%rbp)
movslq -0x388(%rbp), %rsi
callq 0x26930
movq %rax, %rdi
movslq -0x38c(%rbp), %rsi
callq 0x26950
movq -0x670(%rbp), %rdi
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0x4c0(%rbp)
movslq -0x388(%rbp), %rsi
callq 0x26930
movq %rax, %rdi
movl -0x38c(%rbp), %eax
incl %eax
movslq %eax, %rsi
callq 0x26950
movq -0x670(%rbp), %rdi
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0x4b8(%rbp)
movslq -0x388(%rbp), %rsi
callq 0x26930
movq %rax, %rdi
movslq -0x38c(%rbp), %rsi
callq 0x26950
movq -0x670(%rbp), %rdi
movsd 0x30(%rax), %xmm0
movsd %xmm0, -0x4b0(%rbp)
movslq -0x388(%rbp), %rsi
callq 0x26930
movq %rax, %rdi
movl -0x38c(%rbp), %eax
incl %eax
movslq %eax, %rsi
callq 0x26950
movsd 0x30(%rax), %xmm0
movsd %xmm0, -0x4a8(%rbp)
leaq -0x4c0(%rbp), %rax
movq %rax, -0x4a0(%rbp)
movq $0x4, -0x498(%rbp)
leaq -0x4c1(%rbp), %rdi
movq %rdi, -0x660(%rbp)
callq 0x58a0
movq -0x668(%rbp), %rdi
movq -0x660(%rbp), %rcx
movq -0x4a0(%rbp), %rsi
movq -0x498(%rbp), %rdx
callq 0x26a40
jmp 0x244be
movq -0x550(%rbp), %rdi
leaq -0x3d0(%rbp), %rax
movq %rax, -0x680(%rbp)
movq %rax, -0x420(%rbp)
addq $0x60, %rdi
movq %rdi, -0x688(%rbp)
movl -0x388(%rbp), %eax
incl %eax
movslq %eax, %rsi
callq 0x26930
movq %rax, %rdi
movslq -0x38c(%rbp), %rsi
callq 0x26950
movq -0x688(%rbp), %rdi
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0x4f8(%rbp)
movl -0x388(%rbp), %eax
incl %eax
movslq %eax, %rsi
callq 0x26930
movq %rax, %rdi
movl -0x38c(%rbp), %eax
incl %eax
movslq %eax, %rsi
callq 0x26950
movq -0x688(%rbp), %rdi
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0x4f0(%rbp)
movl -0x388(%rbp), %eax
incl %eax
movslq %eax, %rsi
callq 0x26930
movq %rax, %rdi
movslq -0x38c(%rbp), %rsi
callq 0x26950
movq -0x688(%rbp), %rdi
movsd 0x30(%rax), %xmm0
movsd %xmm0, -0x4e8(%rbp)
movl -0x388(%rbp), %eax
incl %eax
movslq %eax, %rsi
callq 0x26930
movq %rax, %rdi
movl -0x38c(%rbp), %eax
incl %eax
movslq %eax, %rsi
callq 0x26950
movsd 0x30(%rax), %xmm0
movsd %xmm0, -0x4e0(%rbp)
leaq -0x4f8(%rbp), %rax
movq %rax, -0x4d8(%rbp)
movq $0x4, -0x4d0(%rbp)
leaq -0x4f9(%rbp), %rdi
movq %rdi, -0x678(%rbp)
callq 0x58a0
movq -0x680(%rbp), %rdi
movq -0x678(%rbp), %rcx
movq -0x4d8(%rbp), %rsi
movq -0x4d0(%rbp), %rdx
callq 0x26a40
jmp 0x24601
movb $0x0, -0x4fa(%rbp)
leaq -0x418(%rbp), %rax
movq %rax, -0x3b8(%rbp)
movq $0x4, -0x3b0(%rbp)
leaq -0x4fb(%rbp), %rdi
movq %rdi, -0x690(%rbp)
callq 0x1c2e0
movq -0x690(%rbp), %rcx
movq -0x3b8(%rbp), %rsi
movq -0x3b0(%rbp), %rdx
leaq -0x3a8(%rbp), %rdi
callq 0x26ac0
jmp 0x24657
leaq -0x4fb(%rbp), %rdi
callq 0x19390
leaq -0x418(%rbp), %rax
movq %rax, -0x6a0(%rbp)
addq $0x60, %rax
movq %rax, -0x698(%rbp)
movq -0x698(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x6a8(%rbp)
callq 0x59b0
movq -0x6a0(%rbp), %rcx
movq -0x6a8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x698(%rbp)
jne 0x2467c
leaq -0x4f9(%rbp), %rdi
callq 0x5930
leaq -0x4c1(%rbp), %rdi
callq 0x5930
leaq -0x489(%rbp), %rdi
callq 0x5930
leaq -0x451(%rbp), %rdi
callq 0x5930
leaq 0x2accc(%rip), %rsi     # 0x4f3b0
leaq -0x518(%rbp), %rdi
callq 0x20ee0
jmp 0x246f2
movl $0x0, -0x51c(%rbp)
cmpl $0x4, -0x51c(%rbp)
jge 0x24c4d
movl $0x0, -0x520(%rbp)
cmpl $0x4, -0x520(%rbp)
jge 0x24c37
movl $0x0, -0x524(%rbp)
cmpl $0x4, -0x524(%rbp)
jge 0x24c21
movl $0x0, -0x528(%rbp)
cmpl $0x4, -0x528(%rbp)
jge 0x24c0b
movslq -0x51c(%rbp), %rsi
leaq -0x80(%rbp), %rdi
callq 0x26b40
movq %rax, %rdi
movslq -0x528(%rbp), %rsi
callq 0x26b60
movsd (%rax), %xmm0
movsd %xmm0, -0x6c0(%rbp)
movslq -0x528(%rbp), %rsi
leaq -0x3a8(%rbp), %rdi
callq 0x22870
movq %rax, %rdi
movslq -0x524(%rbp), %rsi
callq 0x5950
movsd -0x6c0(%rbp), %xmm0
mulsd (%rax), %xmm0
movsd %xmm0, -0x6b8(%rbp)
movslq -0x524(%rbp), %rsi
leaq -0x210(%rbp), %rdi
callq 0x26b40
movq %rax, %rdi
movslq -0x520(%rbp), %rsi
callq 0x26b60
movsd (%rax), %xmm0
movsd %xmm0, -0x6b0(%rbp)
movslq -0x51c(%rbp), %rsi
leaq -0x518(%rbp), %rdi
callq 0x22870
movq %rax, %rdi
movslq -0x520(%rbp), %rsi
callq 0x5950
movsd -0x6b8(%rbp), %xmm0
movsd -0x6b0(%rbp), %xmm2
movsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl -0x528(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x528(%rbp)
jmp 0x24741
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2485f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x65(%rbp), %rdi
callq 0x265f0
leaq -0x50(%rbp), %rdi
callq 0x1aca0
leaq -0x51(%rbp), %rdi
callq 0x1fe00
jmp 0x24d48
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x24933
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x24927
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2491b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2490f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x1f3(%rbp), %rdi
callq 0x19390
leaq -0xf0(%rbp), %rax
movq %rax, -0x6d0(%rbp)
addq $0x60, %rax
movq %rax, -0x6c8(%rbp)
movq -0x6c8(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x6d8(%rbp)
callq 0x59b0
movq -0x6d0(%rbp), %rcx
movq -0x6d8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x6c8(%rbp)
jne 0x248dc
jmp 0x2490f
leaq -0x1f1(%rbp), %rdi
callq 0x5930
leaq -0x1b1(%rbp), %rdi
callq 0x5930
leaq -0x171(%rbp), %rdi
callq 0x5930
leaq -0x131(%rbp), %rdi
callq 0x5930
testb $0x1, -0x1f2(%rbp)
jne 0x2494a
jmp 0x24997
movq -0xf8(%rbp), %rax
leaq -0xf0(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x6e0(%rbp)
je 0x24995
movq -0x6e0(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x6e8(%rbp)
callq 0x59b0
movq -0x6e8(%rbp), %rax
leaq -0xf0(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x6e0(%rbp)
jne 0x24964
jmp 0x24997
jmp 0x24d3c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x24a62
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x24a56
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x24a4a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x24a3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x383(%rbp), %rdi
callq 0x19390
leaq -0x280(%rbp), %rax
movq %rax, -0x6f8(%rbp)
addq $0x60, %rax
movq %rax, -0x6f0(%rbp)
movq -0x6f0(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x700(%rbp)
callq 0x59b0
movq -0x6f8(%rbp), %rcx
movq -0x700(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x6f0(%rbp)
jne 0x24a0b
jmp 0x24a3e
leaq -0x381(%rbp), %rdi
callq 0x5930
leaq -0x341(%rbp), %rdi
callq 0x5930
leaq -0x301(%rbp), %rdi
callq 0x5930
leaq -0x2c1(%rbp), %rdi
callq 0x5930
testb $0x1, -0x382(%rbp)
jne 0x24a79
jmp 0x24ac6
movq -0x288(%rbp), %rax
leaq -0x280(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x708(%rbp)
je 0x24ac4
movq -0x708(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x710(%rbp)
callq 0x59b0
movq -0x710(%rbp), %rax
leaq -0x280(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x708(%rbp)
jne 0x24a93
jmp 0x24ac6
jmp 0x24d15
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x24b91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x24b85
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x24b79
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x24b6d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x4fb(%rbp), %rdi
callq 0x19390
leaq -0x418(%rbp), %rax
movq %rax, -0x720(%rbp)
addq $0x60, %rax
movq %rax, -0x718(%rbp)
movq -0x718(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x728(%rbp)
callq 0x59b0
movq -0x720(%rbp), %rcx
movq -0x728(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x718(%rbp)
jne 0x24b3a
jmp 0x24b6d
leaq -0x4f9(%rbp), %rdi
callq 0x5930
leaq -0x4c1(%rbp), %rdi
callq 0x5930
leaq -0x489(%rbp), %rdi
callq 0x5930
leaq -0x451(%rbp), %rdi
callq 0x5930
testb $0x1, -0x4fa(%rbp)
jne 0x24ba8
jmp 0x24bf5
movq -0x420(%rbp), %rax
leaq -0x418(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x730(%rbp)
je 0x24bf3
movq -0x730(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x738(%rbp)
callq 0x59b0
movq -0x738(%rbp), %rax
leaq -0x418(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x730(%rbp)
jne 0x24bc2
jmp 0x24bf5
jmp 0x24d09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x24cc4
jmp 0x24c0d
movl -0x524(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x524(%rbp)
jmp 0x2472a
jmp 0x24c23
movl -0x520(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x520(%rbp)
jmp 0x24713
jmp 0x24c39
movl -0x51c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x51c(%rbp)
jmp 0x246fc
movq -0x560(%rbp), %rdi
movslq -0x388(%rbp), %rsi
callq 0x268e0
movq %rax, %rdi
movslq -0x38c(%rbp), %rsi
callq 0x1ac80
movq %rax, %rdi
leaq -0x518(%rbp), %rsi
callq 0x225d0
jmp 0x24c80
leaq -0x518(%rbp), %rdi
callq 0x19150
leaq -0x3a8(%rbp), %rdi
callq 0x19150
movl -0x38c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38c(%rbp)
jmp 0x240fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x518(%rbp), %rdi
callq 0x19150
leaq -0x3a8(%rbp), %rdi
callq 0x19150
jmp 0x24d09
jmp 0x24cd4
movl -0x388(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x388(%rbp)
jmp 0x240dc
movb $0x1, -0x31(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x19150
leaq -0x80(%rbp), %rdi
callq 0x19150
testb $0x1, -0x31(%rbp)
jne 0x24d2c
jmp 0x24d20
leaq -0x210(%rbp), %rdi
callq 0x19150
leaq -0x80(%rbp), %rdi
callq 0x19150
jmp 0x24d3c
movq -0x560(%rbp), %rdi
callq 0x26820
movq -0x558(%rbp), %rax
addq $0x740, %rsp            # imm = 0x740
popq %rbp
retq
movq -0x560(%rbp), %rdi
callq 0x26820
movq -0x60(%rbp), %rdi
callq 0x45e0
nopw %cs:(%rax,%rax)