user: What is the c source code of the assembly code below?

```asm
<KeyMD5Encode>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x590,%rsp
  mov    %rdi,-0x578(%rbp)
  mov    %rsi,-0x580(%rbp)
  mov    %edx,-0x584(%rbp)
  mov    %rcx,-0x590(%rbp)
  mov    %r8d,-0x588(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x560(%rbp)
  movq   $0x0,-0x558(%rbp)
  movq   $0x0,-0x550(%rbp)
  movq   $0x0,-0x548(%rbp)
  movq   $0x0,-0x540(%rbp)
  movq   $0x0,-0x538(%rbp)
  movq   $0x0,-0x530(%rbp)
  movq   $0x0,-0x528(%rbp)
  movq   $0x0,-0x520(%rbp)
  movq   $0x0,-0x518(%rbp)
  movq   $0x0,-0x510(%rbp)
  movq   $0x0,-0x508(%rbp)
  movq   $0x0,-0x500(%rbp)
  movq   $0x0,-0x4f8(%rbp)
  movq   $0x0,-0x4f0(%rbp)
  movq   $0x0,-0x4e8(%rbp)
  movq   $0x0,-0x4e0(%rbp)
  movq   $0x0,-0x4d8(%rbp)
  movq   $0x0,-0x4d0(%rbp)
  movq   $0x0,-0x4c8(%rbp)
  movq   $0x0,-0x4c0(%rbp)
  movq   $0x0,-0x4b8(%rbp)
  movq   $0x0,-0x4b0(%rbp)
  movq   $0x0,-0x4a8(%rbp)
  movq   $0x0,-0x450(%rbp)
  movq   $0x0,-0x448(%rbp)
  lea    -0x440(%rbp),%rdx
  mov    $0x0,%eax
  mov    $0x86,%ecx
  mov    %rdx,%rdi
  rep stos %rax,%es:(%rdi)
  mov    %rdi,%rdx
  mov    %al,(%rdx)
  add    $0x1,%rdx
  movq   $0x0,-0x4a0(%rbp)
  movq   $0x0,-0x498(%rbp)
  movq   $0x0,-0x490(%rbp)
  movq   $0x0,-0x488(%rbp)
  movq   $0x0,-0x480(%rbp)
  movq   $0x0,-0x478(%rbp)
  movq   $0x0,-0x470(%rbp)
  movq   $0x0,-0x468(%rbp)
  movq   $0x0,-0x460(%rbp)
  movq   $0x0,-0x458(%rbp)
  lea    -0x560(%rbp),%rax
  mov    $0x40,%edx
  mov    $0x36,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x520(%rbp),%rax
  mov    $0x40,%edx
  mov    $0x5c,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x588(%rbp),%edx
  mov    -0x590(%rbp),%rcx
  lea    -0x4e0(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  movl   $0x0,-0x564(%rbp)
  jmp    L15
L6:
  mov    -0x564(%rbp),%eax
  cltq
  movzbl -0x560(%rbp,%rax,1),%edx
  mov    -0x564(%rbp),%eax
  cltq
  movzbl -0x4e0(%rbp,%rax,1),%eax
  xor    %eax,%edx
  mov    -0x564(%rbp),%eax
  cltq
  mov    %dl,-0x560(%rbp,%rax,1)
  mov    -0x564(%rbp),%eax
  cltq
  movzbl -0x520(%rbp,%rax,1),%edx
  mov    -0x564(%rbp),%eax
  cltq
  movzbl -0x4e0(%rbp,%rax,1),%eax
  xor    %eax,%edx
  mov    -0x564(%rbp),%eax
  cltq
  mov    %dl,-0x520(%rbp,%rax,1)
  addl   $0x1,-0x564(%rbp)
L15:
  cmpl   $0x3f,-0x564(%rbp)
  jle    L6
  lea    -0x560(%rbp),%rcx
  lea    -0x450(%rbp),%rax
  mov    $0x40,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x584(%rbp),%edx
  lea    -0x450(%rbp),%rax
  add    $0x40,%rax
  mov    -0x580(%rbp),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x584(%rbp),%eax
  add    $0x40,%eax
  mov    %eax,%eax
  movb   $0x0,-0x450(%rbp,%rax,1)
  lea    -0x4a0(%rbp),%rax
  add    $0x40,%rax
  mov    -0x584(%rbp),%edx
  add    $0x40,%edx
  mov    %edx,%esi
  lea    -0x450(%rbp),%rcx
  mov    %rax,%rdx
  mov    %rcx,%rdi
  call   <MDString@plt>
  lea    -0x520(%rbp),%rcx
  lea    -0x4a0(%rbp),%rax
  mov    $0x40,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x578(%rbp),%rdx
  lea    -0x4a0(%rbp),%rax
  mov    $0x50,%esi
  mov    %rax,%rdi
  call   <MDString@plt>
  mov    $0x10,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L16
  call   <__stack_chk_fail@plt>
L16:
  leave
  ret
```

assistant: ```c
unsigned int KeyMD5Encode(unsigned char *szEncoded, const unsigned char *szData, unsigned int nSize, unsigned char *szKey, unsigned int nKeyLen) {
  unsigned char ipad[64] = {0}, opad[64] = {0};
  unsigned char K[64] = {0};
  unsigned char firstPad[64 + 1024 + 1] = {0};
  unsigned char midResult[64 + 16] = {0};
  int i;
  memset(ipad, 0x36, 64);
  memset(opad, 0x5c, 64);
  memcpy(K, szKey, nKeyLen);
  for (i = 0; i < 64; i++) {
    ipad[i] ^= K[i];
    opad[i] ^= K[i];
  }
  memcpy(firstPad, ipad, 64);
  memcpy(firstPad + 64, szData, nSize);
  firstPad[64 + nSize] = '\x0';
  MDString(firstPad, 64 + nSize, midResult + 64);
  memcpy(midResult, opad, 64);
  MDString(midResult, 64 + 16, szEncoded);
  return 16;
}
```