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

```asm
<crypt_des_ecb>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x100,%rsp
  mov    %rdi,-0xe8(%rbp)
  mov    %rsi,-0xf0(%rbp)
  mov    %rdx,-0xf8(%rbp)
  mov    %ecx,-0xfc(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0xd8(%rbp),%rdx
  mov    -0xf8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <str_to_key@plt>
  movl   $0x0,-0xdc(%rbp)
  jmp    L48
L75:
  mov    -0xdc(%rbp),%eax
  lea    0x7(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x3,%eax
  movslq %eax,%rdx
  mov    -0xf0(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0xdc(%rbp),%eax
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  shr    $0x1d,%ecx
  add    %ecx,%eax
  and    $0x7,%eax
  sub    %ecx,%eax
  mov    %eax,%ecx
  mov    $0x7,%eax
  sub    %ecx,%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%eax
  and    $0x1,%eax
  mov    %eax,%edx
  mov    -0xdc(%rbp),%eax
  cltq
  mov    %dl,-0x90(%rbp,%rax,1)
  mov    -0xdc(%rbp),%eax
  lea    0x7(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x3,%eax
  cltq
  movzbl -0xd8(%rbp,%rax,1),%eax
  movzbl %al,%edx
  mov    -0xdc(%rbp),%eax
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  shr    $0x1d,%ecx
  add    %ecx,%eax
  and    $0x7,%eax
  sub    %ecx,%eax
  mov    %eax,%ecx
  mov    $0x7,%eax
  sub    %ecx,%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%eax
  and    $0x1,%eax
  mov    %eax,%edx
  mov    -0xdc(%rbp),%eax
  cltq
  mov    %dl,-0x50(%rbp,%rax,1)
  mov    -0xdc(%rbp),%eax
  cltq
  movb   $0x0,-0xd0(%rbp,%rax,1)
  addl   $0x1,-0xdc(%rbp)
L48:
  cmpl   $0x3f,-0xdc(%rbp)
  jle    L75
  mov    -0xfc(%rbp),%ecx
  lea    -0x50(%rbp),%rdx
  lea    -0x90(%rbp),%rsi
  lea    -0xd0(%rbp),%rax
  mov    %rax,%rdi
  call   <dohash@plt>
  movl   $0x0,-0xdc(%rbp)
  jmp    L60
L73:
  mov    -0xdc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xe8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  addl   $0x1,-0xdc(%rbp)
L60:
  cmpl   $0x7,-0xdc(%rbp)
  jle    L73
  movl   $0x0,-0xdc(%rbp)
  jmp    L8
L29:
  mov    -0xdc(%rbp),%eax
  cltq
  movzbl -0xd0(%rbp,%rax,1),%eax
  test   %al,%al
  je     L55
  mov    -0xdc(%rbp),%eax
  lea    0x7(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x3,%eax
  mov    %eax,%edx
  movslq %edx,%rcx
  mov    -0xe8(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  mov    %eax,%edi
  mov    -0xdc(%rbp),%eax
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  shr    $0x1d,%ecx
  add    %ecx,%eax
  and    $0x7,%eax
  sub    %ecx,%eax
  mov    %eax,%ecx
  mov    $0x7,%eax
  sub    %ecx,%eax
  mov    $0x1,%esi
  mov    %eax,%ecx
  shl    %cl,%esi
  mov    %esi,%eax
  or     %eax,%edi
  mov    %edi,%ecx
  movslq %edx,%rdx
  mov    -0xe8(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
L55:
  addl   $0x1,-0xdc(%rbp)
L8:
  cmpl   $0x3f,-0xdc(%rbp)
  jle    L29
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L61
  call   <__stack_chk_fail@plt>
L61:
  leave
  ret
```

assistant: ```c
void crypt_des_ecb(unsigned char *out, const unsigned char *in, const unsigned char *key, int forw) {
  int i;
  char outb[64];
  char inb[64];
  char keyb[64];
  unsigned char key2[8];
  str_to_key(key, key2);
  for (i = 0; i < 64; i++) {
    inb[i] = (in[i / 8] & (1 << (7 - (i % 8)))) ? 1 : 0;
    keyb[i] = (key2[i / 8] & (1 << (7 - (i % 8)))) ? 1 : 0;
    outb[i] = 0;
  }
  dohash(outb, inb, keyb, forw);
  for (i = 0; i < 8; i++) {
    out[i] = 0;
  }
  for (i = 0; i < 64; i++) {
    if (outb[i])
      out[i / 8] |= (1 << (7 - (i % 8)));
  }
}
```