user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<get_string>:
  endbr64
  push   %r15
  xor    %eax,%eax
  push   %r14
  mov    %esi,%r14d
  mov    %edx,%esi
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %ecx,%r12d
  push   %rbp
  mov    %rdi,%rbp
  mov    %r14d,%edi
  push   %rbx
  sub    $0x18,%rsp
  call   <move@plt>
  test   %r12d,%r12d
  jle    L33
  mov    %r12d,%ebx
  nopw   0x0(%rax,%rax,1)
L28:
  xor    %eax,%eax
  mov    $0x20,%edi
  call   <addch@plt>
  sub    $0x1,%ebx
  jne    L28
L33:
  xor    %eax,%eax
  mov    %r13d,%esi
  mov    %r14d,%edi
  mov    %rbp,%rbx
  call   <move@plt>
  lea    -0x1(%r13,%r12,1),%r15d
  mov    $0x4f,%eax
  mov    %r13d,%r12d
  cmp    %eax,%r15d
  cmovg  %eax,%r15d
L83:
  xor    %eax,%eax
  call   <inkey@plt>
  mov    %eax,%ecx
  cmp    $0x1b,%eax
  je     L25
L179:
  jg     L32
  cmp    $0xa,%eax
  je     L84
  cmp    $0xd,%eax
  jne    L52
L84:
  cmp    %rbp,%rbx
  ja     L49
  jmp    L37
  cs nopw 0x0(%rax,%rax,1)
L17:
  sub    $0x1,%rbx
  cmp    %rbx,%rbp
  je     L37
L49:
  cmpb   $0x20,-0x1(%rbx)
  je     L17
L37:
  movb   $0x0,(%rbx)
  add    $0x18,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L32:
  cmp    $0x7f,%eax
  jne    L97
L85:
  cmp    %r13d,%r12d
  jle    L83
  sub    $0x1,%r12d
  mov    %r14d,%esi
  lea    D5(%rip),%rdi
  xor    %eax,%eax
  mov    %r12d,%edx
  sub    $0x1,%rbx
  call   <put_buffer@plt>
  mov    %r12d,%esi
  mov    %r14d,%edi
  xor    %eax,%eax
  call   <move_cursor@plt>
  movb   $0x0,(%rbx)
  xor    %eax,%eax
  call   <inkey@plt>
  mov    %eax,%ecx
  cmp    $0x1b,%eax
  jne    L179
L25:
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L52:
  cmp    $0x8,%eax
  je     L85
L97:
  mov    %ecx,%edi
  mov    %ecx,0xc(%rsp)
  call   <isprint@plt>
  cmp    %r15d,%r12d
  jg     L131
  test   %eax,%eax
  mov    0xc(%rsp),%ecx
  jne    L24
L131:
  xor    %eax,%eax
  call   <bell@plt>
  jmp    L83
  nopl   0x0(%rax)
L24:
  movsbl %cl,%edx
  mov    %r12d,%esi
  mov    %r14d,%edi
  xor    %eax,%eax
  mov    %ecx,0xc(%rsp)
  add    $0x1,%r12d
  add    $0x1,%rbx
  call   <mvaddch@plt>
  mov    0xc(%rsp),%ecx
  mov    %cl,-0x1(%rbx)
  jmp    L83
```

tool_calls: name: read_data
arguments: data_label: D5
type: string

tool: D5:  

assistant: ```c
int get_string(in_str, row, column, slen)
char *in_str;
int row, column, slen;
{
  register int start_col, end_col, i;
  char *p;
  int flag, aborted;
  aborted = 0;
  flag = 0;
  (void)move(row, column);
  for (i = slen; i > 0; i--)
    (void)addch(' ');
  (void)move(row, column);
  start_col = column;
  end_col = column + slen - 1;
  if (end_col > 79) {
    slen = 80 - column;
    end_col = 79;
  }
  p = in_str;
  do {
    i = inkey();
    switch (i) {
    case '\033':
      aborted = 1;
      break;
    case ('J' & 0x1F):
    case ('M' & 0x1F):
      flag = 1;
      break;
    case 0x7f:
    case ('H' & 0x1F):
      if (column > start_col) {
        column--;
        put_buffer(" ", row, column);
        move_cursor(row, column);
        *--p = '\0';
      }
      break;
    default:
      if (!isprint(i) || column > end_col)
        bell();
      else {
        mvaddch(row, column, (char)i);
        *p++ = i;
        column++;
      }
      break;
    }
  } while ((!flag) && (!aborted));
  if (aborted)
    return (0);
  while (p > in_str && p[-1] == ' ')
    p--;
  *p = '\0';
  return (1);
}
```