// File: /workspace/github_c_makefile_star2_O0/sharpyfox[P]citrusleaf-client/src/cf_hist.c
// Function: cf_histogram_dump_new
void 
cf_histogram_dump_new( cf_histogram *h, char *outbuff, size_t outbuff_len)
{
  char printbuf[256];
  int pos = 0; // location to print from
  printbuf[0] = '\0';

  sprintf(printbuf, "histogram dump: %s (%zu total)",h->name, h->n_counts);
  if (outbuff) {
    strncat(outbuff, printbuf, outbuff_len - strlen(outbuff) - 1);
            strncat(outbuff, "  |", outbuff_len - strlen(outbuff) - 1);
  } else {
    cf_debug("%s", printbuf);
  }

  int i, j;
  int k = 0;
  for (j=CF_N_HIST_COUNTS-1 ; j >= 0 ; j-- ) if (h->count[j]) break;
  for (i=0;i<CF_N_HIST_COUNTS;i++) if (h->count[i]) break;
  for (; i<=j;i++) {
    if (h->count[i] > 0) { // print only non zero columns
      int bytes =
        sprintf((char *) (printbuf + pos), " (%02d: %010zu) ", i, h->count[i]);
      if (bytes <= 0) {
        cf_debug("histogram printing error. (bytes < 0 ) Bailing ...");
        return;
      }
      pos += bytes;
      if (k % 4 == 3){
        if (outbuff) {
          strncat(outbuff, printbuf, outbuff_len - strlen(outbuff) - 1);
          strncat(outbuff, "   ", outbuff_len - strlen(outbuff) - 1);
        } else {
          cf_debug("%s", (char *) printbuf);
        }
        pos = 0;
        printbuf[0] = '\0';
      }
      k++;
    }
  } // end for each
  if (pos > 0) {
    if (outbuff) {
      strncat(outbuff, printbuf, outbuff_len - strlen(outbuff) - 1);
    } else {
      cf_debug("%s", (char *) printbuf);
    }
  } // end if pos > 0
}

