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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <atoi@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%edx
  mov    -0xc(%rbp),%ecx
  mov    -0xc(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <d3arr@plt>
  cltq
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x2c(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L15
L75:
  movl   $0x0,-0x24(%rbp)
  jmp    L138
L84:
  movl   $0x0,-0x20(%rbp)
  jmp    L32
L122:
  mov    -0x2c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x2c(%rbp)
  mov    -0x28(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rcx
  mov    -0x24(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x3,%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rcx
  mov    -0x20(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x3,%rdx
  add    %rcx,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,(%rdx)
  addl   $0x1,-0x20(%rbp)
L32:
  mov    -0x20(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jl     L122
  addl   $0x1,-0x24(%rbp)
L138:
  mov    -0x24(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jl     L84
  addl   $0x1,-0x28(%rbp)
L15:
  mov    -0x28(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jl     L75
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x1c(%rbp)
  jmp    L154
L130:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%rax
  mov    (%rax),%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    -0x1c(%rbp),%eax
  add    $0x1,%eax
  cltd
  idivl  -0xc(%rbp)
  mov    %edx,%eax
  test   %eax,%eax
  jne    L139
  mov    $0xa,%edi
  call   <putchar@plt>
L139:
  mov    -0x1c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0xc(%rbp),%eax
  imul   %eax,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  cltd
  idiv   %ecx
  mov    %edx,%eax
  test   %eax,%eax
  jne    L137
  mov    $0xa,%edi
  call   <putchar@plt>
L137:
  addl   $0x1,-0x1c(%rbp)
L154:
  mov    -0xc(%rbp),%eax
  imul   %eax,%eax
  imul   -0xc(%rbp),%eax
  cmp    %eax,-0x1c(%rbp)
  jl     L130
  lea    D33(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x18(%rbp)
  jmp    L51
L1:
  movl   $0x0,-0x14(%rbp)
  jmp    L30
L104:
  movl   $0x0,-0x10(%rbp)
  jmp    L98
L148:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  addl   $0x1,-0x10(%rbp)
L98:
  mov    -0x10(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jl     L148
  mov    $0xa,%edi
  call   <putchar@plt>
  addl   $0x1,-0x14(%rbp)
L30:
  mov    -0x14(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jl     L104
  mov    $0xa,%edi
  call   <putchar@plt>
  addl   $0x1,-0x18(%rbp)
L51:
  mov    -0x18(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jl     L1
  mov    -0x8(%rbp),%rax
  mov    (%rax),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x8(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D28
type_infered: string
name: unpack_data
arguments: data_label: D19
type_infered: string
name: unpack_data
arguments: data_label: D33
type_infered: string

tool: D28: Matrix with 1D indexing:

tool: D19: %.1f 

tool: D33: Matrix with 3D indexing:

assistant: ```c
int main(int argc, char *argv[]) {
  int n = atoi(argv[1]);
  double ***mat3 = d3arr(n, n, n);
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      for (int k = 0; k < n; k++) {
        mat3[i][j][k] = cnt++;
      }
    }
  }
  printf("Matrix with 1D indexing:\n");
  for (int i = 0; i < n * n * n; i++) {
    printf("%.1f ", mat3[0][0][i]);
    if ((i + 1) % n == 0) {
      printf("\n");
    }
    if ((i + 1) % (n * n) == 0) {
      printf("\n");
    }
  }
  printf("Matrix with 3D indexing:\n");
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      for (int k = 0; k < n; k++) {
        printf("%.1f ", mat3[i][j][k]);
      }
      printf("\n");
    }
    printf("\n");
  }
  free(mat3[0][0]);
  free(mat3[0]);
  free(mat3);
  return 0;
}
```