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

```asm
<enDES>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xf0,%rsp
  mov    %rdi,-0xc8(%rbp)
  mov    %esi,-0xcc(%rbp)
  mov    %rdx,-0xd8(%rbp)
  mov    %rcx,-0xe0(%rbp)
  mov    %r8,-0xe8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0xbc(%rbp)
  movl   $0x0,-0xb8(%rbp)
  movl   $0x0,-0xb4(%rbp)
  movl   $0x80,-0x17(%rbp)
  movw   $0x0,-0x13(%rbp)
  movb   $0x0,-0x11(%rbp)
  cmpq   $0x0,-0xc8(%rbp)
  je     L25
  cmpq   $0x0,-0xe0(%rbp)
  je     L25
  cmpq   $0x0,-0xd8(%rbp)
  je     L25
  cmpq   $0x0,-0xe8(%rbp)
  je     L25
  cmpl   $0x0,-0xcc(%rbp)
  jne    L54
L25:
  mov    $0x0,%eax
  jmp    L10
L54:
  mov    -0xc8(%rbp),%rax
  mov    %rax,-0xb0(%rbp)
  mov    -0xcc(%rbp),%eax
  shr    $0x3,%eax
  mov    %eax,-0xbc(%rbp)
  mov    -0xcc(%rbp),%eax
  and    $0x7,%eax
  test   %eax,%eax
  je     L50
  mov    -0xcc(%rbp),%eax
  and    $0x7,%eax
  mov    %eax,%edx
  mov    $0x8,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  mov    -0xcc(%rbp),%ecx
  mov    -0xc8(%rbp),%rax
  add    %rax,%rcx
  lea    -0x17(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <memcpy@plt>
  addl   $0x1,-0xbc(%rbp)
L50:
  shll   $0x3,-0xbc(%rbp)
  mov    -0xbc(%rbp),%edx
  mov    -0xe8(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0xe0(%rbp),%rax
  mov    %rax,-0xa8(%rbp)
  mov    -0xcc(%rbp),%eax
  mov    %eax,-0xbc(%rbp)
  movl   $0x0,-0xb8(%rbp)
  jmp    L55
L93:
  mov    -0xb8(%rbp),%eax
  cltq
  movb   $0x0,-0x10(%rbp,%rax,1)
  addl   $0x1,-0xb8(%rbp)
L55:
  cmpl   $0x7,-0xb8(%rbp)
  jle    L93
  lea    -0xa0(%rbp),%rdx
  mov    -0xd8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <genKey@plt>
  jmp    L16
L62:
  movl   $0x0,-0xb8(%rbp)
  jmp    L53
L31:
  mov    -0xb8(%rbp),%eax
  cltq
  movb   $0x0,-0x10(%rbp,%rax,1)
  addl   $0x1,-0xb8(%rbp)
L53:
  cmpl   $0x7,-0xb8(%rbp)
  jle    L31
  mov    -0xbc(%rbp),%eax
  mov    $0x8,%edx
  cmp    %edx,%eax
  cmovg  %edx,%eax
  mov    %eax,-0xb4(%rbp)
  movl   $0x0,-0xb8(%rbp)
  jmp    L148
L150:
  mov    -0xb8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xb0(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0xb8(%rbp),%eax
  cltq
  mov    %dl,-0x10(%rbp,%rax,1)
  addl   $0x1,-0xb8(%rbp)
L148:
  mov    -0xb8(%rbp),%eax
  cmp    -0xb4(%rbp),%eax
  jl     L150
  lea    -0xa0(%rbp),%rdx
  mov    -0xa8(%rbp),%rsi
  lea    -0x10(%rbp),%rax
  mov    $0x1,%ecx
  mov    %rax,%rdi
  call   <comDES@plt>
  addq   $0x8,-0xb0(%rbp)
  addq   $0x8,-0xa8(%rbp)
  subl   $0x8,-0xbc(%rbp)
L16:
  cmpl   $0x0,-0xbc(%rbp)
  jg     L62
  mov    $0x1,%eax
L10:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L8
  call   <__stack_chk_fail@plt>
L8:
  leave
  ret
```

assistant: ```c
unsigned char enDES(unsigned char *indata, unsigned int inlen, unsigned char *key, unsigned char *outdata, unsigned int *outlen) {
  unsigned char *p, *p1, s_key[16][8], tt[8];
  int tlen = 0, i = 0, ttlen = 0;
  unsigned char padding[7] = {0x80, 0, 0, 0, 0, 0, 0};
  if ((indata == NULL) || (outdata == NULL) || (key == NULL) || (outlen == NULL) || (inlen <= 0))
    return 0;
  p = indata;
  tlen = inlen / 8;
  if (inlen % 8 != 0) {
    memcpy(indata + inlen, padding, 8 - (inlen % 8));
    tlen = tlen + 1;
  }
  tlen = tlen * 8;
  *outlen = tlen;
  p1 = outdata;
  tlen = inlen;
  for (i = 0; i < 8; i++)
    tt[i] = 0;
  genKey(key, s_key);
  while (tlen > 0) {
    for (i = 0; i < 8; i++)
      tt[i] = 0;
    ttlen = (tlen < 8) ? tlen : 8;
    for (i = 0; i < ttlen; i++)
      tt[i] = *(p + i);
    comDES(tt, p1, s_key, 1);
    p = p + 8;
    p1 = p1 + 8;
    tlen = tlen - 8;
  }
  return 1;
}
```