user: What is the c source code of the assembly code below?

```asm
<get_string>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %edx,-0x40(%rbp)
  mov    %ecx,-0x44(%rbp)
  movl   $0x0,-0x2c(%rbp)
  movl   $0x0,-0x30(%rbp)
  mov    -0x40(%rbp),%edx
  mov    -0x3c(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <move@plt>
  mov    -0x44(%rbp),%ebx
  jmp    L216
L251:
  mov    $0x20,%edi
  mov    $0x0,%eax
  call   <addch@plt>
  sub    $0x1,%ebx
L216:
  test   %ebx,%ebx
  jg     L251
  mov    -0x40(%rbp),%edx
  mov    -0x3c(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <move@plt>
  mov    -0x40(%rbp),%r13d
  mov    -0x40(%rbp),%edx
  mov    -0x44(%rbp),%eax
  add    %edx,%eax
  lea    -0x1(%rax),%r12d
  cmp    $0x4f,%r12d
  jle    L225
  mov    $0x50,%eax
  sub    -0x40(%rbp),%eax
  mov    %eax,-0x44(%rbp)
  mov    $0x4f,%r12d
L225:
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x28(%rbp)
L16:
  mov    $0x0,%eax
  call   <inkey@plt>
  mov    %eax,%ebx
  cmp    $0x7f,%ebx
  je     L166
  cmp    $0x7f,%ebx
  jg     L82
  cmp    $0x1b,%ebx
  je     L245
  cmp    $0x1b,%ebx
  jg     L82
  cmp    $0xd,%ebx
  je     L232
  cmp    $0xd,%ebx
  jg     L82
  cmp    $0x8,%ebx
  je     L166
  cmp    $0xa,%ebx
  je     L232
  jmp    L82
L245:
  movl   $0x1,-0x2c(%rbp)
  jmp    L6
L232:
  movl   $0x1,-0x30(%rbp)
  jmp    L6
L166:
  cmp    %r13d,-0x40(%rbp)
  jle    L117
  subl   $0x1,-0x40(%rbp)
  mov    -0x40(%rbp),%edx
  mov    -0x3c(%rbp),%eax
  mov    %eax,%esi
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <put_buffer@plt>
  mov    -0x40(%rbp),%edx
  mov    -0x3c(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <move_cursor@plt>
  subq   $0x1,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L117
L82:
  mov    %ebx,%edi
  call   <isprint@plt>
  test   %eax,%eax
  je     L212
  cmp    %r12d,-0x40(%rbp)
  jle    L71
L212:
  mov    $0x0,%eax
  call   <bell@plt>
  nop
  jmp    L6
L71:
  mov    %ebx,%eax
  movsbl %al,%edx
  mov    -0x40(%rbp),%ecx
  mov    -0x3c(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <mvaddch@plt>
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %ebx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x40(%rbp)
  jmp    L6
L117:
  nop
L6:
  cmpl   $0x0,-0x30(%rbp)
  jne    L3
  cmpl   $0x0,-0x2c(%rbp)
  je     L16
L3:
  cmpl   $0x0,-0x2c(%rbp)
  je     L85
  mov    $0x0,%eax
  jmp    L44
L135:
  subq   $0x1,-0x28(%rbp)
L85:
  mov    -0x28(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jbe    L105
  mov    -0x28(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L135
L105:
  mov    -0x28(%rbp),%rax
  movb   $0x0,(%rax)
  mov    $0x1,%eax
L44:
  add    $0x38,%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D3
type_guessed: string

tool: D3:  

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);
}
```