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

```asm
<lm_deshash>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x8,-0x18(%rbp)
  jbe    L22
  movq   $0x8,-0x18(%rbp)
L22:
  mov    -0x18(%rbp),%rdx
  mov    -0x48(%rbp),%rcx
  lea    -0x10(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  cmpq   $0x8,-0x18(%rbp)
  je     L5
  mov    -0x18(%rbp),%rax
  mov    %eax,%edx
  mov    $0x8,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  lea    -0x10(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
L5:
  mov    -0x20(%rbp),%rax
  movzbl -0x10(%rbp),%edx
  mov    %dl,(%rax)
  movzbl -0x10(%rbp),%eax
  movzbl %al,%eax
  shl    $0x7,%eax
  mov    %eax,%edx
  movzbl -0xf(%rbp),%eax
  shr    %al
  or     %eax,%edx
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  mov    %dl,(%rax)
  movzbl -0xf(%rbp),%eax
  movzbl %al,%eax
  shl    $0x6,%eax
  mov    %eax,%edx
  movzbl -0xe(%rbp),%eax
  shr    $0x2,%al
  or     %eax,%edx
  mov    -0x20(%rbp),%rax
  add    $0x2,%rax
  mov    %dl,(%rax)
  movzbl -0xe(%rbp),%eax
  movzbl %al,%eax
  shl    $0x5,%eax
  mov    %eax,%edx
  movzbl -0xd(%rbp),%eax
  shr    $0x3,%al
  or     %eax,%edx
  mov    -0x20(%rbp),%rax
  add    $0x3,%rax
  mov    %dl,(%rax)
  movzbl -0xd(%rbp),%eax
  movzbl %al,%eax
  shl    $0x4,%eax
  mov    %eax,%edx
  movzbl -0xc(%rbp),%eax
  shr    $0x4,%al
  or     %eax,%edx
  mov    -0x20(%rbp),%rax
  add    $0x4,%rax
  mov    %dl,(%rax)
  movzbl -0xc(%rbp),%eax
  movzbl %al,%eax
  shl    $0x3,%eax
  mov    %eax,%edx
  movzbl -0xb(%rbp),%eax
  shr    $0x5,%al
  or     %eax,%edx
  mov    -0x20(%rbp),%rax
  add    $0x5,%rax
  mov    %dl,(%rax)
  movzbl -0xb(%rbp),%eax
  movzbl %al,%eax
  shl    $0x2,%eax
  mov    %eax,%edx
  movzbl -0xa(%rbp),%eax
  shr    $0x6,%al
  or     %eax,%edx
  mov    -0x20(%rbp),%rax
  add    $0x6,%rax
  mov    %dl,(%rax)
  movzbl -0xa(%rbp),%edx
  mov    -0x20(%rbp),%rax
  add    $0x7,%rax
  add    %edx,%edx
  mov    %dl,(%rax)
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <DES_set_odd_parity@plt>
  lea    -0x21(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <DES_set_key@plt>
  mov    D2(%rip),%rax
  mov    (%rax),%ecx
  lea    -0x21(%rbp),%rdx
  mov    -0x38(%rbp),%rsi
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <DES_ecb_encrypt@plt>
  mov    -0x20(%rbp),%rax
  mov    $0x8,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x21(%rbp),%rax
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L12
  call   <__stack_chk_fail@plt>
L12:
  leave
  ret
```

assistant: ```c
void lm_deshash(void *result, const_DES_cblock *iv, const void *secret) {
  DES_cblock key;
  DES_key_schedule ks;
  unsigned char key_56[8];
  size_t len;
  len = strlen(secret);
  if (len > sizeof key_56)
    len = sizeof key_56;
  memcpy(key_56, secret, len);
  if (sizeof key_56 - len > 0)
    memset(key_56 + len, 0, sizeof key_56 - len);
  key[0] = key_56[0];
  key[1] = (key_56[0] << 7) | (key_56[1] >> 1);
  key[2] = (key_56[1] << 6) | (key_56[2] >> 2);
  key[3] = (key_56[2] << 5) | (key_56[3] >> 3);
  key[4] = (key_56[3] << 4) | (key_56[4] >> 4);
  key[5] = (key_56[4] << 3) | (key_56[5] >> 5);
  key[6] = (key_56[5] << 2) | (key_56[6] >> 6);
  key[7] = (key_56[6] << 1);
  DES_set_odd_parity(&key);
  DES_set_key(&key, &ks);
  DES_ecb_encrypt(iv, result, &ks, DES_ENCRYPT);
  memset(key, 0, sizeof key);
  memset(&ks, 0, sizeof ks);
}
```