// File: /workspace/github_c_makefile_star2_O2/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 $0x38, %rsp
movq 0x64fd(%rip), %r14      # 0xa2d0
leaq 0x652e(%rip), %r13      # 0xa308
xorl %ebx, %ebx
movl $0x6e078, %edx          # imm = 0x6E078
movq %r13, %rdi
xorl %esi, %esi
callq 0x2100
movq 0x64d6(%rip), %rdi      # 0xa2c8
callq 0x5ccb
movl 0x650b(%rip), %ecx      # 0xa308
movl 0x6515(%rip), %edx      # 0xa318
movl 0x6523(%rip), %esi      # 0xa32c
movl 0x6525(%rip), %edi      # 0xa334
movl 0x6527(%rip), %eax      # 0xa33c
movl %eax, 0x4(%rsp)
movq 0x64f0(%rip), %rax      # 0xa310
movq %rax, 0x20(%rsp)
movq 0x651c(%rip), %rax      # 0xa348
movq %rax, 0x18(%rsp)
movq 0x6520(%rip), %r10      # 0xa358
movl 0x6525(%rip), %r11d     # 0xa364
movl 0x6527(%rip), %ebp      # 0xa36c
movl 0x6528(%rip), %r15d     # 0xa374
movl 0x6379(%rip), %r12d     # 0xa1cc
testl %r12d, %r12d
cmovlel %ebx, %r12d
movl $0x5074, %eax           # imm = 0x5074
addq %r13, %rax
movq %rax, 0x28(%rsp)
movl $0x3c074, %eax          # imm = 0x3C074
addq %rax, %r13
movq %r13, 0x30(%rsp)
movb 0x634e(%rip), %bl       # 0xa1c8
movl $0xc8, %r13d
testq %r14, %r14
je 0x3fca
movq 0x8(%r14), %rax
movq 0x10(%rax), %rax
addl (%rax), %ecx
movl %ecx, 0x14(%rsp)
movl %ecx, 0x646b(%rip)      # 0xa308
addl 0x10(%rax), %edx
movl %edx, 0x10(%rsp)
movl %edx, 0x646e(%rip)      # 0xa318
addl 0x24(%rax), %esi
movl %esi, 0xc(%rsp)
movl %esi, 0x6475(%rip)      # 0xa32c
addl 0x2c(%rax), %edi
movl %edi, 0x8(%rsp)
movl %edi, 0x6470(%rip)      # 0xa334
movl 0x4(%rsp), %ecx
addl 0x34(%rax), %ecx
movl %ecx, 0x4(%rsp)
movl %ecx, 0x6467(%rip)      # 0xa33c
movq 0x20(%rsp), %rcx
addq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq %rcx, 0x6426(%rip)      # 0xa310
movq 0x18(%rsp), %rcx
addq 0x40(%rax), %rcx
movq %rcx, 0x18(%rsp)
movq %rcx, 0x6449(%rip)      # 0xa348
addq 0x50(%rax), %r10
movq %r10, 0x644e(%rip)      # 0xa358
addl 0x5c(%rax), %r11d
movl %r11d, 0x644f(%rip)     # 0xa364
addl 0x64(%rax), %ebp
movl %ebp, 0x644e(%rip)      # 0xa36c
addl 0x6c(%rax), %r15d
movl %r15d, 0x644b(%rip)     # 0xa374
movl $0x5074, %ecx           # imm = 0x5074
addq %rax, %rcx
movl $0x3c074, %edx          # imm = 0x3C074
addq %rdx, %rax
movq 0x30(%rsp), %rdx
movq 0x28(%rsp), %rsi
xorl %edi, %edi
cmpq %r12, %rdi
je 0x3fb1
xorl %r8d, %r8d
cmpq $0x5, %r8
je 0x3f74
movl -0x5000(%rcx,%r8,4), %r9d
addl %r9d, -0x5000(%rsi,%r8,4)
testb %bl, %bl
je 0x3f6f
movl (%rcx,%r8,4), %r9d
addl %r9d, (%rsi,%r8,4)
incq %r8
jmp 0x3f4d
xorl %r8d, %r8d
cmpq $0x32, %r8
je 0x3f9e
movl -0x32000(%rax,%r8,4), %r9d
addl %r9d, -0x32000(%rdx,%r8,4)
testb %bl, %bl
je 0x3f99
movl (%rax,%r8,4), %r9d
addl %r9d, (%rdx,%r8,4)
incq %r8
jmp 0x3f77
incq %rdi
addq $0x14, %rcx
addq $0x14, %rsi
addq %r13, %rax
addq %r13, %rdx
jmp 0x3f45
movq 0x10(%r14), %r14
movl 0x14(%rsp), %ecx
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edi
jmp 0x3e80
movq 0x62f7(%rip), %rdi      # 0xa2c8
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5cfa