user: Please show me the C implementation that matches the assembly code listed below:

```asm
<build_transij>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    0x38(%rsp),%r11
  movq   $0x0,(%r11)
  movq   $0x0,0x8(%r11)
  movq   $0x0,0x10(%r11)
  movq   $0x0,0x18(%r11)
  movl   $0x0,0x20(%r11)
  test   %edx,%edx
  jle    L194
  lea    -0x1(%rdx),%eax
  lea    0x1(%r8),%r15d
  movslq %r8d,%r13
  mov    %ecx,%ebp
  movabs $0x8000000000007001,%r12
  lea    0x4(%rsi,%rax,4),%r14
  movslq %r15d,%rax
  mov    %rax,-0x10(%rsp)
  lea    -0x2(%r9),%eax
  sub    %r8d,%eax
  lea    0x2(%r13,%rax,1),%rax
  mov    %rax,-0x8(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L193:
  test   %r8d,%r8d
  jle    L28
  mov    (%rdi),%rax
  cmpb   $0x2c,-0x1(%rax,%r13,1)
  je     L354
L28:
  cmp    %r9d,%ebp
  jl     L288
  mov    (%rdi),%rdx
  movslq %r9d,%rax
  cmpb   $0x2c,-0x1(%rdx,%rax,1)
  je     L354
L288:
  cmp    %r15d,%r9d
  jle    L196
  mov    (%rdi),%rbx
  mov    -0x10(%rsp),%rax
  xor    %r10d,%r10d
  lea    (%rbx,%rax,1),%rdx
  mov    -0x8(%rsp),%rax
  lea    (%rbx,%rax,1),%rcx
  jmp    L115
  nopl   (%rax)
L108:
  add    $0x1,%rdx
  add    $0x1,%r10d
  cmp    %rdx,%rcx
  je     L184
L115:
  movzbl -0x1(%rdx),%eax
  sub    $0x20,%eax
  cmp    $0x3f,%al
  ja     L108
  bt     %rax,%r12
  jae    L108
  add    $0x1,%rdx
  cmp    %rdx,%rcx
  jne    L115
L184:
  test   %r10d,%r10d
  je     L196
  test   %r8d,%r8d
  jle    L11
  movzbl -0x1(%rbx,%r13,1),%eax
  sub    $0x20,%eax
  cmp    $0x3f,%al
  ja     L11
  movabs $0x8000000000006001,%rdx
  bt     %rax,%rdx
  jae    L11
  movss  0x1c(%r11),%xmm0
  addss  (%rsi),%xmm0
  movss  %xmm0,0x1c(%r11)
L253:
  cmp    %r9d,%ebp
  jl     L303
  movslq %r9d,%rax
  movzbl -0x1(%rbx,%rax,1),%eax
  sub    $0x20,%eax
  cmp    $0x3f,%al
  ja     L303
  movabs $0x8000000000006001,%rdx
  bt     %rax,%rdx
  jae    L303
  movss  0x14(%r11),%xmm0
  addss  (%rsi),%xmm0
  movss  %xmm0,0x14(%r11)
L230:
  sub    $0x1,%r10d
  pxor   %xmm0,%xmm0
  cvtsi2ss %r10d,%xmm0
  mulss  (%rsi),%xmm0
  addss  0x10(%r11),%xmm0
  movss  %xmm0,0x10(%r11)
L354:
  add    $0x4,%rsi
  add    $0x8,%rdi
  cmp    %r14,%rsi
  jne    L193
L194:
  pop    %rbx
  mov    $0x1,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L196:
  test   %r8d,%r8d
  jle    L31
  mov    (%rdi),%rdx
  movzbl -0x1(%rdx,%r13,1),%eax
  sub    $0x20,%eax
  cmp    $0x3f,%al
  ja     L31
  movabs $0x8000000000006001,%rcx
  bt     %rax,%rcx
  jae    L31
  cmp    %r9d,%ebp
  jl     L244
  movslq %r9d,%rax
  movzbl -0x1(%rdx,%rax,1),%eax
  sub    $0x20,%eax
  cmp    $0x3f,%al
  ja     L244
  bt     %rax,%rcx
  jae    L244
  movss  0x20(%r11),%xmm0
  addss  (%rsi),%xmm0
  add    $0x4,%rsi
  add    $0x8,%rdi
  movss  %xmm0,0x20(%r11)
  cmp    %r14,%rsi
  jne    L193
  jmp    L194
  nopl   0x0(%rax)
L244:
  movss  0x18(%r11),%xmm0
  addss  (%rsi),%xmm0
  add    $0x4,%rsi
  add    $0x8,%rdi
  movss  %xmm0,0x18(%r11)
  cmp    %r14,%rsi
  jne    L193
  jmp    L194
  xchg   %ax,%ax
L303:
  movss  0xc(%r11),%xmm0
  addss  (%rsi),%xmm0
  movss  %xmm0,0xc(%r11)
  jmp    L230
  nopl   (%rax)
L11:
  movss  0x4(%r11),%xmm0
  addss  (%rsi),%xmm0
  movss  %xmm0,0x4(%r11)
  jmp    L253
  nopl   (%rax)
L31:
  cmp    %r9d,%ebp
  jl     L84
  mov    (%rdi),%rdx
  movslq %r9d,%rax
  movzbl -0x1(%rdx,%rax,1),%eax
  sub    $0x20,%eax
  cmp    $0x3f,%al
  ja     L84
  movabs $0x8000000000006001,%rdx
  bt     %rax,%rdx
  jae    L84
  movss  0x8(%r11),%xmm0
  addss  (%rsi),%xmm0
  add    $0x4,%rsi
  add    $0x8,%rdi
  movss  %xmm0,0x8(%r11)
  cmp    %r14,%rsi
  jne    L193
  jmp    L194
  nopl   (%rax)
L84:
  movss  (%r11),%xmm0
  addss  (%rsi),%xmm0
  add    $0x4,%rsi
  add    $0x8,%rdi
  movss  %xmm0,(%r11)
  cmp    %r14,%rsi
  jne    L193
  jmp    L194
```

