// File: /workspace/github_c_makefile_star2_O0/georgeweigt[P]sassafras/sassafras.c
// Function: proc_anova_print_lsd
void
proc_anova_print_lsd(int x)
{
	int i, j, k, n, ncol, nrow;
	char **a, *s;
	double d, lsd, pval, q, se, tval;

	emit_line_center("Least Significant Difference Test");
	emit_line("");

	q = qt(1 - alpha / 2, dfe); // degrees of freedom error

	n = dataset->spec[x].num_levels;

	nrow = 1 + n * (n - 1);

	ncol = 7;

	a = (char **) xmalloc(nrow * ncol * sizeof (char *));

	s = dataset->spec[x].name;
	A(0, 0) = strdup(s);
	A(0, 1) = strdup(s);

	s = dataset->spec[yvar].name;
	snprintf(bigbuf, BIGBUFLEN, "Delta %s", s);
	A(0, 2) = strdup(bigbuf);

	snprintf(bigbuf, BIGBUFLEN, "%g%% CI MIN", 100 * (1 - alpha));
	A(0, 3) = strdup(bigbuf);

	snprintf(bigbuf, BIGBUFLEN, "%g%% CI MAX", 100 * (1 - alpha));
	A(0, 4) = strdup(bigbuf);

	A(0, 5) = strdup("t Value");
	A(0, 6) = strdup("Pr > |t|  ");

	k = 0;

	for (i = 0; i < n; i++) {
		for (j = 0; j < n; j++) {

			if (i == j)
				continue;

			k++;

			// Level

			s = dataset->spec[x].ltab[i];
			A(k, 0) = strdup(s);

			// Level

			s = dataset->spec[x].ltab[j];
			A(k, 1) = strdup(s);

			// Sanity check

			if (count[i] == 0 || count[j] == 0) {
				A(k, 2) = strdup(".");
				A(k, 3) = strdup(".");
				A(k, 4) = strdup(".");
				A(k, 5) = strdup(".");
				A(k, 6) = strdup(".  ");
				continue;
			}

			// Difference

			d = mean[i] - mean[j];
			snprintf(bigbuf, BIGBUFLEN, "%0.6f", d);
			A(k, 2) = strdup(bigbuf);

			// confidence interval

			se = sqrt(mse * (1.0 / count[i] + 1.0 / count[j]));

			lsd = q * se;

			tval = d / se;

			pval = 2 * (1 - tdist(fabs(tval), dfe));

			snprintf(bigbuf, BIGBUFLEN, "%0.6f", d - lsd);
			A(k, 3) = strdup(bigbuf);

			snprintf(bigbuf, BIGBUFLEN, "%0.6f", d + lsd);
			A(k, 4) = strdup(bigbuf);

			// t Value

			snprintf(bigbuf, BIGBUFLEN, "%0.2f", tval);
			A(k, 5) = strdup(bigbuf);

			// Pr > |t|

			if (pval > alpha)
				snprintf(bigbuf, BIGBUFLEN, "%0.4f  ", pval);
			else
				snprintf(bigbuf, BIGBUFLEN, "%0.4f *", pval);
			A(k, 6) = strdup(bigbuf);
		}
	}

	bigbuf[0] = 1; // left justify
	bigbuf[1] = 1;
	bigbuf[2] = 0;
	bigbuf[3] = 0;
	bigbuf[4] = 0;
	bigbuf[5] = 0;
	bigbuf[6] = 0;

	print_table_and_free(a, nrow, ncol, bigbuf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0x4(%rbp)
leaq 0x9026(%rip), %rdi      # 0xf818
callq 0x4c20
leaq 0x8be1(%rip), %rdi      # 0xf3df
callq 0x4bf0
movsd 0x116bd(%rip), %xmm1    # 0x17ec8
movsd 0x89d5(%rip), %xmm0     # 0xf1e8
divsd %xmm0, %xmm1
movsd 0x89c1(%rip), %xmm0     # 0xf1e0
subsd %xmm1, %xmm0
movsd 0x12215(%rip), %xmm1    # 0x18a40
callq 0x9da0
movsd %xmm0, -0x50(%rbp)
movq 0x1167c(%rip), %rax     # 0x17eb8
addq $0x20, %rax
movslq -0x4(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
imull %ecx, %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl $0x7, -0x18(%rbp)
movl -0x1c(%rbp), %eax
imull -0x18(%rbp), %eax
cltq
shlq $0x3, %rax
movl %eax, %edi
callq 0x2da0
movq %rax, -0x28(%rbp)
movq 0x1162f(%rip), %rax     # 0x17eb8
addq $0x20, %rax
movslq -0x4(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x21f0
movq %rax, %rdx
movq -0x28(%rbp), %rax
imull $0x0, -0x18(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rdi
callq 0x21f0
movq %rax, %rdx
movq -0x28(%rbp), %rax
imull $0x0, -0x18(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x8(%rax,%rcx,8)
movq 0x115db(%rip), %rax     # 0x17eb8
addq $0x20, %rax
movslq 0x11c88(%rip), %rcx     # 0x18570
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
leaq 0x105af(%rip), %rdi     # 0x16eb0
movl $0xfa0, %esi            # imm = 0xFA0
leaq 0x8f2d(%rip), %rdx      # 0xf83a
movb $0x0, %al
callq 0x20c0
leaq 0x10595(%rip), %rdi     # 0x16eb0
callq 0x21f0
movq %rax, %rdx
movq -0x28(%rbp), %rax
imull $0x0, -0x18(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x10(%rax,%rcx,8)
movsd 0x88a5(%rip), %xmm1     # 0xf1e0
subsd 0x11585(%rip), %xmm1    # 0x17ec8
movsd 0x88c5(%rip), %xmm0     # 0xf210
mulsd %xmm1, %xmm0
leaq 0x1055a(%rip), %rdi     # 0x16eb0
movl $0xfa0, %esi            # imm = 0xFA0
leaq 0x8e9e(%rip), %rdx      # 0xf800
movb $0x1, %al
callq 0x20c0
leaq 0x10540(%rip), %rdi     # 0x16eb0
callq 0x21f0
movq %rax, %rdx
movq -0x28(%rbp), %rax
imull $0x0, -0x18(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x18(%rax,%rcx,8)
movsd 0x8850(%rip), %xmm1     # 0xf1e0
subsd 0x11530(%rip), %xmm1    # 0x17ec8
movsd 0x8870(%rip), %xmm0     # 0xf210
mulsd %xmm1, %xmm0
leaq 0x10505(%rip), %rdi     # 0x16eb0
movl $0xfa0, %esi            # imm = 0xFA0
leaq 0x8e55(%rip), %rdx      # 0xf80c
movb $0x1, %al
callq 0x20c0
leaq 0x104eb(%rip), %rdi     # 0x16eb0
callq 0x21f0
movq %rax, %rdx
movq -0x28(%rbp), %rax
imull $0x0, -0x18(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x20(%rax,%rcx,8)
leaq 0x8e5f(%rip), %rdi      # 0xf843
callq 0x21f0
movq %rax, %rdx
movq -0x28(%rbp), %rax
imull $0x0, -0x18(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x28(%rax,%rcx,8)
leaq 0x8e48(%rip), %rdi      # 0xf84b
callq 0x21f0
movq %rax, %rdx
movq -0x28(%rbp), %rax
imull $0x0, -0x18(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x30(%rax,%rcx,8)
movl $0x0, -0x10(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x6e28
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x6e18
movl -0x8(%rbp), %eax
cmpl -0xc(%rbp), %eax
jne 0x6a55
jmp 0x6e0a
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movq 0x11453(%rip), %rax     # 0x17eb8
addq $0x20, %rax
movslq -0x4(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movslq -0x8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x21f0
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
imull -0x10(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x1140f(%rip), %rax     # 0x17eb8
addq $0x20, %rax
movslq -0x4(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x21f0
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
imull -0x10(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x8(%rax,%rcx,8)
movslq -0x8(%rbp), %rcx
leaq 0x12afe(%rip), %rax     # 0x195f0
cmpl $0x0, (%rax,%rcx,4)
je 0x6b0d
movslq -0xc(%rbp), %rcx
leaq 0x12aed(%rip), %rax     # 0x195f0
cmpl $0x0, (%rax,%rcx,4)
jne 0x6bbc
leaq 0x8cc4(%rip), %rdi      # 0xf7d8
callq 0x21f0
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
imull -0x10(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x10(%rax,%rcx,8)
leaq 0x8ca2(%rip), %rdi      # 0xf7d8
callq 0x21f0
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
imull -0x10(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x18(%rax,%rcx,8)
leaq 0x8c80(%rip), %rdi      # 0xf7d8
callq 0x21f0
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
imull -0x10(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x20(%rax,%rcx,8)
leaq 0x8c5e(%rip), %rdi      # 0xf7d8
callq 0x21f0
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
imull -0x10(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x28(%rax,%rcx,8)
leaq 0x8cba(%rip), %rdi      # 0xf856
callq 0x21f0
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
imull -0x10(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x30(%rax,%rcx,8)
jmp 0x6e0a
movslq -0x8(%rbp), %rcx
leaq 0x123e9(%rip), %rax     # 0x18fb0
movsd (%rax,%rcx,8), %xmm0
movslq -0xc(%rbp), %rcx
leaq 0x123d9(%rip), %rax     # 0x18fb0
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm0
leaq 0x102c3(%rip), %rdi     # 0x16eb0
movl $0xfa0, %esi            # imm = 0xFA0
leaq 0x868b(%rip), %rdx      # 0xf284
movb $0x1, %al
callq 0x20c0
leaq 0x102a9(%rip), %rdi     # 0x16eb0
callq 0x21f0
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
imull -0x10(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x10(%rax,%rcx,8)
movsd 0x11e26(%rip), %xmm0    # 0x18a50
movslq -0x8(%rbp), %rcx
leaq 0x129bb(%rip), %rax     # 0x195f0
cvtsi2sdl (%rax,%rcx,4), %xmm2
movsd 0x859e(%rip), %xmm1     # 0xf1e0
divsd %xmm2, %xmm1
movslq -0xc(%rbp), %rcx
leaq 0x1299f(%rip), %rax     # 0x195f0
cvtsi2sdl (%rax,%rcx,4), %xmm3
movsd 0x8582(%rip), %xmm2     # 0xf1e0
divsd %xmm3, %xmm2
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
callq 0x21e0
movsd %xmm0, -0x58(%rbp)
movsd -0x50(%rbp), %xmm0
mulsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x38(%rbp), %xmm0
divsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x60(%rbp), %xmm0
movaps 0x85b2(%rip), %xmm1     # 0xf250
pand %xmm1, %xmm0
movsd 0x11d96(%rip), %xmm1    # 0x18a40
callq 0x9f40
movsd 0x8529(%rip), %xmm1     # 0xf1e0
subsd %xmm0, %xmm1
movsd 0x8525(%rip), %xmm0     # 0xf1e8
mulsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x38(%rbp), %xmm0
subsd -0x40(%rbp), %xmm0
leaq 0x101d3(%rip), %rdi     # 0x16eb0
movl $0xfa0, %esi            # imm = 0xFA0
leaq 0x859b(%rip), %rdx      # 0xf284
movb $0x1, %al
callq 0x20c0
leaq 0x101b9(%rip), %rdi     # 0x16eb0
callq 0x21f0
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
imull -0x10(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x18(%rax,%rcx,8)
movsd -0x38(%rbp), %xmm0
addsd -0x40(%rbp), %xmm0
leaq 0x1018d(%rip), %rdi     # 0x16eb0
movl $0xfa0, %esi            # imm = 0xFA0
leaq 0x8555(%rip), %rdx      # 0xf284
movb $0x1, %al
callq 0x20c0
leaq 0x10173(%rip), %rdi     # 0x16eb0
callq 0x21f0
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
imull -0x10(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x20(%rax,%rcx,8)
movsd -0x60(%rbp), %xmm0
leaq 0x1014c(%rip), %rdi     # 0x16eb0
movl $0xfa0, %esi            # imm = 0xFA0
leaq 0x84fc(%rip), %rdx      # 0xf26c
movb $0x1, %al
callq 0x20c0
leaq 0x10132(%rip), %rdi     # 0x16eb0
callq 0x21f0
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
imull -0x10(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x28(%rax,%rcx,8)
movsd -0x48(%rbp), %xmm0
ucomisd 0x11122(%rip), %xmm0    # 0x17ec8
jbe 0x6dc9
movsd -0x48(%rbp), %xmm0
leaq 0x100fc(%rip), %rdi     # 0x16eb0
movl $0xfa0, %esi            # imm = 0xFA0
leaq 0x8a9a(%rip), %rdx      # 0xf85a
movb $0x1, %al
callq 0x20c0
jmp 0x6de8
movsd -0x48(%rbp), %xmm0
leaq 0x100db(%rip), %rdi     # 0x16eb0
movl $0xfa0, %esi            # imm = 0xFA0
leaq 0x8a81(%rip), %rdx      # 0xf862
movb $0x1, %al
callq 0x20c0
leaq 0x100c1(%rip), %rdi     # 0x16eb0
callq 0x21f0
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
imull -0x10(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, 0x30(%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x6a3c
jmp 0x6e1a
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x6a29
movb $0x1, 0x10081(%rip)     # 0x16eb0
movb $0x1, 0x1007b(%rip)     # 0x16eb1
movb $0x0, 0x10075(%rip)     # 0x16eb2
movb $0x0, 0x1006f(%rip)     # 0x16eb3
movb $0x0, 0x10069(%rip)     # 0x16eb4
movb $0x0, 0x10063(%rip)     # 0x16eb5
movb $0x0, 0x1005d(%rip)     # 0x16eb6
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x18(%rbp), %edx
leaq 0x10046(%rip), %rcx     # 0x16eb0
callq 0x53f0
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)