// File: /workspace/github_c_makefile_star2_O3/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 0x4a3d
movq 0xb519(%rip), %rax      # 0x13ed8
movl 0x14(%rax), %edx
movl 0xba08(%rip), %edi      # 0x143d0
testl %edi, %edi
jne 0x89f0
movl 0x10(%rax), %edi
movl %edi, 0xb9fb(%rip)      # 0x143d0
testl %edi, %edi
jle 0x89f0
leaq 0xb860(%rip), %rax      # 0x14240
xorl %ecx, %ecx
movl %ecx, (%rax)
incq %rcx
addq $0x4, %rax
cmpq %rcx, %rdi
jne 0x89e2
movq %rdx, -0x48(%rbp)
leal 0x1(%rdx), %eax
incl %edi
movl %eax, -0x3c(%rbp)
imull %eax, %edi
shll $0x3, %edi
callq 0x2bd8
movq %rax, %r13
leaq 0x2fc0(%rip), %rdi      # 0xb9d1
callq 0x2220
movq %rax, (%r13)
movslq 0xb9af(%rip), %r15      # 0x143d0
testq %r15, %r15
jle 0x8a62
movq 0xb4ab(%rip), %rbx      # 0x13ed8
addq $0x20, %rbx
leaq (,%r15,4), %r14
xorl %r12d, %r12d
leaq 0xb7fd(%rip), %rax      # 0x14240
movslq (%r12,%rax), %rax
leaq (%rax,%rax,4), %rax
movq (%rbx,%rax,8), %rdi
callq 0x2220
movq %rax, 0x8(%r13,%r12,2)
addq $0x4, %r12
cmpq %r12, %r14
jne 0x8a3c
movq %r13, -0x38(%rbp)
movq -0x48(%rbp), %r12
testl %r12d, %r12d
jle 0x8bb8
movq -0x38(%rbp), %r13
leaq 0x8(%r13), %rax
movq %rax, -0x58(%rbp)
movl $0x1, -0x2c(%rbp)
xorl %eax, %eax
movq %rax, %r12
leaq 0x1(%rax), %r14
movl $0xfa0, %esi            # imm = 0xFA0
leaq 0xa435(%rip), %rbx      # 0x12ed0
movq %rbx, %rdi
leaq 0x297f(%rip), %rdx      # 0xb424
movl %r14d, %ecx
xorl %eax, %eax
callq 0x20e0
movq %rbx, %rdi
callq 0x2220
movl 0xb912(%rip), %r15d     # 0x143d0
leal 0x1(%r15), %ecx
movq %r14, -0x50(%rbp)
imull %r14d, %ecx
movslq %ecx, %rcx
movq %rax, (%r13,%rcx,8)
testl %r15d, %r15d
jle 0x8b9e
movq 0xb3f6(%rip), %r14      # 0x13ed8
leaq 0xb757(%rip), %rbx      # 0x14240
xorl %r13d, %r13d
movslq (%rbx), %rax
leaq (%rax,%rax,4), %rax
movq 0x40(%r14,%rax,8), %rcx
movsd (%rcx,%r12,8), %xmm0
ucomisd %xmm0, %xmm0
jp 0x8b95
leaq (%r14,%rax,8), %rcx
addq $0x20, %rcx
movq 0x10(%rcx), %rax
testq %rax, %rax
je 0x8b26
cvttsd2si %xmm0, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
jmp 0x8b64
movslq 0x18(%rcx), %rax
leaq 0x660f(%rip), %rcx      # 0xf140
movq (%rcx,%rax,8), %rdx
movl $0xfa0, %esi            # imm = 0xFA0
movq %r12, %r15
leaq 0xa38c(%rip), %r12      # 0x12ed0
movq %r12, %rdi
movb $0x1, %al
callq 0x20e0
movq 0xb383(%rip), %r14      # 0x13ed8
movl 0xb875(%rip), %eax      # 0x143d0
movq %r12, %rdi
movq %r15, %r12
movq %rax, %r15
callq 0x2220
leal 0x1(%r15), %ecx
imull -0x2c(%rbp), %ecx
movslq %ecx, %rcx
movq -0x58(%rbp), %rdx
leaq (%rdx,%rcx,8), %rcx
movq %rax, (%rcx,%r13,8)
incq %r13
movslq %r15d, %rax
addq $0x4, %rbx
cmpq %rax, %r13
jl 0x8aec
jmp 0x8b9e
leaq 0x2d01(%rip), %rdi      # 0xb89d
jmp 0x8b64
incl -0x2c(%rbp)
movq -0x48(%rbp), %r12
movq -0x50(%rbp), %rax
cmpq %r12, %rax
movq -0x38(%rbp), %r13
jne 0x8a88
jmp 0x8bbc
movq -0x38(%rbp), %r13
incl %r15d
movl %r15d, %edi
callq 0x2bd8
movq %rax, %r14
movb $0x0, (%rax)
movslq 0xb7fc(%rip), %rdx      # 0x143d0
testq %rdx, %rdx
jle 0x8c18
movq %r14, %rax
incq %rax
movq 0xb2f2(%rip), %rcx      # 0x13ed8
addq $0x20, %rcx
leaq (,%rdx,4), %rsi
xorl %edi, %edi
leaq 0xb645(%rip), %r8       # 0x14240
movslq (%rdi,%r8), %r9
leaq (%r9,%r9,4), %r9
cmpq $0x0, 0x10(%rcx,%r9,8)
setne (%rax)
addq $0x4, %rdi
incq %rax
cmpq %rdi, %rsi
jne 0x8bfb
incl %edx
movq %r13, %rdi
movl -0x3c(%rbp), %esi
movq %r14, %rcx
callq 0x4789
movq %r14, %rdi
callq 0x2040
testl %r12d, %r12d
js 0x8c7d
xorl %ebx, %ebx
movl 0xb793(%rip), %eax      # 0x143d0
testl %eax, %eax
js 0x8c73
movq $-0x1, %r14
incl %eax
imull %ebx, %eax
cltq
leaq (,%rax,8), %rax
addq %r13, %rax
movq 0x8(%rax,%r14,8), %rdi
callq 0x2040
movslq 0xb765(%rip), %rax      # 0x143d0
incq %r14
cmpq %rax, %r14
jl 0x8c48
leal 0x1(%rbx), %ecx
cmpl %r12d, %ebx
movl %ecx, %ebx
jne 0x8c3d
movq %r13, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2040