user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<matchcurves>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %rdi,%rbp
  mov    $0xa,%edi
  push   %rbx
  mov    %rsi,%rbx
  mov    $0x8,%esi
  sub    $0x8,%rsp
  call   <calloc@plt>
  mov    $0x8,%esi
  mov    $0x64,%edi
  mov    %rax,%r13
  call   <calloc@plt>
  mov    $0x8,%esi
  mov    $0x64,%edi
  mov    %rax,%r15
  call   <calloc@plt>
  mov    $0x28,%esi
  mov    %rbp,%rdi
  mov    %rax,%r14
  call   <instr@plt>
  test   %rax,%rax
  je     L113
  movzbl 0x0(%rbp),%eax
  test   %al,%al
  je     L69
  mov    %rbp,%rcx
  xor    %esi,%esi
  mov    $0x1,%r8d
  xor    %r10d,%r10d
  mov    $0x1,%edi
  xor    %r9d,%r9d
  jmp    L63
  nopw   0x0(%rax,%rax,1)
L58:
  test   %edi,%edi
  je     L99
  movslq %r9d,%rcx
  mov    $0x1,%edi
  add    $0x1,%r9d
  mov    %al,0x0(%r13,%rcx,1)
  mov    %rdx,%rcx
L129:
  movzbl (%rdx),%eax
  test   %al,%al
  je     L69
L63:
  lea    0x1(%rcx),%rdx
  cmp    %al,(%rbx)
  jne    L58
L99:
  cmp    %al,0x1(%rbx)
  je     L17
  test   %r8d,%r8d
  je     L61
  movslq %r10d,%rcx
  xor    %edi,%edi
  add    $0x1,%r10d
  mov    %al,(%r15,%rcx,1)
  movzbl (%rdx),%eax
  mov    %rdx,%rcx
  test   %al,%al
  jne    L63
  nopl   0x0(%rax,%rax,1)
L69:
  mov    %r13,(%r12)
  mov    %r13,%rdi
  mov    %r15,0x8(%r12)
  mov    %r14,0x10(%r12)
  call   <iskey@plt>
  test   %eax,%eax
  je     L120
L113:
  xor    %eax,%eax
L0:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L17:
  test   %r8d,%r8d
  je     L61
  movslq %r10d,%rcx
  mov    %al,(%r15,%rcx,1)
  mov    %rdx,%rcx
  add    $0x1,%rdx
L61:
  movzbl (%rcx),%ecx
  movslq %esi,%rax
  xor    %r8d,%r8d
  add    $0x1,%esi
  mov    %cl,(%r14,%rax,1)
  mov    %rdx,%rcx
  jmp    L129
  nopl   0x0(%rax,%rax,1)
L120:
  mov    0x10(%r12),%rdi
  lea    D1(%rip),%rsi
  call   <strstr@plt>
  test   %eax,%eax
  jne    L113
  mov    0x8(%r12),%rcx
  mov    0x10(%r12),%r8
  mov    %rbp,%rsi
  lea    D3(%rip),%rdi
  mov    (%r12),%rdx
  call   <printf@plt>
  mov    $0x1,%eax
  jmp    L0
```

tool_calls: name: unpack_data
arguments: data_label: D1
type_guessed: string
name: unpack_data
arguments: data_label: D3
type_guessed: string

tool: D1: ;

tool: D3: %s
1:%s
2:%s
3:%s


assistant: ```c
int matchcurves(const char *teststr, const char *decollator, char *result[3]) {
  const char *str = teststr;
  int i = 0, iok = 1;
  int j = 0, jok = 1;
  int k = 0;
  char *before_curves = calloc(10, sizeof(char *));
  char *in_curves = calloc(100, sizeof(char *));
  char *after_curves = calloc(100, sizeof(char *));
  if (instr(teststr, '(')) {
    while (*str) {
      if (*str != decollator[0] && iok) {
        before_curves[i++] = *str++;
      } else if (*str != decollator[1] && jok) {
        iok = 0;
        in_curves[j++] = *str++;
      } else {
        if (jok) {
          jok = 0;
          in_curves[j] = *str++;
        }
        after_curves[k++] = *str++;
      }
    }
    result[0] = before_curves;
    result[1] = in_curves;
    result[2] = after_curves;
    if (!iskey(result[0]) && !strstr(result[2], ";")) {
      printf("%s\n1:%s\n2:%s\n3:%s\n", teststr, result[0], result[1], result[2]);
      return 1;
    }
  }
  return 0;
}
```