user: Demonstrate the C code that generates the assembly output below:

```asm
<a_link>:
  endbr64
  push   %r15
  mov    $0x5b,%esi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x18,%rsp
  call   <match@plt>
  test   %eax,%eax
  jne    L97
L25:
  xor    %eax,%eax
L48:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L97:
  mov    $0xa,%edi
  xor    %ebx,%ebx
  mov    $0xa,%r14d
  call   <malloc@plt>
  mov    %rax,%r12
  jmp    L1
  nop
L9:
  mov    %dl,(%r12,%rbx,1)
  mov    %rbp,%rdi
  add    $0x1,%rbx
  call   <consume@plt>
L1:
  mov    %rbp,%rdi
  mov    %ebx,%r13d
  movslq %ebx,%r15
  call   <next@plt>
  mov    %eax,%edx
  cmp    $0xffffffff,%eax
  je     L28
  cmp    $0x5d,%eax
  je     L28
  lea    -0x1(%r14),%eax
  add    $0x1,%r13d
  cmp    %r13d,%eax
  jg     L9
  add    %r14d,%r14d
  mov    %r12,%rdi
  mov    %edx,0xc(%rsp)
  mov    %r14d,%esi
  call   <realloc@plt>
  mov    0xc(%rsp),%edx
  mov    %rax,%r12
  jmp    L9
  nopw   0x0(%rax,%rax,1)
L28:
  movb   $0x0,(%r12,%r15,1)
  mov    $0x5d,%esi
  mov    %rbp,%rdi
  call   <match@plt>
  test   %eax,%eax
  je     L25
  mov    $0x28,%esi
  mov    %rbp,%rdi
  call   <match@plt>
  test   %eax,%eax
  je     L25
  mov    $0xa,%edi
  xor    %ebx,%ebx
  mov    $0xa,%r15d
  call   <malloc@plt>
  mov    %rax,%r14
  jmp    L121
  xchg   %ax,%ax
L138:
  mov    %dl,(%r14,%rbx,1)
  mov    %rbp,%rdi
  add    $0x1,%rbx
  call   <consume@plt>
L121:
  mov    %rbp,%rdi
  mov    %ebx,0xc(%rsp)
  mov    %ebx,%r13d
  call   <next@plt>
  mov    %eax,%edx
  cmp    $0xffffffff,%eax
  je     L29
  cmp    $0x29,%eax
  je     L29
  lea    -0x1(%r15),%eax
  add    $0x1,%r13d
  cmp    %r13d,%eax
  jg     L138
  add    %r15d,%r15d
  mov    %r14,%rdi
  mov    %edx,0xc(%rsp)
  mov    %r15d,%esi
  call   <realloc@plt>
  mov    0xc(%rsp),%edx
  mov    %rax,%r14
  jmp    L138
  nopl   0x0(%rax,%rax,1)
L29:
  movslq 0xc(%rsp),%rax
  mov    $0x29,%esi
  mov    %rbp,%rdi
  movb   $0x0,(%r14,%rax,1)
  call   <match@plt>
  test   %eax,%eax
  je     L25
  mov    %r12,%rcx
  mov    %r14,%rdx
  lea    D0(%rip),%rsi
  mov    %rbp,%rdi
  call   <parser_emit_string@plt>
  mov    %r14,%rdi
  call   <free@plt>
  mov    %r12,%rdi
  call   <free@plt>
  mov    $0x1,%eax
  jmp    L48
```

tool_calls: name: unpack_data
arguments: data_label: D0
type_guessed: string

tool: D0: <a href="%s">%s</a>

assistant: ```c
bool a_link(struct cymkd_parser *parser) {
  int ch;
  int len;
  int bufsize;
  char *link_text;
  char *link_href;
  if (!match(parser, '[')) {
    return false;
  }
  bufsize = 10;
  len = 0;
  link_text = malloc(bufsize);
  while ((ch = next(parser)) != ']' && ch != -1) {
    if (len + 1 >= bufsize - 1) {
      bufsize *= 2;
      link_text = realloc(link_text, bufsize);
    }
    link_text[len] = ch;
    len++;
    consume(parser);
  }
  link_text[len] = '\0';
  if (!match(parser, ']')) {
    return false;
  }
  if (!match(parser, '(')) {
    return false;
  }
  bufsize = 10;
  len = 0;
  link_href = malloc(bufsize);
  while ((ch = next(parser)) != ')' && ch != -1) {
    if (len + 1 >= bufsize - 1) {
      bufsize *= 2;
      link_href = realloc(link_href, bufsize);
    }
    link_href[len] = ch;
    len++;
    consume(parser);
  }
  link_href[len] = '\0';
  if (!match(parser, ')')) {
    return false;
  }
  parser_emit_string(parser, "<a href=\"%s\">%s</a>", link_href, link_text);
  free(link_href);
  free(link_text);
  return true;
}
```