user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<divide_media_token>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x240,%rsp
  mov    %rdi,-0x238(%rbp)
  mov    %rsi,-0x240(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x238(%rbp),%rax
  lea    D24(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x220(%rbp)
  cmpq   $0x0,-0x220(%rbp)
  je     L74
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  movslq %eax,%rdx
  mov    -0x220(%rbp),%rax
  add    %rax,%rdx
  lea    -0x210(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L153
L74:
  mov    -0x238(%rbp),%rax
  lea    D3(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x220(%rbp)
  cmpq   $0x0,-0x220(%rbp)
  je     L47
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  movslq %eax,%rdx
  mov    -0x220(%rbp),%rax
  add    %rax,%rdx
  lea    -0x210(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L153
L47:
  mov    $0x0,%eax
  jmp    L152
L153:
  movb   $0x0,-0x11(%rbp)
  movb   $0x0,-0x12(%rbp)
  movb   $0x0,-0x13(%rbp)
  lea    -0x210(%rbp),%rax
  mov    $0x20,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x220(%rbp)
  cmpq   $0x0,-0x220(%rbp)
  je     L135
  mov    -0x220(%rbp),%rax
  movb   $0x0,(%rax)
L135:
  lea    -0x210(%rbp),%rax
  mov    $0x9,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x220(%rbp)
  cmpq   $0x0,-0x220(%rbp)
  je     L112
  mov    -0x220(%rbp),%rax
  movb   $0x0,(%rax)
L112:
  lea    -0x210(%rbp),%rax
  mov    $0xa,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x220(%rbp)
  cmpq   $0x0,-0x220(%rbp)
  je     L1
  mov    -0x220(%rbp),%rax
  movb   $0x0,(%rax)
L1:
  lea    -0x210(%rbp),%rax
  mov    %rax,-0x220(%rbp)
  movl   $0x0,-0x224(%rbp)
  jmp    L157
L92:
  mov    -0x220(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L67
  mov    -0x220(%rbp),%rax
  mov    $0x2c,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x218(%rbp)
  cmpq   $0x0,-0x218(%rbp)
  je     L100
  mov    -0x218(%rbp),%rax
  movb   $0x0,(%rax)
L100:
  mov    -0x224(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x240(%rbp),%rax
  add    %rax,%rdx
  mov    -0x220(%rbp),%rax
  mov    %rax,%rsi
  mov    %rdx,%rdi
  call   <strcpy@plt>
  addl   $0x1,-0x224(%rbp)
  cmpq   $0x0,-0x218(%rbp)
  je     L79
  mov    -0x218(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x220(%rbp)
L157:
  cmpl   $0x4,-0x224(%rbp)
  jle    L92
  jmp    L98
L67:
  nop
  jmp    L98
L79:
  nop
L98:
  mov    -0x224(%rbp),%eax
L152:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L139
  call   <__stack_chk_fail@plt>
L139:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D24
datatype: string
name: unpack_data
arguments: data_label: D3
datatype: string

tool: D24: media=

tool: D3: PageSize=

assistant: ```c
int divide_media_token(char *input, char output[5][30]) {
  char media_command[512];
  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;
}
```