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

```asm
<generate_control_file>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x830,%rsp
  mov    %edi,-0x824(%rbp)
  mov    %rsi,-0x830(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x810(%rbp)
  movq   $0x0,-0x808(%rbp)
  lea    -0x800(%rbp),%rdx
  mov    $0x0,%eax
  mov    $0x7e,%ecx
  mov    %rdx,%rdi
  rep stos %rax,%es:(%rdi)
  movq   $0x0,-0x410(%rbp)
  movq   $0x0,-0x408(%rbp)
  lea    -0x400(%rbp),%rdx
  mov    $0x0,%eax
  mov    $0x7e,%ecx
  mov    %rdx,%rdi
  rep stos %rax,%es:(%rdi)
  mov    -0x830(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  lea    -0x810(%rbp),%rax
  lea    D37(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  lea    -0x810(%rbp),%rax
  lea    D8(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x818(%rbp)
  cmpq   $0x0,-0x818(%rbp)
  jne    L0
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0xfffffffe,%edi
  call   <exit@plt>
L0:
  mov    -0x830(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rdx
  lea    -0x410(%rbp),%rax
  lea    D79(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    -0x818(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fputs@plt>
  mov    -0x830(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%rdx
  lea    -0x410(%rbp),%rax
  lea    D34(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    -0x818(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fputs@plt>
  mov    -0x830(%rbp),%rax
  add    $0x20,%rax
  mov    (%rax),%rdx
  lea    -0x410(%rbp),%rax
  lea    D16(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    -0x818(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fputs@plt>
  lea    -0x410(%rbp),%rax
  lea    D59(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    -0x818(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fputs@plt>
  mov    -0x830(%rbp),%rax
  add    $0x30,%rax
  mov    (%rax),%rdx
  lea    -0x410(%rbp),%rax
  lea    D98(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    -0x818(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fputs@plt>
  mov    -0x830(%rbp),%rax
  add    $0x38,%rax
  mov    (%rax),%rdx
  lea    -0x410(%rbp),%rax
  lea    D95(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    -0x818(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fputs@plt>
  mov    -0x830(%rbp),%rax
  add    $0x40,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,%edx
  lea    -0x410(%rbp),%rax
  lea    D57(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    -0x818(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fputs@plt>
  mov    -0x830(%rbp),%rax
  add    $0x48,%rax
  mov    (%rax),%rdx
  lea    -0x410(%rbp),%rax
  lea    D36(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    -0x818(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fputs@plt>
  mov    -0x830(%rbp),%rax
  add    $0x58,%rax
  mov    (%rax),%rcx
  mov    -0x830(%rbp),%rax
  add    $0x50,%rax
  mov    (%rax),%rdx
  lea    -0x410(%rbp),%rax
  lea    D44(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  lea    -0x410(%rbp),%rax
  mov    %rax,%rdi
  call   <fix_description@plt>
  mov    -0x818(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fputs@plt>
  mov    -0x818(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L7
  call   <__stack_chk_fail@plt>
L7:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D37
data_type: string
name: extract_symbolic_data
arguments: data_label: D8
data_type: string
name: extract_symbolic_data
arguments: data_label: D28
data_type: string
name: extract_symbolic_data
arguments: data_label: D79
data_type: string
name: extract_symbolic_data
arguments: data_label: D34
data_type: string
name: extract_symbolic_data
arguments: data_label: D16
data_type: string
name: extract_symbolic_data
arguments: data_label: D59
data_type: string
name: extract_symbolic_data
arguments: data_label: D98
data_type: string
name: extract_symbolic_data
arguments: data_label: D95
data_type: string
name: extract_symbolic_data
arguments: data_label: D57
data_type: string
name: extract_symbolic_data
arguments: data_label: D36
data_type: string
name: extract_symbolic_data
arguments: data_label: D44
data_type: string

tool: D37: %s/control

tool: D8: wb

tool: D28: file open error


tool: D79: Package: %s


tool: D34: Version: %s


tool: D16: Section: %s


tool: D59: Priority: optional


tool: D98: Architecture: %s


tool: D95: Depends: %s


tool: D57: Installed-Size: %d


tool: D36: Maintainer: %s


tool: D44: Description: %s
%s


assistant: ```c
void generate_control_file(int argc, char *argv[]) {
  FILE *fp;
  char fn[1024] = {0};
  char line[1024] = {0};
  sprintf(fn, "%s/control", argv[1]);
  fp = fopen(fn, "wb");
  if (!fp) {
    printf("file open error\n");
    exit(-2);
  }
  sprintf(line, "Package: %s\n", argv[2]);
  fputs(line, fp);
  sprintf(line, "Version: %s\n", argv[3]);
  fputs(line, fp);
  sprintf(line, "Section: %s\n", argv[4]);
  fputs(line, fp);
  sprintf(line, "Priority: optional\n");
  fputs(line, fp);
  sprintf(line, "Architecture: %s\n", argv[6]);
  fputs(line, fp);
  sprintf(line, "Depends: %s\n", argv[7]);
  fputs(line, fp);
  sprintf(line, "Installed-Size: %d\n", atoi(argv[8]));
  fputs(line, fp);
  sprintf(line, "Maintainer: %s\n", argv[9]);
  fputs(line, fp);
  sprintf(line, "Description: %s\n%s\n", argv[10], argv[11]);
  fix_description(line);
  fputs(line, fp);
  fclose(fp);
}
```