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

```asm
<dt>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  movslq %edx,%r12
  push   %rbp
  push   %rbx
  movslq %esi,%rbx
  sub    $0x38,%rsp
  cmp    %esi,%r12d
  cmovge %r12,%rbx
  mov    %rdi,0x28(%rsp)
  mov    %esi,0x18(%rsp)
  lea    0x0(,%rbx,8),%rbp
  mov    %rbp,%rdi
  call   <malloc@plt>
  mov    %rbp,%rdi
  mov    %rax,%r14
  call   <malloc@plt>
  lea    0x8(%rbp),%rdi
  mov    %rax,%r13
  call   <malloc@plt>
  lea    0x0(,%rbx,4),%rdi
  mov    %rax,%r15
  call   <malloc@plt>
  mov    %rax,(%rsp)
  test   %r12d,%r12d
  jle    L10
  mov    0x18(%rsp),%esi
  mov    0x28(%rsp),%r11
  movslq %r12d,%rbx
  xor    %r10d,%r10d
  mov    %r15,0x20(%rsp)
  shl    $0x3,%rbx
  mov    %r13,%r15
  lea    -0x1(%rsi),%eax
  mov    %r12d,0x1c(%rsp)
  lea    0x8(,%rax,8),%rbp
  lea    (%r14,%rbp,1),%r9
  add    %r13,%rbp
  mov    %r11,%r13
  mov    %r9,%r12
  nopl   0x0(%rax)
L114:
  mov    %r14,%rax
  mov    %r13,%rcx
  test   %esi,%esi
  jle    L13
  cs nopw 0x0(%rax,%rax,1)
L116:
  movsd  (%rcx),%xmm0
  add    $0x8,%rax
  add    %rbx,%rcx
  movsd  %xmm0,-0x8(%rax)
  cmp    %r12,%rax
  jne    L116
  mov    0x20(%rsp),%rcx
  mov    (%rsp),%r8
  mov    %r15,%rdx
  mov    %r14,%rdi
  xor    %eax,%eax
  mov    %r10d,0x10(%rsp)
  mov    %esi,0x8(%rsp)
  call   <dt_row@plt>
  mov    0x10(%rsp),%r10d
  mov    %r13,%rcx
  mov    %r15,%rax
  mov    0x8(%rsp),%esi
  nopl   0x0(%rax,%rax,1)
L105:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  movsd  %xmm0,(%rcx)
  add    %rbx,%rcx
  cmp    %rbp,%rax
  jne    L105
  add    $0x1,%r10d
  add    $0x8,%r13
  cmp    %r10d,0x1c(%rsp)
  jne    L114
L12:
  mov    %r15,%r13
  mov    0x1c(%rsp),%r12d
  mov    0x20(%rsp),%r15
L10:
  mov    0x18(%rsp),%eax
  test   %eax,%eax
  jle    L76
  lea    -0x1(%r12),%eax
  xor    %r9d,%r9d
  mov    %r15,0x10(%rsp)
  xor    %ebp,%ebp
  mov    %r12d,%r15d
  lea    0x8(,%rax,8),%rbx
  mov    %r9d,%r12d
  jmp    L47
  nopw   0x0(%rax,%rax,1)
L67:
  mov    0x28(%rsp),%rdx
  movslq %r12d,%rax
  mov    %r14,%rdi
  add    $0x1,%ebp
  add    %r15d,%r12d
  lea    (%rdx,%rax,8),%r11
  mov    %rbx,%rdx
  mov    %r11,%rsi
  mov    %r11,0x8(%rsp)
  call   <memcpy@plt>
  mov    (%rsp),%r8
  mov    0x10(%rsp),%rcx
  xor    %eax,%eax
  mov    %r13,%rdx
  mov    %r15d,%esi
  mov    %r14,%rdi
  call   <dt_row@plt>
  mov    0x8(%rsp),%rdi
  mov    %rbx,%rdx
  mov    %r13,%rsi
  call   <memcpy@plt>
  cmp    %ebp,0x18(%rsp)
  je     L103
L47:
  test   %r15d,%r15d
  jg     L67
  mov    (%rsp),%r8
  mov    0x10(%rsp),%rcx
  mov    %r13,%rdx
  mov    %r15d,%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  add    $0x1,%ebp
  add    %r15d,%r12d
  call   <dt_row@plt>
  cmp    %ebp,0x18(%rsp)
  jne    L47
  xchg   %ax,%ax
L103:
  mov    0x10(%rsp),%r15
L76:
  mov    %r14,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  mov    %r15,%rdi
  call   <free@plt>
  mov    (%rsp),%rdi
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <free@plt>
  nopl   0x0(%rax)
L13:
  mov    (%rsp),%r8
  mov    0x20(%rsp),%rcx
  mov    %r15,%rdx
  mov    %r14,%rdi
  xor    %eax,%eax
  mov    %r10d,0x10(%rsp)
  add    $0x8,%r13
  mov    %esi,0x8(%rsp)
  call   <dt_row@plt>
  mov    0x10(%rsp),%r10d
  mov    0x8(%rsp),%esi
  add    $0x1,%r10d
  cmp    %r10d,0x1c(%rsp)
  jne    L114
  jmp    L12
```

assistant: ```c
void dt(double *m, int rows, int cols) {
  const int n = ((rows) > (cols) ? (rows) : (cols));
  double *f = (double *)malloc(sizeof(f[0]) * n);
  double *d = (double *)malloc(sizeof(d[0]) * n);
  double *z = (double *)malloc(sizeof(z[0]) * (n + 1));
  int *v = (int *)malloc(sizeof(v[0]) * n);
  int x, y;
  for (x = 0; x < cols; ++x) {
    for (y = 0; y < rows; ++y) {
      f[y] = m[y * cols + x];
    }
    dt_row(f, rows, d, z, v);
    for (y = 0; y < rows; ++y) {
      m[y * cols + x] = d[y];
    }
  }
  for (y = 0; y < rows; ++y) {
    for (x = 0; x < cols; ++x) {
      f[x] = m[y * cols + x];
    }
    dt_row(f, cols, d, z, v);
    for (x = 0; x < cols; ++x) {
      m[y * cols + x] = d[x];
    }
  }
  free(f);
  free(d);
  free(z);
  free(v);
}
```