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
  mov    %rdi,%r12
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x38,%rsp
  mov    %rsi,-0x58(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <strlen@plt>
  mov    %rbx,%rdi
  mov    %eax,%r13d
  call   <strlen@plt>
  lea    0x1(%r13),%r15d
  mov    %rsp,%rcx
  mov    %eax,-0x48(%rbp)
  add    $0x1,%eax
  imul   %r15,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L112
L87:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L87
L112:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L93
L5:
  lea    0x3(%rsp),%r8
  mov    -0x48(%rbp),%edx
  mov    -0x48(%rbp),%esi
  mov    %r8,%rax
  and    $0xfffffffffffffffc,%r8
  shr    $0x2,%rax
  movl   $0x0,0x0(,%rax,4)
  mov    $0x1,%eax
  test   %edx,%edx
  je     L31
  nopl   (%rax)
L74:
  lea    -0x1(%rax),%ecx
  mov    %eax,%edx
  add    $0x1,%eax
  imul   %r15,%rcx
  imul   %r15,%rdx
  mov    (%r8,%rcx,4),%ecx
  add    $0x1,%ecx
  mov    %ecx,(%r8,%rdx,4)
  cmp    %eax,%esi
  jae    L74
L31:
  mov    $0x1,%eax
  test   %r13d,%r13d
  je     L7
  nopl   (%rax)
L15:
  lea    -0x1(%rax),%edx
  mov    %eax,%ecx
  add    $0x1,%eax
  mov    (%r8,%rdx,4),%edx
  add    $0x1,%edx
  mov    %edx,(%r8,%rcx,4)
  cmp    %eax,%r13d
  jae    L15
  mov    -0x48(%rbp),%eax
  movl   $0x1,-0x44(%rbp)
  xor    %ebx,%ebx
  test   %eax,%eax
  je     L7
  mov    %r15,-0x50(%rbp)
  mov    %rbx,%r15
  nopl   0x0(%rax,%rax,1)
L101:
  mov    -0x58(%rbp),%rax
  mov    -0x44(%rbp),%r11d
  mov    %r15d,%ebx
  xor    %r10d,%r10d
  mov    $0x1,%r9d
  movzbl (%rax,%r15,1),%r14d
  mov    -0x50(%rbp),%rax
  imul   %rax,%rbx
  imul   %rax,%r11
  nopl   (%rax)
L58:
  mov    %r9d,%ecx
  mov    %r10d,%edi
  lea    (%rcx,%rbx,1),%rax
  mov    (%r8,%rax,4),%esi
  lea    (%rdi,%r11,1),%rax
  mov    (%r8,%rax,4),%edx
  xor    %eax,%eax
  add    $0x1,%esi
  add    $0x1,%edx
  cmp    %r14b,(%r12,%r10,1)
  setne  %al
  add    %rbx,%rdi
  add    %r11,%rcx
  add    (%r8,%rdi,4),%eax
  cmp    %esi,%edx
  ja     L116
  cmp    %edx,%eax
  cmovbe %eax,%edx
  add    $0x1,%r9d
  add    $0x1,%r10
  mov    %edx,(%r8,%rcx,4)
  cmp    %r9d,%r13d
  jae    L58
  addl   $0x1,-0x44(%rbp)
  add    $0x1,%r15
  mov    -0x44(%rbp),%eax
  cmp    %eax,-0x48(%rbp)
  jae    L101
L48:
  mov    -0x50(%rbp),%r15
L7:
  mov    -0x48(%rbp),%edx
  mov    %r13d,%eax
  imul   %r15,%rdx
  add    %rdx,%rax
  mov    (%r8,%rax,4),%eax
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L88
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L116:
  cmp    %esi,%eax
  cmova  %esi,%eax
  add    $0x1,%r9d
  add    $0x1,%r10
  mov    %eax,(%r8,%rcx,4)
  cmp    %r13d,%r9d
  jbe    L58
  addl   $0x1,-0x44(%rbp)
  add    $0x1,%r15
  mov    -0x44(%rbp),%eax
  cmp    %eax,-0x48(%rbp)
  jae    L101
  jmp    L48
L93:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L5
L88:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int levenshtein(char *s1, char *s2) {
  unsigned int x, y, s1len, 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))));
  return (matrix[s2len][s1len]);
}
```