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

```asm
<tokenize>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  mov    $0x1f,%edi
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x18,%rsp
  mov    %rsi,0x8(%rsp)
  call   <malloc@plt>
  mov    %rbp,%rdi
  mov    %rax,%r12
  call   <strlen@plt>
  mov    %r12,%rdi
  xor    %esi,%esi
  xor    %r12d,%r12d
  mov    %eax,%edx
  call   <memset@plt>
  mov    %rbp,%rdi
  mov    %rax,%r15
  call   <strlen@plt>
  cmp    %ebx,%eax
  jle    L174
  nopl   0x0(%rax,%rax,1)
L16:
  movslq %ebx,%r13
  lea    0x0(%rbp,%r13,1),%r14
  movsbl (%r14),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L172
  cmpb   $0x2d,(%r14)
  jne    L163
  movsbl -0x1(%rbp,%r13,1),%edi
  cmp    $0x20,%dil
  je     L172
  mov    %edi,%eax
  and    $0xfffffff7,%eax
  cmp    $0x21,%al
  jne    L98
L163:
  mov    $0x2,%edx
  lea    D47(%rip),%rsi
  mov    %r14,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L211
  mov    0x8(%rsp),%rsi
  movslq %r12d,%rax
  lea    D47(%rip),%rdx
  add    $0x1,%ebx
  movslq %ebx,%r8
  add    $0x1,%r12d
  mov    %rdx,(%rsi,%rax,8)
  lea    0x0(%rbp,%r8,1),%r14
L72:
  movzbl (%r14),%eax
  cmp    $0x2f,%al
  jg     L157
  cmp    $0x20,%al
  jle    L131
  sub    $0x21,%eax
  cmp    $0xe,%al
  ja     L131
  lea    D75(%rip),%rcx
  movzbl %al,%eax
  movslq (%rcx,%rax,4),%rax
  add    %rcx,%rax
  notrack jmp *%rax
  nopl   0x0(%rax,%rax,1)
L157:
  cmp    $0x65,%al
  jne    L131
  mov    0x8(%rsp),%rsi
  movslq %r12d,%rax
  lea    D72(%rip),%rdx
  add    $0x1,%r12d
  mov    %rdx,(%rsi,%rax,8)
  nopl   0x0(%rax,%rax,1)
L131:
  add    $0x1,%ebx
L186:
  mov    %rbp,%rdi
  call   <strlen@plt>
  cmp    %ebx,%eax
  jg     L16
L174:
  mov    %r15,%rdi
  call   <free@plt>
  add    $0x18,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
  mov    0x8(%rsp),%rsi
  movslq %r12d,%rax
  lea    D56(%rip),%rdx
  add    $0x1,%ebx
  add    $0x1,%r12d
  mov    %rdx,(%rsi,%rax,8)
  jmp    L186
  nopl   0x0(%rax)
  mov    0x8(%rsp),%rsi
  movslq %r12d,%rax
  lea    D3(%rip),%rdx
  add    $0x1,%ebx
  add    $0x1,%r12d
  mov    %rdx,(%rsi,%rax,8)
  jmp    L186
  nopl   0x0(%rax)
  mov    0x8(%rsp),%rsi
  movslq %r12d,%rax
  lea    D59(%rip),%rdx
  add    $0x1,%ebx
  add    $0x1,%r12d
  mov    %rdx,(%rsi,%rax,8)
  jmp    L186
  nop
  mov    0x8(%rsp),%rsi
  movslq %r12d,%rax
  lea    D1(%rip),%rdx
  add    $0x1,%ebx
  add    $0x1,%r12d
  mov    %rdx,(%rsi,%rax,8)
  jmp    L186
  nop
  mov    0x8(%rsp),%rsi
  movslq %r12d,%rax
  lea    D42(%rip),%rdx
  add    $0x1,%ebx
  add    $0x1,%r12d
  mov    %rdx,(%rsi,%rax,8)
  jmp    L186
  nop
  mov    0x8(%rsp),%rsi
  movslq %r12d,%rax
  lea    D76(%rip),%rdx
  add    $0x1,%ebx
  add    $0x1,%r12d
  mov    %rdx,(%rsi,%rax,8)
  jmp    L186
  nop
  mov    0x8(%rsp),%rsi
  movslq %r12d,%rax
  lea    D45(%rip),%rcx
  add    $0x1,%ebx
  add    $0x1,%r12d
  mov    %rcx,(%rsi,%rax,8)
  jmp    L186
  nop
L98:
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L163
  xchg   %ax,%ax
L172:
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <readDouble@plt>
  mov    $0x1f,%edi
  mov    %eax,%r13d
  call   <malloc@plt>
  mov    0x8(%rsp),%rdx
  mov    %r15,%rsi
  mov    %rax,%rdi
  movslq %r12d,%rax
  add    $0x1,%r12d
  mov    %rdi,(%rdx,%rax,8)
  call   <strcpy@plt>
  test   %r13d,%r13d
  mov    $0x1,%eax
  cmovg  %r13d,%eax
  lea    -0x1(%rbx,%rax,1),%ebx
  movslq %ebx,%r8
  lea    0x0(%rbp,%r8,1),%r14
  jmp    L72
L211:
  mov    $0x4,%edx
  lea    D105(%rip),%rsi
  mov    %r14,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L72
  mov    0x8(%rsp),%rsi
  add    $0x3,%ebx
  movslq %r12d,%rax
  lea    D105(%rip),%rdx
  movslq %ebx,%r8
  add    $0x1,%r12d
  mov    %rdx,(%rsi,%rax,8)
  lea    0x0(%rbp,%r8,1),%r14
  jmp    L72
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D47
data_type: string
name: extract_symbolic_data
arguments: data_tag: D72
data_type: string
name: extract_symbolic_data
arguments: data_tag: D56
data_type: string
name: extract_symbolic_data
arguments: data_tag: D3
data_type: string
name: extract_symbolic_data
arguments: data_tag: D59
data_type: string
name: extract_symbolic_data
arguments: data_tag: D1
data_type: string
name: extract_symbolic_data
arguments: data_tag: D42
data_type: string
name: extract_symbolic_data
arguments: data_tag: D76
data_type: string
name: extract_symbolic_data
arguments: data_tag: D45
data_type: string
name: extract_symbolic_data
arguments: data_tag: D105
data_type: string

tool: D47: pi

tool: D72: e

tool: D56: /

tool: D3: -

tool: D59: +

tool: D1: *

tool: D42: )

tool: D76: (

tool: D45: !

tool: D105: sqrt

assistant: ```c
int tokenize(char *string, char **tokens) {
  char *currentToken = (char *)malloc(30 + 1);
  currentToken = memset(currentToken, '\0', strlen(string));
  int j = 0;
  for (int i = 0; i < strlen(string); i++) {
    if (isdigit(string[i]) || (string[i] == '-' && (string[i - 1] == ' ' || (string[i - 1] != ')' && string[i - 1] != '!' && !isdigit(string[i - 1]))))) {
      int howMany = readDouble(currentToken, string + i);
      tokens[j] = (char *)malloc(30 + 1);
      strcpy(tokens[j], currentToken);
      j++;
      i += (howMany > 1) ? howMany - 1 : 0;
    } else if (strncmp(string + i, "pi", 2) == 0) {
      tokens[j] = "pi";
      j++;
      i++;
    } else if (strncmp(string + i, "sqrt", 4) == 0) {
      tokens[j] = "sqrt";
      j++;
      i += 3;
    }
    switch (string[i]) {
    case 'e':
      tokens[j] = "e";
      j++;
      break;
    case '+':
      tokens[j] = "+";
      j++;
      break;
    case '-':
      tokens[j] = "-";
      j++;
      break;
    case '*':
      tokens[j] = "*";
      j++;
      break;
    case '/':
      tokens[j] = "/";
      j++;
      break;
    case '(':
      tokens[j] = "(";
      j++;
      break;
    case ')':
      tokens[j] = ")";
      j++;
      break;
    case '!':
      tokens[j] = "!";
      j++;
      break;
    }
  }
  free(currentToken);
  return j;
}
```