// File: /workspace/github_c_makefile_star2_O2/georgeweigt[P]sassafras/sassafras.c
// Function: run_proc_print
void
run_proc_print(void)
{
	int i, j, nobs, w, x;
	double d;
	char **a, *s;

	print_title();

	nobs = dataset->nobs;

	// print all variables if not specified with VAR

	if (nvar == 0) {
		nvar = dataset->nvar;
		for (i = 0; i < nvar; i++)
			var[i] = i;
	}

	// create array

	a = (char **) xmalloc((nobs + 1) * (nvar + 1) * sizeof (char *));

	// column names

	A(0, 0) = strdup("Obs");

	for (j = 0; j < nvar; j++) {
		x = var[j];
		A(0, j + 1) = strdup(dataset->spec[x].name);
	}

	// for each row

	for (i = 0; i < nobs; i++) {

		// observation number

		snprintf(bigbuf, BIGBUFLEN, "%d", i + 1);

		A(i + 1, 0) = strdup(bigbuf);

		// for each variable

		for (j = 0; j < nvar; j++) {

			x = var[j];

			d = dataset->spec[x].v[i];

			if (isnan(d))
				s = ".";
			else {
				if (dataset->spec[x].ltab == NULL) {
					w = dataset->spec[x].w;
					snprintf(bigbuf, BIGBUFLEN, fmt[w], d);
					s = bigbuf;
				} else
					s = dataset->spec[x].ltab[(int) d];
			}

			A(i + 1, j + 1) = strdup(s);
		}
	}

	s = (char *) xmalloc(nvar + 1);

	s[0] = 0; // observation numbers are right justified

	for (j = 0; j < nvar; j++) {
		x = var[j];
		if (dataset->spec[x].ltab == NULL)
			s[j + 1] = 0;
		else
			s[j + 1] = 1;
	}

	print_table(a, nobs + 1, nvar + 1, s);

	free(s);

	for (i = 0; i < nobs + 1; i++)
		for (j = 0; j < nvar + 1; j++)
			free(A(i, j));

	free(a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
callq 0x46e2
movq 0xbc2f(%rip), %rax      # 0x13ec8
movl 0x14(%rax), %esi
movl 0xc11e(%rip), %edi      # 0x143c0
testl %edi, %edi
je 0x8532
movq %rsi, -0x38(%rbp)
leal 0x1(%rsi), %eax
incl %edi
movl %eax, -0x2c(%rbp)
imull %eax, %edi
shll $0x3, %edi
callq 0x2a9b
movq %rax, %r13
leaq 0x3706(%rip), %rdi      # 0xb9d1
callq 0x2210
movq %rax, (%r13)
movl 0xc0e5(%rip), %r15d     # 0x143c0
movq 0xbbe6(%rip), %rbx      # 0x13ec8
addq $0x20, %rbx
xorl %r14d, %r14d
testl %r15d, %r15d
movl $0x0, %r12d
cmovgl %r15d, %r12d
shlq $0x2, %r12
cmpq %r14, %r12
je 0x8322
leaq 0xbf2a(%rip), %rax      # 0x14230
movslq (%r14,%rax), %rax
imulq $0x28, %rax, %rax
movq (%rbx,%rax), %rdi
callq 0x2210
movq %rax, 0x8(%r13,%r14,2)
addq $0x4, %r14
jmp 0x82fa
movq -0x38(%rbp), %rax
testl %eax, %eax
movl $0x0, %ecx
cmovgl %eax, %ecx
movq %rcx, -0x48(%rbp)
leaq 0x8(%r13), %rax
movq %rax, -0x58(%rbp)
pushq $0x1
popq %r14
xorl %r12d, %r12d
movq %r13, -0x40(%rbp)
cmpq -0x48(%rbp), %r12
je 0x846b
leaq 0x1(%r12), %rbx
movl $0xfa0, %esi            # imm = 0xFA0
leaq 0xab5e(%rip), %r15      # 0x12ec0
movq %r15, %rdi
leaq 0x30b8(%rip), %rdx      # 0xb424
movl %ebx, %ecx
xorl %eax, %eax
callq 0x20e0
movq %r15, %rdi
callq 0x2210
movl 0xc03c(%rip), %r15d     # 0x143c0
leal 0x1(%r15), %ecx
movq %rbx, -0x50(%rbp)
imull %ebx, %ecx
movslq %ecx, %rcx
movq %rax, (%r13,%rcx,8)
leaq 0xbe92(%rip), %rbx      # 0x14230
xorl %r13d, %r13d
movslq %r15d, %rax
cmpq %rax, %r13
jge 0x845b
movslq (%rbx), %rcx
movq 0xbb11(%rip), %rax      # 0x13ec8
imulq $0x28, %rcx, %rcx
movq 0x40(%rax,%rcx), %rdx
movsd (%rdx,%r12,8), %xmm0
ucomisd %xmm0, %xmm0
jp 0x8452
addq %rax, %rcx
addq $0x20, %rcx
movq 0x10(%rcx), %rax
testq %rax, %rax
je 0x83ed
cvttsd2si %xmm0, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
jmp 0x842a
movslq 0x18(%rcx), %rax
leaq 0x6d38(%rip), %rcx      # 0xf130
movq (%rcx,%rax,8), %rdx
movl $0xfa0, %esi            # imm = 0xFA0
movq %r12, %r15
movl %r14d, %r12d
leaq 0xaab2(%rip), %r14      # 0x12ec0
movq %r14, %rdi
movb $0x1, %al
callq 0x20e0
movl 0xbfa2(%rip), %eax      # 0x143c0
movq %r14, %rdi
movl %r12d, %r14d
movq %r15, %r12
movq %rax, %r15
callq 0x2210
leal 0x1(%r15), %ecx
imull %r14d, %ecx
movslq %ecx, %rcx
movq -0x58(%rbp), %rdx
leaq (%rdx,%rcx,8), %rcx
movq %rax, (%rcx,%r13,8)
incq %r13
addq $0x4, %rbx
jmp 0x83a1
leaq 0x3444(%rip), %rdi      # 0xb89d
jmp 0x842a
incl %r14d
movq -0x50(%rbp), %r12
movq -0x40(%rbp), %r13
jmp 0x8347
incl %r15d
movl %r15d, %edi
callq 0x2a9b
movq %rax, %r14
movb $0x0, (%rax)
movl 0xbf3e(%rip), %edx      # 0x143c0
incq %rax
movq 0xba3c(%rip), %rcx      # 0x13ec8
addq $0x20, %rcx
xorl %esi, %esi
testl %edx, %edx
movl $0x0, %edi
cmovgl %edx, %edi
shlq $0x2, %rdi
leaq 0xbd89(%rip), %r8       # 0x14230
movq -0x38(%rbp), %r15
cmpq %rsi, %rdi
je 0x84ca
movslq (%rsi,%r8), %r9
imulq $0x28, %r9, %r9
cmpq $0x0, 0x10(%rcx,%r9)
setne (%rax)
addq $0x4, %rsi
incq %rax
jmp 0x84ab
incl %edx
movq %r13, %rdi
movl -0x2c(%rbp), %esi
movq %r14, %rcx
callq 0x4491
movq %r14, %rdi
callq 0x2040
xorl %ebx, %ebx
cmpl %r15d, %ebx
jg 0x851c
xorl %r14d, %r14d
movslq 0xbecd(%rip), %rax      # 0x143c0
cmpq %rax, %r14
jg 0x8518
incl %eax
imull %ebx, %eax
cltq
leaq (,%rax,8), %rax
addq %r13, %rax
movq (%rax,%r14,8), %rdi
callq 0x2040
incq %r14
jmp 0x84ec
incl %ebx
jmp 0x84e4
movq %r13, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2040
movl 0x10(%rax), %edi
movl %edi, 0xbe85(%rip)      # 0x143c0
xorl %eax, %eax
testl %edi, %edi
movl $0x0, %ecx
cmovgl %edi, %ecx
leaq 0xbce2(%rip), %rdx      # 0x14230
cmpq %rax, %rcx
je 0x82aa
movl %eax, (%rdx)
incq %rax
addq $0x4, %rdx
jmp 0x854e