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

```asm
<levenshtein>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x98,%rsp
  mov    %rdi,-0x78(%rbp)
  mov    %esi,-0x7c(%rbp)
  mov    %rdx,-0x88(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    -0x88(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <sqlite3_value_text@plt>
  mov    %rax,-0x60(%rbp)
  mov    -0x88(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <sqlite3_value_text@plt>
  mov    %rax,-0x58(%rbp)
  cmpq   $0x0,-0x60(%rbp)
  je     L139
  cmpq   $0x0,-0x58(%rbp)
  jne    L146
L139:
  mov    -0x78(%rbp),%rax
  mov    %rax,%rdi
  call   <sqlite3_result_null@plt>
  jmp    L89
L146:
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0x60(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x68(%rbp)
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x64(%rbp)
  mov    -0x68(%rbp),%eax
  lea    0x1(%rax),%esi
  mov    -0x64(%rbp),%eax
  lea    0x1(%rax),%edi
  mov    %esi,%eax
  sub    $0x1,%rax
  mov    %rax,-0x50(%rbp)
  mov    %esi,%eax
  mov    %rax,-0xc0(%rbp)
  movq   $0x0,-0xb8(%rbp)
  mov    %esi,%eax
  lea    0x0(,%rax,4),%rcx
  mov    %edi,%eax
  sub    $0x1,%rax
  mov    %rax,-0x48(%rbp)
  mov    %esi,%eax
  mov    %rax,-0xb0(%rbp)
  movq   $0x0,-0xa8(%rbp)
  mov    %edi,%eax
  mov    %rax,-0xa0(%rbp)
  movq   $0x0,-0x98(%rbp)
  mov    -0xb0(%rbp),%r9
  mov    -0xa8(%rbp),%r10
  mov    %r10,%rdx
  imul   -0xa0(%rbp),%rdx
  mov    -0x98(%rbp),%rax
  imul   %r9,%rax
  lea    (%rdx,%rax,1),%r8
  mov    %r9,%rax
  mulq   -0xa0(%rbp)
  add    %rdx,%r8
  mov    %r8,%rdx
  mov    %esi,%eax
  mov    %rax,%r14
  mov    $0x0,%r15d
  mov    %edi,%eax
  mov    %rax,%r12
  mov    $0x0,%r13d
  mov    %r15,%rdx
  imul   %r12,%rdx
  mov    %r13,%rax
  imul   %r14,%rax
  lea    (%rdx,%rax,1),%r8
  mov    %r14,%rax
  mul    %r12
  add    %rdx,%r8
  mov    %r8,%rdx
  mov    %esi,%edx
  mov    %edi,%eax
  imul   %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rsi
  and    $0xfffffffffffff000,%rsi
  mov    %rsp,%rdx
  sub    %rsi,%rdx
L21:
  cmp    %rdx,%rsp
  je     L142
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L21
L142:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L135
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L135:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  movl   $0x0,(%rax)
  movl   $0x1,-0x70(%rbp)
  jmp    L63
L84:
  mov    %rcx,%rdx
  shr    $0x2,%rdx
  mov    -0x70(%rbp),%eax
  lea    -0x1(%rax),%esi
  mov    -0x40(%rbp),%rax
  mov    %esi,%esi
  imul   %rsi,%rdx
  mov    (%rax,%rdx,4),%eax
  mov    %rcx,%rdi
  shr    $0x2,%rdi
  lea    0x1(%rax),%esi
  mov    -0x40(%rbp),%rax
  mov    -0x70(%rbp),%edx
  imul   %rdi,%rdx
  mov    %esi,(%rax,%rdx,4)
  addl   $0x1,-0x70(%rbp)
L63:
  mov    -0x70(%rbp),%eax
  cmp    -0x64(%rbp),%eax
  jbe    L84
  movl   $0x1,-0x6c(%rbp)
  jmp    L32
L80:
  mov    -0x6c(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,%edx
  mov    (%rax,%rdx,4),%eax
  lea    0x1(%rax),%esi
  mov    -0x40(%rbp),%rax
  mov    -0x6c(%rbp),%edx
  mov    %esi,(%rax,%rdx,4)
  addl   $0x1,-0x6c(%rbp)
L32:
  mov    -0x6c(%rbp),%eax
  cmp    -0x68(%rbp),%eax
  jbe    L80
  movl   $0x1,-0x70(%rbp)
  jmp    L24
L6:
  movl   $0x1,-0x6c(%rbp)
  jmp    L68
L96:
  mov    %rcx,%rdx
  shr    $0x2,%rdx
  mov    -0x70(%rbp),%eax
  lea    -0x1(%rax),%edi
  mov    -0x40(%rbp),%rax
  mov    -0x6c(%rbp),%esi
  mov    %edi,%edi
  imul   %rdi,%rdx
  add    %rsi,%rdx
  mov    (%rax,%rdx,4),%eax
  lea    0x1(%rax),%esi
  mov    %rcx,%rdi
  shr    $0x2,%rdi
  mov    -0x6c(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,%r8d
  mov    -0x70(%rbp),%edx
  imul   %rdi,%rdx
  add    %r8,%rdx
  mov    (%rax,%rdx,4),%eax
  add    $0x1,%eax
  cmp    %eax,%esi
  jae    L75
  mov    %rcx,%rdx
  shr    $0x2,%rdx
  mov    -0x70(%rbp),%eax
  lea    -0x1(%rax),%esi
  mov    -0x6c(%rbp),%eax
  lea    -0x1(%rax),%edi
  mov    -0x40(%rbp),%rax
  mov    %edi,%edi
  mov    %esi,%esi
  imul   %rsi,%rdx
  add    %rdi,%rdx
  mov    (%rax,%rdx,4),%esi
  mov    -0x6c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,%edx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x70(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,%edi
  mov    -0x58(%rbp),%rax
  add    %rdi,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  setne  %al
  movzbl %al,%eax
  lea    (%rsi,%rax,1),%edx
  mov    %rcx,%rsi
  shr    $0x2,%rsi
  mov    -0x70(%rbp),%eax
  lea    -0x1(%rax),%r8d
  mov    -0x40(%rbp),%rax
  mov    -0x6c(%rbp),%edi
  mov    %r8d,%r8d
  imul   %r8,%rsi
  add    %rdi,%rsi
  mov    (%rax,%rsi,4),%eax
  add    $0x1,%eax
  cmp    %eax,%edx
  cmovbe %edx,%eax
  jmp    L42
L75:
  mov    %rcx,%rdx
  shr    $0x2,%rdx
  mov    -0x70(%rbp),%eax
  lea    -0x1(%rax),%esi
  mov    -0x6c(%rbp),%eax
  lea    -0x1(%rax),%edi
  mov    -0x40(%rbp),%rax
  mov    %edi,%edi
  mov    %esi,%esi
  imul   %rsi,%rdx
  add    %rdi,%rdx
  mov    (%rax,%rdx,4),%esi
  mov    -0x6c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,%edx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x70(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,%edi
  mov    -0x58(%rbp),%rax
  add    %rdi,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  setne  %al
  movzbl %al,%eax
  lea    (%rsi,%rax,1),%edx
  mov    %rcx,%rdi
  shr    $0x2,%rdi
  mov    -0x6c(%rbp),%eax
  lea    -0x1(%rax),%esi
  mov    -0x40(%rbp),%rax
  mov    %esi,%r8d
  mov    -0x70(%rbp),%esi
  imul   %rdi,%rsi
  add    %r8,%rsi
  mov    (%rax,%rsi,4),%eax
  add    $0x1,%eax
  cmp    %eax,%edx
  cmovbe %edx,%eax
L42:
  mov    %rcx,%rdi
  shr    $0x2,%rdi
  mov    -0x40(%rbp),%rdx
  mov    -0x6c(%rbp),%r8d
  mov    -0x70(%rbp),%esi
  imul   %rdi,%rsi
  add    %r8,%rsi
  mov    %eax,(%rdx,%rsi,4)
  addl   $0x1,-0x6c(%rbp)
L68:
  mov    -0x6c(%rbp),%eax
  cmp    -0x68(%rbp),%eax
  jbe    L96
  addl   $0x1,-0x70(%rbp)
L24:
  mov    -0x70(%rbp),%eax
  cmp    -0x64(%rbp),%eax
  jbe    L6
  shr    $0x2,%rcx
  mov    -0x40(%rbp),%rax
  mov    -0x68(%rbp),%esi
  mov    -0x64(%rbp),%edx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  mov    (%rax,%rdx,4),%eax
  mov    %eax,%edx
  mov    -0x78(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <sqlite3_result_int@plt>
  mov    %rbx,%rsp
L89:
  nop
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L36
  call   <__stack_chk_fail@plt>
L36:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
extern void levenshtein(sqlite3_context *context, int argc, sqlite3_value **argv) {
  char *s1;
  char *s2;
  s1 = (char *)sqlite3_value_text(argv[0]);
  s2 = (char *)sqlite3_value_text(argv[1]);
  if ((s1 == NULL) || (s2 == NULL)) {
    sqlite3_result_null(context);
  } else {
    unsigned int x;
    unsigned int y;
    unsigned int s1len;
    unsigned int s2len;
    s1len = strlen(s1);
    s2len = strlen(s2);
    unsigned int matrix[s2len + 1][s1len + 1];
    matrix[0][0] = 0;
    for (x = 1; x <= s2len; x++) {
      matrix[x][0] = matrix[x - 1][0] + 1;
    }
    for (y = 1; y <= s1len; y++) {
      matrix[0][y] = matrix[0][y - 1] + 1;
    }
    for (x = 1; x <= s2len; x++) {
      for (y = 1; y <= s1len; y++) {
        matrix[x][y] = ((matrix[x - 1][y] + 1) < (matrix[x][y - 1] + 1) ? ((matrix[x - 1][y] + 1) < (matrix[x - 1][y - 1] + (s1[y - 1] == s2[x - 1] ? 0 : 1)) ? (matrix[x - 1][y] + 1) : (matrix[x - 1][y - 1] + (s1[y - 1] == s2[x - 1] ? 0 : 1))) : ((matrix[x][y - 1] + 1) < (matrix[x - 1][y - 1] + (s1[y - 1] == s2[x - 1] ? 0 : 1)) ? (matrix[x][y - 1] + 1) : (matrix[x - 1][y - 1] + (s1[y - 1] == s2[x - 1] ? 0 : 1))));
      }
    }
    sqlite3_result_int(context, (int)matrix[s2len][s1len]);
  }
}
```