// File: /workspace/github_c_makefile_star2_O0/hansvanstaveren[P]BigDeal/output.c
// Function: print_stat
static void
print_stat(FILE *out)
{
	int i, length;

	fprintf(out, "Number of deals: %d\n", prparp->pp_nboards);

	fprintf(out, "Average sum of squares: ");
	print_avg(out, stats.st_sumsquare, prparp->pp_nboards, 0, "\n");

	fprintf(out, "Average points NESW: ");
	print_avg(out, stats.st_hcp[0], prparp->pp_nboards, 2, " ");
	print_avg(out, stats.st_hcp[1], prparp->pp_nboards, 2, " ");
	print_avg(out, stats.st_hcp[2], prparp->pp_nboards, 2, " ");
	print_avg(out, stats.st_hcp[3], prparp->pp_nboards, 2, "\n");

	fprintf(out, "Frequency of high card points per hand:\n");
	for (i=0; i<38; i++) {
		if (stats.st_hcpfreq[i] == 0)
			continue;
		fprintf(out, "%2d points: ", i);
		print_avg(out, stats.st_hcpfreq[i]*100, prparp->pp_nboards*4, 4, "% (");
		print_avg(out, theory_hcpfreq[i], 10000, 4, "%)\n");
	}

	fprintf(out, "Frequency of longest suitlength per compass:\n");
	fprintf(out, "%8s%8s%8s%8s%8s Theory\n", "Length",
		"North", "East", "South", "West");
	for(length = 4; length <= stats.st_longestsuit; length++) {
		fprintf(out, "%8d%8d%8d%8d%8d ", length,
			stats.st_lsuitfreq[COMPASS_NORTH][length],
			stats.st_lsuitfreq[COMPASS_EAST][length],
			stats.st_lsuitfreq[COMPASS_SOUTH][length],
			stats.st_lsuitfreq[COMPASS_WEST][length]);
		print_avg(out, 100*theory_lsuitfreq[length],
			100000000/prparp->pp_nboards, 1, "\n");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq 0x76e9(%rip), %rax      # 0xff60
movl 0x8(%rax), %edx
leaq 0x24c7(%rip), %rsi      # 0xad48
movb $0x0, %al
callq 0x2150
movq -0x8(%rbp), %rdi
leaq 0x24ca(%rip), %rsi      # 0xad5d
movb $0x0, %al
callq 0x2150
movq -0x8(%rbp), %rdi
movl 0x7828(%rip), %esi      # 0x100cc
movq 0x76b5(%rip), %rax      # 0xff60
movl 0x8(%rax), %edx
xorl %ecx, %ecx
leaq 0x1dcb(%rip), %r8       # 0xa682
callq 0x9180
movq -0x8(%rbp), %rdi
leaq 0x24af(%rip), %rsi      # 0xad76
movb $0x0, %al
callq 0x2150
movq -0x8(%rbp), %rdi
movl 0x77f8(%rip), %esi      # 0x100d0
movq 0x7681(%rip), %rax      # 0xff60
movl 0x8(%rax), %edx
movl $0x2, %ecx
leaq 0x1bb5(%rip), %r8       # 0xa4a3
callq 0x9180
movq -0x8(%rbp), %rdi
movl 0x77d7(%rip), %esi      # 0x100d4
movq 0x765c(%rip), %rax      # 0xff60
movl 0x8(%rax), %edx
movl $0x2, %ecx
leaq 0x1b90(%rip), %r8       # 0xa4a3
callq 0x9180
movq -0x8(%rbp), %rdi
movl 0x77b6(%rip), %esi      # 0x100d8
movq 0x7637(%rip), %rax      # 0xff60
movl 0x8(%rax), %edx
movl $0x2, %ecx
leaq 0x1b6b(%rip), %r8       # 0xa4a3
callq 0x9180
movq -0x8(%rbp), %rdi
movl 0x7795(%rip), %esi      # 0x100dc
movq 0x7612(%rip), %rax      # 0xff60
movl 0x8(%rax), %edx
movl $0x2, %ecx
leaq 0x1d25(%rip), %r8       # 0xa682
callq 0x9180
movq -0x8(%rbp), %rdi
leaq 0x241f(%rip), %rsi      # 0xad8c
movb $0x0, %al
callq 0x2150
movl $0x0, -0xc(%rbp)
cmpl $0x26, -0xc(%rbp)
jge 0x8a16
movslq -0xc(%rbp), %rcx
leaq 0x773c(%rip), %rax      # 0x100cc
cmpl $0x0, 0x14(%rax,%rcx,4)
jne 0x8999
jmp 0x8a08
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x240e(%rip), %rsi      # 0xadb5
movb $0x0, %al
callq 0x2150
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rcx
leaq 0x770f(%rip), %rax      # 0x100cc
imull $0x64, 0x14(%rax,%rcx,4), %esi
movq 0x7597(%rip), %rax      # 0xff60
movl 0x8(%rax), %edx
shll $0x2, %edx
movl $0x4, %ecx
leaq 0x23e7(%rip), %r8       # 0xadc2
callq 0x9180
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rcx
leaq 0x50e1(%rip), %rax      # 0xdad0
movl (%rax,%rcx,4), %esi
movl $0x2710, %edx           # imm = 0x2710
movl $0x4, %ecx
leaq 0x23c3(%rip), %r8       # 0xadc6
callq 0x9180
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x897b
movq -0x8(%rbp), %rdi
leaq 0x23a9(%rip), %rsi      # 0xadca
movb $0x0, %al
callq 0x2150
movq -0x8(%rbp), %rdi
leaq 0x23c5(%rip), %rsi      # 0xadf8
leaq 0x23d6(%rip), %rdx      # 0xae10
leaq 0x2155(%rip), %rcx      # 0xab96
leaq 0x2154(%rip), %r8       # 0xab9c
leaq 0x2152(%rip), %r9       # 0xaba1
leaq 0x213b(%rip), %rax      # 0xab91
movq %rax, (%rsp)
movb $0x0, %al
callq 0x2150
movl $0x4, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl 0x77e7(%rip), %eax      # 0x10258
jg 0x8b1d
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %edx
movslq -0x10(%rbp), %rcx
leaq 0x7643(%rip), %rax      # 0x100cc
movl 0xac(%rax,%rcx,4), %ecx
movslq -0x10(%rbp), %rsi
leaq 0x7631(%rip), %rax      # 0x100cc
movl 0xe4(%rax,%rsi,4), %r8d
movslq -0x10(%rbp), %rsi
leaq 0x761e(%rip), %rax      # 0x100cc
movl 0x11c(%rax,%rsi,4), %r9d
movslq -0x10(%rbp), %rsi
leaq 0x760b(%rip), %rax      # 0x100cc
movl 0x154(%rax,%rsi,4), %eax
leaq 0x2348(%rip), %rsi      # 0xae17
movl %eax, (%rsp)
movb $0x0, %al
callq 0x2150
movq -0x8(%rbp), %rdi
movslq -0x10(%rbp), %rcx
leaq 0x5088(%rip), %rax      # 0xdb70
imull $0x64, (%rax,%rcx,4), %esi
movq 0x746d(%rip), %rcx      # 0xff60
movl $0x5f5e100, %eax        # imm = 0x5F5E100
cltd
idivl 0x8(%rcx)
movl %eax, %edx
movl $0x1, %ecx
leaq 0x1b78(%rip), %r8       # 0xa682
callq 0x9180
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x8a68
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)