// File: /workspace/github_c_makefile_star2_O0/annoroad[P]fqtools_plus/fqtools.c
// Function: outstat
local void outstat(const char* statfile){
	FILE* out=fopen(statfile,"w");
	//allstat.raw_bases = (long long)allstat.raw_reads * g.CUT * 4;
	int xx=1;
	if(g.single_or_pair) xx=2;
	allstat.clean_bases = (long long)allstat.clean_reads * g.CUT * xx;

	allstat.clean_reads_rate = 100.0 * allstat.clean_reads / allstat.raw_reads;
	
	allstat.low_quality_rate = 100.0 * allstat.low_quality_reads / allstat.raw_reads ;

	allstat.Ns_rate = 100.0 * allstat.ns_reads / allstat.raw_reads;

	allstat.adapter_rate = 100.0 * allstat.adapter_reads / allstat.raw_reads;

	allstat.raw_Q30_bases_rate = 100.0 * allstat.raw_Q30_bases / allstat.raw_bases;

	allstat.clean_Q30_bases_rate = 100.0 * allstat.clean_Q30_bases / allstat.clean_bases;

	allstat.ployAT_rate = 100.0 * allstat.ployAT_reads / allstat.raw_reads;

	allstat.HighAT_rate = 100.0 * allstat.HighAT_reads / allstat.raw_reads;

	allstat.HighGC_rate = 100.0 * allstat.HighGC_reads / allstat.raw_reads;

	fprintf(out,"Read Length(bp)\t%d\n",g.CUT);
	fprintf(out,"Original reads number\t%u\n",allstat.raw_reads*xx);
	fprintf(out,"Original bases number\t%lld\n",allstat.raw_bases);
	fprintf(out,"Clean reads number\t%u\n",allstat.clean_reads*xx);
	fprintf(out,"Clean bases number\t%lld\n",allstat.clean_bases);
	fprintf(out,"Clean reads rate(%%)\t%.3f\n",allstat.clean_reads_rate);
	fprintf(out,"Low-quality reads number\t%u\n",allstat.low_quality_reads*xx);
	fprintf(out,"Low-quality reads rate(%%)\t%.3f\n",allstat.low_quality_rate);
	fprintf(out,"Ns reads number\t%u\n",allstat.ns_reads*xx);
	fprintf(out,"Ns reads rate(%%)\t%.3f\n",allstat.Ns_rate);
	fprintf(out,"Adapter polluted reads number\t%u\n",allstat.adapter_reads*xx);
	fprintf(out,"Adapter polluted reads rate(%%)\t%.3f\n",allstat.adapter_rate);
	fprintf(out,"HighAT Reads(normal)\t%u\n",allstat.HighAT_reads*xx);
	fprintf(out,"HighAT Reads(normal) Rate(%%)\t%.3f\n",allstat.HighAT_rate);
	fprintf(out,"HighGC Reads\t%u\n",allstat.HighGC_reads*xx);
	fprintf(out,"HighGC Reads Rate(%%)\t%.3f\n",allstat.HighGC_rate);
	fprintf(out,"PloyAT Reads\t%u\n",allstat.ployAT_reads*xx);
	fprintf(out,"PloyAT Reads Rate(%%)\t%.3f\n",allstat.ployAT_rate);
	fprintf(out,"Original Q30 bases rate(%%)\t%.3f\n",allstat.raw_Q30_bases_rate);
	fprintf(out,"Clean Q30 bases rate(%%)\t%.3f\n",allstat.clean_Q30_bases_rate);
	
	fclose(out);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x34f0(%rip), %rsi      # 0xa4f5
callq 0x2250
movq %rax, 0x8(%rsp)
movl $0x1, 0x4(%rsp)
cmpb $0x0, 0x61ba(%rip)      # 0xd1d8
je 0x7028
movl $0x2, 0x4(%rsp)
movl 0x62fa(%rip), %eax      # 0xd328
movslq 0x61a7(%rip), %rcx      # 0xd1dc
imulq %rcx, %rax
movslq 0x4(%rsp), %rcx
imulq %rcx, %rax
movq %rax, 0x62e7(%rip)      # 0xd330
movl 0x62d9(%rip), %eax      # 0xd328
cvtsi2sd %rax, %xmm0
movsd 0x32fc(%rip), %xmm1     # 0xa358
mulsd %xmm1, %xmm0
movl 0x62b2(%rip), %eax      # 0xd318
cvtsi2sd %rax, %xmm2
divsd %xmm2, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x62bd(%rip)     # 0xd338
movl 0x62bb(%rip), %eax      # 0xd33c
cvtsi2sd %rax, %xmm0
mulsd %xmm1, %xmm0
movl 0x6288(%rip), %eax      # 0xd318
cvtsi2sd %rax, %xmm2
divsd %xmm2, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x629b(%rip)     # 0xd340
movl 0x6299(%rip), %eax      # 0xd344
cvtsi2sd %rax, %xmm0
mulsd %xmm1, %xmm0
movl 0x625e(%rip), %eax      # 0xd318
cvtsi2sd %rax, %xmm2
divsd %xmm2, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x6279(%rip)     # 0xd348
movl 0x6277(%rip), %eax      # 0xd34c
cvtsi2sd %rax, %xmm0
mulsd %xmm1, %xmm0
movl 0x6234(%rip), %eax      # 0xd318
cvtsi2sd %rax, %xmm2
divsd %xmm2, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x6257(%rip)     # 0xd350
cvtsi2sdq 0x6256(%rip), %xmm0 # 0xd358
mulsd %xmm1, %xmm0
cvtsi2sdq 0x6211(%rip), %xmm2 # 0xd320
divsd %xmm2, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x6241(%rip)     # 0xd360
cvtsi2sdq 0x6240(%rip), %xmm0 # 0xd368
mulsd %xmm1, %xmm0
cvtsi2sdq 0x61fb(%rip), %xmm2 # 0xd330
divsd %xmm2, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x622b(%rip)     # 0xd370
movl 0x6239(%rip), %eax      # 0xd384
cvtsi2sd %rax, %xmm0
mulsd %xmm1, %xmm0
movl 0x61be(%rip), %eax      # 0xd318
cvtsi2sd %rax, %xmm2
divsd %xmm2, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x6219(%rip)     # 0xd388
movl 0x61ff(%rip), %eax      # 0xd374
cvtsi2sd %rax, %xmm0
mulsd %xmm1, %xmm0
movl 0x6194(%rip), %eax      # 0xd318
cvtsi2sd %rax, %xmm2
divsd %xmm2, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x61df(%rip)     # 0xd378
movl 0x61dd(%rip), %eax      # 0xd37c
cvtsi2sd %rax, %xmm0
mulsd %xmm1, %xmm0
movl 0x616a(%rip), %eax      # 0xd318
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x61bd(%rip)     # 0xd380
movq 0x8(%rsp), %rdi
movl 0x600e(%rip), %edx      # 0xd1dc
leaq 0x3d73(%rip), %rsi      # 0xaf48
movb $0x0, %al
callq 0x2150
movq 0x8(%rsp), %rdi
movl 0x6131(%rip), %edx      # 0xd318
imull 0x4(%rsp), %edx
leaq 0x3d69(%rip), %rsi      # 0xaf5c
movb $0x0, %al
callq 0x2150
movq 0x8(%rsp), %rdi
movq 0x611a(%rip), %rdx      # 0xd320
leaq 0x3d69(%rip), %rsi      # 0xaf76
movb $0x0, %al
callq 0x2150
movq 0x8(%rsp), %rdi
movl 0x6109(%rip), %edx      # 0xd328
imull 0x4(%rsp), %edx
leaq 0x3d67(%rip), %rsi      # 0xaf92
movb $0x0, %al
callq 0x2150
movq 0x8(%rsp), %rdi
movq 0x60f2(%rip), %rdx      # 0xd330
leaq 0x3d64(%rip), %rsi      # 0xafa9
movb $0x0, %al
callq 0x2150
movq 0x8(%rsp), %rdi
movss 0x60df(%rip), %xmm0     # 0xd338
cvtss2sd %xmm0, %xmm0
leaq 0x3d5e(%rip), %rsi      # 0xafc2
movb $0x1, %al
callq 0x2150
movq 0x8(%rsp), %rdi
movl 0x60c6(%rip), %edx      # 0xd33c
imull 0x4(%rsp), %edx
leaq 0x3d5b(%rip), %rsi      # 0xafdd
movb $0x0, %al
callq 0x2150
movq 0x8(%rsp), %rdi
movss 0x60aa(%rip), %xmm0     # 0xd340
cvtss2sd %xmm0, %xmm0
leaq 0x3d59(%rip), %rsi      # 0xaffa
movb $0x1, %al
callq 0x2150
movq 0x8(%rsp), %rdi
movl 0x6091(%rip), %edx      # 0xd344
imull 0x4(%rsp), %edx
leaq 0x3d5c(%rip), %rsi      # 0xb01b
movb $0x0, %al
callq 0x2150
movq 0x8(%rsp), %rdi
movss 0x6075(%rip), %xmm0     # 0xd348
cvtss2sd %xmm0, %xmm0
leaq 0x3d51(%rip), %rsi      # 0xb02f
movb $0x1, %al
callq 0x2150
movq 0x8(%rsp), %rdi
movl 0x605c(%rip), %edx      # 0xd34c
imull 0x4(%rsp), %edx
leaq 0x3d4b(%rip), %rsi      # 0xb047
movb $0x0, %al
callq 0x2150
movq 0x8(%rsp), %rdi
movss 0x6040(%rip), %xmm0     # 0xd350
cvtss2sd %xmm0, %xmm0
leaq 0x3d4e(%rip), %rsi      # 0xb069
movb $0x1, %al
callq 0x2150
movq 0x8(%rsp), %rdi
movl 0x6047(%rip), %edx      # 0xd374
imull 0x4(%rsp), %edx
leaq 0x3d56(%rip), %rsi      # 0xb08f
movb $0x0, %al
callq 0x2150
movq 0x8(%rsp), %rdi
movss 0x602b(%rip), %xmm0     # 0xd378
cvtss2sd %xmm0, %xmm0
leaq 0x3d50(%rip), %rsi      # 0xb0a8
movb $0x1, %al
callq 0x2150
movq 0x8(%rsp), %rdi
movl 0x6012(%rip), %edx      # 0xd37c
imull 0x4(%rsp), %edx
leaq 0x3d56(%rip), %rsi      # 0xb0cc
movb $0x0, %al
callq 0x2150
movq 0x8(%rsp), %rdi
movss 0x5ff6(%rip), %xmm0     # 0xd380
cvtss2sd %xmm0, %xmm0
leaq 0x3d48(%rip), %rsi      # 0xb0dd
movb $0x1, %al
callq 0x2150
movq 0x8(%rsp), %rdi
movl 0x5fdd(%rip), %edx      # 0xd384
imull 0x4(%rsp), %edx
leaq 0x3d46(%rip), %rsi      # 0xb0f9
movb $0x0, %al
callq 0x2150
movq 0x8(%rsp), %rdi
movss 0x5fc1(%rip), %xmm0     # 0xd388
cvtss2sd %xmm0, %xmm0
leaq 0x3d38(%rip), %rsi      # 0xb10a
movb $0x1, %al
callq 0x2150
movq 0x8(%rsp), %rdi
movss 0x5f7a(%rip), %xmm0     # 0xd360
cvtss2sd %xmm0, %xmm0
leaq 0x3d35(%rip), %rsi      # 0xb126
movb $0x1, %al
callq 0x2150
movq 0x8(%rsp), %rdi
movss 0x5f6b(%rip), %xmm0     # 0xd370
cvtss2sd %xmm0, %xmm0
leaq 0x3d38(%rip), %rsi      # 0xb148
movb $0x1, %al
callq 0x2150
movq 0x8(%rsp), %rdi
callq 0x20b0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)