user: Translate the below assembly code into C programming language:

```asm
<editDist>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  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
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x30(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  movl   $0x0,-0x3c(%rbp)
  jmp    L76
L9:
  mov    -0x28(%rbp),%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    -0x3c(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x20(%rbp),%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    -0x3c(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x3c(%rbp)
L76:
  mov    -0x30(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jge    L9
  movl   $0x1,-0x3c(%rbp)
  jmp    L37
L13:
  mov    -0x20(%rbp),%rax
  mov    -0x3c(%rbp),%edx
  mov    %edx,(%rax)
  movl   $0x1,-0x38(%rbp)
  jmp    L80
L20:
  mov    -0x3c(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x38(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rcx
  mov    -0x50(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L85
  mov    -0x28(%rbp),%rdx
  mov    -0x38(%rbp),%eax
  cltq
  shl    $0x2,%rax
  sub    $0x4,%rax
  add    %rdx,%rax
  mov    -0x20(%rbp),%rcx
  mov    -0x38(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x2,%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  jmp    L25
L85:
  mov    -0x28(%rbp),%rdx
  mov    -0x38(%rbp),%eax
  cltq
  shl    $0x2,%rax
  sub    $0x4,%rax
  add    %rdx,%rax
  mov    (%rax),%ebx
  mov    -0x20(%rbp),%rdx
  mov    -0x38(%rbp),%eax
  cltq
  shl    $0x2,%rax
  sub    $0x4,%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x28(%rbp),%rcx
  mov    -0x38(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <min@plt>
  mov    %ebx,%esi
  mov    %eax,%edi
  call   <min@plt>
  mov    -0x20(%rbp),%rcx
  mov    -0x38(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x2,%rdx
  add    %rcx,%rdx
  add    $0x1,%eax
  mov    %eax,(%rdx)
L25:
  addl   $0x1,-0x38(%rbp)
L80:
  mov    -0x30(%rbp),%eax
  cmp    -0x38(%rbp),%eax
  jge    L20
  lea    -0x20(%rbp),%rdx
  lea    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <swap@plt>
  addl   $0x1,-0x3c(%rbp)
L37:
  mov    -0x34(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jge    L13
  mov    -0x28(%rbp),%rdx
  mov    -0x30(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x2c(%rbp),%eax
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L71
  call   <__stack_chk_fail@plt>
L71:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int editDist(char *word1, char *word2) {
  int word1_len = strlen(word1);
  int word2_len = strlen(word2);
  int *oldDist = (int *)malloc((word2_len + 1) * sizeof(int));
  int *curDist = (int *)malloc((word2_len + 1) * sizeof(int));
  int i, j, dist;
  for (i = 0; i < word2_len + 1; i++) {
    oldDist[i] = i;
    curDist[i] = i;
  }
  for (i = 1; i < word1_len + 1; i++) {
    curDist[0] = i;
    for (j = 1; j < word2_len + 1; j++) {
      if (word1[i - 1] == word2[j - 1]) {
        curDist[j] = oldDist[j - 1];
      } else {
        curDist[j] = min(min(oldDist[j], curDist[j - 1]), oldDist[j - 1]) + 1;
      }
    }
    swap(&oldDist, &curDist);
  }
  dist = oldDist[word2_len];
  free(oldDist);
  free(curDist);
  return dist;
}
```