// File: /workspace/github_c_makefile_star2_O0/richarddurbin[P]hash10x/composition.c
// Function: main
int main (int argc, char *argv[])
{
  --argc ; ++argv ;

  timeUpdate (stdout) ;
  
  SeqIO *si = seqIOopen (*argv, 0, TRUE) ;
  if (!si) die ("failed to open sequence file %s\n", *argv) ;

  U64 totLen = 0, n = 0 ;
  U64 *totBase = new0 (256, U64) ;
  U64 *totQual = new0 (256, U64) ;
  while (seqIOread (si))
    { char *s = sqioSeq(si), *e = s + si->seqLen ;
      while (s < e) ++totBase[*s++] ;
      totLen += si->seqLen ;
      if (si->isQual)
	{ char *q = sqioQual(si), *e = q + si->seqLen ;
	  while (q < e) ++totQual[*q++] ;
	}
    }
  printf ("%s file, %llu sequences >= 0, %llu total, %.2f average\n",
	  typeName[si->type], si->nSeq, totLen, totLen / (double) si->nSeq) ;
  int i ;
  U64 totUnprint = 0 ;
  printf ("bases\n") ;
  for (i = 0 ; i < 256 ; ++i)
    if (totBase[i])
      { if (isprint(i)) printf ("  %c %llu %4.1f %%\n", i, totBase[i], totBase[i]*100.0/totLen) ;
	else totUnprint += totBase[i] ;
      }
  if (totUnprint) printf (" unprintable %llu %4.1f %%\n", totUnprint, totUnprint*100.0/totLen) ;

  if (si->isQual)
    { printf ("qualities\n") ;
      for (i = 0 ; i < 256 ; ++i)
	if (totQual[i]) printf (" %3d %llu %4.1f %%\n", i, totQual[i], totQual[i]*100.0/totLen) ;
    }
  
  seqIOclose (si) ;
  timeTotal (stdout) ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x8(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
movq 0x7c9b(%rip), %rax      # 0x8fd0
movq (%rax), %rdi
callq 0x5820
movq -0x10(%rbp), %rax
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x1770
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x1372
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0x4ccd(%rip), %rdi      # 0x6038
movb $0x0, %al
callq 0x5410
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x100, %edi            # imm = 0x100
movl $0x8, %esi
callq 0x5540
movq %rax, -0x30(%rbp)
movl $0x100, %edi            # imm = 0x100
movl $0x8, %esi
callq 0x5540
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1a80
cmpb $0x0, %al
je 0x14ca
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x13d0
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x70(%rbp)
jmp 0x13e7
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x18(%rbp), %rcx
movslq 0x24(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq 0x18(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0x1431
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movsbq (%rcx), %rcx
movq (%rax,%rcx,8), %rdx
addq $0x1, %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0x1402
movq -0x18(%rbp), %rax
movslq 0x18(%rax), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, 0x2c(%rax)
je 0x14c5
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x1462
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x78(%rbp)
jmp 0x1479
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x18(%rbp), %rcx
movslq 0x28(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq 0x18(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x14c3
movq -0x38(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x50(%rbp)
movsbq (%rcx), %rcx
movq (%rax,%rcx,8), %rdx
addq $0x1, %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0x1494
jmp 0x14c5
jmp 0x13a8
movq -0x18(%rbp), %rax
movl (%rax), %ecx
movl %ecx, %edx
leaq 0x7c37(%rip), %rcx      # 0x9110
movq (%rcx,%rdx,8), %rsi
movq 0x8(%rax), %rdx
movq -0x20(%rbp), %rcx
movq %rcx, %xmm0
movaps 0x4b1f(%rip), %xmm3     # 0x6010
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x4b23(%rip), %xmm2     # 0x6020
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq %rdx, %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
leaq 0x4b2a(%rip), %rdi      # 0x6059
movb $0x1, %al
callq 0x1090
movq $0x0, -0x68(%rbp)
leaq 0x4b4c(%rip), %rdi      # 0x6091
movb $0x0, %al
callq 0x1090
movl $0x0, -0x5c(%rbp)
cmpl $0x100, -0x5c(%rbp)     # imm = 0x100
jge 0x1620
movq -0x30(%rbp), %rax
movslq -0x5c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x1610
callq 0x11f0
movq (%rax), %rax
movslq -0x5c(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
je 0x15fa
movslq -0x5c(%rbp), %rcx
movl %ecx, %esi
movq -0x30(%rbp), %rax
movq (%rax,%rcx,8), %rdx
movq %rdx, %xmm0
movaps 0x4a69(%rip), %xmm3     # 0x6010
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x4a6d(%rip), %xmm2     # 0x6020
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x4a66(%rip), %xmm1     # 0x6030
mulsd %xmm1, %xmm0
movq -0x20(%rbp), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
leaq 0x4aa7(%rip), %rdi      # 0x6098
movb $0x1, %al
callq 0x1090
jmp 0x160e
movq -0x30(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x1610
jmp 0x1612
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x1553
cmpq $0x0, -0x68(%rbp)
je 0x1688
movq -0x68(%rbp), %rsi
movq %rsi, %xmm0
movaps 0x49d9(%rip), %xmm3     # 0x6010
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x49dd(%rip), %xmm2     # 0x6020
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x49d6(%rip), %xmm1     # 0x6030
mulsd %xmm1, %xmm0
movq -0x20(%rbp), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
leaq 0x4a2b(%rip), %rdi      # 0x60ac
movb $0x1, %al
callq 0x1090
movq -0x18(%rbp), %rax
cmpb $0x0, 0x2c(%rax)
je 0x1744
leaq 0x4a2b(%rip), %rdi      # 0x60c8
movb $0x0, %al
callq 0x1090
movl $0x0, -0x5c(%rbp)
cmpl $0x100, -0x5c(%rbp)     # imm = 0x100
jge 0x1742
movq -0x38(%rbp), %rax
movslq -0x5c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x1732
movslq -0x5c(%rbp), %rcx
movl %ecx, %esi
movq -0x38(%rbp), %rax
movq (%rax,%rcx,8), %rdx
movq %rdx, %xmm0
movaps 0x492f(%rip), %xmm3     # 0x6010
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x4933(%rip), %xmm2     # 0x6020
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x492c(%rip), %xmm1     # 0x6030
mulsd %xmm1, %xmm0
movq -0x20(%rbp), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
leaq 0x49a8(%rip), %rdi      # 0x60d3
movb $0x1, %al
callq 0x1090
jmp 0x1734
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x16ab
jmp 0x1744
movq -0x18(%rbp), %rdi
callq 0x1a10
movq 0x787c(%rip), %rax      # 0x8fd0
movq (%rax), %rdi
callq 0x59b0
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)