// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/regression.c
// Function: train_quantizereg
void* train_quantizereg(Instanceptr* trdata, Instanceptr *cvdata, void* parameters)
{
	/*!Last Changed 21.12.2004*/
	Model_quantizeregptr model;
	Quantizereg_parameterptr param;
	int i, j, k, m, x, y, **countstwo, *countsone, found, totalcount;
	double maxx, maxy, xvalue, yvalue, total, *eigenvalues;
	Instanceptr tmp;
	matrix cov;
	Instance mean;
	model = safemalloc(sizeof(Model_quantizereg), "train_quantizereg", 6);
	param = (Quantizereg_parameterptr) parameters;
	model->partitioncount = param->partitioncount;
	if (current_dataset->featurecount > 2)
	 {
   mean = find_mean(*trdata);
  	cov = covariance(*trdata, mean);
	  safe_free(mean.values);
   eigenvalues = find_eigenvalues_eigenvectors_symmetric(&(model->eigenvectors), cov);
  	matrix_free(cov);
   safe_free(eigenvalues);
   dimension_reduce_with_pca(*trdata, 2, model->eigenvectors);
	  find_bounds_of_feature(current_dataset, *trdata, 0, &(model->minx), &maxx);
			model->binx = (maxx - model->minx) / param->partitioncount;
	  find_bounds_of_feature(current_dataset, *trdata, 1, &(model->miny), &maxy);
			model->biny = (maxy - model->miny) / param->partitioncount;
			countstwo = (int**) safecalloc_2d(sizeof(int *), sizeof(int), param->partitioncount, param->partitioncount, "train_quantizereg", 19);
			model->meanstwo = (double**) safecalloc_2d(sizeof(double *), sizeof(double), param->partitioncount, param->partitioncount, "train_quantizereg", 20);
			tmp = *trdata;
			while (tmp)
			 {
				 xvalue = real_feature(tmp, 0);
				 yvalue = real_feature(tmp, 1);
					x = (int) ((xvalue - model->minx) / model->binx);
					if (x == param->partitioncount)
						 x--;
					y = (int) ((yvalue - model->miny) / model->biny);
					if (y == param->partitioncount)
						 y--;
					model->meanstwo[x][y] += give_regressionvalue(tmp);
					(countstwo[x][y])++;
				 tmp = tmp->next;
			 }
			for (i = 0; i < param->partitioncount; i++)
				 for (j = 0; j < param->partitioncount; j++)
						 if (countstwo[i][j] != 0)
								 model->meanstwo[i][j] /= countstwo[i][j];
			for (i = 0; i < param->partitioncount; i++)
				 for (j = 0; j < param->partitioncount; j++)
						 if (countstwo[i][j] == 0)
							 {
								 found = 0;
								 k = 1;
									totalcount = 0;
									total = 0;
         while (!found)
									 {
										 for (m = j - k; m <= j + k; m++)
												 if (between(i - k, 0, param->partitioncount - 1) && between(m, 0, param->partitioncount - 1) && countstwo[i - k][m] != 0)
													 {
														 total += countstwo[i - k][m] * model->meanstwo[i - k][m];
															totalcount += countstwo[i - k][m];
														 found = 1;
													 }
										 for (m = j - k; m <= j + k; m++)
												 if (between(i + k, 0, param->partitioncount - 1) && between(m, 0, param->partitioncount - 1) && countstwo[i + k][m] != 0)
													 {
														 total += countstwo[i + k][m] * model->meanstwo[i + k][m];
															totalcount += countstwo[i + k][m];
														 found = 1;
													 }
											for (m = i - k; m <= i + k; m++)
												 if (between(j - k, 0, param->partitioncount - 1) && between(m, 0, param->partitioncount - 1) && countstwo[m][j - k] != 0)
													 {
														 total += countstwo[m][j - k] * model->meanstwo[m][j - k];
															totalcount += countstwo[m][j - k];
															found = 1;
													 }
											for (m = i - k; m <= i + k; m++)
												 if (between(j + k, 0, param->partitioncount - 1) && between(m, 0, param->partitioncount - 1) && countstwo[m][j + k] != 0)
													 {
														 total += countstwo[m][j + k] * model->meanstwo[m][j + k];
															totalcount += countstwo[m][j + k];
															found = 1;
													 }
											k++;
									 }
									model->meanstwo[i][j] = total / totalcount; 
							 } 
	 }
	else
	 {
	  find_bounds_of_feature(current_dataset, *trdata, 0, &(model->minx), &maxx);
			model->binx = (maxx - model->minx) / (param->partitioncount);
			model->meansone = safecalloc(param->partitioncount, sizeof(double), "train_quantizereg", 86);
			countsone = safecalloc(param->partitioncount, sizeof(int), "quantizereg", 87);
			tmp = *trdata;
			while (tmp)
			 {
				 xvalue = real_feature(tmp, 0);
					x = (int) ((xvalue - model->minx) / model->binx);
					if (x == param->partitioncount)
						 x--;
					model->meansone[x] += give_regressionvalue(tmp);
					(countsone[x])++;
				 tmp = tmp->next;
			 }
			for (i = 0; i < param->partitioncount; i++)
					if (countsone[i] != 0)
							model->meansone[i] /= countsone[i];
   for (i = 0; i < param->partitioncount; i++)
				 if (countsone[i] == 0)
					 {
						 found = 0;
							totalcount = 0;
							total = 0;
							k = 1;
							while (!found)
							 {
								 if (between(i - k, 0, param->partitioncount - 1) && countsone[i - k] != 0)
									 {
										 total += countsone[i - k] * model->meansone[i - k];
											totalcount += countsone[i - k];
											found = 1;
									 }
									if (between(i + k, 0, param->partitioncount - 1) && countsone[i + k] != 0)
									 {
										 total += countsone[i + k] * model->meansone[i + k];
											totalcount += countsone[i + k];
											found = 1;
									 }
								 k++;
							 }
							model->meansone[i] = total / totalcount;
					 }
	 }
	if (current_dataset->featurecount > 2)
			free_2d((void**)countstwo, param->partitioncount);
	else
			safe_free(countsone);
	return model;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x48, %edi
leaq 0x4a68f(%rip), %rsi     # 0xec232
movl $0x6, %edx
callq 0x52d70
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x40(%rax)
leaq 0x63c73(%rip), %rax     # 0x105840
movq (%rax), %rax
cmpl $0x2, 0x1bc(%rax)
jle 0xa23cf
movq -0x8(%rbp), %rax
movq (%rax), %rsi
leaq -0x100(%rbp), %rdi
callq 0x19b30
leaq -0xd0(%rbp), %rdi
leaq -0x100(%rbp), %rsi
movl $0x30, %edx
callq 0x42b0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movups -0xd0(%rbp), %xmm0
movups -0xc0(%rbp), %xmm1
movups -0xb0(%rbp), %xmm2
movq %rsp, %rax
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x18040
movq %rax, -0x110(%rbp)
movq %rdx, -0x108(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x108(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0xd0(%rbp), %rdi
callq 0x52e80
movq -0x20(%rbp), %rdi
addq $0x30, %rdi
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
callq 0x5fb50
movq %rax, -0x88(%rbp)
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0x59ea0
movq -0x88(%rbp), %rdi
callq 0x52e80
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rdx
movq 0x38(%rax), %rcx
movl $0x2, %esi
callq 0x170d0
leaq 0x63b6e(%rip), %rax     # 0x105840
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rcx
xorl %edx, %edx
leaq -0x60(%rbp), %r8
callq 0x178c0
movsd -0x60(%rbp), %xmm0
movq -0x20(%rbp), %rax
subsd (%rax), %xmm0
movq -0x28(%rbp), %rax
cvtsi2sdl (%rax), %xmm1
divsd %xmm1, %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, 0x8(%rax)
leaq 0x63b2c(%rip), %rax     # 0x105840
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rcx
addq $0x10, %rcx
movl $0x1, %edx
leaq -0x68(%rbp), %r8
callq 0x178c0
movsd -0x68(%rbp), %xmm0
movq -0x20(%rbp), %rax
subsd 0x10(%rax), %xmm0
movq -0x28(%rbp), %rax
cvtsi2sdl (%rax), %xmm1
divsd %xmm1, %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, 0x18(%rax)
movq -0x28(%rbp), %rax
movl (%rax), %edx
movq -0x28(%rbp), %rax
movl (%rax), %ecx
movl $0x8, %edi
movl $0x4, %esi
leaq 0x4a4be(%rip), %r8      # 0xec232
movl $0x13, %r9d
callq 0x52fa0
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %edx
movq -0x28(%rbp), %rax
movl (%rax), %ecx
movl $0x8, %esi
leaq 0x4a497(%rip), %r8      # 0xec232
movl $0x14, %r9d
movq %rsi, %rdi
callq 0x52fa0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x90(%rbp)
cmpq $0x0, -0x90(%rbp)
je 0xa1eb6
movq -0x90(%rbp), %rdi
xorl %esi, %esi
callq 0x42c40
movsd %xmm0, -0x70(%rbp)
movq -0x90(%rbp), %rdi
movl $0x1, %esi
callq 0x42c40
movsd %xmm0, -0x78(%rbp)
movsd -0x70(%rbp), %xmm0
movq -0x20(%rbp), %rax
subsd (%rax), %xmm0
movq -0x20(%rbp), %rax
divsd 0x8(%rax), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jne 0xa1e2a
movl -0x3c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x3c(%rbp)
movsd -0x78(%rbp), %xmm0
movq -0x20(%rbp), %rax
subsd 0x10(%rax), %xmm0
movq -0x20(%rbp), %rax
divsd 0x18(%rax), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jne 0xa1e5c
movl -0x40(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x40(%rbp)
movq -0x90(%rbp), %rdi
callq 0x43580
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x40(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq -0x48(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movq -0x90(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x90(%rbp)
jmp 0xa1dc2
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jge 0xa1f44
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jge 0xa1f34
movq -0x48(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0xa1f27
movq -0x48(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
cvtsi2sdl (%rax,%rcx,4), %xmm1
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0xa1f29
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xa1ecf
jmp 0xa1f36
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xa1ebd
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jge 0xa23ca
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jge 0xa23ba
movq -0x48(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0xa23aa
movl $0x0, -0x54(%rbp)
movl $0x1, -0x34(%rbp)
movl $0x0, -0x58(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x80(%rbp)
cmpl $0x0, -0x54(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xa1fb9
jmp 0xa2383
movl -0x30(%rbp), %eax
subl -0x34(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl -0x30(%rbp), %ecx
addl -0x34(%rbp), %ecx
cmpl %ecx, %eax
jg 0xa20a8
movl -0x2c(%rbp), %edi
subl -0x34(%rbp), %edi
movq -0x28(%rbp), %rax
movl (%rax), %edx
subl $0x1, %edx
xorl %esi, %esi
callq 0x52600
cmpl $0x0, %eax
je 0xa2098
movl -0x38(%rbp), %edi
movq -0x28(%rbp), %rax
movl (%rax), %edx
subl $0x1, %edx
xorl %esi, %esi
callq 0x52600
cmpl $0x0, %eax
je 0xa2098
movq -0x48(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x38(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0xa2098
movq -0x48(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x38(%rbp), %rcx
cvtsi2sdl (%rax,%rcx,4), %xmm0
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x2c(%rbp), %ecx
subl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x38(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x80(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movq -0x48(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x38(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
movl $0x1, -0x54(%rbp)
jmp 0xa209a
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0xa1fc2
movl -0x30(%rbp), %eax
subl -0x34(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl -0x30(%rbp), %ecx
addl -0x34(%rbp), %ecx
cmpl %ecx, %eax
jg 0xa2197
movl -0x2c(%rbp), %edi
addl -0x34(%rbp), %edi
movq -0x28(%rbp), %rax
movl (%rax), %edx
subl $0x1, %edx
xorl %esi, %esi
callq 0x52600
cmpl $0x0, %eax
je 0xa2187
movl -0x38(%rbp), %edi
movq -0x28(%rbp), %rax
movl (%rax), %edx
subl $0x1, %edx
xorl %esi, %esi
callq 0x52600
cmpl $0x0, %eax
je 0xa2187
movq -0x48(%rbp), %rax
movl -0x2c(%rbp), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x38(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0xa2187
movq -0x48(%rbp), %rax
movl -0x2c(%rbp), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x38(%rbp), %rcx
cvtsi2sdl (%rax,%rcx,4), %xmm0
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x2c(%rbp), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x38(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x80(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movq -0x48(%rbp), %rax
movl -0x2c(%rbp), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x38(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
movl $0x1, -0x54(%rbp)
jmp 0xa2189
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0xa20b1
movl -0x2c(%rbp), %eax
subl -0x34(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl -0x2c(%rbp), %ecx
addl -0x34(%rbp), %ecx
cmpl %ecx, %eax
jg 0xa2286
movl -0x30(%rbp), %edi
subl -0x34(%rbp), %edi
movq -0x28(%rbp), %rax
movl (%rax), %edx
subl $0x1, %edx
xorl %esi, %esi
callq 0x52600
cmpl $0x0, %eax
je 0xa2276
movl -0x38(%rbp), %edi
movq -0x28(%rbp), %rax
movl (%rax), %edx
subl $0x1, %edx
xorl %esi, %esi
callq 0x52600
cmpl $0x0, %eax
je 0xa2276
movq -0x48(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x30(%rbp), %ecx
subl -0x34(%rbp), %ecx
movslq %ecx, %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0xa2276
movq -0x48(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x30(%rbp), %ecx
subl -0x34(%rbp), %ecx
movslq %ecx, %rcx
cvtsi2sdl (%rax,%rcx,4), %xmm0
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x30(%rbp), %ecx
subl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x80(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movq -0x48(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x30(%rbp), %ecx
subl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
addl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
movl $0x1, -0x54(%rbp)
jmp 0xa2278
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0xa21a0
movl -0x2c(%rbp), %eax
subl -0x34(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl -0x2c(%rbp), %ecx
addl -0x34(%rbp), %ecx
cmpl %ecx, %eax
jg 0xa2375
movl -0x30(%rbp), %edi
addl -0x34(%rbp), %edi
movq -0x28(%rbp), %rax
movl (%rax), %edx
subl $0x1, %edx
xorl %esi, %esi
callq 0x52600
cmpl $0x0, %eax
je 0xa2365
movl -0x38(%rbp), %edi
movq -0x28(%rbp), %rax
movl (%rax), %edx
subl $0x1, %edx
xorl %esi, %esi
callq 0x52600
cmpl $0x0, %eax
je 0xa2365
movq -0x48(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x30(%rbp), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0xa2365
movq -0x48(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x30(%rbp), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
cvtsi2sdl (%rax,%rcx,4), %xmm0
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x30(%rbp), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x80(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movq -0x48(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x30(%rbp), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
addl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
movl $0x1, -0x54(%rbp)
jmp 0xa2367
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0xa228f
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xa1fa7
movsd -0x80(%rbp), %xmm0
cvtsi2sdl -0x58(%rbp), %xmm1
divsd %xmm1, %xmm0
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0xa23ac
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xa1f61
jmp 0xa23bc
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xa1f4b
jmp 0xa26f8
leaq 0x6346a(%rip), %rax     # 0x105840
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rcx
xorl %edx, %edx
leaq -0x60(%rbp), %r8
callq 0x178c0
movsd -0x60(%rbp), %xmm0
movq -0x20(%rbp), %rax
subsd (%rax), %xmm0
movq -0x28(%rbp), %rax
cvtsi2sdl (%rax), %xmm1
divsd %xmm1, %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movq -0x28(%rbp), %rax
movslq (%rax), %rdi
movl $0x8, %esi
leaq 0x49e0e(%rip), %rdx     # 0xec232
movl $0x56, %ecx
callq 0x52f40
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rax
movslq (%rax), %rdi
movl $0x4, %esi
leaq 0x44577(%rip), %rdx     # 0xe69c3
movl $0x57, %ecx
callq 0x52f40
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x90(%rbp)
cmpq $0x0, -0x90(%rbp)
je 0xa2504
movq -0x90(%rbp), %rdi
xorl %esi, %esi
callq 0x42c40
movsd %xmm0, -0x70(%rbp)
movsd -0x70(%rbp), %xmm0
movq -0x20(%rbp), %rax
subsd (%rax), %xmm0
movq -0x20(%rbp), %rax
divsd 0x8(%rax), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jne 0xa24ba
movl -0x3c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x90(%rbp), %rdi
callq 0x43580
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x3c(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq -0x50(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movq -0x90(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x90(%rbp)
jmp 0xa2468
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jge 0xa2558
movq -0x50(%rbp), %rax
movslq -0x2c(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0xa254b
movq -0x50(%rbp), %rax
movslq -0x2c(%rbp), %rcx
cvtsi2sdl (%rax,%rcx,4), %xmm1
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x2c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0xa254d
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xa250b
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jge 0xa26f6
movq -0x50(%rbp), %rax
movslq -0x2c(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0xa26e6
movl $0x0, -0x54(%rbp)
movl $0x0, -0x58(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x80(%rbp)
movl $0x1, -0x34(%rbp)
cmpl $0x0, -0x54(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xa25af
jmp 0xa26c7
movl -0x2c(%rbp), %edi
subl -0x34(%rbp), %edi
movq -0x28(%rbp), %rax
movl (%rax), %edx
subl $0x1, %edx
xorl %esi, %esi
callq 0x52600
cmpl $0x0, %eax
je 0xa2634
movq -0x50(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl -0x34(%rbp), %ecx
movslq %ecx, %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0xa2634
movq -0x50(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl -0x34(%rbp), %ecx
movslq %ecx, %rcx
cvtsi2sdl (%rax,%rcx,4), %xmm0
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x2c(%rbp), %ecx
subl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x80(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movq -0x50(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
addl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
movl $0x1, -0x54(%rbp)
movl -0x2c(%rbp), %edi
addl -0x34(%rbp), %edi
movq -0x28(%rbp), %rax
movl (%rax), %edx
subl $0x1, %edx
xorl %esi, %esi
callq 0x52600
cmpl $0x0, %eax
je 0xa26b9
movq -0x50(%rbp), %rax
movl -0x2c(%rbp), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0xa26b9
movq -0x50(%rbp), %rax
movl -0x2c(%rbp), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
cvtsi2sdl (%rax,%rcx,4), %xmm0
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x2c(%rbp), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x80(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movq -0x50(%rbp), %rax
movl -0x2c(%rbp), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
addl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
movl $0x1, -0x54(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xa259d
movsd -0x80(%rbp), %xmm0
cvtsi2sdl -0x58(%rbp), %xmm1
divsd %xmm1, %xmm0
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x2c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0xa26e8
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xa255f
jmp 0xa26f8
leaq 0x63141(%rip), %rax     # 0x105840
movq (%rax), %rax
cmpl $0x2, 0x1bc(%rax)
jle 0xa271c
movq -0x48(%rbp), %rdi
movq -0x28(%rbp), %rax
movl (%rax), %esi
callq 0x52e20
jmp 0xa2725
movq -0x50(%rbp), %rdi
callq 0x52e80
movq -0x20(%rbp), %rax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)