// File: conchoecia[P]fasta_stats/src/fasta_stats.cc
// Function: print_captured_gaps(std::__cxx11::list<Scaffold, std::allocator<Scaffold>> const&)
static void print_captured_gaps(const std::list<Scaffold> &scaffolds) {
	const int lengths[] = {       1,
				    100,     200,     300,
				    400,     500,     600,
				    700,     800,     900,
				   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<std::pair<long, long> > gaps(lengths_size, std::pair<long, long>(0, 0));
	std::list<Scaffold>::const_iterator a = scaffolds.begin();
	std::list<Scaffold>::const_iterator end_a = scaffolds.end();
	for (; a != end_a; ++a) {
		std::list<long>::const_iterator b = a->gaps.begin();
		std::list<long>::const_iterator end_b = a->gaps.end();
		for (; b != end_b; ++b) {
			for (i = lengths_size - 1; *b < lengths[i]; --i) { }
			++gaps[i].first;
			gaps[i].second += *b;
		}
	}
	size_t last_found = 0;
	std::pair<long, long> total_gaps(0, 0);
	std::vector<std::pair<long, long> >::const_iterator b = gaps.begin();
	std::vector<std::pair<long, long> >::const_iterator end_b = gaps.end();
	for (i = 0; b != end_b; ++b, ++i) {
		total_gaps.first += b->first;
		total_gaps.second += b->second;
		if (b->first != 0) {
			last_found = i;
		}
	}
	printf("                  Number                       Percent     Total     Percent\n");
	printf("     Gap            of        Gap      Total    Total       Gap       Total\n");
	printf("  Size Range       Gaps     Lengths     Gaps     Gaps     Lengths    Lengths\n");
	printf("---------------  -------  ----------  -------  -------  -----------  -------\n");
	std::pair<long, long> gap_count(0, 0);
	for (i = 0, ++last_found; i != lengths_size && lengths[i] <= opt_min_gap_length; ++i) { }
	int first_print = i > 1;
	if (i == 1) {
		i = 0;
	} else if (i > 1) {
		i -= 2;
	}
	for (; i != last_found; ++i) {
		const std::pair<long, long> &c = gaps[i];
		gap_count.first += c.first;
		gap_count.second += c.second;
		if (first_print) {
			first_print = 0;
			printf("       < ");
			print_size(lengths, i + 1);
		} else {
			print_size(lengths, i, 0, 1);
			printf(" - ");
			print_size(lengths, i + 1, 1);
		}
		printf("  %7s  %10s  %7s  %6.2f%%  %11s  %6.2f%%\n",
			pretty_print(c.first).c_str(),
			pretty_print(c.second).c_str(),
			pretty_print(gap_count.first).c_str(),
			total_gaps.first == 0 ? 0 : (double)100 * gap_count.first / total_gaps.first,
			pretty_print(gap_count.second).c_str(),
			total_gaps.second == 0 ? 0 : (double)100 * gap_count.second / total_gaps.second
);
	}
}

// Assembly:
subq $0x228, %rsp            # imm = 0x228
movq %rdi, 0x220(%rsp)
movabsq $0x4c4b40002625a0, %rax # imm = 0x4C4B40002625A0
movq %rax, 0x210(%rsp)
movaps 0xb268(%rip), %xmm0     # 0xf120
movaps %xmm0, 0x200(%rsp)
movaps 0xb249(%rip), %xmm0     # 0xf110
movaps %xmm0, 0x1f0(%rsp)
movaps 0xb22a(%rip), %xmm0     # 0xf100
movaps %xmm0, 0x1e0(%rsp)
movaps 0xb20b(%rip), %xmm0     # 0xf0f0
movaps %xmm0, 0x1d0(%rsp)
movaps 0xb1ec(%rip), %xmm0     # 0xf0e0
movaps %xmm0, 0x1c0(%rsp)
movq $0x16, 0x1b8(%rsp)
movl $0x0, 0x184(%rsp)
movl $0x0, 0x180(%rsp)
leaq 0x188(%rsp), %rdi
movq %rdi, 0x50(%rsp)
leaq 0x184(%rsp), %rsi
leaq 0x180(%rsp), %rdx
callq 0x9660
leaq 0x17f(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x9690
movq 0x50(%rsp), %rdx
movq 0x58(%rsp), %rcx
leaq 0x198(%rsp), %rdi
movl $0x16, %esi
callq 0x96a0
jmp 0x3f70
leaq 0x17f(%rsp), %rdi
callq 0x9720
movq 0x220(%rsp), %rdi
callq 0x7bc0
movq %rax, 0x160(%rsp)
movq 0x220(%rsp), %rdi
callq 0x7bf0
movq %rax, 0x158(%rsp)
leaq 0x160(%rsp), %rdi
leaq 0x158(%rsp), %rsi
callq 0x7a70
testb $0x1, %al
jne 0x3fc5
jmp 0x4110
leaq 0x160(%rsp), %rdi
callq 0x7d30
movq %rax, %rdi
addq $0x38, %rdi
callq 0x6220
movq %rax, 0x150(%rsp)
leaq 0x160(%rsp), %rdi
callq 0x7d30
movq %rax, %rdi
addq $0x38, %rdi
callq 0x6250
movq %rax, 0x148(%rsp)
leaq 0x150(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x6360
testb $0x1, %al
jne 0x4025
jmp 0x40fc
movq $0x15, 0x1b0(%rsp)
leaq 0x150(%rsp), %rdi
callq 0x63c0
movq (%rax), %rax
movq 0x1b0(%rsp), %rcx
movslq 0x1c0(%rsp,%rcx,4), %rcx
cmpq %rcx, %rax
jge 0x4094
jmp 0x4058
movq 0x1b0(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x1b0(%rsp)
jmp 0x4031
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
leaq 0x17f(%rsp), %rdi
callq 0x9720
jmp 0x4709
movq 0x1b0(%rsp), %rsi
leaq 0x198(%rsp), %rdi
callq 0x9730
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
leaq 0x150(%rsp), %rdi
callq 0x63c0
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x1b0(%rsp), %rsi
leaq 0x198(%rsp), %rdi
callq 0x9730
movq 0x48(%rsp), %rcx
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
leaq 0x150(%rsp), %rdi
callq 0x63f0
jmp 0x4007
jmp 0x40fe
leaq 0x160(%rsp), %rdi
callq 0x7a50
jmp 0x3fa7
movq $0x0, 0x140(%rsp)
movl $0x0, 0x12c(%rsp)
movl $0x0, 0x128(%rsp)
leaq 0x130(%rsp), %rdi
leaq 0x12c(%rsp), %rsi
leaq 0x128(%rsp), %rdx
callq 0x9660
jmp 0x4151
leaq 0x198(%rsp), %rdi
callq 0x9750
movq %rax, 0x118(%rsp)
leaq 0x120(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0x9780
leaq 0x198(%rsp), %rdi
callq 0x97c0
movq %rax, 0x108(%rsp)
leaq 0x110(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x9780
movq $0x0, 0x1b0(%rsp)
leaq 0x120(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x97f0
testb $0x1, %al
jne 0x41cf
jmp 0x4276
leaq 0x120(%rsp), %rdi
callq 0x9830
movq (%rax), %rax
addq 0x130(%rsp), %rax
movq %rax, 0x130(%rsp)
leaq 0x120(%rsp), %rdi
callq 0x9830
movq 0x8(%rax), %rax
addq 0x138(%rsp), %rax
movq %rax, 0x138(%rsp)
leaq 0x120(%rsp), %rdi
callq 0x9830
cmpq $0x0, (%rax)
je 0x424e
movq 0x1b0(%rsp), %rax
movq %rax, 0x140(%rsp)
jmp 0x424e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
jmp 0x46fc
jmp 0x4250
leaq 0x120(%rsp), %rdi
callq 0x9840
movq 0x1b0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x1b0(%rsp)
jmp 0x41b1
leaq 0xb307(%rip), %rdi      # 0xf584
xorl %eax, %eax
callq 0x2050
jmp 0x4286
leaq 0xb345(%rip), %rdi      # 0xf5d2
xorl %eax, %eax
callq 0x2050
jmp 0x4296
leaq 0xb382(%rip), %rdi      # 0xf61f
xorl %eax, %eax
callq 0x2050
jmp 0x42a6
leaq 0xb3c0(%rip), %rdi      # 0xf66d
xorl %eax, %eax
callq 0x2050
jmp 0x42b6
movl $0x0, 0xf4(%rsp)
movl $0x0, 0xf0(%rsp)
leaq 0xf8(%rsp), %rdi
leaq 0xf4(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x9660
jmp 0x42eb
movq $0x0, 0x1b0(%rsp)
movq 0x140(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x140(%rsp)
xorl %eax, %eax
cmpq $0x16, 0x1b0(%rsp)
movb %al, 0x47(%rsp)
je 0x433a
movq 0x1b0(%rsp), %rax
movslq 0x1c0(%rsp,%rax,4), %rax
cmpq 0x11f4d(%rip), %rax     # 0x16280
setle %al
movb %al, 0x47(%rsp)
movb 0x47(%rsp), %al
testb $0x1, %al
jne 0x4344
jmp 0x435c
jmp 0x4346
movq 0x1b0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x1b0(%rsp)
jmp 0x430b
cmpq $0x1, 0x1b0(%rsp)
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0xec(%rsp)
cmpq $0x1, 0x1b0(%rsp)
jne 0x438d
movq $0x0, 0x1b0(%rsp)
jmp 0x43ae
cmpq $0x1, 0x1b0(%rsp)
jbe 0x43ac
movq 0x1b0(%rsp), %rax
subq $0x2, %rax
movq %rax, 0x1b0(%rsp)
jmp 0x43ae
jmp 0x43b0
movq 0x1b0(%rsp), %rax
cmpq 0x140(%rsp), %rax
je 0x46e7
movq 0x1b0(%rsp), %rsi
leaq 0x198(%rsp), %rdi
callq 0x9730
movq %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
movq (%rax), %rax
addq 0xf8(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq 0xe0(%rsp), %rax
movq 0x8(%rax), %rax
addq 0x100(%rsp), %rax
movq %rax, 0x100(%rsp)
cmpl $0x0, 0xec(%rsp)
je 0x445d
movl $0x0, 0xec(%rsp)
leaq 0xb285(%rip), %rdi      # 0xf6bb
xorl %eax, %eax
callq 0x2050
jmp 0x443f
movl 0x1b0(%rsp), %esi
incl %esi
leaq 0x1c0(%rsp), %rdi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x47a0
jmp 0x445b
jmp 0x44ab
movl 0x1b0(%rsp), %esi
leaq 0x1c0(%rsp), %rdi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x47a0
jmp 0x447a
leaq 0xb244(%rip), %rdi      # 0xf6c5
xorl %eax, %eax
callq 0x2050
jmp 0x448a
movl 0x1b0(%rsp), %esi
incl %esi
leaq 0x1c0(%rsp), %rdi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x47a0
jmp 0x44a9
jmp 0x44ab
movq 0xe0(%rsp), %rax
movq (%rax), %rsi
leaq 0xc0(%rsp), %rdi
xorl %edx, %edx
callq 0xe000
jmp 0x44c7
leaq 0xc0(%rsp), %rdi
callq 0x2110
movq %rax, 0x38(%rsp)
movq 0xe0(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0xa0(%rsp), %rdi
xorl %edx, %edx
callq 0xe000
jmp 0x44f6
leaq 0xa0(%rsp), %rdi
callq 0x2110
movq %rax, 0x30(%rsp)
movq 0xf8(%rsp), %rsi
leaq 0x80(%rsp), %rdi
xorl %edx, %edx
callq 0xe000
jmp 0x4521
leaq 0x80(%rsp), %rdi
callq 0x2110
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x130(%rsp)
jne 0x4549
xorps %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
jmp 0x4573
cvtsi2sdq 0xf8(%rsp), %xmm1
movsd 0xabdd(%rip), %xmm0     # 0xf138
mulsd %xmm1, %xmm0
cvtsi2sdq 0x130(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x100(%rsp), %rsi
leaq 0x60(%rsp), %rdi
xorl %edx, %edx
callq 0xe000
jmp 0x4595
leaq 0x60(%rsp), %rdi
callq 0x2110
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x138(%rsp)
jne 0x45ba
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0x45e4
cvtsi2sdq 0x100(%rsp), %xmm1
movsd 0xab6c(%rip), %xmm0     # 0xf138
mulsd %xmm1, %xmm0
cvtsi2sdq 0x138(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x10(%rsp), %r8
movsd 0x18(%rsp), %xmm0
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %rsi
movsd 0x8(%rsp), %xmm1
leaq 0xb0be(%rip), %rdi      # 0xf6c9
movb $0x2, %al
callq 0x2050
jmp 0x4614
leaq 0x60(%rsp), %rdi
callq 0x21a0
leaq 0x80(%rsp), %rdi
callq 0x21a0
leaq 0xa0(%rsp), %rdi
callq 0x21a0
leaq 0xc0(%rsp), %rdi
callq 0x21a0
movq 0x1b0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x1b0(%rsp)
jmp 0x43b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
jmp 0x46d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
jmp 0x46cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
jmp 0x46be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x21a0
leaq 0x80(%rsp), %rdi
callq 0x21a0
leaq 0xa0(%rsp), %rdi
callq 0x21a0
leaq 0xc0(%rsp), %rdi
callq 0x21a0
jmp 0x46fc
leaq 0x198(%rsp), %rdi
callq 0x9860
addq $0x228, %rsp            # imm = 0x228
retq
leaq 0x198(%rsp), %rdi
callq 0x9860
movq 0x170(%rsp), %rdi
callq 0x2420
nopw %cs:(%rax,%rax)