// File: /workspace/github_c_makefile_star2_O0/richarddurbin[P]hash10x/moshset.c
// Function: moshsetSummary
void moshsetSummary (Moshset *ms, FILE *f)
{
  seqhashReport (ms->hasher, f) ;
  fprintf (f, "MS table size %llu number of entries %u", ms->tableSize, ms->max) ;
  if (!ms->max) return ;
  U32 i, copy[4] ; copy[0] = copy[1] = copy[2] = copy[3] = 0 ;
  Array h = arrayCreate (256, U32) ;
  for (i = 1 ; i <= ms->max ; ++i)
    { if (ms->depth[i] < arrayMax(h)) ++arr(h,ms->depth[i],U32) ; /* more efficient to check */
      else ++array(h,ms->depth[i],U32) ;
      ++copy[msCopy(ms,i)] ;
    }
  U64 sum = 0, tot = 0 ;
  for (i = 0 ; i < arrayMax(h) ; ++i) { sum += arr(h,i,U32) ; tot += i * arr(h,i,U32) ; }
  I64 htot = tot / 2 ;
  for (i = 0 ; i < arrayMax(h) ; ++i) { htot -= i*arr(h,i,U32) ; if (htot < 0) break ; }
  fprintf (f, " total count %llu\nMS average depth %.1f N50 depth %u",
	   tot, tot / (double)sum , i) ;
  if (copy[0] < ms->max)
    fprintf (f, " copy0 %u copy1 %u copy2 %u copyM %u", copy[0], copy[1], copy[2], copy[3]) ;
  fputc ('\n', f) ;
  arrayDestroy (h) ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x45c0
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x8(%rbp), %rax
movl 0x40(%rax), %ecx
leaq 0x4206(%rip), %rsi      # 0x9d60
movb $0x0, %al
callq 0x1120
movq -0x8(%rbp), %rax
cmpl $0x0, 0x40(%rax)
jne 0x5b70
jmp 0x5db3
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x100, %edi            # imm = 0x100
movl $0x4, %esi
callq 0x72a0
movq %rax, -0x38(%rbp)
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x40(%rcx), %eax
ja 0x5c41
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x14(%rbp), %ecx
movzwl (%rax,%rcx,2), %eax
movq -0x38(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jge 0x5bfb
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x14(%rbp), %edx
movzwl (%rcx,%rdx,2), %ecx
movq -0x38(%rbp), %rdx
imull 0x14(%rdx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx)
jmp 0x5c1a
movq -0x38(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x14(%rbp), %ecx
movzwl (%rax,%rcx,2), %esi
callq 0x7700
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5b00
cltq
movl -0x30(%rbp,%rax,4), %ecx
addl $0x1, %ecx
movl %ecx, -0x30(%rbp,%rax,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5ba6
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jae 0x5cb5
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x14(%rbp), %ecx
movq -0x38(%rbp), %rdx
imull 0x14(%rdx), %ecx
movl %ecx, %ecx
movl (%rax,%rcx), %eax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x14(%rbp), %eax
movq -0x38(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x14(%rbp), %edx
movq -0x38(%rbp), %rsi
imull 0x14(%rsi), %edx
movl %edx, %edx
imull (%rcx,%rdx), %eax
movl %eax, %eax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5c58
movq -0x48(%rbp), %rax
shrq %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jae 0x5d14
movl -0x14(%rbp), %eax
movq -0x38(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x14(%rbp), %edx
movq -0x38(%rbp), %rsi
imull 0x14(%rsi), %edx
movl %edx, %edx
imull (%rcx,%rdx), %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x50(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jge 0x5d07
jmp 0x5d14
jmp 0x5d09
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5cc7
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rdx
movq %rdx, %xmm0
movaps 0x3e18(%rip), %xmm3     # 0x9b40
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x3e1c(%rip), %xmm2     # 0x9b50
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq -0x40(%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
movl -0x14(%rbp), %ecx
leaq 0x401f(%rip), %rsi      # 0x9d88
movb $0x1, %al
callq 0x1120
movl -0x30(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x40(%rcx), %eax
jae 0x5d9c
movq -0x10(%rbp), %rdi
movl -0x30(%rbp), %edx
movl -0x2c(%rbp), %ecx
movl -0x28(%rbp), %r8d
movl -0x24(%rbp), %r9d
leaq 0x4028(%rip), %rsi      # 0x9dbd
movb $0x0, %al
callq 0x1120
movq -0x10(%rbp), %rsi
movl $0xa, %edi
callq 0x10e0
movq -0x38(%rbp), %rdi
callq 0x74a0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)