user: What is the c source code of the assembly code below?

```asm
<levenshtein>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x34(%rbp)
  mov    -0x50(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x30(%rbp)
  mov    -0x30(%rbp),%eax
  add    $0x1,%eax
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  jmp    L179
L35:
  addq   $0x1,-0x48(%rbp)
  addq   $0x1,-0x50(%rbp)
  subl   $0x1,-0x34(%rbp)
  subl   $0x1,-0x30(%rbp)
L179:
  cmpl   $0x0,-0x34(%rbp)
  je     L60
  cmpl   $0x0,-0x30(%rbp)
  je     L60
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %rax,%rbx
  mov    -0x50(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  cmp    %rax,%rbx
  je     L35
L60:
  cmpl   $0x0,-0x34(%rbp)
  jne    L52
  mov    -0x30(%rbp),%eax
  jmp    L170
L52:
  cmpl   $0x0,-0x30(%rbp)
  jne    L21
  mov    -0x34(%rbp),%eax
  jmp    L170
L21:
  movl   $0x0,-0x28(%rbp)
  jmp    L175
L24:
  mov    -0x28(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x28(%rbp)
L175:
  mov    -0x30(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x28(%rbp)
  jb     L24
  movl   $0x0,-0x2c(%rbp)
  jmp    L5
L195:
  mov    -0x2c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x24(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L148
L118:
  mov    -0x2c(%rbp),%edx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %rax,%rbx
  mov    -0x28(%rbp),%edx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  cmp    %rax,%rbx
  je     L97
  cmpl   $0x0,-0x2c(%rbp)
  je     L84
  cmpl   $0x0,-0x28(%rbp)
  je     L84
  mov    -0x2c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %rax,%rbx
  mov    -0x28(%rbp),%edx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  cmp    %rax,%rbx
  jne    L84
  mov    -0x2c(%rbp),%edx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %rax,%rbx
  mov    -0x28(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  cmp    %rax,%rbx
  je     L97
L84:
  mov    $0x1,%eax
  jmp    L128
L97:
  mov    $0x0,%eax
L128:
  mov    %eax,-0x1c(%rbp)
  mov    -0x28(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x1c(%rbp),%eax
  add    %eax,%edx
  mov    -0x24(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x28(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rsi
  mov    -0x18(%rbp),%rax
  add    %rsi,%rax
  mov    (%rax),%eax
  add    $0x1,%eax
  cmp    %eax,%ecx
  cmovbe %ecx,%eax
  cmp    %eax,%edx
  cmovbe %edx,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x28(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x20(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  addl   $0x1,-0x28(%rbp)
L148:
  mov    -0x28(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jb     L118
  mov    -0x30(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x2c(%rbp)
L5:
  mov    -0x2c(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jb     L195
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x20(%rbp),%eax
L170:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
unsigned int levenshtein(char *word1, char *word2) {
  unsigned int len1 = strlen(word1), len2 = strlen(word2);
  unsigned int *v = malloc((len2 + 1) * sizeof(unsigned int *));
  unsigned int i, j, current, next, cost;
  while (len1 > 0 && len2 > 0 && (tolower(word1[0]) == tolower(word2[0])))
    word1++, word2++, 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 = !((tolower(word1[i]) == tolower(word2[j])) || (i && j && (tolower(word1[i - 1]) == tolower(word2[j])) && (tolower(word1[i]) == tolower(word2[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;
}
```