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

```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    L12
  test   %rdi,%rdi
  je     L12
L79:
  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     L82
  test   %rax,%rax
  je     L82
L117:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  lea    D18(%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     L122
  mov    %r15,%rsi
  call   <strtok@plt>
  mov    %rbp,%rdi
  mov    %rax,%r12
  call   <strlen@plt>
  cltq
  add    %rax,%r12
  je     L10
L42:
  mov    $0xa,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L61
  movb   $0x0,(%rax)
L61:
  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     L28
L118:
  mov    %r12,%rsi
  call   <strcpy@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  xor    %eax,%eax
L127:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L12:
  lea    D46(%rip),%rdi
  call   <print_exit_failure@plt>
  jmp    L79
  nopl   0x0(%rax)
L82:
  lea    D25(%rip),%rdi
  call   <print_exit_failure@plt>
  jmp    L117
  nopl   0x0(%rax)
L28:
  lea    D25(%rip),%rdi
  call   <print_exit_failure@plt>
  mov    (%rbx),%rdi
  jmp    L118
  nopl   0x0(%rax)
L10:
  lea    D47(%rip),%rdi
  call   <print_exit_failure@plt>
  jmp    L42
L122:
  mov    $0xffffffff,%eax
  jmp    L127
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D18
type: string
name: extract_symbolic_data
arguments: data_tag: D46
type: string
name: extract_symbolic_data
arguments: data_tag: D25
type: string
name: extract_symbolic_data
arguments: data_tag: D47
type: string

tool: D18: =

tool: D46: Eingabeparameter von extractCGIdata sind falsch

tool: D25: Es konnte kein Speicher angefordert werden

tool: D47: 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;
}
```