assistant: ```c
int build_transij(char **aseqs, float *weights, int nseq, int M, int i, int j, float transij[3][3]) {
  int x, y;
  int idx;
  int inscount;
  int pos;
  for (x = 0; x < 3; x++)
    for (y = 0; y < 3; y++)
      transij[x][y] = 0.0;
  for (idx = 0; idx < nseq; idx++) {
    if (i > 0 && aseqs[idx][i - 1] == ',')
      continue;
    if (j < M + 1 && aseqs[idx][j - 1] == ',')
      continue;
    inscount = 0;
    for (pos = i + 1; pos < j; pos++)
      if (aseqs[idx][pos - 1] != ',' && !((aseqs[idx][pos - 1]) == ' ' || (aseqs[idx][pos - 1]) == '.' || (aseqs[idx][pos - 1]) == '_' || (aseqs[idx][pos - 1]) == '-'))
        inscount++;
    if (inscount > 0) {
      if (i > 0 && ((aseqs[idx][i - 1]) == ' ' || (aseqs[idx][i - 1]) == '.' || (aseqs[idx][i - 1]) == '_' || (aseqs[idx][i - 1]) == '-'))
        transij[2][1] += weights[idx];
      else
        transij[0][1] += weights[idx];
      if (j < M + 1 && ((aseqs[idx][j - 1]) == ' ' || (aseqs[idx][j - 1]) == '.' || (aseqs[idx][j - 1]) == '_' || (aseqs[idx][j - 1]) == '-'))
        transij[1][2] += weights[idx];
      else
        transij[1][0] += weights[idx];
      transij[1][1] += weights[idx] * (inscount - 1);
    } else {
      if (i > 0 && ((aseqs[idx][i - 1]) == ' ' || (aseqs[idx][i - 1]) == '.' || (aseqs[idx][i - 1]) == '_' || (aseqs[idx][i - 1]) == '-')) {
        if (j < M + 1 && ((aseqs[idx][j - 1]) == ' ' || (aseqs[idx][j - 1]) == '.' || (aseqs[idx][j - 1]) == '_' || (aseqs[idx][j - 1]) == '-'))
          transij[2][2] += weights[idx];
        else
          transij[2][0] += weights[idx];
      } else {
        if (j < M + 1 && ((aseqs[idx][j - 1]) == ' ' || (aseqs[idx][j - 1]) == '.' || (aseqs[idx][j - 1]) == '_' || (aseqs[idx][j - 1]) == '-'))
          transij[0][2] += weights[idx];
        else
          transij[0][0] += weights[idx];
      }
    }
  }
  return 1;
}
```