// File: /workspace/github_c_makefile_star2_O0/georgeweigt[P]sassafras/sassafras.c
// Function: run_proc_means
void
run_proc_means(void)
{
	int i, j, k, n;
	char *t;
	char buf[100];

	// print all numeric variables if not specified with VAR

	if (nvar == 0) {
		k = 0;
		for (i = 0; i < dataset->nvar; i++)
			if (dataset->spec[i].ltab == NULL)
				var[k++] = i;
		nvar = k;
	}

	// default statistics

	if (nstats == 0) {
		nstats = 5;
		stats[0] = KN;
		stats[1] = KMEAN;
		stats[2] = KSTD;
		stats[3] = KMIN;
		stats[4] = KMAX;
	}

	ncol = nclass + nstats + 1;

	nrow = nvar;

	for (i = 0; i < nclass; i++) {
		k = class[i];
		n = dataset->spec[k].num_levels;
		nrow *= n;
	}

	nrow++; // for header row

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

	// table header line

	// categorical variable names, if any

	for (i = 0; i < nclass; i++) {
		k = class[i];
		t = dataset->spec[k].name;
		A(0, i) = strdup(t);
	}

	// variable name column

	A(0, nclass) = strdup("Variable");

	// statistic names

	for (i = 0; i < nstats; i++) {
		switch (stats[i]) {
		case KCLM1:
			snprintf(buf, sizeof buf, "%g%% CLM MIN", 100 * (1 - alpha));
			t = buf;
			break;
		case KCLM2:
			snprintf(buf, sizeof buf, "%g%% CLM MAX", 100 * (1 - alpha));
			t = buf;
			break;
		case KLCLM:
			snprintf(buf, sizeof buf, "%g%% LCLM", 100 * (1 - alpha));
			t = buf;
			break;
		case KMAX:
			t = "Maximum";
			break;
		case KMEAN:
			t = "Mean";
			break;
		case KMIN:
			t = "Minimum";
			break;
		case KN:
			t = "N";
			break;
		case KRANGE:
			t = "Range";
			break;
		case KSUM:
			t = "Sum";
			break;
		case KSTD:
		case KSTDDEV:
			t = "Std Dev";
			break;
		case KSTDERR:
		case KSTDMEAN:
			t = "Std Err";
			break;
		case KUCLM:
			snprintf(buf, sizeof buf, "%g%% UCLM", 100 * (1 - alpha));
			t = buf;
			break;
		case KVAR:
			t = "Variance";
			break;
		default:
			t = ".";
			break;
		}
		A(0, nclass + 1 + i) = strdup(t);
	}

	row = 1;

	f(0);

	// right justify variable names

	for (i = 0; i < ncol; i++) {
		if (i < nclass + 1)
			tblfmt[i] = 1;
		else
			tblfmt[i] = 0;
	}

	print_table(a, nrow, ncol, tblfmt);

	for (i = 0; i < nrow; i++)
		for (j = 0; j < ncol; j++)
			free(A(i, j));

	free(a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
cmpl $0x0, 0xe08e(%rip)      # 0x183b0
jne 0xa38f
movl $0x0, -0xc(%rbp)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
movq 0xdb7c(%rip), %rcx      # 0x17eb8
cmpl 0x10(%rcx), %eax
jge 0xa386
movq 0xdb70(%rip), %rax      # 0x17eb8
addq $0x20, %rax
movslq -0x4(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
jne 0xa379
movl -0x4(%rbp), %edx
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0xc(%rbp)
movslq %eax, %rcx
leaq 0xdeaa(%rip), %rax      # 0x18220
movl %edx, (%rax,%rcx,4)
jmp 0xa37b
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xa332
movl -0xc(%rbp), %eax
movl %eax, 0xe021(%rip)      # 0x183b0
cmpl $0x0, 0xf3ea(%rip)      # 0x19780
jne 0xa3d4
movl $0x5, 0xf3de(%rip)      # 0x19780
movl $0x144, 0xf3e4(%rip)    # imm = 0x144
movl $0x140, 0xf3de(%rip)    # imm = 0x140
movl $0x14b, 0xf3d8(%rip)    # imm = 0x14B
movl $0x142, 0xf3d2(%rip)    # imm = 0x142
movl $0x13e, 0xf3cc(%rip)    # imm = 0x13E
movl 0xde36(%rip), %eax      # 0x18210
addl 0xf3a0(%rip), %eax      # 0x19780
addl $0x1, %eax
movl %eax, 0xe6f7(%rip)      # 0x18ae0
movl 0xdfc1(%rip), %eax      # 0x183b0
movl %eax, 0xf3cb(%rip)      # 0x197c0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0xde0b(%rip), %eax      # 0x18210
jge 0xa44f
movslq -0x4(%rbp), %rcx
leaq 0xdc6e(%rip), %rax      # 0x18080
movl (%rax,%rcx,4), %eax
movl %eax, -0xc(%rbp)
movq 0xda99(%rip), %rax      # 0x17eb8
addq $0x20, %rax
movslq -0xc(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
imull 0xf382(%rip), %eax      # 0x197c0
movl %eax, 0xf37c(%rip)      # 0x197c0
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xa3fc
movl 0xf36b(%rip), %eax      # 0x197c0
addl $0x1, %eax
movl %eax, 0xf362(%rip)      # 0x197c0
movl 0xf35c(%rip), %eax      # 0x197c0
imull 0xe675(%rip), %eax      # 0x18ae0
cltq
shlq $0x3, %rax
movl %eax, %edi
callq 0x2da0
movq %rax, 0xf349(%rip)      # 0x197c8
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0xdd81(%rip), %eax      # 0x18210
jge 0xa4f6
movslq -0x4(%rbp), %rcx
leaq 0xdbe4(%rip), %rax      # 0x18080
movl (%rax,%rcx,4), %eax
movl %eax, -0xc(%rbp)
movq 0xda0f(%rip), %rax      # 0x17eb8
addq $0x20, %rax
movslq -0xc(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x21f0
movq %rax, %rdx
movq 0xf2f6(%rip), %rax      # 0x197c8
imull $0x0, 0xe607(%rip), %ecx # 0x18ae0
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xa486
leaq 0x53ae(%rip), %rdi      # 0xf8ab
callq 0x21f0
movq %rax, %rdx
movq 0xf2bc(%rip), %rax      # 0x197c8
imull $0x0, 0xe5cd(%rip), %ecx # 0x18ae0
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq 0xdcec(%rip), %rcx      # 0x18210
movq %rdx, (%rax,%rcx,8)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0xf248(%rip), %eax      # 0x19780
jge 0xa748
movslq -0x4(%rbp), %rcx
leaq 0xf247(%rip), %rax      # 0x19790
movl (%rax,%rcx,4), %eax
addl $0xfffffecd, %eax       # imm = 0xFFFFFECD
movl %eax, %ecx
movq %rcx, -0x88(%rbp)
subl $0x24, %eax
ja 0xa6f8
movq -0x88(%rbp), %rax
leaq 0x4acb(%rip), %rcx      # 0xf03c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x80(%rbp), %rdi
movsd 0x4c5a(%rip), %xmm1     # 0xf1e0
subsd 0xd93a(%rip), %xmm1     # 0x17ec8
movsd 0x4c7a(%rip), %xmm0     # 0xf210
mulsd %xmm1, %xmm0
movl $0x64, %esi
leaq 0x530e(%rip), %rdx      # 0xf8b4
movb $0x1, %al
callq 0x20c0
leaq -0x80(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xa703
leaq -0x80(%rbp), %rdi
movsd 0x4c1a(%rip), %xmm1     # 0xf1e0
subsd 0xd8fa(%rip), %xmm1     # 0x17ec8
movsd 0x4c3a(%rip), %xmm0     # 0xf210
mulsd %xmm1, %xmm0
movl $0x64, %esi
leaq 0x52db(%rip), %rdx      # 0xf8c1
movb $0x1, %al
callq 0x20c0
leaq -0x80(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xa703
leaq -0x80(%rbp), %rdi
movsd 0x4bda(%rip), %xmm1     # 0xf1e0
subsd 0xd8ba(%rip), %xmm1     # 0x17ec8
movsd 0x4bfa(%rip), %xmm0     # 0xf210
mulsd %xmm1, %xmm0
movl $0x64, %esi
leaq 0x52a8(%rip), %rdx      # 0xf8ce
movb $0x1, %al
callq 0x20c0
leaq -0x80(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xa703
leaq 0x5297(%rip), %rax      # 0xf8d8
movq %rax, -0x18(%rbp)
jmp 0xa703
leaq 0x5179(%rip), %rax      # 0xf7ca
movq %rax, -0x18(%rbp)
jmp 0xa703
leaq 0x527f(%rip), %rax      # 0xf8e0
movq %rax, -0x18(%rbp)
jmp 0xa703
leaq 0x54a3(%rip), %rax      # 0xfb14
movq %rax, -0x18(%rbp)
jmp 0xa703
leaq 0x5267(%rip), %rax      # 0xf8e8
movq %rax, -0x18(%rbp)
jmp 0xa703
leaq 0x5260(%rip), %rax      # 0xf8ee
movq %rax, -0x18(%rbp)
jmp 0xa703
leaq 0x5257(%rip), %rax      # 0xf8f2
movq %rax, -0x18(%rbp)
jmp 0xa703
leaq 0x5252(%rip), %rax      # 0xf8fa
movq %rax, -0x18(%rbp)
jmp 0xa703
leaq -0x80(%rbp), %rdi
movsd 0x4b26(%rip), %xmm1     # 0xf1e0
subsd 0xd806(%rip), %xmm1     # 0x17ec8
movsd 0x4b46(%rip), %xmm0     # 0xf210
mulsd %xmm1, %xmm0
movl $0x64, %esi
leaq 0x5228(%rip), %rdx      # 0xf902
movb $0x1, %al
callq 0x20c0
leaq -0x80(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xa703
leaq 0x506a(%rip), %rax      # 0xf75c
movq %rax, -0x18(%rbp)
jmp 0xa703
leaq 0x50d9(%rip), %rax      # 0xf7d8
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x21f0
movq %rax, %rdx
movq 0xf0b2(%rip), %rax      # 0x197c8
imull $0x0, 0xe3c3(%rip), %ecx # 0x18ae0
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movl 0xdae3(%rip), %ecx      # 0x18210
addl $0x1, %ecx
addl -0x4(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xa52f
movl $0x1, 0xf07e(%rip)      # 0x197d0
xorl %edi, %edi
callq 0xa840
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0xe377(%rip), %eax      # 0x18ae0
jge 0xa7a8
movl -0x4(%rbp), %eax
movl 0xda9c(%rip), %ecx      # 0x18210
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0xa78c
movslq -0x4(%rbp), %rcx
leaq 0xf05a(%rip), %rax      # 0x197e0
movb $0x1, (%rax,%rcx)
jmp 0xa79b
movslq -0x4(%rbp), %rcx
leaq 0xf049(%rip), %rax      # 0x197e0
movb $0x0, (%rax,%rcx)
jmp 0xa79d
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xa760
movq 0xf019(%rip), %rdi      # 0x197c8
movl 0xf00b(%rip), %esi      # 0x197c0
movl 0xe325(%rip), %edx      # 0x18ae0
leaq 0xf01e(%rip), %rcx      # 0x197e0
callq 0x5480
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0xefe9(%rip), %eax      # 0x197c0
jge 0xa82b
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0xe2f7(%rip), %eax      # 0x18ae0
jge 0xa81e
movq 0xefd6(%rip), %rax      # 0x197c8
movl -0x4(%rbp), %ecx
imull 0xe2e4(%rip), %ecx      # 0x18ae0
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq -0x8(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2030
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0xa7e0
jmp 0xa820
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xa7ce
movq 0xef96(%rip), %rdi      # 0x197c8
callq 0x2030
addq $0x90, %rsp
popq %rbp
retq