user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<_hash_md5>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x10,-0x2c(%rbp)
  mov    -0x2c(%rbp),%eax
  add    %eax,%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x28(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  jne    L52
  mov    $0x1,%esi
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <_error@plt>
  mov    $0x0,%eax
  jmp    L88
L52:
  lea    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <MD5_Init@plt>
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    -0x48(%rbp),%rcx
  lea    -0x30(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <MD5_Update@plt>
  lea    -0x30(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <MD5_Final@plt>
  movw   $0x0,-0x32(%rbp)
  jmp    L71
L67:
  movzwl -0x32(%rbp),%eax
  cltq
  movzbl -0x20(%rbp,%rax,1),%eax
  shr    $0x4,%al
  mov    %al,-0x33(%rbp)
  cmpb   $0x9,-0x33(%rbp)
  ja     L59
  movzbl -0x33(%rbp),%eax
  lea    0x30(%rax),%ecx
  movzwl -0x32(%rbp),%eax
  add    %eax,%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L66
L59:
  movzbl -0x33(%rbp),%eax
  lea    0x57(%rax),%ecx
  movzwl -0x32(%rbp),%eax
  add    %eax,%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
L66:
  movzwl -0x32(%rbp),%eax
  cltq
  movzbl -0x20(%rbp,%rax,1),%eax
  and    $0xf,%eax
  mov    %al,-0x33(%rbp)
  cmpb   $0x9,-0x33(%rbp)
  ja     L25
  movzbl -0x33(%rbp),%eax
  lea    0x30(%rax),%edx
  movzwl -0x32(%rbp),%eax
  add    %eax,%eax
  cltq
  lea    0x1(%rax),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    %dl,(%rax)
  jmp    L15
L25:
  movzbl -0x33(%rbp),%eax
  lea    0x57(%rax),%edx
  movzwl -0x32(%rbp),%eax
  add    %eax,%eax
  cltq
  lea    0x1(%rax),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    %dl,(%rax)
L15:
  movzwl -0x32(%rbp),%eax
  add    $0x1,%eax
  mov    %ax,-0x32(%rbp)
L71:
  movzwl -0x32(%rbp),%eax
  cmp    %eax,-0x2c(%rbp)
  jg     L67
  mov    -0x2c(%rbp),%eax
  add    %eax,%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x28(%rbp),%rax
L88:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L79
  call   <__stack_chk_fail@plt>
L79:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D5
data_type: string

tool: D5: malloc

assistant: ```c
char *_hash_md5(char const *password) {
  char *ret;
  unsigned char digest[16];
  const int len = sizeof(digest);
  unsigned short i;
  unsigned char j;
  MD5_CTX c;
  if ((ret = malloc((len * 2) + 1)) == NULL) {
    _error("malloc", 1);
    return NULL;
  }
  MD5_Init(&c);
  MD5_Update(&c, password, strlen(password));
  MD5_Final(digest, &c);
  for (i = 0; i < len; i++) {
    j = (digest[i] >> 4) & 0xf;
    if (j <= 9)
      ret[i * 2] = (j + '0');
    else
      ret[i * 2] = (j + 'a' - 10);
    j = digest[i] & 0xf;
    if (j <= 9)
      ret[i * 2 + 1] = (j + '0');
    else
      ret[i * 2 + 1] = (j + 'a' - 10);
  }
  ret[len * 2] = '\0';
  return ret;
}
```