user: What would the C source look like for the assembly code provided here:

```asm
<levenshtein>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  call   <strlen@plt>
  mov    %r12,%rdi
  mov    %rax,%r14
  call   <strlen@plt>
  mov    $0x4,%esi
  lea    0x1(%rax),%rdi
  mov    %rax,%rbp
  call   <calloc@plt>
  mov    %rax,%r9
  test   %rbp,%rbp
  je     L113
  test   %r14,%r14
  jne    L135
  jmp    L125
  nop
L118:
  add    $0x1,%r13
  add    $0x1,%r12
  sub    $0x1,%rbp
  sub    $0x1,%r14
  je     L125
  test   %rbp,%rbp
  je     L113
L135:
  movzbl (%r12),%eax
  cmp    %al,0x0(%r13)
  je     L118
L54:
  lea    0x1(%rbp),%rcx
  xor    %eax,%eax
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L102:
  mov    %eax,(%r9,%rdx,4)
  lea    0x1(%rax),%edx
  mov    %rdx,%rax
  cmp    %rcx,%rdx
  jb     L102
  lea    (%r9,%rbp,4),%rax
  mov    %r14,0x18(%rsp)
  xor    %r15d,%r15d
  xor    %r10d,%r10d
  mov    %rax,0x10(%rsp)
  movl   $0xffffffff,0xc(%rsp)
  nopl   0x0(%rax,%rax,1)
L87:
  mov    %r15d,%ebx
  add    $0x1,%r15d
  mov    0xc(%rsp),%r14d
  xor    %edi,%edi
  lea    0x0(%r13,%r10,1),%r11
  mov    %r15d,%r8d
  xor    %ecx,%ecx
  jmp    L63
  nopw   0x0(%rax,%rax,1)
L97:
  mov    %eax,%r8d
L63:
  movzbl (%r11),%edx
  movzbl (%r12,%rcx,1),%eax
  xor    %esi,%esi
  cmp    %al,%dl
  je     L86
  mov    $0x1,%esi
  test   %ebx,%ebx
  je     L86
  test   %edi,%edi
  je     L86
  cmp    0x0(%r13,%r14,1),%al
  jne    L86
  lea    -0x1(%rdi),%eax
  xor    %esi,%esi
  cmp    %dl,(%r12,%rax,1)
  setne  %sil
  nopl   0x0(%rax,%rax,1)
L86:
  lea    (%r9,%rcx,4),%rdx
  lea    0x1(%rdi),%ecx
  mov    (%r9,%rcx,4),%eax
  lea    0x1(%r8),%r10d
  mov    %rcx,%rdi
  add    $0x1,%eax
  cmp    %r10d,%eax
  cmova  %r10d,%eax
  add    (%rdx),%esi
  mov    %r8d,(%rdx)
  cmp    %esi,%eax
  cmova  %esi,%eax
  cmp    %rbp,%rcx
  jb     L97
  mov    0x10(%rsp),%rbx
  addl   $0x1,0xc(%rsp)
  mov    %r15d,%r10d
  mov    %eax,(%rbx)
  cmp    %r10,0x18(%rsp)
  ja     L87
  mov    %r9,%rdi
  mov    %eax,0xc(%rsp)
  call   <free@plt>
  mov    0xc(%rsp),%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L113:
  test   %r14,%r14
  jne    L91
L125:
  add    $0x28,%rsp
  mov    %ebp,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L91:
  test   %rbp,%rbp
  jne    L54
  add    $0x28,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
int levenshtein(const char *str1, const char *str2) {
  size_t len1 = strlen(str1), len2 = strlen(str2);
  unsigned int *v = calloc(len2 + 1, sizeof(unsigned int));
  unsigned int i, j, current, next, cost;
  while (len1 > 0 && len2 > 0 && ((str1[0]) == (str2[0])))
    str1++, str2++, len1--, len2--;
  if (!len1)
    return (len2);
  if (!len2)
    return (len1);
  for (j = 0; j < len2 + 1; j++)
    v[j] = j;
  for (i = 0; i < len1; i++) {
    current = i + 1;
    for (j = 0; j < len2; j++) {
      cost = !(((str1[i]) == (str2[j])) || (i && j && ((str1[i - 1]) == (str2[j])) && ((str1[i]) == (str2[j - 1]))));
      next = ((((v[j + 1] + 1) < (current + 1) ? (v[j + 1] + 1) : (current + 1))) < (v[j] + cost) ? (((v[j + 1] + 1) < (current + 1) ? (v[j + 1] + 1) : (current + 1))) : (v[j] + cost));
      v[j] = current;
      current = next;
    }
    v[len2] = next;
  }
  free(v);
  return (next);
}
```