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

```asm
<levenshtein>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r12
  mov    %rsi,%r13
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <strlen@plt>
  mov    %eax,%ebx
  mov    %r13,%rdi
  call   <strlen@plt>
  mov    %eax,%r11d
  lea    0x1(%rbx),%r9d
  lea    0x1(%rax),%eax
  imul   %r9,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L142:
  cmp    %rdx,%rsp
  je     L87
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L142
L87:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L32
  orq    $0x0,-0x8(%rsp,%rax,1)
L32:
  lea    0x3(%rsp),%rcx
  mov    %rcx,%rax
  shr    $0x2,%rax
  and    $0xfffffffffffffffc,%rcx
  movl   $0x0,0x0(,%rax,4)
  test   %r11d,%r11d
  je     L114
  mov    $0x1,%eax
L109:
  mov    %eax,%edx
  imul   %r9,%rdx
  lea    -0x1(%rax),%esi
  imul   %r9,%rsi
  mov    (%rcx,%rsi,4),%esi
  add    $0x1,%esi
  mov    %esi,(%rcx,%rdx,4)
  add    $0x1,%eax
  cmp    %eax,%r11d
  jae    L109
  test   %ebx,%ebx
  je     L160
L84:
  mov    $0x1,%eax
L18:
  mov    %eax,%esi
  lea    -0x1(%rax),%edx
  mov    (%rcx,%rdx,4),%edx
  add    $0x1,%edx
  mov    %edx,(%rcx,%rsi,4)
  add    $0x1,%eax
  cmp    %eax,%ebx
  jae    L18
  test   %r11d,%r11d
  je     L9
L160:
  mov    %r13,%r8
  mov    $0x0,%r13d
  mov    $0x1,%r10d
  jmp    L12
L2:
  mov    %eax,%r15d
  movzbl (%r8),%eax
  cmp    %al,(%r12,%r15,1)
  setne  %al
  movzbl %al,%eax
  add    %rdi,%r15
  add    (%rcx,%r15,4),%eax
  cmp    %r14d,%eax
  cmova  %r14d,%eax
L24:
  mov    %edx,%r14d
  add    %rsi,%r14
  mov    %eax,(%rcx,%r14,4)
  add    $0x1,%edx
  cmp    %edx,%ebx
  jb     L61
L5:
  mov    %edx,%eax
  add    %rdi,%rax
  mov    (%rcx,%rax,4),%r15d
  add    $0x1,%r15d
  lea    -0x1(%rdx),%eax
  mov    %eax,%r14d
  add    %rsi,%r14
  mov    (%rcx,%r14,4),%r14d
  add    $0x1,%r14d
  cmp    %r14d,%r15d
  jae    L2
  mov    %eax,%r14d
  movzbl (%r8),%eax
  cmp    %al,(%r12,%r14,1)
  setne  %al
  movzbl %al,%eax
  add    %rdi,%r14
  add    (%rcx,%r14,4),%eax
  cmp    %r15d,%eax
  cmova  %r15d,%eax
  jmp    L24
L61:
  add    $0x1,%r10d
  add    $0x1,%r13d
  add    $0x1,%r8
  cmp    %r10d,%r11d
  jb     L9
L12:
  mov    $0x1,%edx
  test   %ebx,%ebx
  je     L61
  mov    %r13d,%edi
  imul   %r9,%rdi
  mov    %r10d,%esi
  imul   %r9,%rsi
  jmp    L5
L114:
  test   %ebx,%ebx
  jne    L84
L9:
  mov    %ebx,%eax
  mov    %r11d,%r11d
  imul   %r9,%r11
  add    %r11,%rax
  mov    (%rcx,%rax,4),%eax
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L25
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L25:
  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]);
}
```