user: Translate the below assembly code into C programming language:

```asm
<explode>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdx,0x28(%rsp)
  test   %rdi,%rdi
  je     L108
  mov    %rsi,%r15
  test   %rsi,%rsi
  je     L108
  mov    %rdi,%r13
  call   <strlen@plt>
  mov    %eax,%r14d
  test   %r14d,%r14d
  jle    L108
  lea    -0x1(%r14),%edx
  movzbl (%r15),%ecx
  mov    %r13,%rax
  xor    %r12d,%r12d
  lea    0x1(%r13,%rdx,1),%rsi
  nopl   0x0(%rax,%rax,1)
L85:
  xor    %edx,%edx
  cmp    %cl,(%rax)
  sete   %dl
  add    $0x1,%rax
  add    %edx,%r12d
  cmp    %rsi,%rax
  jne    L85
  test   %r12d,%r12d
  je     L108
  movslq %r12d,%rax
  lea    0x0(,%r12,8),%edi
  mov    %rax,0x30(%rsp)
  call   <malloc@plt>
  mov    %rax,0x8(%rsp)
  test   %rax,%rax
  je     L47
L42:
  xor    %r8d,%r8d
  mov    %r12d,0x3c(%rsp)
  mov    %r15,%r10
  xor    %ebx,%ebx
  mov    %r13,%r15
  movl   $0x0,0x38(%rsp)
  mov    %r14,%r12
  mov    %r8d,%r13d
  jmp    L80
  nopw   0x0(%rax,%rax,1)
L136:
  lea    0x2(%rbx),%ebp
  add    $0x1,%rbx
  cmp    %r12,%rbx
  je     L145
L80:
  movzbl (%r10),%eax
  mov    %ebx,%ebp
  lea    0x1(%rbx),%ecx
  cmp    %al,(%r15,%rbx,1)
  jne    L136
  mov    %ecx,%r14d
  mov    %r10,0x18(%rsp)
  sub    %r13d,%r14d
  mov    %ecx,0x10(%rsp)
  mov    %r14d,%edi
  call   <malloc@plt>
  movslq 0x38(%rsp),%rdx
  mov    0x8(%rsp),%rdi
  test   %rax,%rax
  mov    0x10(%rsp),%ecx
  mov    0x18(%rsp),%r10
  lea    (%rdi,%rdx,8),%r8
  mov    %rax,(%r8)
  je     L27
  mov    %ebx,%edx
  mov    %r13d,%esi
  mov    %r15,%rdi
  mov    %r10,0x20(%rsp)
  mov    %r8,0x10(%rsp)
  movslq %r14d,%r14
  add    $0x1,%rbx
  add    $0x2,%ebp
  mov    %ecx,0x18(%rsp)
  call   <substr@plt>
  mov    0x10(%rsp),%r8
  addl   $0x1,0x38(%rsp)
  mov    0x18(%rsp),%r13d
  mov    0x20(%rsp),%r10
  mov    %rax,(%r8)
  movb   $0x0,-0x1(%rax,%r14,1)
  cmp    %r12,%rbx
  jne    L80
  nopl   0x0(%rax)
L145:
  mov    %ebp,%edi
  mov    %r13d,0x38(%rsp)
  mov    0x3c(%rsp),%r12d
  mov    %r15,%r13
  call   <malloc@plt>
  mov    0x8(%rsp),%rsi
  mov    0x30(%rsp),%rdi
  test   %rax,%rax
  mov    0x38(%rsp),%r8d
  lea    (%rsi,%rdi,8),%rbx
  mov    %rax,(%rbx)
  je     L90
L44:
  mov    %ebp,%edx
  mov    %r8d,%esi
  mov    %r13,%rdi
  mov    %r8d,0x38(%rsp)
  call   <substr@plt>
  mov    0x38(%rsp),%r8d
  add    $0x1,%r12d
  mov    %rax,(%rbx)
  sub    %r8d,%ebp
  movslq %ebp,%rbp
  movb   $0x0,(%rax,%rbp,1)
  mov    0x28(%rsp),%rax
  mov    %r12d,(%rax)
  jmp    L159
  nopl   (%rax)
L108:
  movq   $0x0,0x8(%rsp)
  mov    0x28(%rsp),%rax
  movl   $0x0,(%rax)
L159:
  mov    0x8(%rsp),%rax
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L47:
  mov    $0x147,%ecx
  lea    D36(%rip),%rdx
  mov    $0x4,%edi
  lea    D53(%rip),%rsi
  call   <libcgi_error@plt>
  jmp    L42
  nopw   0x0(%rax,%rax,1)
L27:
  mov    $0x151,%ecx
  lea    D36(%rip),%rdx
  mov    $0x4,%edi
  lea    D53(%rip),%rsi
  call   <libcgi_error@plt>
  movq   $0x0,0x8(%rsp)
  jmp    L159
L90:
  mov    $0x161,%ecx
  lea    D36(%rip),%rdx
  mov    $0x4,%edi
  lea    D53(%rip),%rsi
  call   <libcgi_error@plt>
  mov    0x38(%rsp),%r8d
  jmp    L44
```

tool_calls: name: unpack_data
arguments: label: D36
type: string
name: unpack_data
arguments: label: D53
type: string

tool: D36: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/LeSpocky/libcgi/refs/heads/master/src/string.c

tool: D53: %s, line %s

assistant: ```c
char **explode(char *src, const char *token, int *total) {
  char **str;
  register int i, j, count, item, start;
  int len;
  if (!src || !token) {
    *total = 0;
    return NULL;
  }
  count = item = start = 0;
  j = 1;
  len = strlen(src);
  for (i = 0; i < len; i++) {
    if (src[i] == *token)
      count++;
  }
  if (count == 0) {
    *total = 0;
    return NULL;
  }
  str = (char **)malloc(count * sizeof(char *));
  if (str == NULL)
    libcgi_error(4, "%s, line %s", "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/LeSpocky/libcgi/refs/heads/master/src/string.c", 327);
  for (i = 0; i < len; i++) {
    if (src[i] != *token)
      j++;
    else {
      str[item] = (char *)malloc(j - start);
      if (str[item] == NULL) {
        libcgi_error(4, "%s, line %s", "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/LeSpocky/libcgi/refs/heads/master/src/string.c", 337);
        return NULL;
      }
      *(str + item) = substr(src, start, j - 1);
      str[item][j - start - 1] = '\0';
      item++;
      start = j++;
    }
  }
  *(str + count) = (char *)malloc(j);
  if (str[count] == NULL)
    libcgi_error(4, "%s, line %s", "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/LeSpocky/libcgi/refs/heads/master/src/string.c", 353);
  str[count] = substr(src, start, j);
  str[count][j - start] = '\0';
  *total = ++count;
  return str;
}
```