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

```asm
<divide_media_token>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xa0,%rsp
  mov    %rdi,-0x98(%rbp)
  mov    %rsi,-0xa0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x98(%rbp),%rax
  lea    D12(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x80(%rbp)
  cmpq   $0x0,-0x80(%rbp)
  je     L109
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  movslq %eax,%rdx
  mov    -0x80(%rbp),%rax
  add    %rax,%rdx
  lea    -0x70(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L125
L109:
  mov    -0x98(%rbp),%rax
  lea    D13(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x80(%rbp)
  cmpq   $0x0,-0x80(%rbp)
  je     L103
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  movslq %eax,%rdx
  mov    -0x80(%rbp),%rax
  add    %rax,%rdx
  lea    -0x70(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L125
L103:
  mov    $0x0,%eax
  jmp    L127
L125:
  movb   $0x0,-0xd(%rbp)
  movb   $0x0,-0xe(%rbp)
  movb   $0x0,-0xf(%rbp)
  lea    -0x70(%rbp),%rax
  mov    $0x20,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x80(%rbp)
  cmpq   $0x0,-0x80(%rbp)
  je     L149
  mov    -0x80(%rbp),%rax
  movb   $0x0,(%rax)
L149:
  lea    -0x70(%rbp),%rax
  mov    $0x9,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x80(%rbp)
  cmpq   $0x0,-0x80(%rbp)
  je     L8
  mov    -0x80(%rbp),%rax
  movb   $0x0,(%rax)
L8:
  lea    -0x70(%rbp),%rax
  mov    $0xa,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x80(%rbp)
  cmpq   $0x0,-0x80(%rbp)
  je     L10
  mov    -0x80(%rbp),%rax
  movb   $0x0,(%rax)
L10:
  lea    -0x70(%rbp),%rax
  mov    %rax,-0x80(%rbp)
  movl   $0x0,-0x84(%rbp)
  jmp    L141
L78:
  mov    -0x80(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L72
  mov    -0x80(%rbp),%rax
  mov    $0x2c,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x78(%rbp)
  cmpq   $0x0,-0x78(%rbp)
  je     L94
  mov    -0x78(%rbp),%rax
  movb   $0x0,(%rax)
L94:
  mov    -0x84(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0xa0(%rbp),%rax
  add    %rax,%rdx
  mov    -0x80(%rbp),%rax
  mov    %rax,%rsi
  mov    %rdx,%rdi
  call   <strcpy@plt>
  addl   $0x1,-0x84(%rbp)
  cmpq   $0x0,-0x78(%rbp)
  je     L55
  mov    -0x78(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x80(%rbp)
L141:
  cmpl   $0x4,-0x84(%rbp)
  jle    L78
  jmp    L124
L72:
  nop
  jmp    L124
L55:
  nop
L124:
  mov    -0x84(%rbp),%eax
L127:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L133
  call   <__stack_chk_fail@plt>
L133:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D12
datatype: string
name: read_data
arguments: data_label: D13
datatype: string

tool: D12: media=

tool: D13: PageSize=

assistant: ```c
int divide_media_token(char *input, char output[5][30]) {
  char media_command[100];
  char *media, *p, *pp;
  int i;
  if ((p = strstr(input, "media=")) != NULL) {
    strcpy(media_command, p + strlen("media="));
  } else if ((p = strstr(input, "PageSize=")) != NULL) {
    strcpy(media_command, p + strlen("PageSize="));
  } else {
    return 0;
  }
  media_command[sizeof(media_command) - 1] = 0;
  media_command[sizeof(media_command) - 2] = 0;
  media_command[sizeof(media_command) - 3] = 0;
  p = strchr(media_command, ' ');
  if (p)
    *p = 0;
  p = strchr(media_command, '\t');
  if (p)
    *p = 0;
  p = strchr(media_command, '\n');
  if (p)
    *p = 0;
  p = media_command;
  for (i = 0; i < 5;) {
    if (*p == 0)
      break;
    pp = strchr(p, ',');
    if (pp)
      *pp = 0;
    strcpy(output[i], p);
    i++;
    if (pp == NULL)
      break;
    p = pp + 1;
  }
  return i;
}
```