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

```asm
<GenerateCrypt>:
  endbr64
  push   %r15
  push   %r14
  mov    %r9,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdi,%r12
  mov    %rdx,%rdi
  mov    $0x100,%edx
  push   %rbp
  push   %rbx
  mov    %r8,%rbx
  not    %rbx
  sub    $0x338,%rsp
  mov    %rcx,0x8(%rsp)
  lea    0x20(%rsp),%r15
  mov    %r15,%rsi
  mov    %fs:0x28,%rax
  mov    %rax,0x328(%rsp)
  xor    %eax,%eax
  call   <lutil_b64_pton@plt>
  mov    %rbx,%rsi
  movabs $0x8888888888888889,%rdx
  mov    %eax,%ebp
  mov    0x26(%rsp),%eax
  or     %rax,%rsi
  mov    %rsi,%rax
  mov    %rsi,%rcx
  mov    %rsi,%rbx
  imul   %rdx
  mov    %rsi,%rax
  sar    $0x3f,%rax
  add    %rsi,%rdx
  sar    $0x4,%rdx
  sub    %rax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  mov    $0xffffffff,%edx
  add    %rax,%rax
  sub    %rax,%rcx
  sub    %esi,%eax
  and    $0x1f,%ecx
  mov    %eax,%edi
  sar    %cl,%rbx
  mov    %eax,%ecx
  and    $0x1f,%edi
  shl    %cl,%edx
  mov    %edi,%ecx
  mov    %r13,%rdi
  not    %edx
  shl    %cl,%rsi
  and    %rdx,%rbx
  or     %rsi,%rbx
  mov    %rbx,(%rsp)
  call   <strlen@plt>
  mov    %r15,%rcx
  mov    %ebp,%r8d
  mov    %r13,%rsi
  lea    0x120(%rsp),%r9
  mov    %rax,%rdx
  xor    %eax,%eax
  mov    %r9,%rdi
  mov    %r9,0x18(%rsp)
  lea    0x220(%rsp),%rbp
  call   <KeyMD5Encode@plt>
  mov    %r12,%rdi
  mov    %eax,%r10d
  mov    %r10,%r15
  mov    %r10,0x10(%rsp)
  movb   $0x0,0x120(%rsp,%r10,1)
  call   <strlen@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  movslq %eax,%rbx
  mov    %rax,%r13
  mov    %rbx,%rdx
  call   <memcpy@plt>
  movd   (%rsp),%xmm0
  movd   0x8(%rsp),%xmm1
  lea    0x9(%rbp,%rbx,1),%rdi
  mov    0x10(%rsp),%rdx
  mov    0x18(%rsp),%rsi
  movb   $0x20,0x220(%rsp,%rbx,1)
  punpckldq %xmm1,%xmm0
  movq   %xmm0,0x221(%rsp,%rbx,1)
  call   <memcpy@plt>
  mov    %r14,%rdx
  xor    %eax,%eax
  lea    0x9(%r15,%r13,1),%esi
  mov    $0x100,%ecx
  mov    %rbp,%rdi
  call   <lutil_b64_ntop@plt>
  mov    0x328(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L5
  add    $0x338,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L5:
  call   <__stack_chk_fail@plt>
```

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;
}
```