user: 请从给定的汇编指令推导出C源代码:

```asm
<calc_prob_dp>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,0x38(%rsp)
  mov    %esi,0x48(%rsp)
  mov    %rdx,0x40(%rsp)
  mov    %ecx,0x4c(%rsp)
  mov    %r8d,0xc(%rsp)
  mov    %r9,0x30(%rsp)
  cmpl   $0x0,0x98(%rsp)
  je     L79
  cmpl   $0x0,0x98(%rsp)
  js     L37
  movslq 0x48(%rsp),%rax
  shl    $0x3,%rax
  mov    %rax,(%rsp)
  movq   $0x0,0x10(%rsp)
  mov    $0x0,%ebx
  pxor   %xmm2,%xmm2
  movsd  %xmm2,0x18(%rsp)
  jmp    L54
L37:
  pxor   %xmm3,%xmm3
  movsd  %xmm3,0x18(%rsp)
  jmp    L13
L79:
  mov    0x48(%rsp),%esi
  mov    %esi,%eax
  shr    $0x1f,%eax
  add    %esi,%eax
  sar    %eax
  neg    %eax
  push   0xb0(%rsp)
  mov    0xb0(%rsp),%ecx
  push   %rcx
  mov    0xb0(%rsp),%ecx
  push   %rcx
  mov    0x24(%rsp),%ecx
  mov    %ecx,%edx
  sub    %eax,%edx
  push   %rdx
  lea    (%rax,%rcx,1),%r9d
  mov    %ecx,%r8d
  mov    0x6c(%rsp),%ecx
  mov    0x60(%rsp),%rdx
  mov    0x58(%rsp),%rdi
  call   <calc_prob_region_dp@plt>
  movsd  %xmm0,0x38(%rsp)
  add    $0x20,%rsp
L13:
  movsd  0x18(%rsp),%xmm0
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L24:
  mov    %r15d,%eax
  shr    $0x1f,%eax
  add    %r15d,%eax
  sar    %eax
  mov    0xc(%rsp),%ecx
  mov    %ecx,%esi
  sub    %eax,%esi
  mov    %esi,0x20(%rsp)
  add    %ecx,%eax
  mov    %eax,0x24(%rsp)
  lea    (%r15,%r15,4),%eax
  lea    (%r15,%rax,4),%edi
  shl    $0x3,%edi
  call   <malloc@plt>
  mov    %rax,0x28(%rsp)
  movslq %r15d,%r13
  lea    0x0(,%r15,8),%r14d
  shl    $0x3,%r13
  mov    %rax,%r12
  movslq %ebx,%rbx
  mov    0x38(%rsp),%rax
  lea    (%rax,%rbx,8),%rbp
  mov    $0x15,%ebx
L67:
  mov    %r14d,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <memcpy@plt>
  add    %r13,%r12
  add    (%rsp),%rbp
  sub    $0x1,%ebx
  jne    L67
  push   0xb0(%rsp)
  mov    0xb0(%rsp),%eax
  push   %rax
  mov    0xb0(%rsp),%eax
  push   %rax
  mov    0x3c(%rsp),%eax
  push   %rax
  mov    0x40(%rsp),%r9d
  mov    0x2c(%rsp),%ebx
  mov    %ebx,%r8d
  mov    0x6c(%rsp),%ecx
  mov    0x60(%rsp),%rdx
  mov    %r15d,%esi
  mov    0x48(%rsp),%r14
  mov    %r14,%rdi
  call   <calc_prob_region_dp@plt>
  addsd  0x38(%rsp),%xmm0
  movsd  %xmm0,0x38(%rsp)
  add    $0x20,%rsp
  mov    %r14,%rdi
  call   <free@plt>
  mov    0x90(%rsp),%rcx
  mov    0x10(%rsp),%rax
  add    (%rcx,%rax,4),%r15d
  add    %r15d,%ebx
  mov    %ebx,0xc(%rsp)
  mov    0x30(%rsp),%rcx
  mov    (%rcx,%rax,4),%ecx
  lea    0x1(%rcx),%ebx
  add    $0x1,%rax
  mov    %rax,0x10(%rsp)
  cmp    %eax,0x98(%rsp)
  jl     L13
L54:
  mov    0x48(%rsp),%r15d
  sub    %ebx,%r15d
  mov    0x10(%rsp),%rax
  cmp    %eax,0x98(%rsp)
  jle    L24
  mov    0x30(%rsp),%rcx
  mov    (%rcx,%rax,4),%eax
  mov    %eax,0x20(%rsp)
  mov    %eax,%r15d
  sub    %ebx,%r15d
  add    $0x1,%r15d
  jmp    L24
```

assistant: ```c
double calc_prob_dp(const double *matrix, int read_length, const char *seq, int seq_length, int pos, int *splice_pos, int *splice_offset, int n_splice, int gap_op, int gap_ex, int *seqnt_map) {
  int start = pos - (read_length / 2);
  int end = pos + (read_length / 2);
  int i, j;
  double probability = 0;
  if (n_splice == 0) {
    probability = calc_prob_region_dp(matrix, read_length, seq, seq_length, pos, start, end, gap_op, gap_ex, seqnt_map);
  } else {
    int r_pos = 0;
    int g_pos = pos;
    for (i = 0; i <= n_splice; i++) {
      int r_len = (i < n_splice) ? splice_pos[i] - r_pos + 1 : read_length - r_pos;
      int n = r_len / 2;
      start = g_pos - n;
      end = g_pos + n;
      double *submatrix = malloc(21 * r_len * sizeof(double));
      for (j = 0; j < 21; j++)
        memcpy(&submatrix[r_len * j], &matrix[read_length * j + r_pos], r_len * sizeof(double));
      probability += calc_prob_region_dp(submatrix, r_len, seq, seq_length, g_pos, start, end, gap_op, gap_ex, seqnt_map);
      free(submatrix);
      submatrix = NULL;
      g_pos += r_len + splice_offset[i];
      r_pos = splice_pos[i] + 1;
    }
  }
  return probability;
}
```