// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rsi, %r13
movq %rdi, %r12
movq %rsi, %rdi
callq 0x12b54
movq %rax, %rbx
leaq 0x18(%r13), %rdi
callq 0x12b54
movq %rax, %r15
leaq -0xc0(%rbp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x17a0c
addq $0x60, %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x18422
movq %r14, %rdi
callq 0x18332
movq %r15, -0x148(%rbp)
leal -0x1(%r15), %eax
movl %eax, -0x40(%rbp)
movslq %eax, %r14
leaq -0x120(%rbp), %r15
movq %r15, %rdi
callq 0x116bc
leaq 0x24c4b(%rip), %rdx     # 0x3b388
leaq -0xc0(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rcx
callq 0x18110
leal -0x1(%rbx), %eax
movl %eax, -0x38(%rbp)
movslq %eax, %r14
leaq -0x100(%rbp), %r15
movq %r15, %rdi
callq 0x1816a
leaq -0xc0(%rbp), %rdx
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq 0x18174
movq %r13, -0xd0(%rbp)
movq %r12, -0x48(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x1885a
leaq -0xc0(%rbp), %rdi
callq 0x114c8
leaq -0x120(%rbp), %r14
movq %r14, %rdi
callq 0x14402
movups 0xe243(%rip), %xmm0     # 0x249f8
movaps %xmm0, 0x10(%r14)
movupd 0xe226(%rip), %xmm0     # 0x249e8
movapd %xmm0, (%r14)
leaq -0x138(%rbp), %r15
movq %r15, %rdi
callq 0x533c
leaq -0xc0(%rbp), %r14
leaq -0x120(%rbp), %rsi
movl $0x4, %edx
movq %r14, %rdi
movq %r15, %rcx
callq 0x1843a
leaq -0xa8(%rbp), %r15
movups 0xe216(%rip), %xmm0     # 0x24a18
leaq -0x100(%rbp), %r12
movaps %xmm0, 0x10(%r12)
movupd 0xe1f1(%rip), %xmm0     # 0x24a08
movapd %xmm0, (%r12)
leaq -0x60(%rbp), %r13
movq %r13, %rdi
callq 0x533c
movl $0x4, %edx
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0x1843a
leaq -0x90(%rbp), %r15
movups 0xe1ee(%rip), %xmm0     # 0x24a38
leaq -0x1a0(%rbp), %r12
movaps %xmm0, 0x10(%r12)
movupd 0xe1c9(%rip), %xmm0     # 0x24a28
movapd %xmm0, (%r12)
leaq -0x2b(%rbp), %r13
movq %r13, %rdi
callq 0x533c
movl $0x4, %edx
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0x1843a
leaq -0x78(%rbp), %r15
movups 0xe1c9(%rip), %xmm0     # 0x24a58
leaq -0x180(%rbp), %r12
movaps %xmm0, 0x10(%r12)
movupd 0xe1a4(%rip), %xmm0     # 0x24a48
movapd %xmm0, (%r12)
leaq -0x2a(%rbp), %r13
movq %r13, %rdi
callq 0x533c
movl $0x4, %edx
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0x1843a
leaq -0x29(%rbp), %r12
movq %r12, %rdi
callq 0x12108
leaq -0x1b8(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
movl $0x4, %edx
movq %r12, %rcx
callq 0x1849c
leaq -0x29(%rbp), %rdi
callq 0x1056e
movl $0x48, %r14d
leaq (%r14,%rbp), %rdi
addq $-0xc0, %rdi
callq 0x53c6
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x168ff
leaq -0x2a(%rbp), %rdi
callq 0x5a80
leaq -0x2b(%rbp), %rdi
callq 0x5a80
leaq -0x60(%rbp), %rdi
callq 0x5a80
leaq -0x138(%rbp), %rdi
callq 0x5a80
movups 0xe131(%rip), %xmm0     # 0x24a78
leaq -0x120(%rbp), %r15
movaps %xmm0, 0x10(%r15)
movupd 0xe10d(%rip), %xmm0     # 0x24a68
movapd %xmm0, (%r15)
leaq -0x60(%rbp), %r12
movq %r12, %rdi
callq 0x533c
leaq -0xc0(%rbp), %r14
movl $0x4, %edx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rcx
callq 0x1843a
leaq -0xa8(%rbp), %r15
movups 0xe104(%rip), %xmm0     # 0x24a98
leaq -0x100(%rbp), %r12
movaps %xmm0, 0x10(%r12)
movupd 0xe0df(%rip), %xmm0     # 0x24a88
movapd %xmm0, (%r12)
leaq -0x2b(%rbp), %r13
movq %r13, %rdi
callq 0x533c
movl $0x4, %edx
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0x1843a
leaq -0x90(%rbp), %r15
movups 0xe0dc(%rip), %xmm0     # 0x24ab8
leaq -0x1a0(%rbp), %r12
movaps %xmm0, 0x10(%r12)
movupd 0xe0b7(%rip), %xmm0     # 0x24aa8
movapd %xmm0, (%r12)
leaq -0x2a(%rbp), %r13
movq %r13, %rdi
callq 0x533c
movl $0x4, %edx
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0x1843a
leaq -0x78(%rbp), %r15
movups 0xe0b7(%rip), %xmm0     # 0x24ad8
leaq -0x180(%rbp), %r12
movaps %xmm0, 0x10(%r12)
movupd 0xe092(%rip), %xmm0     # 0x24ac8
movapd %xmm0, (%r12)
leaq -0x29(%rbp), %r13
movq %r13, %rdi
callq 0x533c
movl $0x4, %edx
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0x1843a
leaq -0x2c(%rbp), %r12
movq %r12, %rdi
callq 0x12108
leaq -0x138(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
movl $0x4, %edx
movq %r12, %rcx
callq 0x1849c
movq -0xd0(%rbp), %r13
leaq -0x2c(%rbp), %rdi
callq 0x1056e
movl $0x48, %r14d
leaq (%r14,%rbp), %rdi
addq $-0xc0, %rdi
callq 0x53c6
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x16a98
leaq -0x29(%rbp), %rdi
callq 0x5a80
leaq -0x2a(%rbp), %rdi
callq 0x5a80
leaq -0x2b(%rbp), %rdi
callq 0x5a80
leaq -0x60(%rbp), %rdi
callq 0x5a80
cmpl $0x2, %ebx
jl 0x16fec
leaq -0x78(%rbp), %rax
movq %rax, -0xc8(%rbp)
movl -0x38(%rbp), %eax
movq %rax, -0x140(%rbp)
movl -0x40(%rbp), %eax
movq %rax, -0x150(%rbp)
movq $0x0, -0x38(%rbp)
leaq -0xc0(%rbp), %r15
cmpl $0x2, -0x148(%rbp)
jl 0x16fd4
movq -0x38(%rbp), %rax
incq %rax
movq %rax, -0xd8(%rbp)
xorl %r12d, %r12d
movq %r13, %rdi
movq -0x38(%rbp), %r14
movq %r14, %rsi
callq 0x183a8
movq %rax, %rdi
movq %r12, %rsi
callq 0x183ba
movsd 0x18(%rax), %xmm0
movsd %xmm0, -0x120(%rbp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x183a8
leaq 0x1(%r12), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x183ba
movsd 0x18(%rax), %xmm0
movsd %xmm0, -0x118(%rbp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x183a8
movq %rax, %rdi
movq %r12, %rsi
callq 0x183ba
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0x110(%rbp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x183a8
movq %rax, %rdi
movq %rbx, %rsi
callq 0x183ba
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0x108(%rbp)
leaq -0x2b(%rbp), %r14
movq %r14, %rdi
callq 0x533c
movl $0x4, %edx
movq %r15, %rdi
leaq -0x120(%rbp), %rsi
movq %r14, %rcx
callq 0x1843a
movq %r13, %rdi
movq -0xd8(%rbp), %r14
movq %r14, %rsi
callq 0x183a8
movq %rax, %rdi
movq %r12, %rsi
callq 0x183ba
movsd 0x18(%rax), %xmm0
movsd %xmm0, -0x100(%rbp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x183a8
movq %rax, %rdi
movq %rbx, %rsi
callq 0x183ba
movsd 0x18(%rax), %xmm0
movsd %xmm0, -0xf8(%rbp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x183a8
movq %rax, %rdi
movq %r12, %rsi
callq 0x183ba
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0xf0(%rbp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x183a8
movq %rax, %rdi
movq %rbx, %rsi
callq 0x183ba
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0xe8(%rbp)
leaq -0x2a(%rbp), %r14
movq %r14, %rdi
callq 0x533c
movl $0x4, %edx
leaq -0xa8(%rbp), %rdi
leaq -0x100(%rbp), %rsi
movq %r14, %rcx
callq 0x1843a
movq %r13, %rdi
movq -0x38(%rbp), %r14
movq %r14, %rsi
callq 0x183a8
movq %rax, %rdi
movq %r12, %rsi
callq 0x183ba
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0x1a0(%rbp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x183a8
movq %rax, %rdi
movq %rbx, %rsi
callq 0x183ba
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0x198(%rbp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x183a8
movq %rax, %rdi
movq %r12, %rsi
callq 0x183ba
movsd 0x30(%rax), %xmm0
movsd %xmm0, -0x190(%rbp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x183a8
movq %rax, %rdi
movq %rbx, %rsi
callq 0x183ba
movsd 0x30(%rax), %xmm0
movsd %xmm0, -0x188(%rbp)
leaq -0x29(%rbp), %r14
movq %r14, %rdi
callq 0x533c
movl $0x4, %edx
leaq -0x90(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
movq %r14, %rcx
callq 0x1843a
movq %r13, %rdi
movq -0xd8(%rbp), %r14
movq %r14, %rsi
callq 0x183a8
movq %rax, %rdi
movq %r12, %rsi
callq 0x183ba
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0x180(%rbp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x183a8
movq %rax, %rdi
movq %rbx, %rsi
callq 0x183ba
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0x178(%rbp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x183a8
movq %rax, %rdi
movq %r12, -0x160(%rbp)
movq %r12, %rsi
callq 0x183ba
movsd 0x30(%rax), %xmm0
movsd %xmm0, -0x170(%rbp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x183a8
movq %rax, %rdi
movq %rbx, %rsi
callq 0x183ba
movsd 0x30(%rax), %xmm0
movsd %xmm0, -0x168(%rbp)
leaq -0x2c(%rbp), %r13
movq %r13, %rdi
callq 0x533c
movl $0x4, %edx
leaq -0x78(%rbp), %rdi
leaq -0x180(%rbp), %rsi
movq %r13, %rcx
callq 0x1843a
movq %rbx, -0x158(%rbp)
leaq -0x2d(%rbp), %r14
movq %r14, %rdi
callq 0x12108
movl $0x4, %edx
leaq -0x60(%rbp), %rdi
leaq -0xc0(%rbp), %r15
movq %r15, %rsi
movq %r14, %rcx
callq 0x1849c
movq %r14, %rdi
callq 0x1056e
movl $0x48, %r14d
leaq (%r14,%rbp), %rdi
addq $-0xc0, %rdi
callq 0x53c6
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x16e4e
movq %r13, %rdi
callq 0x5a80
leaq -0x29(%rbp), %rdi
callq 0x5a80
leaq -0x2a(%rbp), %rdi
callq 0x5a80
leaq -0x2b(%rbp), %rdi
callq 0x5a80
movq %r15, %rdi
leaq 0x244f3(%rip), %rsi     # 0x3b388
callq 0x14dca
xorl %r13d, %r13d
xorl %r12d, %r12d
xorl %r15d, %r15d
xorl %r14d, %r14d
leaq -0x60(%rbp), %rbx
leaq -0x1b8(%rbp), %rdi
movq %r13, %rsi
callq 0x184fe
movq %rax, %rdi
movq %r14, %rsi
callq 0x18510
movsd (%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x15cb4
movq %rax, %rdi
movq %r15, %rsi
callq 0x539c
movsd -0x40(%rbp), %xmm0
mulsd (%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
leaq -0x138(%rbp), %rdi
movq %r15, %rsi
callq 0x184fe
movq %rax, %rdi
movq %r12, %rsi
callq 0x18510
movsd -0x40(%rbp), %xmm0
mulsd (%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
leaq -0xc0(%rbp), %rdi
movq %r13, %rsi
callq 0x15cb4
movq %rax, %rdi
movq %r12, %rsi
callq 0x539c
movsd -0x40(%rbp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
incq %r14
cmpq $0x4, %r14
jne 0x16eaa
incq %r15
cmpq $0x4, %r15
jne 0x16ea3
incq %r12
cmpq $0x4, %r12
jne 0x16ea0
incq %r13
cmpq $0x4, %r13
jne 0x16e9d
movq -0x48(%rbp), %r14
movq %r14, %rdi
movq -0x38(%rbp), %rsi
callq 0x18374
movq %rax, %rdi
movq -0x160(%rbp), %rsi
callq 0x114b6
movq %rax, %rdi
leaq -0xc0(%rbp), %r15
movq %r15, %rsi
callq 0x15b00
movq %r15, %rdi
callq 0x1048a
leaq -0x60(%rbp), %rdi
callq 0x1048a
movq -0x158(%rbp), %rax
movq %rax, %r12
cmpq -0x150(%rbp), %rax
movq -0xd0(%rbp), %r13
jne 0x16b2b
movq -0x38(%rbp), %rcx
incq %rcx
movq %rcx, -0x38(%rbp)
cmpq -0x140(%rbp), %rcx
jne 0x16b0d
leaq -0x138(%rbp), %rdi
callq 0x1048a
leaq -0x1b8(%rbp), %rdi
callq 0x1048a
movq -0x48(%rbp), %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x2c(%rbp), %rdi
callq 0x1056e
movl $0x48, %r12d
leaq (%r12,%rbp), %rdi
addq $-0xc0, %rdi
callq 0x53c6
addq $-0x18, %r12
cmpq $-0x18, %r12
jne 0x1702c
movb $0x1, %r12b
jmp 0x17051
movq %rax, %rbx
xorl %r12d, %r12d
leaq -0x29(%rbp), %rdi
callq 0x5a80
jmp 0x17062
movq %rax, %rbx
xorl %r12d, %r12d
leaq -0x2a(%rbp), %rdi
callq 0x5a80
jmp 0x17073
movq %rax, %rbx
xorl %r12d, %r12d
leaq -0x2b(%rbp), %rdi
callq 0x5a80
jmp 0x17087
movq %rax, %rbx
xorl %r12d, %r12d
movq %r14, %r15
leaq -0x60(%rbp), %rdi
callq 0x5a80
cmpq %r15, %r14
sete %al
orb %r12b, %al
jne 0x170b3
leaq -0xc0(%rbp), %r14
addq $-0x18, %r15
movq %r15, %rdi
callq 0x53c6
cmpq %r14, %r15
jne 0x170a2
movq -0x48(%rbp), %r14
jmp 0x17287
movq %rax, %rbx
leaq -0x29(%rbp), %rdi
callq 0x1056e
movl $0x48, %r12d
leaq (%r12,%rbp), %rdi
addq $-0xc0, %rdi
callq 0x53c6
addq $-0x18, %r12
cmpq $-0x18, %r12
jne 0x170ce
movb $0x1, %r12b
jmp 0x170f3
movq %rax, %rbx
xorl %r12d, %r12d
leaq -0x2a(%rbp), %rdi
callq 0x5a80
jmp 0x17104
movq %rax, %rbx
xorl %r12d, %r12d
leaq -0x2b(%rbp), %rdi
callq 0x5a80
jmp 0x17115
movq %rax, %rbx
xorl %r12d, %r12d
leaq -0x60(%rbp), %rdi
callq 0x5a80
jmp 0x17129
movq %rax, %rbx
xorl %r12d, %r12d
movq %r14, %r15
leaq -0x138(%rbp), %rdi
callq 0x5a80
cmpq %r15, %r14
sete %al
orb %r12b, %al
jne 0x17158
leaq -0xc0(%rbp), %r14
addq $-0x18, %r15
movq %r15, %rdi
callq 0x53c6
cmpq %r14, %r15
jne 0x17147
movq -0x48(%rbp), %r14
jmp 0x17293
movq %rax, %rbx
leaq -0x100(%rbp), %rdi
callq 0x1885a
leaq -0xc0(%rbp), %rdi
callq 0x114c8
jmp 0x17181
movq %rax, %rbx
leaq -0x120(%rbp), %rdi
callq 0x14402
jmp 0x1729b
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
callq 0x1048a
jmp 0x171aa
movq %rax, %rbx
movq -0x48(%rbp), %r14
leaq -0x60(%rbp), %rdi
callq 0x1048a
jmp 0x1727b
movq %rax, %rbx
leaq -0x2d(%rbp), %rdi
callq 0x1056e
movl $0x48, %r14d
leaq (%r14,%rbp), %rdi
addq $-0xc0, %rdi
callq 0x53c6
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x171ca
movb $0x1, %r14b
jmp 0x171f6
movq %rax, %rbx
xorl %r14d, %r14d
leaq -0xc0(%rbp), %r15
leaq -0x2c(%rbp), %rdi
callq 0x5a80
jmp 0x1721c
movq %rax, %rbx
xorl %r14d, %r14d
leaq -0x90(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq -0xc0(%rbp), %r15
leaq -0x29(%rbp), %rdi
callq 0x5a80
movq -0xc8(%rbp), %r13
jmp 0x17242
movq %rax, %rbx
xorl %r14d, %r14d
leaq -0xa8(%rbp), %r13
leaq -0xc0(%rbp), %r15
leaq -0x2a(%rbp), %rdi
callq 0x5a80
leaq -0x2b(%rbp), %rdi
callq 0x5a80
cmpq %r13, %r15
sete %al
orb %r14b, %al
jne 0x17277
leaq -0xc0(%rbp), %r14
addq $-0x18, %r13
movq %r13, %rdi
callq 0x53c6
cmpq %r14, %r13
jne 0x17266
movq -0x48(%rbp), %r14
leaq -0x138(%rbp), %rdi
callq 0x1048a
leaq -0x1b8(%rbp), %rdi
callq 0x1048a
movq %r14, %rdi
callq 0x182f0
movq %rbx, %rdi
callq 0x45a0
movq %rax, %rbx
xorl %r14d, %r14d
leaq -0xc0(%rbp), %r15
movq %r15, %r13
jmp 0x1724b
nop