// File: /workspace/github_c_makefile_star2_O0/georgeweigt[P]sassafras/sassafras.c
// Function: proc_anova_prelim
void
proc_anova_prelim(void)
{
	int i, j, k, x;

	xfree(miss);
	xfree(B);
	xfree(GG);
	xfree(TT);
	xfree(XX);
	xfree(Y);
	xfree(Yhat);

	// missing data

	miss = (int *) xmalloc(dataset->nobs * sizeof (int));

	nmiss = 0;

	for (i = 0; i < dataset->nobs; i++) {
		miss[i] = 0;
		if (isnan(dataset->spec[yvar].v[i])) {
			miss[i] = 1;
			nmiss++;
			continue;
		}
		for (j = 0; j < nx; j++) {
			x = xtab[j];
			if (isnan(dataset->spec[x].v[i])) {
				miss[i] = 1;
				nmiss++;
				break;
			}
		}
	}

	nobs = dataset->nobs - nmiss;

	// add up all levels

	ncol = 1; // for intercept

	for (i = 0; i < nx; i++) {
		x = xtab[i];
		ncol += dataset->spec[x].num_levels;
	}

	B = (double *) xmalloc(ncol * sizeof (double));
	GG = (double *) xmalloc(ncol * ncol * sizeof (double));
	TT = (double *) xmalloc(ncol * ncol * sizeof (double));
	XX = (double *) xmalloc(nobs * ncol * sizeof (double));
	Y = (double *) xmalloc(nobs * sizeof (double));
	Yhat = (double *) xmalloc(nobs * sizeof (double));

	// fill Y with non-missing values

	k = 0;

	for (i = 0; i < dataset->nobs; i++) {
		if (miss[i])
			continue;
		Y[k++] = dataset->spec[yvar].v[i];
	}

	ybar = 0;

	for (i = 0; i < nobs; i++)
		ybar += Y[i];

	ybar /= nobs;

	// corrected sum of squares

	css = 0;

	for (i = 0; i < nobs; i++)
		css += (Y[i] - ybar) * (Y[i] - ybar);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0xfff9(%rip), %rdi      # 0x18aa8
callq 0x91b0
movq 0xfff5(%rip), %rdi      # 0x18ab0
callq 0x91b0
movq 0xfff1(%rip), %rdi      # 0x18ab8
callq 0x91b0
movq 0xffed(%rip), %rdi      # 0x18ac0
callq 0x91b0
movq 0xffe9(%rip), %rdi      # 0x18ac8
callq 0x91b0
movq 0xffe5(%rip), %rdi      # 0x18ad0
callq 0x91b0
movq 0xffe1(%rip), %rdi      # 0x18ad8
callq 0x91b0
movq 0xf3b5(%rip), %rax      # 0x17eb8
movslq 0x14(%rax), %rax
shlq $0x2, %rax
movl %eax, %edi
callq 0x2da0
movq %rax, 0xff8f(%rip)      # 0x18aa8
movl $0x0, 0xff0d(%rip)      # 0x18a30
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
movq 0xf384(%rip), %rcx      # 0x17eb8
cmpl 0x14(%rcx), %eax
jge 0x8c3b
movq 0xff64(%rip), %rax      # 0x18aa8
movslq -0x4(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movq 0xf362(%rip), %rax      # 0x17eb8
addq $0x20, %rax
movslq 0xfa0f(%rip), %rcx      # 0x18570
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rax
movslq -0x4(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x8b82
jmp 0x8ba8
movq 0xff1f(%rip), %rax      # 0x18aa8
movslq -0x4(%rbp), %rcx
movl $0x1, (%rax,%rcx,4)
movl 0xfe96(%rip), %eax      # 0x18a30
addl $0x1, %eax
movl %eax, 0xfe8d(%rip)      # 0x18a30
jmp 0x8c2d
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0xf820(%rip), %eax      # 0x183d8
jge 0x8c2b
movslq -0x8(%rbp), %rcx
leaq 0xfb4b(%rip), %rax      # 0x18710
movl (%rax,%rcx,4), %eax
movl %eax, -0x10(%rbp)
movq 0xf2e6(%rip), %rax      # 0x17eb8
addq $0x20, %rax
movslq -0x10(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rax
movslq -0x4(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x8bfb
jmp 0x8c1e
movq 0xfea6(%rip), %rax      # 0x18aa8
movslq -0x4(%rbp), %rcx
movl $0x1, (%rax,%rcx,4)
movl 0xfe1d(%rip), %eax      # 0x18a30
addl $0x1, %eax
movl %eax, 0xfe14(%rip)      # 0x18a30
jmp 0x8c2b
jmp 0x8c20
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x8baf
jmp 0x8c2d
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x8b2a
movq 0xf276(%rip), %rax      # 0x17eb8
movl 0x14(%rax), %eax
subl 0xfde5(%rip), %eax      # 0x18a30
movl %eax, 0xfde3(%rip)      # 0x18a34
movl $0x1, 0xfe85(%rip)      # 0x18ae0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0xf76d(%rip), %eax      # 0x183d8
jge 0x8cae
movslq -0x4(%rbp), %rcx
leaq 0xfa98(%rip), %rax      # 0x18710
movl (%rax,%rcx,4), %eax
movl %eax, -0x10(%rbp)
movq 0xf233(%rip), %rax      # 0x17eb8
addq $0x20, %rax
movslq -0x10(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
addl 0xfe43(%rip), %eax      # 0x18ae0
movl %eax, 0xfe3d(%rip)      # 0x18ae0
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x8c62
movslq 0xfe2b(%rip), %rax      # 0x18ae0
shlq $0x3, %rax
movl %eax, %edi
callq 0x2da0
movq %rax, 0xfde9(%rip)      # 0x18ab0
movl 0xfe13(%rip), %eax      # 0x18ae0
imull 0xfe0c(%rip), %eax      # 0x18ae0
cltq
shlq $0x3, %rax
movl %eax, %edi
callq 0x2da0
movq %rax, 0xfdd0(%rip)      # 0x18ab8
movl 0xfdf2(%rip), %eax      # 0x18ae0
imull 0xfdeb(%rip), %eax      # 0x18ae0
cltq
shlq $0x3, %rax
movl %eax, %edi
callq 0x2da0
movq %rax, 0xfdb7(%rip)      # 0x18ac0
movl 0xfd25(%rip), %eax      # 0x18a34
imull 0xfdca(%rip), %eax      # 0x18ae0
cltq
shlq $0x3, %rax
movl %eax, %edi
callq 0x2da0
movq %rax, 0xfd9e(%rip)      # 0x18ac8
movslq 0xfd03(%rip), %rax      # 0x18a34
shlq $0x3, %rax
movl %eax, %edi
callq 0x2da0
movq %rax, 0xfd8d(%rip)      # 0x18ad0
movslq 0xfcea(%rip), %rax      # 0x18a34
shlq $0x3, %rax
movl %eax, %edi
callq 0x2da0
movq %rax, 0xfd7c(%rip)      # 0x18ad8
movl $0x0, -0xc(%rbp)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
movq 0xf144(%rip), %rcx      # 0x17eb8
cmpl 0x14(%rcx), %eax
jge 0x8dd7
movq 0xfd28(%rip), %rax      # 0x18aa8
movslq -0x4(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x8d8c
jmp 0x8dcc
movq 0xf125(%rip), %rax      # 0x17eb8
addq $0x20, %rax
movslq 0xf7d2(%rip), %rcx      # 0x18570
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rax
movslq -0x4(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0xfd17(%rip), %rax      # 0x18ad0
movl -0xc(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0xc(%rbp)
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x8d6a
xorps %xmm0, %xmm0
movsd %xmm0, 0xfcb6(%rip)     # 0x18a98
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0xfc42(%rip), %eax      # 0x18a34
jge 0x8e1f
movq 0xfcd5(%rip), %rax      # 0x18ad0
movslq -0x4(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd 0xfc8c(%rip), %xmm0     # 0x18a98
movsd %xmm0, 0xfc84(%rip)     # 0x18a98
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x8de9
cvtsi2sdl 0xfc0d(%rip), %xmm1 # 0x18a34
movsd 0xfc69(%rip), %xmm0     # 0x18a98
divsd %xmm1, %xmm0
movsd %xmm0, 0xfc5d(%rip)     # 0x18a98
xorps %xmm0, %xmm0
movsd %xmm0, 0xfc3a(%rip)     # 0x18a80
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0xfbde(%rip), %eax      # 0x18a34
jge 0x8eab
movq 0xfc71(%rip), %rax      # 0x18ad0
movslq -0x4(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
subsd 0xfc28(%rip), %xmm0     # 0x18a98
movq 0xfc59(%rip), %rax      # 0x18ad0
movslq -0x4(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
subsd 0xfc10(%rip), %xmm2     # 0x18a98
movsd 0xfbf0(%rip), %xmm1     # 0x18a80
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0xfbe0(%rip)     # 0x18a80
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x8e4d
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)