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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0xc000(%rsp),%r11
L38:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L38
  sub    $0x778,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xc768(%rsp)
  xor    %eax,%eax
  lea    D143(%rip),%rsi
  lea    D81(%rip),%rdi
  call   <fopen@plt>
  test   %rax,%rax
  je     L51
  mov    %rax,%r13
  lea    0x410(%rsp),%rdi
  mov    %rax,%rdx
  mov    $0xc350,%esi
  call   <fgets@plt>
  lea    D104(%rip),%r12
  lea    D94(%rip),%r15
  lea    D87(%rip),%r14
  jmp    L34
L51:
  lea    D105(%rip),%rdi
  call   <puts@plt>
  mov    $0x2,%eax
L19:
  mov    0xc768(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L62
  add    $0xc778,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L63:
  lea    D7(%rip),%rdi
  call   <puts@plt>
L34:
  lea    0x410(%rsp),%rdi
  mov    %r13,%rdx
  mov    $0xc350,%esi
  call   <fgets@plt>
  test   %rax,%rax
  je     L19
  lea    0x18(%rsp),%rbp
  lea    0x410(%rsp),%rdi
  mov    %rbp,%rdx
  mov    %r12,%rsi
  call   <strtok_r@plt>
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    $0x0,%edi
  call   <strtok_r@plt>
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    $0x0,%edi
  call   <strtok_r@plt>
  mov    %rax,%rbx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    $0x0,%edi
  call   <strtok_r@plt>
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    $0x0,%edi
  call   <strtok_r@plt>
  mov    %rax,%rbp
  mov    %rbx,%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L63
  lea    D131(%rip),%rdi
  call   <puts@plt>
  lea    0x20(%rsp),%rbx
  mov    %rbp,%rdx
  lea    D10(%rip),%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <check_file@plt>
  mov    %eax,0x8(%rsp)
  mov    %rbp,%rdx
  lea    D146(%rip),%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <check_file@plt>
  mov    %eax,0xc(%rsp)
  mov    %rbp,%rdx
  lea    D159(%rip),%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <check_file@plt>
  mov    %rbp,%rdx
  lea    D140(%rip),%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <check_file@plt>
  mov    %rbp,%rdx
  lea    D73(%rip),%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <check_file@plt>
  mov    %rbp,%rdx
  lea    D114(%rip),%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <check_file@plt>
  mov    %rbp,%rdx
  lea    D52(%rip),%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <check_file@plt>
  mov    %rbp,%rdx
  lea    D43(%rip),%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <check_file@plt>
  cmpl   $0x1,0x8(%rsp)
  jne    L34
  cmpl   $0x0,0xc(%rsp)
  jne    L34
  mov    %rbp,%rdi
  call   <check_logs@plt>
  jmp    L34
L62:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D143
type: string
name: disassemble_data
arguments: data_tag: D81
type: string
name: disassemble_data
arguments: data_tag: D104
type: string
name: disassemble_data
arguments: data_tag: D94
type: string
name: disassemble_data
arguments: data_tag: D87
type: string
name: disassemble_data
arguments: data_tag: D105
type: string
name: disassemble_data
arguments: data_tag: D7
type: string
name: disassemble_data
arguments: data_tag: D131
type: string
name: disassemble_data
arguments: data_tag: D10
type: string
name: disassemble_data
arguments: data_tag: D146
type: string
name: disassemble_data
arguments: data_tag: D159
type: string
name: disassemble_data
arguments: data_tag: D140
type: string
name: disassemble_data
arguments: data_tag: D73
type: string
name: disassemble_data
arguments: data_tag: D114
type: string
name: disassemble_data
arguments: data_tag: D52
type: string
name: disassemble_data
arguments: data_tag: D43
type: string

tool: D143: r

tool: D81: /hihg/smoke/pipelines/vcf

tool: D104: 	


tool: D94: status is %s


tool: D87: 0

tool: D105: The current pipeline runs list could not be opened.  Exiting 

tool: D7: we have a finished pipeline run

tool: D131: we have a 0 status running pipeline job

tool: D10: %s/Variants/logs/.started

tool: D146: %s/Variants/logs/.finished

tool: D159: %s/Positions/logs/.started

tool: D140: %s/Positions/logs/.finished

tool: D73: %s/VCF_files/logs/.started

tool: D114: %s/VCF_files/logs/.finished

tool: D52: %s/final/logs/.started

tool: D43: %s/final/logs/.finished

assistant: ```c
int main(int argc, char *argv[]) {
  DIR *dir;
  struct dirent *ent;
  char *filename;
  char *filelist;
  char *status;
  char *working_dir;
  char *username;
  char *ptype;
  FILE *logp;
  FILE *filelistfp;
  FILE *jobptr;
  FILE *outptr;
  char *end_str;
  char description[100];
  char sample[50];
  char read1[1000];
  char read2[1000];
  char current_command[1000];
  char dir_trunk[1000];
  char filestring[50000];
  char current_directory[1000];
  char rmdup_job_file[1000];
  char snplist_job_file[1000];
  char sys_command[1000];
  char run_dir[1000];
  int i;
  int awkvar_started;
  int awkvar_finished;
  int snplist_started;
  int snplist_finished;
  int extract_started;
  int extract_finished;
  int merge_started;
  int merge_finished;
  int check_status;
  i = 0;
  filelistfp = fopen("/hihg/smoke/pipelines/vcf", "r");
  if (filelistfp == NULL) {
    printf("The current pipeline runs list could not be opened.  Exiting \n");
    return 2;
  }
  fgets(filestring, 50000, filelistfp);
  while (fgets(filestring, 50000, filelistfp) != NULL) {
    username = strtok_r(filestring, "\t\n", &end_str);
    ptype = strtok_r(NULL, "\t\n", &end_str);
    status = strtok_r(NULL, "\t\n", &end_str);
    filelist = strtok_r(NULL, "\t\n", &end_str);
    working_dir = strtok_r(NULL, "\t\n", &end_str);
    printf("status is %s\n", status);
    if (strcmp(status, "0") == 0) {
      printf("we have a 0 status running pipeline job\n");
      sprintf(current_directory, "%s/Variants/logs/.started", working_dir);
      awkvar_started = check_file(current_directory);
      sprintf(current_directory, "%s/Variants/logs/.finished", working_dir);
      awkvar_finished = check_file(current_directory);
      sprintf(current_directory, "%s/Positions/logs/.started", working_dir);
      snplist_started = check_file(current_directory);
      sprintf(current_directory, "%s/Positions/logs/.finished", working_dir);
      snplist_finished = check_file(current_directory);
      sprintf(current_directory, "%s/VCF_files/logs/.started", working_dir);
      extract_started = check_file(current_directory);
      sprintf(current_directory, "%s/VCF_files/logs/.finished", working_dir);
      extract_finished = check_file(current_directory);
      sprintf(current_directory, "%s/final/logs/.started", working_dir);
      merge_started = check_file(current_directory);
      sprintf(current_directory, "%s/final/logs/.finished", working_dir);
      merge_finished = check_file(current_directory);
      if (awkvar_started == 1 && awkvar_finished == 0) {
        check_status = check_logs(working_dir);
      }
    } else {
      printf("we have a finished pipeline run\n");
    }
  }
  return 0;
}
```