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

```asm
<cmdshell_init_write>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x430,%rsp
  mov    %rdi,-0x418(%rbp)
  mov    %rsi,-0x420(%rbp)
  mov    %rdx,-0x428(%rbp)
  mov    %rcx,-0x430(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movb   $0x0,-0x3f0(%rbp)
  movl   $0x0,-0x404(%rbp)
  mov    -0x404(%rbp),%eax
  mov    %eax,-0x408(%rbp)
  lea    -0x3f0(%rbp),%rax
  mov    $0x3e8,%edx
  mov    %rax,%rsi
  lea    D130(%rip),%rax
  mov    %rax,%rdi
  call   <input_line@plt>
  mov    %eax,-0x400(%rbp)
  cmpl   $0x0,-0x400(%rbp)
  je     L83
  lea    -0x3f0(%rbp),%rax
  mov    %rax,%rdi
  call   <str_isspace@plt>
  test   %rax,%rax
  je     L224
L83:
  mov    -0x418(%rbp),%rax
  mov    %rax,%rsi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L6
L224:
  lea    -0x3f0(%rbp),%rdx
  mov    -0x418(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x3f0(%rbp),%rax
  mov    %rax,%rsi
  lea    D89(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L6:
  movb   $0x0,-0x3f0(%rbp)
  lea    -0x3f0(%rbp),%rax
  mov    $0x3e8,%edx
  mov    %rax,%rsi
  lea    D109(%rip),%rax
  mov    %rax,%rdi
  call   <input_line@plt>
  mov    %eax,-0x400(%rbp)
  cmpl   $0x0,-0x400(%rbp)
  je     L220
  lea    -0x3f0(%rbp),%rax
  mov    %rax,%rdi
  call   <str_isspace@plt>
  test   %rax,%rax
  je     L65
L220:
  mov    -0x420(%rbp),%rax
  mov    %rax,%rsi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L145
L65:
  lea    -0x3f0(%rbp),%rdx
  mov    -0x420(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x3f0(%rbp),%rax
  mov    %rax,%rsi
  lea    D89(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L145:
  movb   $0x0,-0x3f0(%rbp)
  lea    -0x3f0(%rbp),%rax
  mov    $0x3e8,%edx
  mov    %rax,%rsi
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  call   <input_line@plt>
  mov    %eax,-0x400(%rbp)
  cmpl   $0x0,-0x400(%rbp)
  je     L235
  lea    -0x3f0(%rbp),%rax
  mov    %rax,%rdi
  call   <str_isspace@plt>
  test   %rax,%rax
  je     L32
L235:
  mov    -0x428(%rbp),%rax
  mov    %rax,%rsi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L72
L32:
  lea    -0x3f0(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    $0xf,%eax
  jle    L158
  movl   $0x1,-0x408(%rbp)
  lea    -0x3f0(%rbp),%rax
  mov    $0xf,%edx
  mov    %rax,%rsi
  lea    D70(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L72
L158:
  lea    -0x3f0(%rbp),%rax
  mov    %rax,%rdi
  call   <str_isdigit@plt>
  test   %eax,%eax
  jne    L4
  movl   $0x1,-0x408(%rbp)
  lea    -0x3f0(%rbp),%rax
  mov    %rax,%rsi
  lea    D61(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L72
L4:
  lea    -0x3f8(%rbp),%rdx
  lea    -0x3f0(%rbp),%rax
  lea    D194(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  jne    L50
  lea    -0x3f0(%rbp),%rdx
  mov    -0x428(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x3f0(%rbp),%rax
  mov    %rax,%rsi
  lea    D89(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L72
L50:
  movl   $0x1,-0x408(%rbp)
  lea    -0x3f0(%rbp),%rax
  mov    %rax,%rsi
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L72:
  movb   $0x0,-0x3f0(%rbp)
  lea    -0x3f0(%rbp),%rax
  mov    $0x3e8,%edx
  mov    %rax,%rsi
  lea    D161(%rip),%rax
  mov    %rax,%rdi
  call   <input_line@plt>
  mov    %eax,-0x400(%rbp)
  cmpl   $0x0,-0x400(%rbp)
  je     L26
  lea    -0x3f0(%rbp),%rax
  mov    %rax,%rdi
  call   <str_isspace@plt>
  test   %rax,%rax
  je     L109
L26:
  mov    -0x430(%rbp),%rax
  mov    %rax,%rsi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L30
L109:
  lea    -0x3f0(%rbp),%rax
  lea    D88(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L251
  lea    -0x3f0(%rbp),%rdx
  mov    -0x430(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x3f0(%rbp),%rax
  mov    %rax,%rsi
  lea    D89(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L30
L251:
  lea    -0x3f0(%rbp),%rax
  lea    D34(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L164
  lea    -0x3f0(%rbp),%rdx
  mov    -0x430(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x3f0(%rbp),%rax
  mov    %rax,%rsi
  lea    D89(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L30
L164:
  movl   $0x1,-0x404(%rbp)
  lea    -0x3f0(%rbp),%rax
  mov    %rax,%rsi
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L30:
  cmpl   $0x0,-0x408(%rbp)
  jne    L53
  cmpl   $0x0,-0x404(%rbp)
  jne    L53
  mov    $0x1,%eax
  jmp    L168
L53:
  mov    $0x0,%eax
L168:
  mov    %eax,-0x3fc(%rbp)
  mov    -0x3fc(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L154
  call   <__stack_chk_fail@plt>
L154:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D130
type_guessed: string
name: parse_data
arguments: data_tag: D47
type_guessed: string
name: parse_data
arguments: data_tag: D89
type_guessed: string
name: parse_data
arguments: data_tag: D109
type_guessed: string
name: parse_data
arguments: data_tag: D23
type_guessed: string
name: parse_data
arguments: data_tag: D70
type_guessed: string
name: parse_data
arguments: data_tag: D61
type_guessed: string
name: parse_data
arguments: data_tag: D194
type_guessed: string
name: parse_data
arguments: data_tag: D21
type_guessed: string
name: parse_data
arguments: data_tag: D161
type_guessed: string
name: parse_data
arguments: data_tag: D88
type_guessed: string
name: parse_data
arguments: data_tag: D34
type_guessed: string
name: parse_data
arguments: data_tag: D13
type_guessed: string

tool: D130: Input source (path): 

tool: D47: Ok unchanged "%s"


tool: D89: Ok "%s"


tool: D109: Input destination (path): 

tool: D23: Input offset (number >= 0): 

tool: D70: Fail "%s", should be between 1 and %d digits


tool: D61: Fail "%s", should be an unsigned number


tool: D194: %lf

tool: D21: Fail "%s", should be a number


tool: D161: Input cipher (xor, none): 

tool: D88: xor

tool: D34: none

tool: D13: Fail "%s", unknown type


assistant: ```c
int cmdshell_init_write(char src[], char dst[], char offset[], char cipher[]) {
  char input[1000];
  int retval, retin;
  int f_bad_offset, f_bad_cipher;
  *input = '\0';
  f_bad_offset = f_bad_cipher = 0;
  retin = input_line("Input source (path): ", input, sizeof input);
  if (!retin || str_isspace(input)) {
    printf("Ok unchanged \"%s\"\n", src);
  } else {
    strcpy(src, input);
    printf("Ok \"%s\"\n", input);
  }
  *input = '\0';
  retin = input_line("Input destination (path): ", input, sizeof input);
  if (!retin || str_isspace(input)) {
    printf("Ok unchanged \"%s\"\n", dst);
  } else {
    strcpy(dst, input);
    printf("Ok \"%s\"\n", input);
  }
  *input = '\0';
  retin = input_line("Input offset (number >= 0): ", input, sizeof input);
  if (!retin || str_isspace(input)) {
    printf("Ok unchanged \"%s\"\n", offset);
  } else {
    double tmp;
    if (strlen(input) > 15) {
      f_bad_offset = 1;
      printf("Fail \"%s\", should be between 1 and %d digits\n", input, 15);
    } else if (!str_isdigit(input)) {
      f_bad_offset = 1;
      printf("Fail \"%s\", should be an unsigned number\n", input);
    } else if (sscanf(input, "%lf", &tmp) == 1) {
      strcpy(offset, input);
      printf("Ok \"%s\"\n", input);
    } else {
      f_bad_offset = 1;
      printf("Fail \"%s\", should be a number\n", input);
    }
  }
  *input = '\0';
  retin = input_line("Input cipher (xor, none): ", input, sizeof input);
  if (!retin || str_isspace(input)) {
    printf("Ok unchanged \"%s\"\n", cipher);
  } else {
    if (strcmp(input, "xor") == 0) {
      strcpy(cipher, input);
      printf("Ok \"%s\"\n", input);
    } else if (strcmp(input, "none") == 0) {
      strcpy(cipher, input);
      printf("Ok \"%s\"\n", input);
    } else {
      f_bad_cipher = 1;
      printf("Fail \"%s\", unknown type\n", input);
    }
  }
  retval = !(f_bad_offset || f_bad_cipher);
  return retval;
}
```