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

```asm
<dp_score>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %rsi,0x58(%rsp)
  mov    %rdx,0x28(%rsp)
  mov    %rcx,0x18(%rsp)
  mov    %r8,0x20(%rsp)
  call   <strlen@plt>
  mov    %r12,%rdi
  lea    0x1(%rax),%r15d
  mov    %eax,0x30(%rsp)
  mov    %eax,%ebp
  mov    %r15d,0x68(%rsp)
  call   <strlen@plt>
  mov    %r15d,%edi
  mov    %eax,0x6c(%rsp)
  add    $0x1,%eax
  imul   %eax,%edi
  mov    %eax,0x54(%rsp)
  shl    $0x2,%edi
  call   <malloc@plt>
  mov    %rax,0x48(%rsp)
  movl   $0x0,(%rax)
  cmp    $0x1,%r15d
  jle    L76
  sub    $0x1,%ebp
  lea    0x4(%rax),%rbx
  mov    %r14,%r12
  xor    %r15d,%r15d
  mov    %rbp,%r13
  add    %r14,%rbp
  mov    %r13d,0x8(%rsp)
  mov    %rbx,%r13
  mov    0x18(%rsp),%rbx
  jmp    L34
  nopl   0x0(%rax,%rax,1)
L46:
  add    $0x1,%r12
  add    $0x4,%r13
L34:
  movsbl (%r12),%edi
  call   *%rbx
  add    %eax,%r15d
  mov    %r15d,0x0(%r13)
  cmp    %rbp,%r12
  jne    L46
  cmpl   $0x1,0x54(%rsp)
  mov    0x8(%rsp),%r13d
  jle    L43
L27:
  movslq 0x68(%rsp),%rax
  mov    0x58(%rsp),%rcx
  mov    %r14,0x10(%rsp)
  mov    0x48(%rsp),%r12
  mov    0x20(%rsp),%rbp
  mov    %rax,0x8(%rsp)
  lea    0x0(,%rax,4),%r15
  mov    %rcx,%r14
  mov    0x6c(%rsp),%eax
  sub    $0x1,%eax
  lea    0x1(%rcx,%rax,1),%r13
L1:
  mov    (%r12),%ebx
  movsbl (%r14),%edi
  add    %r15,%r12
  add    $0x1,%r14
  call   *%rbp
  add    %eax,%ebx
  mov    %ebx,(%r12)
  cmp    %r13,%r14
  jne    L1
  cmpl   $0x1,0x68(%rsp)
  mov    0x10(%rsp),%r14
  jle    L25
  mov    0x30(%rsp),%eax
  lea    -0x1(%rax),%r13d
L3:
  mov    0x8(%rsp),%r15
  mov    0x48(%rsp),%rax
  mov    %r13d,%ebx
  lea    0x1(%r14),%r12
  movq   $0x1,0x38(%rsp)
  mov    0x58(%rsp),%rcx
  shl    $0x2,%r15
  add    %r15,%rax
  mov    %r15,%r13
  mov    %rax,0x40(%rsp)
  lea    0x2(%rbx),%rax
  mov    %rax,0x60(%rsp)
  mov    0x6c(%rsp),%eax
  sub    $0x1,%eax
  lea    0x1(%rcx,%rax,1),%rax
  mov    %rax,0x30(%rsp)
  nopl   0x0(%rax)
L18:
  cmpl   $0x1,0x54(%rsp)
  jle    L15
  mov    0x48(%rsp),%rax
  mov    0x38(%rsp),%rcx
  mov    0x40(%rsp),%r14
  mov    0x58(%rsp),%r15
  lea    (%rax,%rcx,4),%rbx
  mov    %r13,%rax
  mov    %r14,%r13
  mov    %rax,%r14
  nopl   0x0(%rax)
L13:
  mov    0x0(%r13),%ebp
  movsbl 0x1(%r15),%edi
  add    $0x1,%r15
  mov    0x20(%rsp),%rax
  call   *%rax
  movsbl (%r12),%edi
  lea    0x0(%rbp,%rax,1),%edx
  mov    (%rbx),%ebp
  mov    0x18(%rsp),%rax
  mov    %edx,0x10(%rsp)
  call   *%rax
  movsbl -0x1(%r15),%esi
  movsbl -0x1(%r12),%edi
  add    %eax,%ebp
  mov    -0x4(%rbx),%eax
  mov    0x28(%rsp),%rdx
  add    %r14,%rbx
  mov    %eax,0x8(%rsp)
  call   *%rdx
  mov    0x8(%rsp),%ecx
  mov    0x10(%rsp),%edx
  mov    %ebp,%esi
  lea    (%rcx,%rax,1),%edi
  call   <min3@plt>
  mov    %eax,0x4(%r13)
  add    %r14,%r13
  cmp    %r15,0x30(%rsp)
  jne    L13
  mov    %r14,%r13
L15:
  addq   $0x1,0x38(%rsp)
  add    $0x1,%r12
  mov    0x38(%rsp),%rax
  addq   $0x4,0x40(%rsp)
  cmp    %rax,0x60(%rsp)
  jne    L18
L25:
  mov    0x68(%rsp),%ecx
  mov    0x6c(%rsp),%eax
  mov    0x48(%rsp),%rdi
  imul   %ecx,%eax
  add    %ecx,%eax
  cltq
  mov    -0x4(%rdi,%rax,4),%r12d
  call   <free@plt>
  add    $0x78,%rsp
  pop    %rbx
  mov    %r12d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L76:
  cmpl   $0x1,0x54(%rsp)
  jg     L27
  jmp    L25
L43:
  movslq 0x68(%rsp),%rax
  mov    %rax,0x8(%rsp)
  jmp    L3
```

assistant: ```c
int dp_score(char *a, char *b, int (*score)(char, char), int (*gap_a)(char), int (*gap_b)(char)) {
  int i, j, k;
  int n_c, m_r;
  int *D, d;
  n_c = strlen(a) + 1;
  m_r = strlen(b) + 1;
  D = (int *)malloc(sizeof(int) * n_c * m_r);
  D[0] = 0;
  for (i = 1; i < n_c; i++) {
    D[i] = D[i - 1] + gap_a(a[i - 1]);
  }
  for (i = 1; i < m_r; i++) {
    D[i * n_c] = D[(i - 1) * n_c] + gap_b(b[i - 1]);
  }
  for (i = 1; i < n_c; i++) {
    for (j = 1; j < m_r; j++) {
      D[j * n_c + i] = min3(D[(j - 1) * n_c + (i - 1)] + score(a[i - 1], b[j - 1]), D[(j - 1) * n_c + i] + gap_a(a[i]), D[j * n_c + (i - 1)] + gap_b(b[j]));
    }
  }
  d = D[(m_r - 1) * n_c + n_c - 1];
  free(D);
  return d;
}
```