// File: /workspace/github_c_makefile_star2_O0/wuxb45[P]SLB/lib1.c
// Function: qsort_u64_sample
void
qsort_u64_sample(const u64 * const array0, const u64 nr, const u64 res, FILE * const out)
{
  const u64 datasize = nr * sizeof(array0[0]);
  u64 * const array = (typeof(array))malloc(datasize);
  debug_assert(array);
  memcpy(array, array0, datasize);
  qsort_u64(array, nr);

  const double sized = (double)nr;
  const u64 srate = res ? res : 64;
  const u64 xstep = ({u64 step = nr / srate; step ? step : 1; });
  const u64 ystep = ({u64 step = (array[nr - 1] - array[0]) / srate; step ? step : 1; });
  u64 i = 0;
  fprintf(out, "%lu %06.2lf %lu\n", i, ((double)(i + 1lu)) * 100.0 / sized, array[i]);
  for (u64 j = 1; j < nr; j++) {
    if (((j - i) >= xstep) || (array[j] - array[i]) >= ystep) {
      i = j;
      fprintf(out, "%lu %06.2lf %lu\n", i, ((double)(i + 1lu)) * 100.0 / sized, array[i]);
    }
  }
  if (i != (nr - 1)) {
    i = nr - 1;
    fprintf(out, "%lu %06.2lf %lu\n", i, ((double)(i + 1lu)) * 100.0 / sized, array[i]);
  }
  free(array);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
shlq $0x3, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x6380
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
setne %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x7640
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x6320
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x9910
vcvtusi2sdq -0x10(%rbp), %xmm0, %xmm0
vmovsd %xmm0, -0x38(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x9ab5
movq -0x18(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0x9ac3
movl $0x40, %eax
movq %rax, -0x88(%rbp)
jmp 0x9ac3
movq -0x88(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x40(%rbp)
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x9af2
movq -0x50(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0x9b00
movl $0x1, %eax
movq %rax, -0x90(%rbp)
jmp 0x9b00
movq -0x90(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movq -0x30(%rbp), %rcx
subq (%rcx), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x40(%rbp)
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
je 0x9b4a
movq -0x68(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x9b58
movl $0x1, %eax
movq %rax, -0x98(%rbp)
jmp 0x9b58
movq -0x98(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x60(%rbp)
movq $0x0, -0x78(%rbp)
movq -0x20(%rbp), %rdi
movq -0x78(%rbp), %rdx
movq -0x78(%rbp), %rax
addq $0x1, %rax
vcvtusi2sd %rax, %xmm0, %xmm0
vmovsd 0x1151f(%rip), %xmm1    # 0x1b0b0
vmulsd %xmm1, %xmm0, %xmm0
vdivsd -0x38(%rbp), %xmm0, %xmm0
movq -0x30(%rbp), %rax
movq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x116d9(%rip), %rsi     # 0x1b286
movb $0x1, %al
callq 0x62e0
movq $0x1, -0x80(%rbp)
movq -0x80(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x9c52
movq -0x80(%rbp), %rax
subq -0x78(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0x9bf6
movq -0x30(%rbp), %rax
movq -0x80(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x30(%rbp), %rcx
movq -0x78(%rbp), %rdx
subq (%rcx,%rdx,8), %rax
cmpq -0x60(%rbp), %rax
jb 0x9c3f
movq -0x80(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x20(%rbp), %rdi
movq -0x78(%rbp), %rdx
movq -0x78(%rbp), %rax
addq $0x1, %rax
vcvtusi2sd %rax, %xmm0, %xmm0
vmovsd 0x11494(%rip), %xmm1    # 0x1b0b0
vmulsd %xmm1, %xmm0, %xmm0
vdivsd -0x38(%rbp), %xmm0, %xmm0
movq -0x30(%rbp), %rax
movq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x1164e(%rip), %rsi     # 0x1b286
movb $0x1, %al
callq 0x62e0
jmp 0x9c41
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0x9bbc
movq -0x78(%rbp), %rax
movq -0x10(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
je 0x9cb0
movq -0x10(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x78(%rbp)
movq -0x20(%rbp), %rdi
movq -0x78(%rbp), %rdx
movq -0x78(%rbp), %rax
addq $0x1, %rax
vcvtusi2sd %rax, %xmm0, %xmm0
vmovsd 0x11423(%rip), %xmm1    # 0x1b0b0
vmulsd %xmm1, %xmm0, %xmm0
vdivsd -0x38(%rbp), %xmm0, %xmm0
movq -0x30(%rbp), %rax
movq -0x78(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x115dd(%rip), %rsi     # 0x1b286
movb $0x1, %al
callq 0x62e0
movq -0x30(%rbp), %rdi
callq 0x6060
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)