// Assembly:
subq $0x198, %rsp            # imm = 0x198
movq %rdi, 0x190(%rsp)
movq %rsi, 0x188(%rsp)
movq %rdx, 0x180(%rsp)
movl $0x0, 0x7c(%rsp)
movb $0x0, 0x80(%rsp)
leaq 0x80(%rsp), %rdi
movq 0x190(%rsp), %rdx
movq 0x190(%rsp), %rax
movq 0x40(%rax), %rcx
leaq 0x7e5e(%rip), %rsi      # 0x1e390
movb $0x0, %al
callq 0x6ac0
cmpq $0x0, 0x188(%rsp)
je 0x165dd
movq 0x188(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x80(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x180(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x188(%rsp), %rdi
callq 0x6280
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
subq %rax, %rdx
subq $0x1, %rdx
callq 0x6460
movq 0x188(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x180(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x188(%rsp), %rdi
callq 0x6280
movq 0x58(%rsp), %rdx
movq 0x60(%rsp), %rdi
subq %rax, %rdx
subq $0x1, %rdx
leaq 0x7dd9(%rip), %rsi      # 0x1e3af
callq 0x6460
jmp 0x16613
movq 0xc9e4(%rip), %rax      # 0x22fc8
movl (%rax), %ecx
movl $0x3, %eax
cmpl %ecx, %eax
jg 0x16611
movq 0xc9aa(%rip), %rax      # 0x22fa0
movq (%rax), %rcx
leaq 0x80(%rsp), %rdx
movl $0x3, %edi
leaq 0x7f11(%rip), %rsi      # 0x1e51e
movb $0x0, %al
callq *%rcx
jmp 0x16613
movl $0x0, 0x70(%rsp)
movl $0x3f, 0x74(%rsp)
cmpl $0x0, 0x74(%rsp)
jl 0x16653
movq 0x190(%rsp), %rax
movslq 0x74(%rsp), %rcx
movq 0x48(%rax,%rcx,8), %rax
cmpq $0x0, %rax
je 0x16644
jmp 0x16653
jmp 0x16646
movl 0x74(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x74(%rsp)
jmp 0x16623
movl $0x0, 0x78(%rsp)
cmpl $0x40, 0x78(%rsp)
jge 0x1668b
movq 0x190(%rsp), %rax
movslq 0x78(%rsp), %rcx
movq 0x48(%rax,%rcx,8), %rax
cmpq $0x0, %rax
je 0x1667c
jmp 0x1668b
jmp 0x1667e
movl 0x78(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x78(%rsp)
jmp 0x1665b
jmp 0x1668d
movl 0x78(%rsp), %eax
cmpl 0x74(%rsp), %eax
jg 0x1684f
movq 0x190(%rsp), %rax
movslq 0x78(%rsp), %rcx
movq 0x48(%rax,%rcx,8), %rax
cmpq $0x0, %rax
jbe 0x1683d
leaq 0x80(%rsp), %rdi
movslq 0x7c(%rsp), %rax
addq %rax, %rdi
movl 0x78(%rsp), %edx
movq 0x190(%rsp), %rax
movslq 0x78(%rsp), %rcx
movq 0x48(%rax,%rcx,8), %rcx
leaq 0x7ccf(%rip), %rsi      # 0x1e3b3
movb $0x0, %al
callq 0x6ac0
movl %eax, 0x6c(%rsp)
cmpl $0x0, 0x6c(%rsp)
jg 0x16727
movq 0xc8cb(%rip), %rax      # 0x22fc8
movl (%rax), %ecx
movl $0x3, %eax
cmpl %ecx, %eax
jg 0x16722
movq 0xc891(%rip), %rax      # 0x22fa0
movq (%rax), %rcx
movl $0x3, %edi
leaq 0x7ca6(%rip), %rsi      # 0x1e3c4
movb $0x0, %al
callq *%rcx
jmp 0x168ec
movl 0x6c(%rsp), %eax
addl 0x7c(%rsp), %eax
movl %eax, 0x7c(%rsp)
movl 0x70(%rsp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
cmpl $0x3, %edx
jne 0x16832
cmpq $0x0, 0x188(%rsp)
je 0x167ec
movq 0x188(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x80(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x180(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x188(%rsp), %rdi
callq 0x6280
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
subq %rax, %rdx
subq $0x1, %rdx
callq 0x6460
movq 0x188(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x180(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x188(%rsp), %rdi
callq 0x6280
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %rdi
subq %rax, %rdx
subq $0x1, %rdx
leaq 0x7c12(%rip), %rsi      # 0x1e3f7
callq 0x6460
jmp 0x16822
movq 0xc7d5(%rip), %rax      # 0x22fc8
movl (%rax), %ecx
movl $0x3, %eax
cmpl %ecx, %eax
jg 0x16820
movq 0xc79b(%rip), %rax      # 0x22fa0
movq (%rax), %rcx
leaq 0x80(%rsp), %rdx
movl $0x3, %edi
leaq 0x7d02(%rip), %rsi      # 0x1e51e
movb $0x0, %al
callq *%rcx
jmp 0x16822
movl $0x0, 0x7c(%rsp)
movb $0x0, 0x80(%rsp)
movl 0x70(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x70(%rsp)
jmp 0x1683f
movl 0x78(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x78(%rsp)
jmp 0x1668d
cmpl $0x0, 0x7c(%rsp)
jle 0x168ec
cmpq $0x0, 0x188(%rsp)
je 0x168b4
movq 0x188(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x80(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x180(%rsp), %rax
movq %rax, (%rsp)
movq 0x188(%rsp), %rdi
callq 0x6280
movq (%rsp), %rdx
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
subq %rax, %rdx
subq $0x1, %rdx
callq 0x6460
jmp 0x168ea
movq 0xc70d(%rip), %rax      # 0x22fc8
movl (%rax), %ecx
movl $0x3, %eax
cmpl %ecx, %eax
jg 0x168e8
movq 0xc6d3(%rip), %rax      # 0x22fa0
movq (%rax), %rcx
leaq 0x80(%rsp), %rdx
movl $0x3, %edi
leaq 0x7c3a(%rip), %rsi      # 0x1e51e
movb $0x0, %al
callq *%rcx
jmp 0x168ea
jmp 0x168ec
addq $0x198, %rsp            # imm = 0x198
retq
nopw %cs:(%rax,%rax)
nop