user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<at_recv>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x20(%rsp),%r14
  lea    0x18(%rsp),%r13
  movq   $0x0,0x18(%rsp)
  movq   $0x0,0x20(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L15:
  mov    %r12,%rdx
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <getline@plt>
  mov    %eax,%r15d
  cmp    $0xffffffff,%eax
  je     L73
  test   %r15d,%r15d
  je     L15
  mov    0x18(%rsp),%rsi
  movslq %r15d,%rax
  lea    -0x1(%rax),%rdi
  movzbl -0x1(%rsi,%rax,1),%edx
  cmp    $0xa,%dl
  je     L7
  cmp    $0xd,%dl
  je     L19
L173:
  add    $0x1,%r15d
L1:
  movb   $0x0,(%rsi,%rax,1)
  mov    0x18(%rsp),%rdi
  cmpb   $0x4f,(%rdi)
  jne    L183
  cmpb   $0x4b,0x1(%rdi)
  jne    L183
  cmpb   $0x0,0x2(%rdi)
  je     L136
  nopl   0x0(%rax)
L183:
  lea    D8(%rip),%rsi
  mov    %rdi,0x8(%rsp)
  call   <strcmp@plt>
  mov    0x8(%rsp),%rdi
  test   %eax,%eax
  je     L26
  mov    $0xa,%edx
  lea    D3(%rip),%rsi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L114
  mov    0x18(%rsp),%rdi
  mov    $0xa,%edx
  lea    D19(%rip),%rsi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L114
  test   %rbx,%rbx
  je     L103
  test   %rbp,%rbp
  je     L169
  movb   $0x20,-0x1(%rbx)
L169:
  mov    0x18(%rsp),%rsi
  mov    %rbx,%rdi
  mov    %r15d,%edx
  call   <memcpy@plt>
  movslq %r15d,%rcx
  add    %rcx,%rbx
L103:
  add    $0x1,%rbp
  jmp    L15
  nopw   0x0(%rax,%rax,1)
L7:
  sub    $0x1,%r15d
  je     L15
  movzbl -0x2(%rsi,%rax,1),%edx
  mov    %rdi,%rax
  cmp    $0xd,%dl
  jne    L173
L19:
  mov    %r15d,%eax
  sub    $0x1,%eax
  je     L15
  cltq
  jmp    L1
  xchg   %ax,%ax
L73:
  mov    0x18(%rsp),%rdi
L136:
  mov    %ebp,%r12d
L101:
  call   <free@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L90
  add    $0x38,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L114:
  mov    0x18(%rsp),%rdi
  mov    $0xffffffff,%r12d
  jmp    L101
  nopl   (%rax)
L26:
  mov    $0xffffffff,%r12d
  jmp    L101
L90:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D8
type: string
name: read_data
arguments: data_label: D3
type: string
name: read_data
arguments: data_label: D19
type: string

tool: D8: ERROR

tool: D3: +CME ERROR:

tool: D19: +CMS ERROR:

assistant: ```c
ssize_t at_recv(FILE *fp, char *dest) {
  char *line = NULL;
  size_t len = 0;
  size_t ret = 0;
  ssize_t read;
  while ((read = getline(&line, &len, fp)) != -1) {
    if (!read)
      continue;
    if ((line[read - 1] == '\n') && (--read == 0))
      continue;
    if ((line[read - 1] == '\r') && (--read == 0))
      continue;
    line[read++] = '\0';
    if (!strcmp(line, "OK"))
      break;
    if ((!strcmp(line, "ERROR")) || (!strncmp(line, "+CME ERROR:", 10)) || (!strncmp(line, "+CMS ERROR:", 10))) {
      ret = -1;
      break;
    }
    if (dest) {
      if (ret)
        dest[-1] = ' ';
      memcpy(dest, line, read);
      dest += read;
    }
    ret++;
  }
  free(line);
  return ret;
}
```