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

```asm
<text2code>:
  endbr64
  push   %r15
  mov    %rdi,%r8
  mov    $0x10,%ecx
  mov    %rdx,%r15
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  lea    D3(%rip),%rsi
  push   %rbx
  lea    D69(%rip),%rbx
  sub    $0xa8,%rsp
  mov    %rdx,(%rsp)
  lea    0x10(%rsp),%r13
  mov    %r13,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  rep stos %rax,%es:(%rdi)
  mov    %r8,%rdi
  call   <fopen@plt>
  lea    D68(%rip),%rsi
  mov    %rbp,%rdi
  mov    %rax,%r12
  call   <fopen@plt>
  mov    %r15,%rdi
  mov    %rax,%rbp
  call   <count_lines@plt>
  lea    D37(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,0xc(%rsp)
  mov    %eax,%edx
  xor    %eax,%eax
  call   <fprintf@plt>
  jmp    L47
  nopl   0x0(%rax)
L108:
  mov    %r15,%rcx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
L136:
  cmp    $0x7f,%r14
  je     L116
L26:
  add    $0x1,%r14
  sub    $0xffffffffffffff80,%r15
L47:
  cmpb   $0x0,(%r15)
  je     L136
  movsbl %r14b,%edx
  cmp    $0x20,%r14
  je     L18
  cmp    $0xa,%r14b
  jne    L108
  xor    %eax,%eax
  mov    %r15,%rdx
  lea    D56(%rip),%rsi
  mov    %rbp,%rdi
  call   <fprintf@plt>
  cmp    $0x7f,%r14
  jne    L26
  nopw   0x0(%rax,%rax,1)
L116:
  mov    %r12,%rdi
  call   <feof@plt>
  test   %eax,%eax
  jne    L71
L148:
  mov    %r12,%rdi
  call   <fgetc@plt>
  test   %al,%al
  jns    L114
  mov    %r13,%rdi
  call   <strlen@plt>
  cmp    $0x7,%eax
  jle    L116
L40:
  mov    %r13,%rdi
  call   <bin2dec@plt>
  mov    %rbp,%rsi
  movzbl %al,%edi
  call   <fputc@plt>
  mov    %r13,%rdi
  call   <move_code@plt>
  mov    %r12,%rdi
  call   <feof@plt>
  test   %eax,%eax
  je     L148
L71:
  mov    %r13,%rdi
  call   <strlen@plt>
  movslq %eax,%r14
  test   %r14,%r14
  jne    L39
L24:
  xor    %edx,%edx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <fseek@plt>
  mov    0xc(%rsp),%ecx
  mov    %r14,%rdx
  mov    %rbp,%rdi
  lea    D12(%rip),%rsi
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %r12,%rdi
  call   <fclose@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    0x98(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L129
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L114:
  mov    (%rsp),%rdi
  movsbl %al,%edx
  mov    %r13,%rsi
  call   <codetext@plt>
  mov    %r13,%rdi
  call   <strlen@plt>
  cmp    $0x7,%eax
  jle    L116
  jmp    L40
  nopl   (%rax)
L18:
  mov    %r15,%rdx
  lea    D44(%rip),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
  jmp    L26
L39:
  mov    %r13,%rdi
  call   <final_num@plt>
  mov    %rbp,%rsi
  movzbl %al,%edi
  call   <fputc@plt>
  jmp    L24
L129:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D3
type_infered: string
name: read_data
arguments: tag: D69
type_infered: string
name: read_data
arguments: tag: D68
type_infered: string
name: read_data
arguments: tag: D37
type_infered: string
name: read_data
arguments: tag: D56
type_infered: string
name: read_data
arguments: tag: D12
type_infered: string
name: read_data
arguments: tag: D44
type_infered: string

tool: D3: r

tool: D69: %c - %s


tool: D68: w

tool: D37: %d

 

tool: D56: '\n' - %s


tool: D12: %lu
%d


tool: D44: ' ' - %s


assistant: ```c
void text2code(const char *input_name, const char *output_name, char code_arr[128][128]) {
  char code[128];
  for (int i = 0; i < 128; i++)
    code[i] = '\0';
  FILE *input;
  input = fopen(input_name, "r");
  FILE *output;
  output = fopen(output_name, "w");
  int lines = count_lines(code_arr);
  fprintf(output, "%d\n\n ", lines);
  for (int i = 0; i < 128; i++)
    if (code_arr[i][0] != '\0') {
      if ((char)i == ' ') {
        fprintf(output, "' ' - %s\n", code_arr[i]);
        continue;
      }
      if ((char)i == '\n') {
        fprintf(output, "'\\n' - %s\n", code_arr[i]);
        continue;
      }
      fprintf(output, "%c - %s\n", (char)i, code_arr[i]);
    }
  char sign;
  while (!feof(input)) {
    sign = fgetc(input);
    if ((int)sign >= 0)
      codetext(code_arr, code, sign);
    if (strlen(code) >= 8) {
      int coded = bin2dec(code);
      unsigned char out_sign = coded;
      fprintf(output, "%c", out_sign);
      move_code(code);
    }
  }
  unsigned long int while_eof = strlen(code);
  if (while_eof > 0) {
    int coded = final_num(code);
    unsigned char out_sign = coded;
    fprintf(output, "%c", out_sign);
  }
  fseek(output, 0, 0);
  fprintf(output, "%lu\n%d\n", while_eof, lines);
  fclose(input);
  fclose(output);
}
```