// File: conchoecia[P]fasta_stats/src/fasta_stats.cc
// Function: print_coverage(std::__cxx11::list<Scaffold, std::allocator<Scaffold>> const&)
static void print_coverage(const std::list<Scaffold> &scaffolds) {
	const int lengths[] = {       0,
				    100,     250,     500,
				   1000,    2500,    5000,
				  10000,   25000,   50000,
				 100000,  250000,  500000,
				1000000, 2500000, 5000000
	};
	const size_t lengths_size = sizeof(lengths) / sizeof(int);
	size_t i;
	std::vector<Stats> stats(lengths_size);
	std::list<Scaffold>::const_iterator a = scaffolds.begin();
	std::list<Scaffold>::const_iterator end_a = scaffolds.end();
	for (; a != end_a; ++a) {
		for (i = lengths_size - 1; a->total_size < lengths[i]; --i) { }
		stats[i].add(*a);
	}
	for (i = lengths_size - 1; i != 0; --i) {
		stats[i - 1].add(stats[i]);
	}
	printf(" Minimum    Number    Number     Total        Total     Scaffold\n");
	printf("Scaffold      of        of      Scaffold      Contig     Contig\n");
	printf(" Length   Scaffolds  Contigs     Length       Length    Coverage\n");
	printf("--------  ---------  -------  -----------  -----------  --------\n");
	int found_end = 0;
	for (i = 0; i != lengths_size; ++i) {
		const int &x = lengths[i];
		const Stats &b = stats[i];
		if (x == 0) {
			printf("    All");
		} else if (x < opt_min_length || (found_end && b.scaffolds == 0)) {
			continue;
		} else {
			printf(" ");
			print_size(lengths, i);
		}
		if (b.scaffolds == 0) {
			found_end = 1;
		}
		printf("   %7s    %7s  %11s  %11s   %6.2f%%\n", pretty_print(b.scaffolds).c_str(), pretty_print(b.contigs).c_str(), pretty_print(b.s_size).c_str(), pretty_print(b.c_size).c_str(), b.coverage());
	}
}

