user: Converte this assembly snippet into its equivalent C code:

```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,0x50(%rsp)
  mov    %rdx,0x28(%rsp)
  mov    %rcx,0x18(%rsp)
  mov    %r8,0x20(%rsp)
  call   <strlen@plt>
  mov    %r12,%rdi
  lea    0x1(%rax),%ebx
  mov    %eax,0x14(%rsp)
  mov    %eax,%ebp
  mov    %ebx,0x60(%rsp)
  call   <strlen@plt>
  mov    %ebx,%edi
  lea    0x1(%rax),%r13d
  mov    %eax,0x64(%rsp)
  imul   %r13d,%edi
  shl    $0x2,%edi
  call   <malloc@plt>
  mov    %rax,0x48(%rsp)
  movl   $0x0,(%rax)
  cmp    $0x1,%ebx
  jle    L47
  mov    %rax,%rsi
  mov    %rax,%r12
  mov    0x18(%rsp),%r15
  lea    -0x1(%rbp),%eax
  mov    %r13d,0x8(%rsp)
  lea    0x4(%rsi,%rax,4),%rbp
  mov    %r14,%r13
  nopl   0x0(%rax,%rax,1)
L69:
  mov    (%r12),%ebx
  movsbl 0x0(%r13),%edi
  add    $0x4,%r12
  add    $0x1,%r13
  call   *%r15
  add    %eax,%ebx
  mov    %ebx,(%r12)
  cmp    %r12,%rbp
  jne    L69
  mov    0x8(%rsp),%r13d
  cmp    $0x1,%r13d
  jle    L60
L2:
  movslq 0x60(%rsp),%rax
  mov    0x50(%rsp),%rcx
  mov    %r14,0x8(%rsp)
  mov    0x48(%rsp),%rbp
  mov    %rax,0x38(%rsp)
  lea    0x0(,%rax,4),%r15
  mov    %rcx,%r12
  mov    0x64(%rsp),%eax
  add    $0x1,%rcx
  mov    %r12,%r14
  mov    0x20(%rsp),%r12
  sub    $0x1,%eax
  mov    %rcx,0x68(%rsp)
  mov    %eax,0x30(%rsp)
  lea    (%rax,%rcx,1),%r13
  nopw   0x0(%rax,%rax,1)
L10:
  mov    0x0(%rbp),%ebx
  movsbl (%r14),%edi
  add    %r15,%rbp
  add    $0x1,%r14
  call   *%r12
  add    %eax,%ebx
  mov    %ebx,0x0(%rbp)
  cmp    %r14,%r13
  jne    L10
  cmpl   $0x1,0x60(%rsp)
  mov    0x8(%rsp),%r14
  jle    L60
  mov    0x38(%rsp),%r15
  mov    0x48(%rsp),%rax
  lea    0x1(%r14),%r12
  movq   $0x1,0x38(%rsp)
  shl    $0x2,%r15
  add    %r15,%rax
  mov    %r15,%r13
  mov    %rax,0x40(%rsp)
  mov    0x14(%rsp),%eax
  sub    $0x1,%eax
  add    $0x2,%rax
  mov    %rax,0x58(%rsp)
  mov    0x30(%rsp),%eax
  add    0x68(%rsp),%rax
  mov    %rax,0x30(%rsp)
  nopw   0x0(%rax,%rax,1)
L83:
  mov    0x48(%rsp),%rax
  mov    0x38(%rsp),%rcx
  mov    0x40(%rsp),%r14
  mov    0x50(%rsp),%r15
  lea    (%rax,%rcx,4),%rbx
  mov    %r13,%rax
  mov    %r14,%r13
  mov    %rax,%r14
  nopl   0x0(%rax)
L4:
  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,0x14(%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    0x14(%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    L4
  addq   $0x1,0x38(%rsp)
  mov    %r14,%r13
  mov    0x38(%rsp),%rax
  add    $0x1,%r12
  addq   $0x4,0x40(%rsp)
  cmp    %rax,0x58(%rsp)
  jne    L83
L60:
  mov    0x60(%rsp),%ecx
  mov    0x64(%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
L47:
  cmp    $0x1,%r13d
  jg     L2
  jmp    L60
```

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