// File: /workspace/github_c_makefile_star2_O3/annoroad[P]fqtools_plus/fqtools.c
// Function: merge_stat
local void merge_stat(struct pool* pool){
	struct space* space = pool->head;
	struct STAT* stat;
	memset(&allstat,0,sizeof(allstat));
	possess(pool->have);
	int m,n;
	while(space != NULL){
		stat = space->readclass->stat;
		allstat.raw_reads += stat->raw_reads;
		allstat.clean_reads += stat->clean_reads;
		allstat.low_quality_reads += stat->low_quality_reads;
		allstat.ns_reads += stat->ns_reads;
		allstat.adapter_reads += stat->adapter_reads;
		allstat.raw_bases += stat->raw_bases;
		allstat.raw_Q30_bases += stat->raw_Q30_bases;
		allstat.clean_Q30_bases += stat->clean_Q30_bases;
		allstat.HighAT_reads += stat->HighAT_reads;
		allstat.HighGC_reads += stat->HighGC_reads;
		allstat.ployAT_reads += stat->ployAT_reads;
		for(m=0;m<g.CUT;m++){
			for(n=0;n<5;n++){
				(allstat.base1)[m][n] += (stat->base1)[m][n];
				if (g.single_or_pair) (allstat.base2)[m][n] += (stat->base2)[m][n];
			}
			for(n=0;n<50;n++){
				(allstat.quality1)[m][n] += (stat->quality1)[m][n];
				if (g.single_or_pair) (allstat.quality2)[m][n] += (stat->quality2)[m][n];
			}
		}
		space = space->next;
	}
	release(pool->have);
	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x6f76(%rip), %r14      # 0xb2d0
leaq 0x6fa7(%rip), %rdi      # 0xb308
movl $0x6e078, %edx          # imm = 0x6E078
movq %rdi, %rbx
xorl %esi, %esi
callq 0x2100
movq 0x6f51(%rip), %rdi      # 0xb2c8
callq 0x6265
testq %r14, %r14
je 0x456e
movl 0x6fe9(%rip), %ecx      # 0xb374
movl 0x6fdb(%rip), %edx      # 0xb36c
movl 0x6fcd(%rip), %esi      # 0xb364
movq 0x6fba(%rip), %rdi      # 0xb358
movq 0x6fa3(%rip), %r8       # 0xb348
movq 0x6f64(%rip), %r9       # 0xb310
movl 0x6f89(%rip), %r10d     # 0xb33c
movl 0x6f7a(%rip), %r11d     # 0xb334
movl 0x6f6c(%rip), %ebp      # 0xb32c
movl 0x6f52(%rip), %eax      # 0xb318
movl %eax, 0xc(%rsp)
movl 0x6f37(%rip), %r15d     # 0xb308
movl 0x6df4(%rip), %r12d     # 0xb1cc
movl $0x5074, %eax           # imm = 0x5074
addq %rbx, %rax
movq %rax, 0x20(%rsp)
movl $0x3c074, %eax          # imm = 0x3C074
addq %rax, %rbx
movq %rbx, 0x28(%rsp)
movb 0x6dcf(%rip), %r13b     # 0xb1c8
movl $0xc8, %ebx
movq 0x8(%r14), %rax
movq 0x10(%rax), %rax
addl (%rax), %r15d
movl %r15d, 0x10(%rsp)
movl %r15d, 0x6ef3(%rip)     # 0xb308
movl 0xc(%rsp), %r15d
addl 0x10(%rax), %r15d
movl %r15d, 0xc(%rsp)
movl %r15d, 0x6eee(%rip)     # 0xb318
addl 0x24(%rax), %ebp
movl %ebp, 0x14(%rsp)
movl %ebp, 0x6ef5(%rip)      # 0xb32c
addl 0x2c(%rax), %r11d
movl %r11d, 0x18(%rsp)
movl %r11d, 0x6eed(%rip)     # 0xb334
addl 0x34(%rax), %r10d
movl %r10d, 0x1c(%rsp)
movl %r10d, 0x6ee5(%rip)     # 0xb33c
addq 0x8(%rax), %r9
movq %r9, 0x30(%rsp)
movq %r9, 0x6ea9(%rip)       # 0xb310
addq 0x40(%rax), %r8
movq %r8, 0x38(%rsp)
movq %r8, 0x6ed1(%rip)       # 0xb348
addq 0x50(%rax), %rdi
movq %rdi, 0x40(%rsp)
movq %rdi, 0x6ed1(%rip)      # 0xb358
addl 0x5c(%rax), %esi
movl %esi, %ebp
movl %esi, 0x6ed2(%rip)      # 0xb364
addl 0x64(%rax), %edx
movl %edx, %r11d
movl %edx, 0x6ece(%rip)      # 0xb36c
addl 0x6c(%rax), %ecx
movl %ecx, %r10d
movl %ecx, 0x6eca(%rip)      # 0xb374
testl %r12d, %r12d
jle 0x4537
movl $0x5074, %ecx           # imm = 0x5074
addq %rax, %rcx
movl $0x3c074, %edx          # imm = 0x3C074
addq %rdx, %rax
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rsi
xorl %edi, %edi
xorl %r8d, %r8d
movl -0x5000(%rcx,%r8,4), %r9d
addl %r9d, -0x5000(%rsi,%r8,4)
testb %r13b, %r13b
je 0x44ef
movl (%rcx,%r8,4), %r9d
addl %r9d, (%rsi,%r8,4)
incq %r8
cmpq $0x5, %r8
jne 0x44d2
xorl %r8d, %r8d
movl -0x32000(%rax,%r8,4), %r9d
addl %r9d, -0x32000(%rdx,%r8,4)
testb %r13b, %r13b
je 0x4518
movl (%rax,%r8,4), %r9d
addl %r9d, (%rdx,%r8,4)
incq %r8
cmpq $0x32, %r8
jne 0x44fb
incq %rdi
addq $0x14, %rcx
addq $0x14, %rsi
addq %rbx, %rax
addq %rbx, %rdx
cmpq %r12, %rdi
jne 0x44cf
movq 0x10(%r14), %r14
testq %r14, %r14
movl %r10d, %ecx
movl %r11d, %edx
movl %ebp, %esi
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %r8
movq 0x30(%rsp), %r9
movl 0x1c(%rsp), %r10d
movl 0x18(%rsp), %r11d
movl 0x14(%rsp), %ebp
movl 0x10(%rsp), %r15d
jne 0x43fe
movq 0x6d53(%rip), %rdi      # 0xb2c8
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6276