user: 请将以下的汇编代码转换成C语言代码:

```asm
<qstat_dump>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x60(%rbp)
  mov    %esi,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,-0x68(%rbp)
  test   %esi,%esi
  jle    L6
  mov    -0x50(%rbp),%eax
  lea    0x6(%rax),%edx
  movslq %edx,%rax
  imul   $0xffffffff92492493,%rax,%rax
  shr    $0x20,%rax
  add    %edx,%eax
  sar    $0x2,%eax
  sar    $0x1f,%edx
  sub    %edx,%eax
  mov    %eax,-0x54(%rbp)
  imul   $0x52,%eax,%eax
  add    $0x14,%eax
  cltq
  add    $0xf,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L64:
  cmp    %rdx,%rsp
  je     L46
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L64
L6:
  lea    D10(%rip),%rdi
  call   <LOG_wrk@plt>
  mov    -0x68(%rbp),%rsp
  jmp    L0
L46:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L58
  orq    $0x0,-0x8(%rsp,%rax,1)
L58:
  mov    %rsp,-0x70(%rbp)
  mov    -0x50(%rbp),%edx
  lea    D4(%rip),%rsi
  mov    %rsp,%rdi
  call   <sprintf@plt>
  movslq %eax,%r13
  add    %rsp,%r13
  mov    $0x0,%ebx
  mov    $0x0,%r15d
L96:
  mov    $0x5,%edx
  lea    D23(%rip),%rsi
  mov    %r13,%rdi
  call   <memcpy@plt>
  lea    0x5(%r13),%rax
  mov    %rax,-0x48(%rbp)
  lea    0x7(%rbx),%esi
  mov    -0x50(%rbp),%edi
  call   <min_i@plt>
  mov    %eax,%ecx
  mov    %eax,-0x4c(%rbp)
  cmp    %ebx,%eax
  jle    L25
  movslq %ebx,%rax
  mov    -0x60(%rbp),%rdx
  lea    (%rdx,%rax,8),%r12
  lea    -0x1(%rcx),%r14d
  sub    %ebx,%r14d
  lea    (%r14,%r14,4),%rax
  lea    0x10(%r14,%rax,2),%rax
  add    %rax,%r13
  mov    -0x48(%rbp),%rbx
L31:
  movsd  (%r12),%xmm0
  mov    %rbx,%rdi
  mov    $0x1,%eax
  call   <enc11@plt>
  add    $0xb,%rbx
  add    $0x8,%r12
  cmp    %r13,%rbx
  jne    L31
  add    $0x1,%r14
  lea    (%r14,%r14,4),%rax
  lea    (%r14,%rax,2),%r13
  add    -0x48(%rbp),%r13
  mov    -0x4c(%rbp),%ebx
L92:
  add    $0x1,%r15d
  cmp    %r15d,-0x54(%rbp)
  jg     L96
  movb   $0x21,0x0(%r13)
  movb   $0xa,0x1(%r13)
  lea    0x2(%r13),%rdx
  mov    -0x70(%rbp),%rsi
  sub    %esi,%edx
  mov    $0x1,%edi
  call   <write@plt>
  mov    -0x68(%rbp),%rsp
L0:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L90
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L25:
  mov    -0x48(%rbp),%r13
  jmp    L92
L90:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D10
datatype: string
name: read_data
arguments: label: D4
datatype: string
name: read_data
arguments: label: D23
datatype: string

tool: D10: BUG: qstat_dump: n=%d

tool: D4: Q_^_Sc%d

tool: D23: 
Q_^<

assistant: ```c
void qstat_dump(const double *v, int n) {
  int i, j, k, n7 = (n + 6) / 7;
  if (n7 < 1)
    return LOG_wrk("BUG: qstat_dump: n=%d", n);
  char buf[82 * n7 + 20], *q = buf;
  q += sprintf(q, "Q_^_Sc%d", n);
  for (i = j = 0; i < n7; i++) {
    memcpy(q, "\nQ_^<", 5);
    q += 5;
    for (k = min_i(n, j + 7); j < k; j++)
      enc11(q, v[j]), q += 11;
  }
  q[0] = '!';
  q[1] = 10;
  write(1, buf, q + 2 - buf);
}
```