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

```asm
<_extractCGIdata>:
  endbr64
  push   %r15
  mov    %rdx,%r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  mov    %rcx,%rbx
  sub    $0x8,%rsp
  test   %rsi,%rsi
  sete   %al
  test   %rdx,%rdx
  sete   %dl
  or     %dl,%al
  jne    L96
  test   %rdi,%rdi
  je     L96
L37:
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    $0x1,%esi
  lea    0x2(%rax),%edi
  call   <calloc@plt>
  mov    %r14,%rdi
  mov    %rax,%rbp
  call   <strlen@plt>
  mov    $0x1,%esi
  lea    0x1(%rax),%edi
  call   <calloc@plt>
  mov    %rax,%r13
  test   %rbp,%rbp
  je     L29
  test   %rax,%rax
  je     L29
L112:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  lea    D3(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <strcpy@plt>
  mov    %r13,%rdi
  mov    %rbp,%rsi
  call   <strstr@plt>
  mov    %rax,%rdi
  test   %rax,%rax
  je     L49
  mov    %r15,%rsi
  call   <strtok@plt>
  mov    %rbp,%rdi
  mov    %rax,%r12
  call   <strlen@plt>
  cltq
  add    %rax,%r12
  je     L3
L73:
  mov    $0xa,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L45
  movb   $0x0,(%rax)
L45:
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    $0x1,%esi
  lea    0x1(%rax),%edi
  call   <calloc@plt>
  mov    %rax,(%rbx)
  mov    %rax,%rdi
  test   %rax,%rax
  je     L121
L55:
  mov    %r12,%rsi
  call   <strcpy@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  xor    %eax,%eax
L60:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L96:
  lea    D18(%rip),%rdi
  call   <print_exit_failure@plt>
  jmp    L37
  nopl   0x0(%rax)
L29:
  lea    D41(%rip),%rdi
  call   <print_exit_failure@plt>
  jmp    L112
  nopl   0x0(%rax)
L121:
  lea    D41(%rip),%rdi
  call   <print_exit_failure@plt>
  mov    (%rbx),%rdi
  jmp    L55
  nopl   0x0(%rax)
L3:
  lea    D16(%rip),%rdi
  call   <print_exit_failure@plt>
  jmp    L73
L49:
  mov    $0xffffffff,%eax
  jmp    L60
```

tool_calls: name: unpack_data
arguments: label: D3
type: string
name: unpack_data
arguments: label: D18
type: string
name: unpack_data
arguments: label: D41
type: string
name: unpack_data
arguments: label: D16
type: string

tool: D3: =

tool: D18: Eingabeparameter von extractCGIdata sind falsch

tool: D41: Es konnte kein Speicher angefordert werden

tool: D16: Token nicht gefunden

assistant: ```c
int _extractCGIdata(char *data, const char *property, char *delim, char **out) {
  if (data == NULL || property == NULL || delim == NULL) {
    print_exit_failure("Eingabeparameter von extractCGIdata sind falsch");
  }
  char *prop = NULL;
  prop = (char *)calloc(strlen(property) + 1 + 1, sizeof(char));
  char *tempData = NULL;
  tempData = (char *)calloc(strlen(data) + 1, sizeof(char));
  if (prop == NULL || tempData == NULL) {
    print_exit_failure("Es konnte kein Speicher angefordert werden");
  }
  strcpy(prop, property);
  strcat(prop, "=");
  strcpy(tempData, data);
  char *start = NULL;
  start = strstr(tempData, prop);
  if (start == NULL) {
    return -1;
  }
  char *klaus = NULL;
  klaus = strtok(start, delim) + strlen(prop);
  if (klaus == NULL) {
    print_exit_failure("Token nicht gefunden");
  }
  char *newline = strchr(klaus, '\n');
  if (newline != NULL) {
    *newline = '\0';
  }
  *out = calloc(strlen(klaus) + 1, sizeof(char));
  if (*out == NULL) {
    print_exit_failure("Es konnte kein Speicher angefordert werden");
  }
  strcpy(*out, klaus);
  free(prop);
  free(tempData);
  return 0;
}
```