// Assembly:
subq $0x178, %rsp            # imm = 0x178
movq %rdi, 0x170(%rsp)
movaps 0xb76a(%rip), %xmm0     # 0xf0d0
movaps %xmm0, 0x160(%rsp)
movaps 0xb74b(%rip), %xmm0     # 0xf0c0
movaps %xmm0, 0x150(%rsp)
movaps 0xb72c(%rip), %xmm0     # 0xf0b0
movaps %xmm0, 0x140(%rsp)
movaps 0xb70d(%rip), %xmm0     # 0xf0a0
movaps %xmm0, 0x130(%rsp)
movq $0x10, 0x128(%rsp)
leaq 0x107(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x8d00
movq 0x40(%rsp), %rdx
leaq 0x108(%rsp), %rdi
movl $0x10, %esi
callq 0x8d10
jmp 0x39d2
leaq 0x107(%rsp), %rdi
callq 0x8d90
movq 0x170(%rsp), %rdi
callq 0x7bc0
movq %rax, 0xe8(%rsp)
movq 0x170(%rsp), %rdi
callq 0x7bf0
movq %rax, 0xe0(%rsp)
leaq 0xe8(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x7a70
testb $0x1, %al
jne 0x3a27
jmp 0x3af9
movq $0xf, 0x120(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0x7d30
movq (%rax), %rax
movq 0x120(%rsp), %rcx
movslq 0x130(%rsp,%rcx,4), %rcx
cmpq %rcx, %rax
jge 0x3a96
jmp 0x3a5a
movq 0x120(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x120(%rsp)
jmp 0x3a33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0x107(%rsp), %rdi
callq 0x8d90
jmp 0x3e7f
movq 0x120(%rsp), %rsi
leaq 0x108(%rsp), %rdi
callq 0x8da0
movq %rax, 0x38(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0x8e30
movq 0x38(%rsp), %rdi
movq %rax, %rsi
callq 0x8dc0
jmp 0x3acc
jmp 0x3ace
leaq 0xe8(%rsp), %rdi
callq 0x7a50
jmp 0x3a09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
jmp 0x3e72
movq $0xf, 0x120(%rsp)
cmpq $0x0, 0x120(%rsp)
je 0x3b6b
movq 0x120(%rsp), %rsi
decq %rsi
leaq 0x108(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x8da0
movq 0x28(%rsp), %rdi
movq %rax, 0x30(%rsp)
movq 0x120(%rsp), %rsi
callq 0x8da0
movq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x8e50
jmp 0x3b53
jmp 0x3b55
movq 0x120(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x120(%rsp)
jmp 0x3b05
leaq 0xb87f(%rip), %rdi      # 0xf3f1
xorl %eax, %eax
callq 0x2050
jmp 0x3b7b
leaq 0xb8b1(%rip), %rdi      # 0xf433
xorl %eax, %eax
callq 0x2050
jmp 0x3b8b
leaq 0xb8e2(%rip), %rdi      # 0xf474
xorl %eax, %eax
callq 0x2050
jmp 0x3b9b
leaq 0xb914(%rip), %rdi      # 0xf4b6
xorl %eax, %eax
callq 0x2050
jmp 0x3bab
movl $0x0, 0xdc(%rsp)
movq $0x0, 0x120(%rsp)
cmpq $0x10, 0x120(%rsp)
je 0x3e5d
movq 0x120(%rsp), %rcx
leaq 0x130(%rsp), %rax
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, 0xd0(%rsp)
movq 0x120(%rsp), %rsi
leaq 0x108(%rsp), %rdi
callq 0x8da0
movq %rax, 0xc8(%rsp)
movq 0xd0(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x3c2c
leaq 0xb8d7(%rip), %rdi      # 0xf4f8
xorl %eax, %eax
callq 0x2050
jmp 0x3c2a
jmp 0x3c8b
movq 0xd0(%rsp), %rax
movslq (%rax), %rax
cmpq 0x1263a(%rip), %rax     # 0x16278
jl 0x3c58
cmpl $0x0, 0xdc(%rsp)
je 0x3c5d
movq 0xc8(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x3c5d
jmp 0x3dbe
leaq 0xb6ce(%rip), %rdi      # 0xf332
xorl %eax, %eax
callq 0x2050
jmp 0x3c6d
movl 0x120(%rsp), %esi
leaq 0x130(%rsp), %rdi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x47a0
jmp 0x3c87
jmp 0x3c89
jmp 0x3c8b
movq 0xc8(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x3ca4
movl $0x1, 0xdc(%rsp)
movq 0xc8(%rsp), %rax
movq (%rax), %rsi
leaq 0xa8(%rsp), %rdi
xorl %edx, %edx
callq 0xe000
jmp 0x3cc0
leaq 0xa8(%rsp), %rdi
callq 0x2110
movq %rax, 0x20(%rsp)
movq 0xc8(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0x88(%rsp), %rdi
xorl %edx, %edx
callq 0xe000
jmp 0x3cef
leaq 0x88(%rsp), %rdi
callq 0x2110
movq %rax, 0x18(%rsp)
movq 0xc8(%rsp), %rax
movq 0x10(%rax), %rsi
leaq 0x68(%rsp), %rdi
xorl %edx, %edx
callq 0xe000
jmp 0x3d1b
leaq 0x68(%rsp), %rdi
callq 0x2110
movq %rax, 0x10(%rsp)
movq 0xc8(%rsp), %rax
movq 0x18(%rax), %rsi
leaq 0x48(%rsp), %rdi
xorl %edx, %edx
callq 0xe000
jmp 0x3d44
leaq 0x48(%rsp), %rdi
callq 0x2110
movq %rax, (%rsp)
movq 0xc8(%rsp), %rdi
callq 0x8eb0
movsd %xmm0, 0x8(%rsp)
jmp 0x3d67
movsd 0x8(%rsp), %xmm0
movq (%rsp), %r8
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rsi
leaq 0xb779(%rip), %rdi      # 0xf500
movb $0x1, %al
callq 0x2050
jmp 0x3d90
leaq 0x48(%rsp), %rdi
callq 0x21a0
leaq 0x68(%rsp), %rdi
callq 0x21a0
leaq 0x88(%rsp), %rdi
callq 0x21a0
leaq 0xa8(%rsp), %rdi
callq 0x21a0
movq 0x120(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x120(%rsp)
jmp 0x3bc2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
jmp 0x3e4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
jmp 0x3e41
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
jmp 0x3e37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x21a0
leaq 0x68(%rsp), %rdi
callq 0x21a0
leaq 0x88(%rsp), %rdi
callq 0x21a0
leaq 0xa8(%rsp), %rdi
callq 0x21a0
jmp 0x3e72
leaq 0x108(%rsp), %rdi
callq 0x8f00
addq $0x178, %rsp            # imm = 0x178
retq
leaq 0x108(%rsp), %rdi
callq 0x8f00
movq 0xf8(%rsp), %rdi
callq 0x2420
nopl (%rax)