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

```asm
<main>:
  endbr64
  push   %r15
  pxor   %xmm0,%xmm0
  push   %r14
  push   %r13
  push   %r12
  lea    D49(%rip),%r12
  push   %rbp
  push   %rbx
  sub    $0x118,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  movaps %xmm0,0x40(%rsp)
  lea    0x40(%rsp),%r14
  movaps %xmm0,0x50(%rsp)
  mov    %r14,%rbp
  movaps %xmm0,0x60(%rsp)
  movaps %xmm0,0x70(%rsp)
  movaps %xmm0,0x80(%rsp)
  movaps %xmm0,0x90(%rsp)
  movaps %xmm0,0xa0(%rsp)
  movaps %xmm0,0xb0(%rsp)
  movaps %xmm0,0xc0(%rsp)
  movaps %xmm0,0xd0(%rsp)
  movaps %xmm0,0xe0(%rsp)
  movaps %xmm0,0xf0(%rsp)
  movdqa D50(%rip),%xmm0
  movb   $0x0,0x100(%rsp)
  movaps %xmm0,0x10(%rsp)
  movdqa D37(%rip),%xmm0
  movl   $0x0,0xc(%rsp)
  movaps %xmm0,0x20(%rsp)
  movl   $0x16d6f63,0x30(%rsp)
  movb   $0x0,0x34(%rsp)
  call   <ERR_load_crypto_strings@plt>
  xor    %eax,%eax
  call   <OpenSSL_add_all_algorithms@plt>
  xor    %edi,%edi
  call   <OPENSSL_config@plt>
  xor    %eax,%eax
  call   <EVP_sha512@plt>
  push   %r14
  mov    $0x8,%esi
  lea    D80(%rip),%rdi
  push   $0x40
  mov    %eax,%r9d
  mov    $0x100,%r8d
  mov    $0x4,%ecx
  lea    D70(%rip),%rdx
  lea    0x90(%rsp),%r15
  lea    0x110(%rsp),%r13
  call   <PKCS5_PBKDF2_HMAC@plt>
  mov    %r15,%rbx
  pop    %rsi
  pop    %rdi
  nop
L22:
  movzbl 0x0(%rbp),%edx
  mov    %rbx,%rdi
  mov    %r12,%rsi
  add    $0x2,%rbx
  add    $0x1,%rbp
  call   <sprintf@plt>
  cmp    %r13,%rbx
  jne    L22
  lea    D64(%rip),%rdi
  xor    %ebx,%ebx
  lea    D29(%rip),%rbp
  call   <puts@plt>
  nopl   0x0(%rax)
L8:
  mov    (%r14,%rbx,4),%edi
  call   <ntohl@plt>
  mov    %ebx,%esi
  mov    %rbp,%rdi
  add    $0x1,%rbx
  mov    %eax,%edx
  xor    %eax,%eax
  call   <printf@plt>
  cmp    $0x10,%rbx
  jne    L8
  xor    %eax,%eax
  call   <EVP_sha512@plt>
  lea    0x10(%rsp),%rcx
  xor    %r9d,%r9d
  mov    %r14,%rsi
  sub    $0x8,%rsp
  mov    %eax,%edi
  mov    $0x40,%edx
  mov    $0x25,%r8d
  lea    0x14(%rsp),%rax
  push   %rax
  call   <HMAC@plt>
  mov    0x1c(%rsp),%esi
  lea    D14(%rip),%rdi
  mov    %rax,%r13
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x1c(%rsp),%eax
  pop    %rdx
  pop    %rcx
  test   %eax,%eax
  je     L35
  xor    %ebx,%ebx
  nopl   0x0(%rax,%rax,1)
L30:
  movzbl 0x0(%r13,%rbx,1),%edx
  lea    (%r15,%rbx,2),%rdi
  mov    %r12,%rsi
  add    $0x1,%rbx
  call   <sprintf@plt>
  mov    0xc(%rsp),%eax
  cmp    %ebx,%eax
  ja     L30
L35:
  movb   $0x0,0x0(%r13,%rax,1)
  mov    %r13,%rsi
  lea    D0(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D6(%rip),%rdi
  call   <puts@plt>
  mov    0xc(%rsp),%eax
  shr    $0x2,%eax
  je     L38
  xor    %ebx,%ebx
  nopl   0x0(%rax)
L11:
  mov    0x0(%r13,%rbx,4),%edi
  call   <ntohl@plt>
  mov    %ebx,%esi
  mov    %rbp,%rdi
  add    $0x1,%rbx
  mov    %eax,%edx
  xor    %eax,%eax
  call   <printf@plt>
  mov    0xc(%rsp),%eax
  shr    $0x2,%eax
  cmp    %ebx,%eax
  ja     L11
L38:
  mov    %r15,%rsi
  lea    D23(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x40,%esi
  mov    %r13,%rdi
  call   <base64@plt>
  lea    D92(%rip),%rdi
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  call   <EVP_cleanup@plt>
  xor    %eax,%eax
  call   <CRYPTO_cleanup_all_ex_data@plt>
  xor    %eax,%eax
  call   <ERR_free_strings@plt>
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L18
  add    $0x118,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L18:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D49
datatype: string
name: retrieve_data
arguments: data_label: D50
datatype: byte[16]
name: retrieve_data
arguments: data_label: D37
datatype: byte[16]
name: retrieve_data
arguments: data_label: D80
datatype: string
name: retrieve_data
arguments: data_label: D70
datatype: string
name: retrieve_data
arguments: data_label: D64
datatype: string
name: retrieve_data
arguments: data_label: D29
datatype: string
name: retrieve_data
arguments: data_label: D14
datatype: string
name: retrieve_data
arguments: data_label: D0
datatype: string
name: retrieve_data
arguments: data_label: D6
datatype: string
name: retrieve_data
arguments: data_label: D23
datatype: string
name: retrieve_data
arguments: data_label: D92
datatype: string

tool: D49: %02x

tool: {"D50": [0x95,0xb1,0x4f,0x6e,0x65,0x53,0x68,0x61,0x6c,0x6c,0x50,0x61,0x73,0x73,0x20,0x76]}

tool: {"D37": [0x32,0x2e,0x30,0xa4,0x73,0x61,0x6c,0x74,0xaa,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e]}

tool: D80: password

tool: D70: salt

tool: D64: dk:

tool: D29: [%d] %d


tool: D14: md_len: %d


tool: D0: digest raw: %s


tool: D6: digest:

tool: D23: digest %s


tool: D92: digest base64 %s


assistant: ```c
int main(int argc, char **argv) {
  char derived_key[64] = {0};
  char hexResult[2 * 64 + 1] = {0};
  unsigned int md_len = 0;
  unsigned char data[] = {149, 177, 79, 110, 101, 83, 104, 97, 108, 108, 80, 97, 115, 115, 32, 118, 50, 46, 48, 164, 115, 97, 108, 116, 170, 103, 111, 111, 103, 108, 101, 46, 99, 111, 109, 1, 0};
  int i;
  ERR_load_crypto_strings();
  OpenSSL_add_all_algorithms();
  OPENSSL_config(NULL);
  PKCS5_PBKDF2_HMAC("password", 8, "salt", 4, 256, EVP_sha512(), 64, derived_key);
  for (i = 0; i < 64; i++) {
    sprintf(hexResult + (i * 2), "%02x", 255 & derived_key[i]);
  };
  printf("dk:\n");
  for (i = 0; i < 64 / 4; i++) {
    printf("[%d] %d\n", i, ntohl(*(int *)(derived_key + 4 * i)));
  }
  unsigned char *digest = HMAC(EVP_sha512(), derived_key, 64, data, sizeof(data), NULL, &md_len);
  printf("md_len: %d\n", md_len);
  for (i = 0; i < md_len; i++) {
    sprintf(hexResult + (i * 2), "%02x", 255 & digest[i]);
  };
  digest[md_len] = 0;
  printf("digest raw: %s\n", digest);
  printf("digest:\n");
  for (i = 0; i < md_len / 4; i++) {
    printf("[%d] %d\n", i, ntohl(*(int *)(digest + i * 4)));
  }
  printf("digest %s\n", hexResult);
  printf("digest base64 %s\n", base64(digest, 64));
  EVP_cleanup();
  CRYPTO_cleanup_all_ex_data();
  ERR_free_strings();
  return 0;
}
```