user: Converte this assembly snippet into its equivalent C code:

```asm
<test_implementations>:
  endbr64
  push   %r13
  mov    $0x1,%esi
  mov    $0x200,%edi
  push   %r12
  push   %rbp
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  call   <calloc@plt>
  mov    $0x1,%esi
  mov    $0x100,%edi
  mov    %rax,%rbp
  call   <calloc@plt>
  mov    $0x1,%esi
  mov    $0x100,%edi
  mov    %rax,%r12
  call   <calloc@plt>
  movdqa D99(%rip),%xmm0
  movdqa D77(%rip),%xmm3
  lea    0x200(%rbp),%rdx
  movdqa D62(%rip),%xmm9
  movdqa D24(%rip),%xmm7
  mov    %rax,%r13
  mov    %rbp,%rax
  movaps %xmm0,(%rsp)
  movdqa D59(%rip),%xmm0
  movdqa D87(%rip),%xmm8
  movdqa D22(%rip),%xmm6
  movdqa D8(%rip),%xmm4
  movdqa D95(%rip),%xmm5
  movaps %xmm0,0x10(%rsp)
L54:
  movdqa %xmm3,%xmm2
  add    $0x10,%rax
  paddd  %xmm9,%xmm3
  movdqa %xmm2,%xmm10
  movdqa %xmm2,%xmm0
  movdqa %xmm2,%xmm1
  paddd  %xmm8,%xmm10
  punpcklwd %xmm10,%xmm0
  punpckhwd %xmm10,%xmm1
  movdqa %xmm0,%xmm10
  punpcklwd %xmm1,%xmm0
  punpckhwd %xmm1,%xmm10
  movdqa %xmm2,%xmm1
  paddd  %xmm6,%xmm2
  paddd  %xmm7,%xmm1
  punpcklwd %xmm10,%xmm0
  movdqa %xmm1,%xmm10
  punpcklwd %xmm2,%xmm1
  pand   %xmm4,%xmm0
  punpckhwd %xmm2,%xmm10
  movdqa %xmm1,%xmm2
  punpckhwd %xmm10,%xmm2
  punpcklwd %xmm10,%xmm1
  punpcklwd %xmm2,%xmm1
  pand   %xmm4,%xmm1
  packuswb %xmm1,%xmm0
  pand   %xmm5,%xmm0
  movups %xmm0,-0x10(%rax)
  cmp    %rax,%rdx
  jne    L54
  xor    %eax,%eax
  call   <load_constants@plt>
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <haraka512_8x@plt>
  mov    %rsp,%rdx
  lea    0x20(%r13),%rcx
  mov    %r13,%rax
  sub    %r13,%rdx
  jmp    L51
  cs nopw 0x0(%rax,%rax,1)
L27:
  add    $0x1,%rax
  cmp    %rcx,%rax
  je     L4
L51:
  movzbl (%rdx,%rax,1),%esi
  cmp    %sil,(%rax)
  je     L27
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  add    $0x30,%rsp
  lea    D50(%rip),%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    10c0 <printf@plt>
L4:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %r12,%rdi
  call   <free@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  add    $0x30,%rsp
  mov    %r13,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    10a0 <free@plt>
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D99
type_guessed: byte[16]
name: read_data
arguments: tag: D77
type_guessed: byte[16]
name: read_data
arguments: tag: D62
type_guessed: byte[16]
name: read_data
arguments: tag: D24
type_guessed: byte[16]
name: read_data
arguments: tag: D59
type_guessed: byte[16]
name: read_data
arguments: tag: D87
type_guessed: byte[16]
name: read_data
arguments: tag: D22
type_guessed: byte[16]
name: read_data
arguments: tag: D8
type_guessed: byte[16]
name: read_data
arguments: tag: D95
type_guessed: byte[16]
name: read_data
arguments: tag: D50
type_guessed: string

tool: {"D99": [0xbe,0x7f,0x72,0x3b,0x4e,0x80,0xa9,0x98,0x13,0xb2,0x92,0x28,0x7f,0x30,0x6f,0x62]}

tool: {"D77": [0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00]}

tool: {"D62": [0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00]}

tool: {"D24": [0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00]}

tool: {"D59": [0x5a,0x6d,0x57,0x33,0x1c,0xae,0x5f,0x34,0xdd,0x92,0x77,0xb0,0x94,0x5b,0xe2,0xaa]}

tool: {"D87": [0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

tool: {"D22": [0x0c,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x0c,0x00,0x00,0x00]}

tool: {"D8": [0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00]}

tool: {"D95": [0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f]}

tool: D50: 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);
}
```