user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<print_aft_stats_log_mba>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  test   %esi,%esi
  jle    L44
  mov    %rdi,%r13
  mov    %esi,%r15d
  lea    0x10(%rsp),%rbp
  lea    0x3c(%rsp),%rcx
  mov    %rbp,%rax
L32:
  movl   $0x0,(%rax)
  add    $0x4,%rax
  cmp    %rcx,%rax
  jne    L32
  mov    %rdx,%rbx
  lea    -0x1(%r15),%eax
  shl    $0x4,%rax
  lea    0x10(%rdx,%rax,1),%r14
  mov    D7(%rip),%r12
  movsd  D43(%rip),%xmm7
  movsd  %xmm7,(%rsp)
  jmp    L50
L105:
  mov    $0x0,%eax
L71:
  comisd D5(%rip),%xmm0
  ja     L35
  mulsd  D33(%rip),%xmm0
  add    $0x1,%eax
  cmp    $0x9,%eax
  jne    L71
L35:
  cltq
  addl   $0x1,0x10(%rsp,%rax,4)
L20:
  add    $0x10,%rbx
  cmp    %r14,%rbx
  je     L98
L50:
  mov    0x8(%rbx),%ecx
  mov    0x4(%rbx),%edx
  mov    0xc(%rbx),%r8d
  mov    (%rbx),%esi
  mov    %r13,%rdi
  call   <aft_tetra_qual_mba@plt>
  movq   %r12,%xmm1
  addsd  %xmm0,%xmm1
  movq   %xmm1,%r12
  movapd %xmm0,%xmm2
  minsd  (%rsp),%xmm2
  movsd  %xmm2,(%rsp)
  pxor   %xmm5,%xmm5
  comisd %xmm0,%xmm5
  jb     L105
  addl   $0x1,0x38(%rsp)
  jmp    L20
L98:
  pxor   %xmm6,%xmm6
  cvtsi2sd %r15d,%xmm6
  movsd  %xmm6,0x8(%rsp)
  movq   %r12,%xmm0
  divsd  %xmm6,%xmm0
  lea    D12(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    0x38(%rsp),%r14d
  mov    %r14d,%esi
  lea    D25(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x28(%rbp),%r12
  mov    %rbp,%rbx
  lea    D94(%rip),%r13
L36:
  mov    (%rbx),%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x4,%rbx
  cmp    %r12,%rbx
  jne    L36
  mov    $0xa,%edi
  call   <putchar@plt>
  movsd  (%rsp),%xmm0
  lea    D26(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %r14d,%xmm0
  mulsd  D16(%rip),%xmm0
  divsd  0x8(%rsp),%xmm0
  lea    D79(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  lea    D92(%rip),%rbx
L15:
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x0(%rbp),%xmm0
  mulsd  D16(%rip),%xmm0
  divsd  0x8(%rsp),%xmm0
  mov    %rbx,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  add    $0x4,%rbp
  cmp    %r12,%rbp
  jne    L15
  mov    $0xa,%edi
  call   <putchar@plt>
L44:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L76
  mov    $0x0,%eax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L76:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D7
type_guessed: f64
name: unpack_data
arguments: tag: D43
type_guessed: f64
name: unpack_data
arguments: tag: D5
type_guessed: f64[2]
name: unpack_data
arguments: tag: D33
type_guessed: f64
name: unpack_data
arguments: tag: D12
type_guessed: string
name: unpack_data
arguments: tag: D25
type_guessed: string
name: unpack_data
arguments: tag: D94
type_guessed: string
name: unpack_data
arguments: tag: D26
type_guessed: string
name: unpack_data
arguments: tag: D16
type_guessed: f64
name: unpack_data
arguments: tag: D79
type_guessed: string
name: unpack_data
arguments: tag: D92
type_guessed: string

tool: D7: 0

tool: D43: 1

tool: {"D5": [0.1,10.0]}

tool: D33: 10

tool: D12: [mba] QS: q_avg: %15.8le  

tool: D25:  ## %6d # 

tool: D94:  %6d 

tool: D26: [mba] ln  q_min: %15.8le  

tool: D16: 100

tool: D79:  ## %6.2lf # 

tool: D92:  %6.2lf 

assistant: ```c
int print_aft_stats_log_mba(double *vertex, int nt, int *tetra) {
  double q, worst, qs;
  int stat[11], i, j;
  if (nt < 1)
    return 0;
  for (i = 0; i < 11; i++)
    stat[i] = 0;
  worst = 1.0, qs = 0.0;
  for (i = 0; i < nt; i++) {
    qs += q = aft_tetra_qual_mba(vertex, tetra[4 * i + 0], tetra[4 * i + 1], tetra[4 * i + 2], tetra[4 * i + 3]);
    if (q < worst)
      worst = q;
    if (q <= 0.0)
      stat[10]++;
    else {
      for (j = 0; j < 9; j++) {
        if (q > 0.1)
          break;
        q *= 10.0;
      }
      stat[j]++;
    }
  }
  qs /= nt;
  printf("[mba] QS: q_avg: %15.8le  ", qs);
  printf(" ## %6d # ", stat[10]);
  for (i = 0; i < 10; i++)
    printf(" %6d ", stat[i]);
  printf("\n");
  printf("[mba] ln  q_min: %15.8le  ", worst);
  printf(" ## %6.2lf # ", 100.0 * stat[10] / nt);
  for (i = 0; i < 10; i++)
    printf(" %6.2lf ", 100.0 * stat[i] / nt);
  printf("\n");
  return 0;
}
```