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

```asm
<dp_score>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %rdi,%r12
  mov    %rdi,0x20(%rsp)
  mov    %rsi,%r14
  mov    %rsi,0x40(%rsp)
  mov    %rdx,0x10(%rsp)
  mov    %rcx,%rbp
  mov    %rcx,0x18(%rsp)
  mov    %r8,0x8(%rsp)
  call   <strlen@plt>
  mov    %eax,%r15d
  lea    0x1(%rax),%ebx
  mov    %ebx,0x6c(%rsp)
  mov    %r14,%rdi
  call   <strlen@plt>
  mov    %eax,0x68(%rsp)
  lea    0x1(%rax),%edx
  mov    %edx,0x4c(%rsp)
  movslq %ebx,%r14
  mov    %ebx,%eax
  imul   %edx,%eax
  mov    %eax,%edi
  shl    $0x2,%edi
  call   <malloc@plt>
  mov    %rax,0x60(%rsp)
  movl   $0x0,(%rax)
  cmp    $0x1,%ebx
  jle    L35
  mov    %rax,%rdx
  mov    %rax,%rbx
  lea    -0x1(%r15),%eax
  lea    0x4(%rdx,%rax,4),%r13
  mov    %r15d,(%rsp)
  mov    %rbp,%r15
L81:
  mov    (%rbx),%ebp
  movsbl (%r12),%edi
  call   *%r15
  add    $0x4,%rbx
  add    %eax,%ebp
  mov    %ebp,(%rbx)
  add    $0x1,%r12
  cmp    %r13,%rbx
  jne    L81
  mov    (%rsp),%r15d
  cmpl   $0x1,0x4c(%rsp)
  jle    L7
L102:
  lea    0x0(,%r14,4),%rax
  mov    %rax,(%rsp)
  mov    0x60(%rsp),%rbp
  mov    0x40(%rsp),%rcx
  mov    %rcx,%rbx
  mov    0x68(%rsp),%eax
  lea    -0x1(%rax),%eax
  lea    0x1(%rcx,%rax,1),%r13
  mov    %r15d,0x28(%rsp)
  mov    0x8(%rsp),%r15
L14:
  mov    0x0(%rbp),%r12d
  movsbl (%rbx),%edi
  call   *%r15
  add    (%rsp),%rbp
  add    %eax,%r12d
  mov    %r12d,0x0(%rbp)
  add    $0x1,%rbx
  cmp    %r13,%rbx
  jne    L14
  mov    0x28(%rsp),%r15d
  cmpl   $0x1,0x6c(%rsp)
  jle    L68
L7:
  mov    0x60(%rsp),%rax
  add    $0x4,%rax
  mov    %rax,0x30(%rsp)
  mov    0x20(%rsp),%r13
  lea    -0x1(%r15),%eax
  mov    %rax,0x50(%rsp)
  lea    0x0(,%r14,4),%rax
  mov    %rax,0x20(%rsp)
  sub    $0x4,%rax
  mov    %rax,0x58(%rsp)
  movq   $0x0,0x38(%rsp)
  mov    0x68(%rsp),%eax
  lea    -0x1(%rax),%eax
  mov    0x40(%rsp),%rcx
  lea    0x1(%rcx,%rax,1),%rax
  mov    %rax,0x28(%rsp)
  jmp    L47
L78:
  mov    (%r12),%r15d
  movsbl 0x1(%rbx),%edi
  mov    0x8(%rsp),%rax
  call   *%rax
  add    %eax,%r15d
  mov    0x0(%rbp),%r14d
  movsbl 0x1(%r13),%edi
  mov    0x18(%rsp),%rax
  call   *%rax
  add    %eax,%r14d
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rsp)
  movsbl (%rbx),%esi
  movsbl 0x0(%r13),%edi
  mov    0x10(%rsp),%rdx
  call   *%rdx
  mov    (%rsp),%ecx
  lea    (%rcx,%rax,1),%edi
  mov    %r15d,%edx
  mov    %r14d,%esi
  call   <min3@plt>
  mov    %eax,0x4(%r12)
  mov    0x20(%rsp),%rax
  add    %rax,%r12
  add    $0x1,%rbx
  add    %rax,%rbp
  cmp    0x28(%rsp),%rbx
  jne    L78
L26:
  mov    0x38(%rsp),%rcx
  lea    0x1(%rcx),%rax
  addq   $0x4,0x30(%rsp)
  add    $0x1,%r13
  cmp    0x50(%rsp),%rcx
  je     L68
  mov    %rax,0x38(%rsp)
L47:
  mov    0x30(%rsp),%rbp
  mov    %rbp,%r12
  add    0x58(%rsp),%r12
  mov    0x40(%rsp),%rbx
  cmpl   $0x1,0x4c(%rsp)
  jg     L78
  jmp    L26
L35:
  cmpl   $0x1,0x4c(%rsp)
  jg     L102
L68:
  mov    0x68(%rsp),%eax
  mov    0x6c(%rsp),%ecx
  imul   %ecx,%eax
  add    %ecx,%eax
  cltq
  mov    0x60(%rsp),%rdi
  mov    -0x4(%rdi,%rax,4),%ebx
  call   <free@plt>
  mov    %ebx,%eax
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

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;
}
```