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

```asm
<similarity>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x27000(%rsp),%r11
L85:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L85
  sub    $0x148,%rsp
  mov    %esi,0x24(%rsp)
  mov    %rdi,%rbp
  xor    %esi,%esi
  lea    0x30(%rsp),%rdi
  mov    %rdx,0x10(%rsp)
  mov    $0x27100,%edx
  mov    %ecx,%r14d
  mov    %r8,%rbx
  mov    %ecx,0x20(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x27138(%rsp)
  xor    %eax,%eax
  call   <memset@plt>
  mov    %rax,%rdi
  movslq %r14d,%rax
  mov    %rax,0x28(%rsp)
  test   %eax,%eax
  jle    L10
  mov    0x10(%rsp),%rsi
  mov    0x28(%rsp),%r8
  xor    %eax,%eax
  xor    %edx,%edx
  nopl   (%rax)
L29:
  movsbq (%rsi,%rax,1),%rcx
  add    0xb400(%rbx,%rcx,4),%edx
  mov    %edx,0x4(%rdi,%rax,4)
  add    $0x1,%rax
  cmp    %r8,%rax
  jne    L29
L10:
  mov    0x24(%rsp),%edx
  test   %edx,%edx
  jle    L28
  mov    0x24(%rsp),%eax
  lea    0x350(%rsp),%rsi
  xor    %ecx,%ecx
  sub    $0x1,%eax
  lea    0x1(%rbp,%rax,1),%rdi
  mov    %rbp,%rax
  mov    %rdi,0x18(%rsp)
  nopl   0x0(%rax,%rax,1)
L71:
  movsbq (%rax),%rdx
  add    $0x1,%rax
  add    $0x320,%rsi
  shl    $0xa,%rdx
  add    0xb4(%rbx,%rdx,1),%ecx
  mov    %ecx,-0x320(%rsi)
  cmp    %rdi,%rax
  jne    L71
  lea    0x34(%rsp),%rax
  mov    0x10(%rsp),%rcx
  mov    $0x320,%r13d
  xor    %r12d,%r12d
  mov    %rax,0x8(%rsp)
  mov    0x20(%rsp),%eax
  sub    $0x1,%eax
  lea    0x1(%rcx,%rax,1),%rax
  mov    %rax,(%rsp)
  nopl   (%rax)
L48:
  mov    0x20(%rsp),%eax
  test   %eax,%eax
  jle    L81
  mov    0x8(%rsp),%r15
  mov    0x10(%rsp),%r14
  mov    0x31c(%r15),%eax
  nopl   0x0(%rax)
L42:
  movsbq 0x0(%rbp),%rdx
  movsbq (%r14),%rdi
  add    $0x1,%r14
  mov    -0x4(%r15),%esi
  shl    $0xa,%rdx
  add    0xb400(%rbx,%rdi,4),%eax
  add    %rbx,%rdx
  add    (%rdx,%rdi,4),%esi
  mov    %eax,%edi
  call   <max@plt>
  mov    (%r15),%edi
  mov    %eax,%esi
  movsbq 0x0(%rbp),%rax
  shl    $0xa,%rax
  add    0xb4(%rbx,%rax,1),%edi
  call   <max@plt>
  lea    (%r12,%r15,1),%rdx
  add    $0x4,%r15
  mov    %eax,(%rdx,%r13,1)
  cmp    (%rsp),%r14
  jne    L42
L81:
  addq   $0x320,0x8(%rsp)
  add    $0x1,%rbp
  sub    $0x320,%r12
  add    $0x320,%r13
  cmp    0x18(%rsp),%rbp
  jne    L48
L28:
  movslq 0x24(%rsp),%rax
  mov    0x28(%rsp),%rcx
  lea    (%rax,%rax,4),%rax
  lea    (%rax,%rax,4),%rax
  lea    (%rcx,%rax,8),%rax
  mov    0x30(%rsp,%rax,4),%eax
  mov    0x27138(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L33
  add    $0x27148,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L33:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int similarity(char *a, int a_len, char *b, int b_len, int score[][256]) {
  int s[200][200] = {0};
  for (int j = 0; j < b_len; ++j) {
    s[0][j + 1] = s[0][j] + score['-'][b[j]];
  }
  for (int i = 0; i < a_len; ++i) {
    s[i + 1][0] = s[i][0] + score[a[i]]['-'];
  }
  for (int i = 0; i < a_len; ++i) {
    for (int j = 0; j < b_len; ++j) {
      s[i + 1][j + 1] = max(s[i][j + 1] + score[a[i]]['-'], max(s[i + 1][j] + score['-'][b[j]], s[i][j] + score[a[i]][b[j]]));
    }
  }
  return s[a_len][b_len];
}
```