user: 请从给定的汇编指令推导出C源代码:

```asm
<test_implementations>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0x1,%esi
  mov    $0x200,%edi
  call   <calloc@plt>
  mov    %rax,-0x68(%rbp)
  mov    $0x1,%esi
  mov    $0x100,%edi
  call   <calloc@plt>
  mov    %rax,-0x60(%rbp)
  mov    $0x1,%esi
  mov    $0x100,%edi
  call   <calloc@plt>
  mov    %rax,-0x58(%rbp)
  movabs $0x4b774979b8cc2780,%rax
  movabs $0xcf72bb75f54d078,%rdx
  mov    %rax,-0x50(%rbp)
  mov    %rdx,-0x48(%rbp)
  movabs $0x7bd4cb23092a5c69,%rax
  movabs $0x1c2c2bbfef5911ba,%rdx
  mov    %rax,-0x40(%rbp)
  mov    %rdx,-0x38(%rbp)
  movabs $0x98a9804e3b727fbe,%rax
  movabs $0x626f307f2892b213,%rdx
  mov    %rax,-0x30(%rbp)
  mov    %rdx,-0x28(%rbp)
  movabs $0x345fae1c33576d5a,%rax
  movabs $0xaae25b94b07792dd,%rdx
  mov    %rax,-0x20(%rbp)
  mov    %rdx,-0x18(%rbp)
  movl   $0x0,-0x6c(%rbp)
  jmp    L0
L13:
  mov    -0x6c(%rbp),%eax
  cltd
  shr    $0x1a,%edx
  add    %edx,%eax
  and    $0x3f,%eax
  sub    %edx,%eax
  mov    %eax,%ecx
  mov    -0x6c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x6c(%rbp)
L0:
  cmpl   $0x1ff,-0x6c(%rbp)
  jle    L13
  mov    $0x0,%eax
  call   <load_constants@plt>
  mov    -0x68(%rbp),%rdx
  mov    -0x58(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <haraka512_8x@plt>
  movl   $0x0,-0x6c(%rbp)
  jmp    L46
L7:
  mov    -0x6c(%rbp),%eax
  cltd
  shr    $0x1b,%edx
  add    %edx,%eax
  and    $0x1f,%eax
  sub    %edx,%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x6c(%rbp),%eax
  cltq
  movzbl -0x30(%rbp,%rax,1),%eax
  cmp    %al,%dl
  je     L19
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L22
L19:
  addl   $0x1,-0x6c(%rbp)
L46:
  cmpl   $0x1f,-0x6c(%rbp)
  jle    L7
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x60(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L22:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L31
  call   <__stack_chk_fail@plt>
L31:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D9
datatype: string

tool: D9: Error: testvector incorrect.


assistant: ```c
void test_implementations() {
  unsigned char *in = (unsigned char *)calloc(64 * 8, sizeof(unsigned char));
  unsigned char *out256 = (unsigned char *)calloc(32 * 8, sizeof(unsigned char));
  unsigned char *out512 = (unsigned char *)calloc(32 * 8, sizeof(unsigned char));
  unsigned char testvector256[32] = {0x80, 0x27, 0xcc, 0xb8, 0x79, 0x49, 0x77, 0x4b, 0x78, 0xd0, 0x54, 0x5f, 0xb7, 0x2b, 0xf7, 0x0c, 0x69, 0x5c, 0x2a, 0x09, 0x23, 0xcb, 0xd4, 0x7b, 0xba, 0x11, 0x59, 0xef, 0xbf, 0x2b, 0x2c, 0x1c};
  unsigned char testvector512[32] = {0xbe, 0x7f, 0x72, 0x3b, 0x4e, 0x80, 0xa9, 0x98, 0x13, 0xb2, 0x92, 0x28, 0x7f, 0x30, 0x6f, 0x62, 0x5a, 0x6d, 0x57, 0x33, 0x1c, 0xae, 0x5f, 0x34, 0xdd, 0x92, 0x77, 0xb0, 0x94, 0x5b, 0xe2, 0xaa};
  int i;
  for (i = 0; i < 512; i++) {
    in[i] = i % 64;
  }
  load_constants();
  haraka512_8x(out512, in);
  for (i = 0; i < 32; i++) {
    if (out512[i % 32] != testvector512[i]) {
      printf("Error: testvector incorrect.\n");
      return;
    }
  }
  free(in);
  free(out256);
  free(out512);
}
```