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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0xc000(%rsp),%r11
L80:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L80
  sub    $0x778,%rsp
  lea    D6(%rip),%rsi
  lea    D29(%rip),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0xc768(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  test   %rax,%rax
  je     L42
  lea    0x410(%rsp),%r13
  mov    %rax,%rdx
  mov    $0xc350,%esi
  mov    %rax,%r14
  mov    %r13,%rdi
  lea    D58(%rip),%rbx
  lea    D127(%rip),%r15
  call   <fgets@plt>
  cs nopw 0x0(%rax,%rax,1)
L39:
  mov    %r14,%rdx
  mov    $0xc350,%esi
  mov    %r13,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L46
  lea    0x18(%rsp),%r12
  mov    %rbx,%rsi
  mov    %r13,%rdi
  mov    %r12,%rdx
  call   <strtok_r@plt>
  mov    %r12,%rdx
  xor    %edi,%edi
  mov    %rbx,%rsi
  call   <strtok_r@plt>
  mov    %r12,%rdx
  xor    %edi,%edi
  mov    %rbx,%rsi
  call   <strtok_r@plt>
  mov    %r12,%rdx
  xor    %edi,%edi
  mov    %rbx,%rsi
  mov    %rax,%rbp
  call   <strtok_r@plt>
  mov    %r12,%rdx
  xor    %edi,%edi
  mov    %rbx,%rsi
  call   <strtok_r@plt>
  mov    %rbp,%rsi
  mov    %r15,%rdi
  mov    %rax,%r12
  xor    %eax,%eax
  call   <printf@plt>
  lea    D86(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L79
  lea    0x20(%rsp),%rbp
  lea    D12(%rip),%rdi
  call   <puts@plt>
  mov    %r12,%rdx
  lea    D63(%rip),%rsi
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <check_file@plt>
  mov    %r12,%rdx
  lea    D125(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,0x8(%rsp)
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <check_file@plt>
  mov    %r12,%rdx
  lea    D99(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,0xc(%rsp)
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <check_file@plt>
  mov    %r12,%rdx
  lea    D100(%rip),%rsi
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <check_file@plt>
  mov    %r12,%rdx
  lea    D20(%rip),%rsi
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <check_file@plt>
  mov    %r12,%rdx
  lea    D81(%rip),%rsi
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <check_file@plt>
  mov    %r12,%rdx
  lea    D11(%rip),%rsi
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <check_file@plt>
  mov    %r12,%rdx
  lea    D107(%rip),%rsi
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <check_file@plt>
  cmpl   $0x1,0x8(%rsp)
  jne    L39
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jne    L39
  mov    %r12,%rdi
  call   <check_logs@plt>
  jmp    L39
  nopl   0x0(%rax,%rax,1)
L79:
  lea    D111(%rip),%rdi
  call   <puts@plt>
  jmp    L39
L42:
  lea    D95(%rip),%rdi
  call   <puts@plt>
  mov    $0x2,%eax
  nopw   0x0(%rax,%rax,1)
L46:
  mov    0xc768(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L28
  add    $0xc778,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L28:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D6
type_infered: string
name: parse_data
arguments: data_tag: D29
type_infered: string
name: parse_data
arguments: data_tag: D58
type_infered: string
name: parse_data
arguments: data_tag: D127
type_infered: string
name: parse_data
arguments: data_tag: D86
type_infered: string
name: parse_data
arguments: data_tag: D12
type_infered: string
name: parse_data
arguments: data_tag: D63
type_infered: string
name: parse_data
arguments: data_tag: D125
type_infered: string
name: parse_data
arguments: data_tag: D99
type_infered: string
name: parse_data
arguments: data_tag: D100
type_infered: string
name: parse_data
arguments: data_tag: D20
type_infered: string
name: parse_data
arguments: data_tag: D81
type_infered: string
name: parse_data
arguments: data_tag: D11
type_infered: string
name: parse_data
arguments: data_tag: D107
type_infered: string
name: parse_data
arguments: data_tag: D111
type_infered: string
name: parse_data
arguments: data_tag: D95
type_infered: string

tool: D6: r

tool: D29: /hihg/smoke/pipelines/vcf

tool: D58: 	


tool: D127: status is %s


tool: D86: 0

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

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

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

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

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

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

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

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

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

tool: D111: we have a finished pipeline run

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

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;
}
```