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

```asm
<SetClearPasswd>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x550,%rsp
  mov    %rdi,-0x538(%rbp)
  mov    %rsi,-0x540(%rbp)
  mov    %rdx,-0x548(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x410(%rbp),%rax
  mov    $0x400,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x500(%rbp),%rax
  mov    $0x21,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x490(%rbp),%rax
  mov    $0x80,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x4d0(%rbp),%rax
  mov    $0x40,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x511(%rbp),%rax
  mov    $0x8,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x540(%rbp),%rcx
  lea    -0x410(%rbp),%rax
  mov    $0x3ff,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  lea    -0x500(%rbp),%rax
  mov    %rax,%rdi
  call   <getKey@plt>
  lea    -0x410(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    $0x3ff,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  lea    -0x500(%rbp),%rcx
  lea    -0x410(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncat@plt>
  lea    -0x410(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  lea    -0x410(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <hashckey@plt>
  mov    %rax,-0x520(%rbp)
  mov    -0x520(%rbp),%rdx
  lea    -0x509(%rbp),%rax
  mov    %rdx,%rcx
  lea    D6(%rip),%rdx
  mov    $0x9,%esi
  mov    %rax,%rdi
  call   <snprintf@plt>
  mov    -0x538(%rbp),%rdx
  lea    -0x490(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x490(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x524(%rbp)
  mov    -0x524(%rbp),%eax
  add    $0x7,%eax
  lea    0x7(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x3,%eax
  lea    0x0(,%rax,8),%ecx
  lea    -0x511(%rbp),%rdi
  lea    -0x509(%rbp),%rdx
  mov    -0x548(%rbp),%rsi
  lea    -0x490(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <DES_CBC_Encryption@plt>
  mov    -0x524(%rbp),%eax
  add    $0x7,%eax
  lea    0x7(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x3,%eax
  shl    $0x3,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L5
  call   <__stack_chk_fail@plt>
L5:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D6
type_infered: string

tool: D6: %.8x

assistant: ```c
int SetClearPasswd(char *sClearPwd, char *sKey, char *sEncPwd) {
  int rc;
  char sUserKey[1024];
  char sInnerKey[33];
  unsigned long i;
  char sTmp[8 + 1];
  char sEncPswd[128];
  int nEncPswdLen;
  char sEnc[64];
  char sIv[8];
  memset(sUserKey, 0x00, sizeof(sUserKey));
  memset(sInnerKey, 0x00, sizeof(sInnerKey));
  memset(sEncPswd, 0x00, sizeof(sEncPswd));
  memset(sEnc, 0x00, sizeof(sEnc));
  memset(sIv, 0x00, sizeof(sIv));
  strncpy(sUserKey, sKey, sizeof(sUserKey) - 1);
  getKey(sInnerKey);
  strncat(sUserKey, sInnerKey, sizeof(sUserKey) - strlen(sUserKey) - 1);
  i = hashckey(sUserKey, strlen(sUserKey));
  snprintf(sTmp, sizeof(sTmp), "%.8x", i);
  strcpy(sEncPswd, sClearPwd);
  nEncPswdLen = strlen(sEncPswd);
  DES_CBC_Encryption(sEncPswd, sEncPwd, sTmp, (nEncPswdLen + 7) / 8 * 8, sIv);
  return (nEncPswdLen + 7) / 8 * 8;
}
```