user: 请将以下的汇编代码转换成C语言代码：

```asm
<parse_reply>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  movl   $0xffffffff,-0x1c(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x14(%rbp)
  movl   $0x0,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rsi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L35:
  mov    -0x10(%rbp),%rax
  lea    D60(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strtok@plt>
  mov    %rax,-0x8(%rbp)
  movq   $0x0,-0x10(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L66
  mov    -0x28(%rbp),%rax
  movb   $0x0,(%rax)
  nop
  mov    $0x0,%eax
  jmp    L63
L66:
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    $0x1,%eax
  add    %eax,-0x18(%rbp)
  mov    -0x8(%rbp),%rax
  lea    D55(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L35
  mov    -0x10(%rbp),%rax
  lea    D60(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strtok@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    $0x1,%eax
  add    %eax,-0x18(%rbp)
  mov    -0x8(%rbp),%rax
  lea    D15(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L32
  movl   $0x4,-0x1c(%rbp)
L32:
  mov    -0x8(%rbp),%rax
  lea    D57(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L34
  movl   $0x1,-0x1c(%rbp)
L34:
  mov    -0x8(%rbp),%rax
  lea    D56(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L42
  movl   $0x3,-0x1c(%rbp)
L42:
  mov    -0x8(%rbp),%rax
  lea    D64(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L43
  movl   $0x2,-0x1c(%rbp)
L43:
  mov    -0x14(%rbp),%eax
  sub    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x18(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x28(%rbp),%rax
  add    %rax,%rcx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x1c(%rbp),%eax
L63:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D10
type_infered: string
name: disassemble_data
arguments: label: D60
type_infered: string
name: disassemble_data
arguments: label: D55
type_infered: string
name: disassemble_data
arguments: label: D15
type_infered: string
name: disassemble_data
arguments: label: D57
type_infered: string
name: disassemble_data
arguments: label: D56
type_infered: string
name: disassemble_data
arguments: label: D64
type_infered: string

tool: D10: Eingabe: %s


tool: D60:  


tool: D55: key

tool: D15: Escape

tool: D57: Down

tool: D56: Right

tool: D64: Enter

assistant: ```c
int parse_reply(char *input) {
  char *next = input;
  char *retstr;
  int retint = -1;
  int inputlen = strlen(input);
  int len = 0;
  printf("Eingabe: %s\n", input);
  while (1) {
    retstr = strtok(next, " \n");
    next = NULL;
    if (retstr == NULL) {
      input[0] = 0;
      break;
    }
    len += strlen(retstr) + 1;
    if (strcmp(retstr, "key") == 0) {
      retstr = strtok(next, " \n");
      len += strlen(retstr) + 1;
      if (strcmp(retstr, "Escape") == 0)
        retint = 4;
      if (strcmp(retstr, "Down") == 0)
        retint = 1;
      if (strcmp(retstr, "Right") == 0)
        retint = 3;
      if (strcmp(retstr, "Enter") == 0)
        retint = 2;
      input = strncpy(input, &input[len], inputlen - len + 1);
      return retint;
    }
  }
  return 0;
}
```