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

```asm
<mem_init>:
  endbr64
  test   %rsi,%rsi
  jne    L96
  ret
  nopw   0x0(%rax,%rax,1)
L96:
  push   %rbp
  mov    %rsi,%rdx
  mov    %rsi,%rbp
  xor    %esi,%esi
  push   %rbx
  mov    %rdi,%rbx
  sub    $0xf8,%rsp
  call   <memset@plt>
  lea    -0x1(%rbp),%r8
  cmp    $0xafe9,%r8
  jbe    L176
  cmp    $0xfffffffffffffe00,%rbp
  ja     L176
  mov    %r8,%rax
  movd   %ebx,%xmm4
  movdqa D85(%rip),%xmm3
  xor    %ecx,%ecx
  movabs $0x20040080100201,%rdx
  punpcklwd %xmm4,%xmm4
  movdqa D69(%rip),%xmm12
  movdqa D17(%rip),%xmm11
  mul    %rdx
  mov    %r8,%rax
  movdqa D28(%rip),%xmm10
  movdqa D46(%rip),%xmm9
  movdqa D98(%rip),%xmm8
  movdqa D83(%rip),%xmm7
  pshufd $0x0,%xmm4,%xmm4
  movdqa D39(%rip),%xmm6
  movdqa D78(%rip),%xmm5
  sub    %rdx,%rax
  movdqa D24(%rip),%xmm2
  shr    %rax
  add    %rax,%rdx
  shr    $0xa,%rdx
  lea    0x1(%rdx),%rsi
  mov    %rbx,%rdx
  mov    %rsi,%r9
  shr    $0x4,%r9
  nopl   0x0(%rax)
L104:
  movdqa %xmm3,%xmm14
  add    $0x1,%rcx
  paddq  %xmm12,%xmm3
  add    $0x7ff0,%rdx
  movdqa %xmm14,%xmm0
  movdqa %xmm14,%xmm1
  movdqa %xmm14,%xmm13
  paddq  %xmm11,%xmm0
  paddq  %xmm9,%xmm13
  movdqa %xmm14,%xmm15
  shufps $0x88,%xmm0,%xmm1
  movdqa %xmm14,%xmm0
  paddq  %xmm7,%xmm15
  paddq  %xmm10,%xmm0
  shufps $0x88,%xmm13,%xmm0
  movdqa %xmm1,%xmm13
  punpcklwd %xmm0,%xmm1
  punpckhwd %xmm0,%xmm13
  movdqa %xmm1,%xmm0
  punpckhwd %xmm13,%xmm0
  punpcklwd %xmm13,%xmm1
  punpcklwd %xmm0,%xmm1
  movdqa %xmm14,%xmm0
  paddq  %xmm8,%xmm0
  pxor   %xmm4,%xmm1
  movdqa %xmm0,%xmm13
  movdqa %xmm14,%xmm0
  shufps $0x88,%xmm15,%xmm13
  movdqa %xmm14,%xmm15
  paddq  %xmm5,%xmm0
  paddq  %xmm6,%xmm15
  movdqa %xmm15,%xmm14
  movdqa %xmm13,%xmm15
  shufps $0x88,%xmm0,%xmm14
  movdqa %xmm13,%xmm0
  punpckhwd %xmm14,%xmm15
  punpcklwd %xmm14,%xmm0
  movdqa %xmm0,%xmm13
  punpcklwd %xmm15,%xmm0
  punpckhwd %xmm15,%xmm13
  punpcklwd %xmm13,%xmm0
  pxor   %xmm4,%xmm0
  movdqa %xmm0,%xmm13
  movdqa %xmm1,%xmm0
  pand   %xmm2,%xmm1
  movdqa %xmm13,%xmm14
  psrlw  $0x8,%xmm0
  pand   %xmm2,%xmm13
  psrlw  $0x8,%xmm14
  pand   %xmm2,%xmm0
  packuswb %xmm13,%xmm1
  pand   %xmm2,%xmm14
  packuswb %xmm14,%xmm0
  pxor   %xmm1,%xmm0
  movd   %xmm0,%eax
  mov    %al,-0x7ff0(%rdx)
  movaps %xmm0,0xe0(%rsp)
  movzbl 0xe1(%rsp),%eax
  mov    %al,-0x77f1(%rdx)
  movaps %xmm0,0xd0(%rsp)
  movzbl 0xd2(%rsp),%eax
  mov    %al,-0x6ff2(%rdx)
  movaps %xmm0,0xc0(%rsp)
  movzbl 0xc3(%rsp),%eax
  mov    %al,-0x67f3(%rdx)
  movaps %xmm0,0xb0(%rsp)
  movzbl 0xb4(%rsp),%eax
  mov    %al,-0x5ff4(%rdx)
  movaps %xmm0,0xa0(%rsp)
  movzbl 0xa5(%rsp),%eax
  mov    %al,-0x57f5(%rdx)
  movaps %xmm0,0x90(%rsp)
  movzbl 0x96(%rsp),%eax
  mov    %al,-0x4ff6(%rdx)
  movaps %xmm0,0x80(%rsp)
  movzbl 0x87(%rsp),%eax
  mov    %al,-0x47f7(%rdx)
  movaps %xmm0,0x70(%rsp)
  movzbl 0x78(%rsp),%eax
  mov    %al,-0x3ff8(%rdx)
  movaps %xmm0,0x60(%rsp)
  movzbl 0x69(%rsp),%eax
  mov    %al,-0x37f9(%rdx)
  movaps %xmm0,0x50(%rsp)
  movzbl 0x5a(%rsp),%edi
  mov    %dil,-0x2ffa(%rdx)
  movaps %xmm0,0x40(%rsp)
  movzbl 0x4b(%rsp),%edi
  mov    %dil,-0x27fb(%rdx)
  movaps %xmm0,0x30(%rsp)
  movzbl 0x3c(%rsp),%edi
  mov    %dil,-0x1ffc(%rdx)
  movaps %xmm0,0x20(%rsp)
  movzbl 0x2d(%rsp),%edi
  mov    %dil,-0x17fd(%rdx)
  movaps %xmm0,0x10(%rsp)
  movzbl 0x1e(%rsp),%edi
  mov    %dil,-0xffe(%rdx)
  movaps %xmm0,(%rsp)
  movzbl 0xf(%rsp),%edi
  mov    %dil,-0x7ff(%rdx)
  cmp    %rcx,%r9
  ja     L104
  mov    %rsi,%rax
  and    $0xfffffffffffffff0,%rax
  mov    %rax,%rdx
  shl    $0xb,%rdx
  sub    %rax,%rdx
  cmp    %rax,%rsi
  je     L90
  mov    %rbx,%rcx
  xor    %rdx,%rcx
  mov    %rcx,%rax
  shr    $0x8,%rax
  xor    %ecx,%eax
  mov    %al,(%rbx,%rdx,1)
  lea    0x7ff(%rdx),%rax
  cmp    %rax,%rbp
  jbe    L90
  xor    %rbx,%rax
  mov    %rax,%rcx
  shr    $0x8,%rcx
  xor    %ecx,%eax
  mov    %al,0x7ff(%rbx,%rdx,1)
  lea    0xffe(%rdx),%rax
  cmp    %rax,%rbp
  jbe    L90
  xor    %rbx,%rax
  mov    %rax,%rcx
  shr    $0x8,%rcx
  xor    %ecx,%eax
  mov    %al,0xffe(%rbx,%rdx,1)
  lea    0x17fd(%rdx),%rax
  cmp    %rax,%rbp
  jbe    L90
  xor    %rbx,%rax
  mov    %rax,%rcx
  shr    $0x8,%rcx
  xor    %ecx,%eax
  mov    %al,0x17fd(%rbx,%rdx,1)
  lea    0x1ffc(%rdx),%rax
  cmp    %rax,%rbp
  jbe    L90
  xor    %rbx,%rax
  mov    %rax,%rcx
  shr    $0x8,%rcx
  xor    %ecx,%eax
  mov    %al,0x1ffc(%rbx,%rdx,1)
  lea    0x27fb(%rdx),%rax
  cmp    %rax,%rbp
  jbe    L90
  xor    %rbx,%rax
  mov    %rax,%rcx
  shr    $0x8,%rcx
  xor    %ecx,%eax
  mov    %al,0x27fb(%rbx,%rdx,1)
  lea    0x2ffa(%rdx),%rax
  cmp    %rax,%rbp
  jbe    L90
  xor    %rbx,%rax
  mov    %rax,%rcx
  shr    $0x8,%rcx
  xor    %ecx,%eax
  mov    %al,0x2ffa(%rbx,%rdx,1)
  lea    0x37f9(%rdx),%rax
  cmp    %rax,%rbp
  jbe    L90
  xor    %rbx,%rax
  mov    %rax,%rcx
  shr    $0x8,%rcx
  xor    %ecx,%eax
  mov    %al,0x37f9(%rbx,%rdx,1)
  lea    0x3ff8(%rdx),%rax
  cmp    %rax,%rbp
  jbe    L90
  xor    %rbx,%rax
  mov    %rax,%rcx
  shr    $0x8,%rcx
  xor    %ecx,%eax
  mov    %al,0x3ff8(%rbx,%rdx,1)
  lea    0x47f7(%rdx),%rax
  cmp    %rax,%rbp
  jbe    L90
  xor    %rbx,%rax
  mov    %rax,%rcx
  shr    $0x8,%rcx
  xor    %ecx,%eax
  mov    %al,0x47f7(%rbx,%rdx,1)
  lea    0x4ff6(%rdx),%rax
  cmp    %rax,%rbp
  jbe    L90
  xor    %rbx,%rax
  mov    %rax,%rcx
  shr    $0x8,%rcx
  xor    %ecx,%eax
  mov    %al,0x4ff6(%rbx,%rdx,1)
  lea    0x57f5(%rdx),%rax
  cmp    %rax,%rbp
  jbe    L90
  xor    %rbx,%rax
  mov    %rax,%rcx
  shr    $0x8,%rcx
  xor    %ecx,%eax
  mov    %al,0x57f5(%rbx,%rdx,1)
  lea    0x5ff4(%rdx),%rax
  cmp    %rax,%rbp
  jbe    L90
  xor    %rbx,%rax
  mov    %rax,%rcx
  shr    $0x8,%rcx
  xor    %ecx,%eax
  mov    %al,0x5ff4(%rbx,%rdx,1)
  lea    0x67f3(%rdx),%rax
  cmp    %rax,%rbp
  jbe    L90
  xor    %rbx,%rax
  mov    %rax,%rcx
  shr    $0x8,%rcx
  xor    %ecx,%eax
  mov    %al,0x67f3(%rbx,%rdx,1)
  lea    0x6ff2(%rdx),%rax
  cmp    %rax,%rbp
  jbe    L90
  xor    %rbx,%rax
  mov    %rax,%rcx
  shr    $0x8,%rcx
  xor    %ecx,%eax
  mov    %al,0x6ff2(%rbx,%rdx,1)
L90:
  xor    %rbx,%r8
  mov    %r8,%rax
  shr    $0x8,%rax
  xor    %r8d,%eax
  mov    %al,-0x1(%rbx,%rbp,1)
  add    $0xf8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax,%rax,1)
L176:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L189:
  mov    %rbx,%rcx
  xor    %rax,%rcx
  mov    %rcx,%rdx
  shr    $0x8,%rdx
  xor    %ecx,%edx
  mov    %dl,(%rbx,%rax,1)
  add    $0x7ff,%rax
  cmp    %rax,%rbp
  ja     L189
  jmp    L90
```

