user: Please show me the C implementation that matches the assembly code listed below:

```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    D10(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x80(%rbp)
  cmpq   $0x0,-0x80(%rbp)
  je     L81
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  movslq %eax,%rdx
  mov    -0x80(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  lea    -0x70(%rbp),%rax
  mov    $0x64,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0xd(%rbp)
  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     L99
  jmp    L61
L81:
  mov    $0x0,%eax
  jmp    L42
L61:
  mov    -0x80(%rbp),%rax
  movb   $0x0,(%rax)
L99:
  lea    -0x70(%rbp),%rax
  mov    $0x9,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x80(%rbp)
  cmpq   $0x0,-0x80(%rbp)
  je     L28
  mov    -0x80(%rbp),%rax
  movb   $0x0,(%rax)
L28:
  lea    -0x70(%rbp),%rax
  mov    $0xa,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x80(%rbp)
  cmpq   $0x0,-0x80(%rbp)
  je     L138
  mov    -0x80(%rbp),%rax
  movb   $0x0,(%rax)
L138:
  lea    -0x70(%rbp),%rax
  mov    %rax,-0x80(%rbp)
  movl   $0x0,-0x84(%rbp)
  jmp    L116
L121:
  mov    -0x80(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L64
  mov    -0x80(%rbp),%rax
  mov    $0x2c,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x78(%rbp)
  cmpq   $0x0,-0x78(%rbp)
  je     L33
  mov    -0x78(%rbp),%rax
  movb   $0x0,(%rax)
L33:
  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
  lea    (%rdx,%rax,1),%rcx
  mov    -0x80(%rbp),%rax
  mov    $0x1e,%edx
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <strncpy@plt>
  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    %rdx,%rax
  movb   $0x0,0x1d(%rax)
  addl   $0x1,-0x84(%rbp)
  cmpq   $0x0,-0x78(%rbp)
  je     L53
  mov    -0x78(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x80(%rbp)
L116:
  cmpl   $0x4,-0x84(%rbp)
  jle    L121
  jmp    L94
L64:
  nop
  jmp    L94
L53:
  nop
L94:
  mov    -0x84(%rbp),%eax
L42:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L59
  call   <__stack_chk_fail@plt>
L59:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D10
datatype: string

tool: D10: media=

assistant: ```c
int divide_media_token(char *input, char output[5][30]) {
  char media_command[100];
  char *p, *pp;
  int i;
  p = strstr(input, "media=");
  if (p) {
    {
      strncpy(media_command, p + strlen("media="), sizeof(media_command));
      media_command[sizeof(media_command) - 1] = 0;
    };
  } 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;
    {
      strncpy(output[i], p, 30);
      output[i][30 - 1] = 0;
    };
    i++;
    if (pp == NULL)
      break;
    p = pp + 1;
  }
  return i;
}
```