user: Translate the below assembly code into C programming language:

```asm
<_forward>:
  endbr64
  push   %r15
  push   %r14
  mov    %r8d,%r14d
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %r9d,%ebx
  sub    $0x38,%rsp
  mov    %rsi,0x18(%rsp)
  mov    %rdx,0x20(%rsp)
  test   %r8d,%r8d
  jle    L124
  pxor   %xmm3,%xmm3
  mov    %rdx,%rsi
  lea    -0x1(%r8),%r12d
  mov    %rcx,%rdx
  xor    %eax,%eax
  mov    %r8d,%ecx
  movapd %xmm3,%xmm1
  nopl   (%rax)
L4:
  movsd  (%rdx,%rax,8),%xmm0
  mulsd  (%rsi,%rax,8),%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  addsd  %xmm0,%xmm1
  cmp    %rcx,%rax
  jne    L4
  movapd %xmm1,%xmm0
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <log@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm3
  movapd %xmm0,%xmm4
  ucomisd %xmm3,%xmm1
  jp     L158
  jne    L158
L25:
  lea    -0x1(%rbx),%eax
  mov    %eax,0x28(%rsp)
  test   %eax,%eax
  jle    L53
  lea    -0x1(%r14),%eax
  movslq %r14d,%rbx
  xor    %r12d,%r12d
  xor    %r13d,%r13d
  mov    %eax,0x2c(%rsp)
  shl    $0x3,%rbx
  xchg   %ax,%ax
L60:
  add    $0x1,%r13d
  test   %r14d,%r14d
  jle    L26
  mov    0x2c(%rsp),%r9d
  movslq %r12d,%rax
  lea    0x8(%rbp),%r15
  add    %r14d,%r12d
  lea    0x0(%rbp,%rax,8),%r11
  mov    0x18(%rsp),%rdi
  xor    %esi,%esi
  movapd %xmm3,%xmm2
  add    %r9,%rax
  lea    (%r15,%rax,8),%rcx
  movslq %r12d,%rax
  lea    0x0(,%rax,8),%r8
  mov    %rax,0x8(%rsp)
  mov    0x20(%rsp),%rax
  lea    (%rax,%r8,1),%r10
  add    %rbp,%r8
  nop
L90:
  mov    %rdi,%rdx
  mov    %r11,%rax
  movapd %xmm3,%xmm1
  nopw   0x0(%rax,%rax,1)
L32:
  movsd  (%rax),%xmm0
  mulsd  (%rdx),%xmm0
  add    $0x8,%rax
  add    %rbx,%rdx
  addsd  %xmm0,%xmm1
  cmp    %rax,%rcx
  jne    L32
  mulsd  (%r10,%rsi,8),%xmm1
  lea    0x1(%rsi),%rax
  add    $0x8,%rdi
  addsd  %xmm1,%xmm2
  movsd  %xmm1,(%r8,%rsi,8)
  cmp    %rsi,%r9
  je     L44
  mov    %rax,%rsi
  jmp    L90
  nopw   0x0(%rax,%rax,1)
L44:
  ucomisd %xmm3,%xmm2
  jp     L159
  jne    L159
L14:
  movapd %xmm2,%xmm0
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm4,0x8(%rsp)
  call   <log@plt>
  movsd  0x8(%rsp),%xmm4
  cmp    %r13d,0x28(%rsp)
  movsd  0x10(%rsp),%xmm3
  addsd  %xmm0,%xmm4
  jne    L60
L53:
  add    $0x38,%rsp
  movapd %xmm4,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L159:
  add    0x8(%rsp),%r9
  lea    (%r15,%r9,8),%rax
  nopl   0x0(%rax)
L57:
  movsd  (%r8),%xmm0
  add    $0x8,%r8
  divsd  %xmm2,%xmm0
  movsd  %xmm0,-0x8(%r8)
  cmp    %r8,%rax
  jne    L57
  jmp    L14
L26:
  movapd %xmm3,%xmm2
  add    %r14d,%r12d
  jmp    L14
L158:
  mov    %rbp,%rax
  lea    0x8(%rbp,%r12,8),%rdx
L13:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %rdx,%rax
  jne    L13
  jmp    L25
L124:
  pxor   %xmm3,%xmm3
  movapd %xmm3,%xmm0
  movsd  %xmm3,0x8(%rsp)
  call   <log@plt>
  movsd  0x8(%rsp),%xmm3
  movapd %xmm0,%xmm4
  jmp    L25
```

assistant: ```c
double _forward(double *alpha, const double *A, const double *pobs, const double *pi, int N, int T) {
  int i, j, t;
  double sum, logprob, scaling;
  scaling = 0.0;
  for (i = 0; i < N; i++) {
    alpha[i] = pi[i] * pobs[i];
    scaling += alpha[i];
  }
  logprob = log(scaling);
  if (scaling != 0)
    for (i = 0; i < N; i++)
      alpha[i] /= scaling;
  for (t = 0; t < T - 1; t++) {
    scaling = 0.0;
    for (j = 0; j < N; j++) {
      sum = 0.0;
      for (i = 0; i < N; i++) {
        sum += alpha[t * N + i] * A[i * N + j];
      }
      alpha[(t + 1) * N + j] = sum * pobs[(t + 1) * N + j];
      scaling += alpha[(t + 1) * N + j];
    }
    if (scaling != 0)
      for (j = 0; j < N; j++)
        alpha[(t + 1) * N + j] /= scaling;
    logprob += log(scaling);
  }
  return logprob;
}
```