tool_calls: name: parse_data
arguments: data_label: D85
type: byte[16]
name: parse_data
arguments: data_label: D69
type: byte[16]
name: parse_data
arguments: data_label: D17
type: byte[16]
name: parse_data
arguments: data_label: D28
type: byte[16]
name: parse_data
arguments: data_label: D46
type: byte[16]
name: parse_data
arguments: data_label: D98
type: byte[16]
name: parse_data
arguments: data_label: D83
type: byte[16]
name: parse_data
arguments: data_label: D39
type: byte[16]
name: parse_data
arguments: data_label: D78
type: byte[16]
name: parse_data
arguments: data_label: D24
type: byte[16]

tool: {"D85": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: {"D69": [0xf0,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x7f,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: {"D17": [0xfe,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x0f,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: {"D28": [0xfc,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x1f,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: {"D46": [0xfa,0x2f,0x00,0x00,0x00,0x00,0x00,0x00,0xfa,0x2f,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: {"D98": [0xf8,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x3f,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: {"D83": [0xf6,0x4f,0x00,0x00,0x00,0x00,0x00,0x00,0xf6,0x4f,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: {"D39": [0xf4,0x5f,0x00,0x00,0x00,0x00,0x00,0x00,0xf4,0x5f,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: {"D78": [0xf2,0x6f,0x00,0x00,0x00,0x00,0x00,0x00,0xf2,0x6f,0x00,0x00,0x00,0x00,0x00,0x00]}

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

assistant: ```c
void mem_init(unsigned char *ptr, unsigned long size) {
  unsigned long i, j;
  if (size == 0)
    return;
  memset(ptr, '\0', size);
  for (i = 0; i < size; i += 2047) {
    j = (unsigned long)ptr ^ i;
    ptr[i] = ((j ^ (j >> 8)) & 0xFF);
  }
  j = (unsigned long)ptr ^ (size - 1);
  ptr[size - 1] = ((j ^ (j >> 8)) & 0xFF);
}
```