user: What would the C source look like for the assembly code provided here?

```asm
<_compute_viterbi>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %rsi,-0x70(%rbp)
  mov    %rdx,-0x78(%rbp)
  mov    %rcx,-0x80(%rbp)
  mov    %r8d,-0x84(%rbp)
  mov    %r9d,-0x88(%rbp)
  movl   $0x0,-0x48(%rbp)
  mov    -0x84(%rbp),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x38(%rbp)
  mov    -0x84(%rbp),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x30(%rbp)
  mov    -0x84(%rbp),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x88(%rbp),%eax
  imul   -0x84(%rbp),%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  cmpq   $0x0,-0x38(%rbp)
  je     L0
  cmpq   $0x0,-0x30(%rbp)
  je     L0
  cmpq   $0x0,-0x28(%rbp)
  je     L0
  cmpq   $0x0,-0x20(%rbp)
  jne    L58
L0:
  movl   $0x2,-0x48(%rbp)
  jmp    L38
L58:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movl   $0x0,-0x54(%rbp)
  jmp    L76
L115:
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x40(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  addl   $0x1,-0x54(%rbp)
L76:
  mov    -0x54(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L115
  movl   $0x0,-0x54(%rbp)
  jmp    L142
L154:
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  divsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x54(%rbp)
L142:
  mov    -0x54(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L154
  movl   $0x1,-0x4c(%rbp)
  jmp    L12
L100:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movl   $0x0,-0x50(%rbp)
  jmp    L91
L107:
  movl   $0x0,-0x54(%rbp)
  jmp    L51
L87:
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x54(%rbp),%eax
  imul   -0x84(%rbp),%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x54(%rbp)
L51:
  mov    -0x54(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L87
  mov    -0x84(%rbp),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <argmax@plt>
  mov    %eax,-0x44(%rbp)
  mov    -0x4c(%rbp),%eax
  imul   -0x84(%rbp),%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x44(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x4c(%rbp),%eax
  imul   -0x84(%rbp),%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x44(%rbp),%eax
  imul   -0x84(%rbp),%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x40(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  addl   $0x1,-0x50(%rbp)
L91:
  mov    -0x50(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L107
  movl   $0x0,-0x54(%rbp)
  jmp    L69
L71:
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  divsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x54(%rbp)
L69:
  mov    -0x54(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L71
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  addl   $0x1,-0x4c(%rbp)
L12:
  mov    -0x4c(%rbp),%eax
  cmp    -0x88(%rbp),%eax
  jl     L100
  mov    -0x88(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x68(%rbp),%rax
  lea    (%rdx,%rax,1),%rbx
  mov    -0x84(%rbp),%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <argmax@plt>
  mov    %eax,(%rbx)
  mov    -0x88(%rbp),%eax
  sub    $0x2,%eax
  mov    %eax,-0x4c(%rbp)
  jmp    L63
L98:
  mov    -0x4c(%rbp),%eax
  add    $0x1,%eax
  imul   -0x84(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rcx
  mov    -0x68(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x4c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x68(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  subl   $0x1,-0x4c(%rbp)
L63:
  cmpl   $0x0,-0x4c(%rbp)
  jns    L98
  nop
L38:
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x48(%rbp),%eax
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int _compute_viterbi(int *path, const double *A, const double *pobs, const double *pi, int N, int T) {
  int i, j, t, maxi, result;
  double sum;
  double *v, *vnext, *h, *vh;
  int *ptr;
  result = 0;
  v = (double *)malloc(N * sizeof(double));
  vnext = (double *)malloc(N * sizeof(double));
  h = (double *)malloc(N * sizeof(double));
  ptr = (int *)malloc(T * N * sizeof(int));
  if (!v || !vnext || !h || !ptr) {
    result = 2;
    goto error;
  }
  sum = 0.0;
  for (i = 0; i < N; i++) {
    v[i] = pobs[i] * pi[i];
    sum += v[i];
  }
  for (i = 0; i < N; i++) {
    v[i] /= sum;
  }
  for (t = 1; t < T; t++) {
    sum = 0.0;
    for (j = 0; j < N; j++) {
      for (i = 0; i < N; i++) {
        h[i] = v[i] * A[i * N + j];
      }
      maxi = argmax(h, N);
      ptr[t * N + j] = maxi;
      vnext[j] = pobs[t * N + j] * v[maxi] * A[maxi * N + j];
      sum += vnext[j];
    }
    for (i = 0; i < N; i++) {
      vnext[i] /= sum;
    }
    vh = v;
    v = vnext;
    vnext = vh;
  }
  path[T - 1] = argmax(v, N);
  for (t = T - 2; t >= 0; t--) {
    path[t] = ptr[(t + 1) * N + path[t + 1]];
  }
error:
  free(v);
  free(vnext);
  free(h);
  free(ptr);
  return result;
}
```