user: What is the c source code of the assembly code below?

```asm
<implicit_precalc_3Dz>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %rsi,0x20(%rsp)
  mov    %rdx,0x28(%rsp)
  mov    %rcx,0x30(%rsp)
  movsd  %xmm0,0x38(%rsp)
  mov    %r9d,0xc(%rsp)
  movslq 0x90(%rsp),%r14
  mov    0x90(%rsp),%edi
  lea    0x0(,%rdi,8),%r13d
  mov    %r13d,%edi
  call   <malloc@plt>
  mov    %rax,%r12
  mov    %r13d,%edi
  call   <malloc@plt>
  mov    %rax,%rbp
  mov    %r13d,%edi
  call   <malloc@plt>
  mov    %rax,%rbx
  mov    %r13d,%edi
  call   <malloc@plt>
  mov    %rax,%r15
  mov    %r13d,%edi
  call   <malloc@plt>
  mov    %rax,0x48(%rsp)
  mov    0x90(%rsp),%edi
  call   <tridiag_malloc@plt>
  mov    0xa0(%rsp),%edi
  cmp    %edi,0x98(%rsp)
  jge    L62
  mov    0xc(%rsp),%eax
  mov    %eax,%edi
  imul   0x90(%rsp),%edi
  mov    %edi,0x44(%rsp)
  imul   0x98(%rsp),%eax
  imul   0x90(%rsp),%eax
  mov    %eax,0x40(%rsp)
  lea    0x0(,%r14,8),%rax
  mov    %rax,0x10(%rsp)
  jmp    L20
L66:
  movsd  D4(%rip),%xmm0
  divsd  0x38(%rsp),%xmm0
  mov    0x90(%rsp),%r8d
  movslq 0x8(%rsp),%rdx
  shl    $0x3,%rdx
  mov    0x20(%rsp),%rax
  lea    (%rax,%rdx,1),%rdi
  mov    0x28(%rsp),%rax
  lea    (%rax,%rdx,1),%rsi
  mov    0x30(%rsp),%rax
  lea    (%rax,%rdx,1),%rcx
  add    0x18(%rsp),%rdx
  mov    $0x0,%eax
L31:
  movsd  (%rdi,%rax,8),%xmm1
  movsd  %xmm1,(%r12,%rax,8)
  movapd %xmm0,%xmm1
  addsd  (%rsi,%rax,8),%xmm1
  movsd  %xmm1,0x0(%rbp,%rax,8)
  movsd  (%rcx,%rax,8),%xmm1
  movsd  %xmm1,(%rbx,%rax,8)
  movapd %xmm0,%xmm1
  mulsd  (%rdx,%rax,8),%xmm1
  movsd  %xmm1,(%r15,%rax,8)
  add    $0x1,%rax
  cmp    %r8,%rax
  jne    L31
L10:
  mov    0x90(%rsp),%r9d
  mov    %r14,%r8
  mov    %r15,%rcx
  mov    %rbx,%rdx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <tridiag_premalloc@plt>
  add    $0x1,%r13d
  add    0x10(%rsp),%r14
  mov    0x90(%rsp),%ecx
  add    %ecx,0x8(%rsp)
  cmp    %r13d,0xc(%rsp)
  je     L67
L42:
  cmpl   $0x0,0x90(%rsp)
  jg     L66
  jmp    L10
L67:
  addl   $0x1,0x98(%rsp)
  mov    0x44(%rsp),%edi
  add    %edi,0x40(%rsp)
  mov    0x98(%rsp),%eax
  cmp    %eax,0xa0(%rsp)
  je     L62
L20:
  cmpl   $0x0,0xc(%rsp)
  jle    L67
  mov    0x40(%rsp),%esi
  movslq %esi,%rax
  mov    0x18(%rsp),%rdi
  lea    (%rdi,%rax,8),%r14
  mov    %esi,0x8(%rsp)
  mov    $0x0,%r13d
  jmp    L42
L62:
  mov    $0x0,%eax
  call   <tridiag_free@plt>
  mov    %r12,%rdi
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %rbx,%rdi
  call   <free@plt>
  mov    %r15,%rdi
  call   <free@plt>
  mov    0x48(%rsp),%rdi
  call   <free@plt>
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: disassemble_data
arguments: label: D4
datatype: byte[8]

tool: {"D4": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

assistant: ```c
void implicit_precalc_3Dz(double *phi, double *az, double *bz, double *cz, double dt, int L, int M, int N, int Lstart, int Lend) {
  int ii, jj, kk;
  int index;
  double *a = malloc(N * sizeof(*a));
  double *b = malloc(N * sizeof(*b));
  double *c = malloc(N * sizeof(*c));
  double *r = malloc(N * sizeof(*r));
  double *new_row = malloc(N * sizeof(*new_row));
  tridiag_malloc(N);
  for (ii = Lstart; ii < Lend; ii++) {
    for (jj = 0; jj < M; jj++) {
      for (kk = 0; kk < N; kk++) {
        index = ii * M * N + jj * N + kk;
        a[kk] = az[index];
        b[kk] = bz[index] + 1 / dt;
        c[kk] = cz[index];
        r[kk] = 1 / dt * phi[index];
      }
      tridiag_premalloc(a, b, c, r, &phi[ii * M * N + jj * N], N);
    }
  }
  tridiag_free();
  free(a);
  free(b);
  free(c);
  free(r);
  free(new_row);
}
```