// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
leaq 0x843a(%rip), %rdi      # 0xd318
xorl %esi, %esi
movl $0x6e078, %edx          # imm = 0x6E078
callq 0x2110
movq 0x20(%rsp), %rax
movq (%rax), %rdi
callq 0x8040
cmpq $0x0, 0x18(%rsp)
je 0x51a6
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl (%rax), %eax
addl 0x83f6(%rip), %eax      # 0xd318
movl %eax, 0x83f0(%rip)      # 0xd318
movq 0x10(%rsp), %rax
movl 0x10(%rax), %eax
addl 0x83f2(%rip), %eax      # 0xd328
movl %eax, 0x83ec(%rip)      # 0xd328
movq 0x10(%rsp), %rax
movl 0x24(%rax), %eax
addl 0x83f2(%rip), %eax      # 0xd33c
movl %eax, 0x83ec(%rip)      # 0xd33c
movq 0x10(%rsp), %rax
movl 0x2c(%rax), %eax
addl 0x83e6(%rip), %eax      # 0xd344
movl %eax, 0x83e0(%rip)      # 0xd344
movq 0x10(%rsp), %rax
movl 0x34(%rax), %eax
addl 0x83da(%rip), %eax      # 0xd34c
movl %eax, 0x83d4(%rip)      # 0xd34c
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
addq 0x8398(%rip), %rax      # 0xd320
movq %rax, 0x8391(%rip)      # 0xd320
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rax
addq 0x83b9(%rip), %rax      # 0xd358
movq %rax, 0x83b2(%rip)      # 0xd358
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rax
addq 0x83b2(%rip), %rax      # 0xd368
movq %rax, 0x83ab(%rip)      # 0xd368
movq 0x10(%rsp), %rax
movl 0x5c(%rax), %eax
addl 0x83a9(%rip), %eax      # 0xd374
movl %eax, 0x83a3(%rip)      # 0xd374
movq 0x10(%rsp), %rax
movl 0x64(%rax), %eax
addl 0x839d(%rip), %eax      # 0xd37c
movl %eax, 0x8397(%rip)      # 0xd37c
movq 0x10(%rsp), %rax
movl 0x6c(%rax), %eax
addl 0x8391(%rip), %eax      # 0xd384
movl %eax, 0x838b(%rip)      # 0xd384
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x81d1(%rip), %eax      # 0xd1dc
jge 0x5193
movl $0x0, 0x8(%rsp)
cmpl $0x5, 0x8(%rsp)
jge 0x50c1
movq 0x10(%rsp), %rax
addq $0x74, %rax
movslq 0xc(%rsp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movslq 0x8(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movslq 0xc(%rsp), %rcx
leaq 0x82cb(%rip), %rax      # 0xd318
addq $0x74, %rax
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movslq 0x8(%rsp), %rcx
addl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
cmpb $0x0, 0x816e(%rip)      # 0xd1d8
je 0x50af
movq 0x10(%rsp), %rax
addq $0x5074, %rax           # imm = 0x5074
movslq 0xc(%rsp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movslq 0x8(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movslq 0xc(%rsp), %rcx
leaq 0x8281(%rip), %rax      # 0xd318
addq $0x5074, %rax           # imm = 0x5074
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movslq 0x8(%rsp), %rcx
addl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
jmp 0x50b1
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x5019
movl $0x0, 0x8(%rsp)
cmpl $0x32, 0x8(%rsp)
jge 0x5181
movq 0x10(%rsp), %rax
addq $0xa074, %rax           # imm = 0xA074
movslq 0xc(%rsp), %rcx
imulq $0xc8, %rcx, %rcx
addq %rcx, %rax
movslq 0x8(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movslq 0xc(%rsp), %rcx
leaq 0x8216(%rip), %rax      # 0xd318
addq $0xa074, %rax           # imm = 0xA074
imulq $0xc8, %rcx, %rcx
addq %rcx, %rax
movslq 0x8(%rsp), %rcx
addl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
cmpb $0x0, 0x80b4(%rip)      # 0xd1d8
je 0x516f
movq 0x10(%rsp), %rax
addq $0x3c074, %rax          # imm = 0x3C074
movslq 0xc(%rsp), %rcx
imulq $0xc8, %rcx, %rcx
addq %rcx, %rax
movslq 0x8(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movslq 0xc(%rsp), %rcx
leaq 0x81c4(%rip), %rax      # 0xd318
addq $0x3c074, %rax          # imm = 0x3C074
imulq $0xc8, %rcx, %rcx
addq %rcx, %rax
movslq 0x8(%rsp), %rcx
addl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
jmp 0x5171
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x50c9
jmp 0x5183
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x5001
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x18(%rsp)
jmp 0x4ef7
movq 0x20(%rsp), %rax
movq (%rax), %rdi
callq 0x8080
addq $0x28, %rsp
retq
nopl (%rax,%rax)