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

```asm
<Print_Real_nd>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  movl   $0x1,-0x4(%rbp)
  jmp    L19
L21:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x4(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rsi
  mov    -0x20(%rbp),%rdx
  add    %rsi,%rdx
  imul   %ecx,%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x4(%rbp)
L19:
  mov    -0x4(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L21
  mov    -0x30(%rbp),%rax
  mov    %rax,%rsi
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x8(%rbp)
  jmp    L64
L26:
  lea    D33(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x8(%rbp),%edx
  mov    -0x20(%rbp),%rcx
  mov    -0x14(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <print_index@plt>
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <fabs@plt>
  test   %eax,%eax
  jg     L10
  lea    D38(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L4
L10:
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
L4:
  addl   $0x1,-0x8(%rbp)
L64:
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x8(%rbp)
  jl     L26
  mov    -0x14(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x4(%rbp)
  jmp    L25
L32:
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x4(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x2,%rdx
  lea    -0x4(%rdx),%rcx
  mov    -0x20(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edi
  mov    -0x4(%rbp),%ecx
  movslq %ecx,%rcx
  lea    0x0(,%rcx,4),%rsi
  mov    -0x20(%rbp),%rcx
  add    %rsi,%rcx
  cltd
  idiv   %edi
  mov    %eax,(%rcx)
  subl   $0x1,-0x4(%rbp)
L25:
  cmpl   $0x0,-0x4(%rbp)
  jg     L32
  nop
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D23
type: string
name: unpack_data
arguments: tag: D33
type: string
name: unpack_data
arguments: tag: D38
type: string
name: unpack_data
arguments: tag: D27
type: string

tool: D23: 
%s:


tool: D33:    

tool: D38: : 0

tool: D27: : %.5g


assistant: ```c
void Print_Real_nd(int ndim, int *dims, double *array, char *title) {
  int i, d;
  for (d = 1; d < ndim; d++)
    dims[d] *= dims[d - 1];
  printf("\n%s:\n", title);
  for (i = 0; i < dims[ndim - 1]; i++) {
    printf("   ");
    print_index(ndim, dims, i);
    if (fabs(array[i]) < 1e-13)
      printf(": 0\n");
    else
      printf(": %.5g\n", array[i]);
  }
  for (d = ndim - 1; d > 0; d--)
    dims[d] /= dims[d - 1];
}
```