user: 这段汇编代码用C语言表示是什么样的：

```asm
<listen_parse>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  movl   $0x0,-0x28(%rbp)
  movl   $0x0,-0x24(%rbp)
  movl   $0x0,-0x20(%rbp)
  mov    -0x50(%rbp),%rax
  movl   $0xffffffff,(%rax)
  mov    -0x50(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x40(%rbp),%rax
  movq   $0x0,(%rax)
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,%ebx
  jle    L118
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  lea    D20(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  jne    L118
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cltq
  add    %rax,-0x38(%rbp)
L118:
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  jmp    L266
L356:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L4
  cmpl   $0x0,-0x20(%rbp)
  jne    L4
  cmpl   $0x0,-0x24(%rbp)
  je     L224
L4:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  je     L91
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  je     L84
L91:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L180
  cmpl   $0x0,-0x20(%rbp)
  je     L306
  mov    $0x8,%eax
  jmp    L222
L306:
  addl   $0x1,-0x20(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  jle    L94
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <strtol@plt>
  mov    -0x50(%rbp),%rdx
  mov    %eax,(%rdx)
  jmp    L94
L180:
  cmpl   $0x0,-0x20(%rbp)
  je     L97
  addl   $0x1,-0x28(%rbp)
  jmp    L208
L97:
  addl   $0x1,-0x24(%rbp)
  jmp    L208
L224:
  nop
  jmp    L208
L94:
  nop
L208:
  subq   $0x1,-0x18(%rbp)
L266:
  mov    -0x18(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jb     L104
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L356
  jmp    L104
L84:
  nop
L104:
  cmpl   $0x0,-0x28(%rbp)
  je     L201
  cmpl   $0x0,-0x20(%rbp)
  je     L201
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <strtol@plt>
  mov    -0x48(%rbp),%rdx
  mov    %eax,(%rdx)
L201:
  cmpl   $0x0,-0x24(%rbp)
  je     L157
  cmpl   $0x0,-0x20(%rbp)
  jne    L157
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <strtol@plt>
  mov    -0x50(%rbp),%rdx
  mov    %eax,(%rdx)
L157:
  cmpl   $0x0,-0x20(%rbp)
  je     L184
  cmpl   $0x0,-0x28(%rbp)
  je     L235
  cmpl   $0x0,-0x24(%rbp)
  jne    L184
L235:
  mov    $0x8,%eax
  jmp    L222
L184:
  cmpl   $0x0,-0x28(%rbp)
  jne    L337
  cmpl   $0x0,-0x24(%rbp)
  je     L301
L337:
  mov    -0x18(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jbe    L301
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  je     L301
  mov    $0x8,%eax
  jmp    L222
L301:
  mov    -0x18(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jbe    L11
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L11
  subq   $0x1,-0x18(%rbp)
L11:
  mov    -0x18(%rbp),%rax
  sub    -0x38(%rbp),%rax
  add    $0x1,%eax
  mov    %eax,-0x1c(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  jle    L140
  mov    -0x1c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%esi
  mov    $0x1,%edi
  call   <calloc@plt>
  mov    -0x40(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  mov    -0x1c(%rbp),%edx
  mov    -0x38(%rbp),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
L140:
  mov    $0x0,%eax
L222:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D20
type_guessed: string

tool: D20: spice://

assistant: ```c
int listen_parse(const char *listen_spec, char **addr, int *port_start, int *port_end) {
  int leading = 0;
  int trailing = 0;
  int hyphen = 0;
  const char *p;
  int len;
  *port_start = *port_end = -1;
  *addr = NULL;
  if (strlen(listen_spec) > strlen("spice://"))
    if (memcmp(listen_spec, "spice://", strlen("spice://")) == 0)
      listen_spec += strlen("spice://");
  p = listen_spec + strlen(listen_spec) - 1;
  for (; p >= listen_spec && *p; p--) {
    if (isspace(*p) && !hyphen && !trailing)
      continue;
    if (*p != '-' && !isdigit(*p))
      break;
    if (*p == '-') {
      if (hyphen)
        return 8;
      hyphen++;
      if (trailing > 0)
        *port_end = strtol(p + 1, NULL, 0);
      continue;
    }
    if (hyphen)
      leading++;
    else
      trailing++;
  }
  if (leading && hyphen)
    *port_start = strtol(p + 1, NULL, 0);
  if (trailing && !hyphen)
    *port_end = strtol(p + 1, NULL, 0);
  if (hyphen && (!leading || !trailing))
    return 8;
  if (leading || trailing)
    if (p > listen_spec && *p != ':')
      return 8;
  if (p > listen_spec && *p == ':')
    p--;
  len = p - listen_spec + 1;
  if (len > 0) {
    *addr = calloc(1, len + 1);
    memcpy(*addr, listen_spec, len);
  }
  return 0;
}
```