user: 请从给定的汇编指令推导出C源代码：

```asm
<getstring>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x240,%rsp
  mov    %rdi,-0x238(%rbp)
  mov    %rsi,-0x240(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x228(%rbp)
  movl   $0x0,-0x224(%rbp)
  jmp    L81
L153:
  addq   $0x1,-0x238(%rbp)
L81:
  mov    -0x238(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L80
  mov    -0x238(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x28,%al
  jne    L153
L80:
  mov    -0x238(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L125
  mov    -0x240(%rbp),%rdx
  lea    -0x210(%rbp),%rax
  mov    $0x200,%esi
  mov    %rax,%rdi
  call   <myfgets@plt>
  test   %rax,%rax
  jne    L88
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <strdup@plt>
  jmp    L144
L88:
  lea    -0x210(%rbp),%rax
  mov    %rax,-0x238(%rbp)
  jmp    L81
L125:
  nop
  addq   $0x1,-0x238(%rbp)
  movq   $0x0,-0x218(%rbp)
  movl   $0x1,-0x224(%rbp)
L45:
  mov    -0x238(%rbp),%rax
  mov    %rax,-0x220(%rbp)
  jmp    L58
L141:
  mov    -0x220(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L38
  mov    -0x220(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x28,%al
  je     L190
  mov    -0x220(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x29,%al
  jne    L38
L190:
  addq   $0x1,-0x220(%rbp)
  jmp    L97
L38:
  mov    -0x220(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x28,%al
  jne    L158
  addl   $0x1,-0x228(%rbp)
  jmp    L97
L158:
  mov    -0x220(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x29,%al
  jne    L97
  subl   $0x1,-0x228(%rbp)
L97:
  addq   $0x1,-0x220(%rbp)
L58:
  mov    -0x220(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L183
  mov    -0x220(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x29,%al
  jne    L141
  cmpl   $0x0,-0x228(%rbp)
  jg     L141
L183:
  mov    -0x220(%rbp),%rax
  cmp    -0x238(%rbp),%rax
  jbe    L120
  cmpq   $0x0,-0x218(%rbp)
  jne    L99
  mov    -0x220(%rbp),%rax
  sub    -0x238(%rbp),%rax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x218(%rbp)
  jmp    L167
L99:
  mov    -0x224(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x220(%rbp),%rax
  add    %rdx,%rax
  sub    -0x238(%rbp),%rax
  mov    %eax,%edx
  mov    -0x218(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    %rax,-0x218(%rbp)
L167:
  mov    -0x220(%rbp),%rax
  sub    -0x238(%rbp),%rax
  mov    %eax,%edx
  mov    -0x224(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rcx
  mov    -0x218(%rbp),%rax
  add    %rax,%rcx
  mov    -0x238(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <strncpy@plt>
  mov    -0x220(%rbp),%rax
  sub    -0x238(%rbp),%rax
  mov    %eax,%edx
  mov    -0x224(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x224(%rbp)
  mov    -0x224(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x218(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
L120:
  mov    -0x220(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L147
  mov    -0x240(%rbp),%rdx
  lea    -0x210(%rbp),%rax
  mov    $0x200,%esi
  mov    %rax,%rdi
  call   <myfgets@plt>
  test   %rax,%rax
  jne    L0
  mov    -0x218(%rbp),%rax
  jmp    L144
L0:
  lea    -0x210(%rbp),%rax
  mov    %rax,-0x238(%rbp)
  jmp    L45
L147:
  nop
  mov    -0x218(%rbp),%rax
L144:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L124
  call   <__stack_chk_fail@plt>
L124:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D2
type_infered: string

tool: 

assistant: ```c
char *getstring(char *start, FILE *in) {
  char *end, *ret;
  int parencnt = 0, len = 0;
  char buffer[512];
  for (;;) {
    while (*start != '\0' && *start != '(')
      ++start;
    if (*start == '\0') {
      if (myfgets(buffer, sizeof(buffer), in) == NULL)
        return (strdup(""));
      start = buffer;
    } else
      break;
  }
  ++start;
  ret = NULL;
  len = 1;
  for (;;) {
    for (end = start; *end != '\0' && (*end != ')' || parencnt > 0); ++end) {
      if (*end == '\\' && (end[1] == '(' || end[1] == ')'))
        ++end;
      else if (*end == '(')
        ++parencnt;
      else if (*end == ')')
        --parencnt;
    }
    if (end > start) {
      if (ret == NULL)
        ret = malloc(end - start + 1);
      else
        ret = realloc(ret, len + end - start);
      strncpy(ret + len - 1, start, end - start);
      len += end - start;
      ret[len - 1] = '\0';
    }
    if (*end != '\0')
      break;
    if (myfgets(buffer, sizeof(buffer), in) == NULL)
      return (ret);
    start = buffer;
  }
  return (ret);
}
```