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

```asm
<match_list>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x178,%rsp
  mov    %rsi,%rbx
  mov    %rdx,(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x168(%rsp)
  xor    %eax,%eax
  call   <ssh_strdup@plt>
  mov    %rax,%r14
  mov    %rax,0x10(%rsp)
  mov    %rbx,%rdi
  call   <ssh_strdup@plt>
  mov    %rax,0x8(%rsp)
  mov    %rax,0x18(%rsp)
  lea    0x18(%rsp),%rdi
  lea    D2(%rip),%rsi
  call   <strsep@plt>
  test   %rax,%rax
  je     L24
  cmpb   $0x0,(%rax)
  je     L39
  mov    $0x1,%ebx
  lea    D2(%rip),%rbp
L76:
  mov    %rax,0x18(%rsp,%rbx,8)
  lea    0x18(%rsp),%rdi
  mov    %rbp,%rsi
  call   <strsep@plt>
  mov    %ebx,%r13d
  test   %rax,%rax
  je     L51
  cmpb   $0x0,(%rax)
  setne  %cl
  cmp    $0x27,%ebx
  setle  %dl
  add    $0x1,%rbx
  test   %dl,%cl
  jne    L76
L51:
  lea    0x10(%rsp),%rdi
  lea    D2(%rip),%rsi
  call   <strsep@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L101
  lea    0x20(%rsp),%r15
  lea    -0x1(%r13),%eax
  lea    0x28(%rsp,%rax,8),%r12
L13:
  cmpb   $0x0,0x0(%rbp)
  je     L101
  mov    %r15,%rbx
  test   %r13d,%r13d
  jle    L130
L34:
  mov    (%rbx),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L92
  add    $0x8,%rbx
  cmp    %r12,%rbx
  jne    L34
L130:
  lea    0x10(%rsp),%rdi
  lea    D2(%rip),%rsi
  call   <strsep@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  jne    L13
L101:
  mov    (%rsp),%rbx
  test   %rbx,%rbx
  je     L120
  mov    %r14,%rdi
  call   <strlen@plt>
  mov    %eax,(%rbx)
L120:
  mov    %r14,%rdi
  call   <free@plt>
  mov    0x8(%rsp),%rdi
  call   <free@plt>
  mov    $0x0,%ebx
  jmp    L167
L24:
  mov    $0x0,%r13d
  jmp    L51
L39:
  mov    $0x0,%r13d
  jmp    L51
L92:
  mov    %rbp,%rdi
  call   <ssh_strdup@plt>
  mov    %rax,%rbx
  cmpq   $0x0,(%rsp)
  je     L113
  mov    0x10(%rsp),%rdx
  mov    %edx,%eax
  sub    %r14d,%eax
  test   %rdx,%rdx
  je     L151
L146:
  mov    (%rsp),%rcx
  mov    %eax,(%rcx)
L113:
  mov    %r14,%rdi
  call   <free@plt>
  mov    0x8(%rsp),%rdi
  call   <free@plt>
L167:
  mov    0x168(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L65
  mov    %rbx,%rax
  add    $0x178,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L151:
  mov    %r14,%rdi
  call   <strlen@plt>
  jmp    L146
L65:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D2
type: string

tool: D2: ,

assistant: ```c
char *match_list(const char *client, const char *server, u_int *next) {
  char *sproposals[40];
  char *c, *s, *p, *ret, *cp, *sp;
  int i, j, nproposals;
  c = cp = ssh_strdup(client);
  s = sp = ssh_strdup(server);
  for ((p = strsep(&sp, ",")), i = 0; p && *p != '\0'; (p = strsep(&sp, ",")), i++) {
    if (i < 40)
      sproposals[i] = p;
    else
      break;
  }
  nproposals = i;
  for ((p = strsep(&cp, ",")), i = 0; p && *p != '\0'; (p = strsep(&cp, ",")), i++) {
    for (j = 0; j < nproposals; j++) {
      if (strcmp(p, sproposals[j]) == 0) {
        ret = ssh_strdup(p);
        if (next != NULL)
          *next = (cp == NULL) ? strlen(c) : (u_int)(cp - c);
        free(c);
        free(s);
        return ret;
      }
    }
  }
  if (next != NULL)
    *next = strlen(c);
  free(c);
  free(s);
  return NULL;
}
```