user: Please show me the C implementation that matches the assembly code listed below:

```asm
<GenerateCrypt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x390,%rsp
  mov    %rdi,-0x368(%rbp)
  mov    %rsi,-0x370(%rbp)
  mov    %rdx,-0x378(%rbp)
  mov    %rcx,-0x380(%rbp)
  mov    %r8,-0x388(%rbp)
  mov    %r9,-0x390(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x340(%rbp)
  movq   $0x0,-0x338(%rbp)
  lea    -0x310(%rbp),%rcx
  mov    -0x378(%rbp),%rax
  mov    $0x100,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <lutil_b64_pton@plt>
  mov    %eax,-0x354(%rbp)
  lea    -0x310(%rbp),%rax
  add    $0x6,%rax
  mov    (%rax),%eax
  mov    %eax,-0x340(%rbp)
  mov    -0x388(%rbp),%rax
  not    %rax
  mov    %rax,%rdx
  mov    -0x340(%rbp),%rax
  or     %rdx,%rax
  mov    %rax,-0x340(%rbp)
  mov    -0x340(%rbp),%rcx
  movabs $0x8888888888888889,%rdx
  mov    %rcx,%rax
  imul   %rdx
  lea    (%rdx,%rcx,1),%rax
  sar    $0x4,%rax
  mov    %rcx,%rsi
  sar    $0x3f,%rsi
  sub    %rsi,%rax
  mov    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  mov    %edx,-0x350(%rbp)
  mov    -0x340(%rbp),%rdx
  mov    -0x350(%rbp),%eax
  neg    %eax
  and    $0x1f,%eax
  mov    %eax,%ecx
  shl    %cl,%rdx
  mov    %rdx,%rax
  mov    %rax,-0x330(%rbp)
  mov    -0x340(%rbp),%rdx
  mov    -0x350(%rbp),%eax
  and    $0x1f,%eax
  mov    %eax,%ecx
  sar    %cl,%rdx
  mov    %rdx,%rax
  mov    %rax,-0x328(%rbp)
  mov    -0x350(%rbp),%eax
  neg    %eax
  and    $0x1f,%eax
  mov    $0xffffffff,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  not    %eax
  mov    %eax,%eax
  mov    %rax,-0x320(%rbp)
  mov    -0x328(%rbp),%rax
  and    -0x320(%rbp),%rax
  mov    %rax,-0x318(%rbp)
  mov    -0x330(%rbp),%rax
  or     -0x318(%rbp),%rax
  mov    %rax,-0x338(%rbp)
  mov    -0x370(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,%rdi
  mov    -0x354(%rbp),%ecx
  lea    -0x310(%rbp),%rdx
  mov    -0x370(%rbp),%rsi
  lea    -0x210(%rbp),%rax
  mov    %ecx,%r8d
  mov    %rdx,%rcx
  mov    %rdi,%rdx
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <KeyMD5Encode@plt>
  mov    %eax,-0x34c(%rbp)
  mov    -0x34c(%rbp),%eax
  movb   $0x0,-0x210(%rbp,%rax,1)
  mov    -0x368(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x348(%rbp)
  mov    -0x348(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x368(%rbp),%rcx
  lea    -0x110(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x348(%rbp),%eax
  cltq
  movb   $0x20,-0x110(%rbp,%rax,1)
  mov    -0x348(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  lea    -0x110(%rbp),%rax
  add    %rax,%rdx
  mov    -0x338(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x348(%rbp),%eax
  cltq
  lea    0x5(%rax),%rdx
  lea    -0x110(%rbp),%rax
  add    %rax,%rdx
  mov    -0x380(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x34c(%rbp),%edx
  mov    -0x348(%rbp),%eax
  cltq
  lea    0x9(%rax),%rcx
  lea    -0x110(%rbp),%rax
  add    %rax,%rcx
  lea    -0x210(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <memcpy@plt>
  mov    -0x348(%rbp),%edx
  mov    -0x34c(%rbp),%eax
  add    %edx,%eax
  lea    0x9(%rax),%esi
  mov    -0x390(%rbp),%rdx
  lea    -0x110(%rbp),%rax
  mov    $0x100,%ecx
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <lutil_b64_ntop@plt>
  mov    %eax,-0x344(%rbp)
  mov    -0x344(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L0
  call   <__stack_chk_fail@plt>
L0:
  leave
  ret
```

assistant: ```c
int GenerateCrypt(char *szUser, char *szPassword, char *szChallenge64, long clientinfo, long embkey, char *szResult) {
  unsigned char szDecoded[256];
  unsigned char szKey[256];
  unsigned char szAscii[256];
  unsigned int nDecodedLen;
  long challengetime = 0;
  int nMoveBits;
  long challengetime_new = 0;
  long a, b, c, d;
  unsigned int nKey;
  int nUser;
  unsigned int nEncoded;
  nDecodedLen = lutil_b64_pton(szChallenge64, szDecoded, 256);
  memcpy(&challengetime, szDecoded + 6, 4);
  challengetime |= ~embkey;
  nMoveBits = challengetime % 30;
  a = challengetime << ((32 - nMoveBits) % 32);
  b = challengetime >> (((unsigned int)nMoveBits) % 32);
  c = ~(0xffffffff << ((32 - nMoveBits) % 32));
  d = b & c;
  challengetime_new = a | d;
  nKey = KeyMD5Encode(szKey, (unsigned char *)szPassword, strlen((char *)szPassword), (unsigned char *)szDecoded, nDecodedLen);
  szKey[nKey] = 0;
  nUser = strlen((char *)szUser);
  memcpy(szAscii, szUser, nUser);
  szAscii[nUser] = ' ';
  memcpy(szAscii + nUser + 1, &challengetime_new, 4);
  memcpy(szAscii + nUser + 1 + 4, &clientinfo, 4);
  memcpy(szAscii + nUser + 1 + 4 + 4, szKey, nKey);
  nEncoded = lutil_b64_ntop((unsigned char *)szAscii, nUser + 1 + 4 + 4 + nKey, szResult, 256);
  return nEncoded;
}
```