user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x78,%rsp
  mov    %rsi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
L168:
  cmp    %rax,%rsp
  je     L348
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L168
L348:
  sub    $0x3f0,%rsp
  orq    $0x0,0x3e8(%rsp)
  mov    %rsp,-0x98(%rbp)
  mov    0x8(%rbx),%rsi
  mov    %rsp,%rdi
  call   <strcpy@plt>
  mov    %rsp,%rax
L214:
  cmp    %rax,%rsp
  je     L107
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L214
L107:
  sub    $0x3f0,%rsp
  orq    $0x0,0x3e8(%rsp)
  mov    %rsp,%r14
  mov    0x10(%rbx),%rsi
  mov    %rsp,%rdi
  call   <strcpy@plt>
  mov    %rsp,%rax
L202:
  cmp    %rax,%rsp
  je     L536
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L202
L536:
  sub    $0x3f0,%rsp
  orq    $0x0,0x3e8(%rsp)
  mov    %rsp,-0x50(%rbp)
  mov    0x18(%rbx),%rsi
  mov    %rsp,%rdi
  call   <strcpy@plt>
  mov    %rsp,%rax
L446:
  cmp    %rax,%rsp
  je     L105
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L446
L105:
  sub    $0x3f0,%rsp
  orq    $0x0,0x3e8(%rsp)
  mov    -0x50(%rbp),%rsi
  mov    %rsp,%rdi
  call   <strcpy@plt>
  lea    D13(%rip),%rsi
  mov    %rsp,%rdi
  call   <strcat@plt>
  lea    D67(%rip),%rsi
  mov    %rsp,%rdi
  call   <fopen@plt>
  mov    %rax,-0xa0(%rbp)
  mov    %rsp,%rax
L154:
  cmp    %rax,%rsp
  je     L221
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L154
L221:
  sub    $0x3f0,%rsp
  orq    $0x0,0x3e8(%rsp)
  mov    -0x50(%rbp),%rsi
  mov    %rsp,%rdi
  call   <strcpy@plt>
  lea    D256(%rip),%rsi
  mov    %rsp,%rdi
  call   <strcat@plt>
  mov    %r14,%rsi
  mov    %rsp,%rdi
  call   <strcat@plt>
  lea    D21(%rip),%rbx
  mov    %rbx,%rsi
  mov    %rsp,%rdi
  call   <strcat@plt>
  mov    -0x98(%rbp),%r15
  mov    %r15,%rsi
  mov    %rsp,%rdi
  call   <strcat@plt>
  lea    D225(%rip),%rsi
  mov    %rsp,%rdi
  call   <strcat@plt>
  mov    %r14,%rsi
  mov    %rsp,%rdi
  call   <strcat@plt>
  mov    %rbx,%rsi
  mov    %rsp,%rdi
  call   <strcat@plt>
  mov    %r15,%rsi
  mov    %rsp,%rdi
  call   <strcat@plt>
  lea    D216(%rip),%rsi
  mov    %rsp,%rdi
  call   <strcat@plt>
  lea    D183(%rip),%rsi
  mov    %rsp,%rdi
  call   <fopen@plt>
  mov    %rax,-0x88(%rbp)
  mov    %rax,%rcx
  mov    $0x2a,%edx
  mov    $0x1,%esi
  lea    D209(%rip),%rdi
  call   <fwrite@plt>
  mov    %rsp,%rax
L623:
  cmp    %rax,%rsp
  je     L114
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L623
L114:
  sub    $0x3f0,%rsp
  orq    $0x0,0x3e8(%rsp)
  mov    %rsp,%r13
  mov    -0x50(%rbp),%rsi
  mov    %rsp,%rdi
  call   <strcpy@plt>
  lea    D256(%rip),%rsi
  mov    %rsp,%rdi
  call   <strcat@plt>
  mov    %r14,%rsi
  mov    %rsp,%rdi
  call   <strcat@plt>
  lea    D21(%rip),%rbx
  mov    %rbx,%rsi
  mov    %rsp,%rdi
  call   <strcat@plt>
  mov    -0x98(%rbp),%rsi
  mov    %rsp,%rdi
  call   <strcat@plt>
  lea    D225(%rip),%rsi
  mov    %rsp,%rdi
  call   <strcat@plt>
  mov    %r14,%rsi
  mov    %rsp,%rdi
  call   <strcat@plt>
  mov    %rbx,%rsi
  mov    %rsp,%rdi
  call   <strcat@plt>
  lea    D115(%rip),%rsi
  mov    %rsp,%rdi
  call   <strcat@plt>
  mov    %rsp,%rax
L177:
  cmp    %rax,%rsp
  je     L503
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L177
L503:
  sub    $0x3f0,%rsp
  orq    $0x0,0x3e8(%rsp)
  mov    %rsp,%r12
  lea    D140(%rip),%rsi
  mov    %r13,%rdi
  call   <fopen@plt>
  mov    %rax,%r15
  mov    $0x0,%ebx
  test   %rax,%rax
  jne    L442
  mov    %r13,%rdi
  call   <perror@plt>
  mov    $0x0,%ebx
  jmp    L237
L516:
  add    $0x1,%ebx
L442:
  mov    %r15,%rdx
  mov    $0x3e8,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L516
  mov    %r15,%rdi
  call   <fclose@plt>
L237:
  movslq %ebx,%rax
  imul   $0x3e8,%rax,%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rsi
  and    $0xfffffffffffffff0,%rsi
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L329:
  cmp    %rcx,%rsp
  je     L419
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L329
L419:
  mov    %rsi,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L561
  orq    $0x0,-0x8(%rsp,%rdx,1)
L561:
  mov    %rsp,-0x90(%rbp)
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffffff0,%rdx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rcx
  sub    %rax,%rcx
L515:
  cmp    %rcx,%rsp
  je     L158
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L515
L158:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L64
  orq    $0x0,-0x8(%rsp,%rax,1)
L64:
  mov    %rsp,%rbx
  mov    %rbx,-0x70(%rbp)
  lea    D140(%rip),%rsi
  mov    %r13,%rdi
  call   <fopen@plt>
  mov    %rax,%r15
  test   %rax,%rax
  je     L293
  mov    -0x90(%rbp),%r13
  mov    $0x0,%eax
  mov    %r15,-0x48(%rbp)
  mov    %eax,%r15d
  jmp    L512
L112:
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <strcpy@plt>
  mov    -0x50(%rbp),%rsi
  mov    %rbx,%rdi
  call   <strcpy@plt>
  lea    D256(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D21(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  mov    -0x98(%rbp),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D225(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D86(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D68(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  add    $0x1,%r15d
  add    $0x3e8,%r13
  add    $0x3e8,%rbx
L512:
  mov    -0x48(%rbp),%rdx
  mov    $0x3e8,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L145
  mov    %r12,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  movslq %eax,%rdx
  cmpb   $0xa,(%r12,%rdx,1)
  jne    L112
  movb   $0x0,(%r12,%rdx,1)
  jmp    L112
L145:
  mov    %r15d,-0x50(%rbp)
  mov    -0x48(%rbp),%r15
  mov    %r15,%rdi
  call   <fclose@plt>
  lea    -0xf4000(%rsp),%rax
L469:
  cmp    %rax,%rsp
  je     L522
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L469
L522:
  sub    $0x240,%rsp
  orq    $0x0,0x238(%rsp)
  mov    %rsp,-0x60(%rbp)
  lea    -0xf4000(%rsp),%rax
L397:
  cmp    %rax,%rsp
  je     L41
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L397
L41:
  sub    $0x240,%rsp
  orq    $0x0,0x238(%rsp)
  mov    %rsp,-0x78(%rbp)
  movq   $0x0,-0x58(%rbp)
  movl   $0x0,-0x48(%rbp)
  cmpl   $0x0,-0x50(%rbp)
  jg     L334
  jmp    L39
L293:
  mov    %r13,%rdi
  call   <perror@plt>
L39:
  mov    -0x98(%rbp),%r14
  mov    %r14,%rsi
  lea    D102(%rip),%rbx
  mov    %rbx,%rdi
  call   <printf@plt>
  mov    %r14,%rdx
  mov    %rbx,%rsi
  mov    -0xa0(%rbp),%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L47
  mov    $0x0,%eax
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L88:
  sub    $0x240,%rsp
  orq    $0x0,0x238(%rsp)
  mov    %rsp,%rbx
  jmp    L280
L622:
  mov    %rbx,%rsi
  mov    -0x60(%rbp),%rdi
  call   <strcpy@plt>
  mov    %r12,%rdi
  call   <fclose@plt>
L280:
  mov    %r12,%rdx
  mov    $0xf4240,%esi
  mov    %rbx,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L162
  cmpb   $0x3e,(%rbx)
  je     L280
  mov    %rbx,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  movslq %eax,%rdx
  cmpb   $0xa,(%rbx,%rdx,1)
  jne    L622
  movb   $0x0,(%rbx,%rdx,1)
  jmp    L622
L162:
  mov    %r13,%rsp
L251:
  mov    -0x90(%rbp),%r15
  mov    %r15,%rax
  add    -0x58(%rbp),%rax
  mov    %rax,-0x68(%rbp)
  mov    -0x70(%rbp),%r14
  mov    $0x0,%ebx
  jmp    L521
L483:
  mov    %rbx,%rdi
  call   <perror@plt>
  jmp    L251
L372:
  sub    $0x240,%rsp
  orq    $0x0,0x238(%rsp)
  mov    %rsp,%r12
  jmp    L523
L11:
  mov    %r12,%rsi
  mov    -0x78(%rbp),%rdi
  call   <strcpy@plt>
  mov    %r13,%rdi
  call   <fclose@plt>
L523:
  mov    %r13,%rdx
  mov    $0xf4240,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L388
  cmpb   $0x3e,(%r12)
  je     L523
  mov    %r12,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  movslq %eax,%rdx
  cmpb   $0xa,(%r12,%rdx,1)
  jne    L11
  movb   $0x0,(%r12,%rdx,1)
  jmp    L11
L388:
  mov    -0x80(%rbp),%rsp
L508:
  mov    -0x60(%rbp),%rdi
  call   <strlen@plt>
  mov    %eax,%r13d
  test   %eax,%eax
  jle    L10
  mov    %eax,%r8d
  mov    $0x0,%edx
  mov    $0x0,%edi
  mov    $0x0,%r12d
  mov    -0x60(%rbp),%rsi
  mov    -0x78(%rbp),%r9
  jmp    L395
L478:
  mov    %r14,%rdi
  call   <perror@plt>
  jmp    L508
L426:
  add    $0x1,%edi
L296:
  add    $0x1,%rdx
  cmp    %r8,%rdx
  je     L228
L395:
  movzbl (%rsi,%rdx,1),%eax
  cmp    $0x4e,%al
  je     L426
  movzbl (%r9,%rdx,1),%ecx
  cmp    $0x4e,%cl
  je     L426
  cmp    %cl,%al
  setne  %al
  movzbl %al,%eax
  add    %eax,%r12d
  jmp    L296
L10:
  mov    $0x0,%edi
  mov    $0x0,%r12d
L228:
  sub    %edi,%r13d
  pxor   %xmm0,%xmm0
  cvtsi2ss %r12d,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2ss %r13d,%xmm1
  divss  %xmm1,%xmm0
  mulss  D176(%rip),%xmm0
  movss  D87(%rip),%xmm1
  subss  %xmm0,%xmm1
  cvttss2si %xmm1,%edi
  call   <log@plt>
  mulss  D93(%rip),%xmm0
  cvtss2sd %xmm0,%xmm0
  mov    %r13d,%r9d
  mov    %r12d,%r8d
  mov    %r15,%rcx
  mov    -0x68(%rbp),%rdx
  lea    D113(%rip),%rsi
  mov    -0x88(%rbp),%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
L40:
  add    $0x1,%ebx
  add    $0x3e8,%r15
  add    $0x3e8,%r14
  cmp    %ebx,-0x50(%rbp)
  je     L24
L521:
  cmp    %ebx,-0x48(%rbp)
  jle    L40
  lea    D140(%rip),%rsi
  mov    %r14,%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L478
  mov    %rsp,-0x80(%rbp)
  lea    -0xf4000(%rsp),%rax
L328:
  cmp    %rax,%rsp
  je     L372
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L328
L24:
  addl   $0x1,-0x48(%rbp)
  mov    -0x48(%rbp),%eax
  addq   $0x3e8,-0x58(%rbp)
  cmp    %eax,-0x50(%rbp)
  je     L39
L334:
  mov    -0x70(%rbp),%rbx
  add    -0x58(%rbp),%rbx
  lea    D140(%rip),%rsi
  mov    %rbx,%rdi
  call   <fopen@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L483
  mov    %rsp,%r13
  lea    -0xf4000(%rsp),%rax
L170:
  cmp    %rax,%rsp
  je     L88
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L170
L47:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D13
type: string
name: parse_data
arguments: data_tag: D67
type: string
name: parse_data
arguments: data_tag: D256
type: string
name: parse_data
arguments: data_tag: D21
type: string
name: parse_data
arguments: data_tag: D225
type: string
name: parse_data
arguments: data_tag: D216
type: string
name: parse_data
arguments: data_tag: D183
type: string
name: parse_data
arguments: data_tag: D209
type: string
name: parse_data
arguments: data_tag: D115
type: string
name: parse_data
arguments: data_tag: D140
type: string
name: parse_data
arguments: data_tag: D86
type: string
name: parse_data
arguments: data_tag: D68
type: string
name: parse_data
arguments: data_tag: D102
type: string
name: parse_data
arguments: data_tag: D176
type: byte[4]
name: parse_data
arguments: data_tag: D87
type: byte[4]
name: parse_data
arguments: data_tag: D93
type: byte[4]
name: parse_data
arguments: data_tag: D113
type: string

tool: D13: /Analysis/log.txt

tool: D67: a

tool: D256: /Analysis/

tool: D21: /

tool: D225: _

tool: D216: _di_simulated.csv

tool: D183: w

tool: D209: Isolate_1,Isolate_2,SNPs,Sites,Divergence


tool: D115: Isolates.txt

tool: D140: r

tool: D86: /Intergenic_files/

tool: D68: .fasta

tool: D102: %s di calculated.


tool: {"D176": [0xab,0xaa,0xaa,0x3f]}

tool: {"D87": [0x00,0x00,0x80,0x3f]}

tool: {"D93": [0x00,0x00,0x40,0xbf]}

tool: D113: %s,%s,%i,%i,%0.6f


assistant: ```c
int main(int argc, char *argv[]) {
  int arg_len = 1000;
  char species[arg_len];
  strcpy(species, argv[1]);
  char analysis[arg_len];
  strcpy(analysis, argv[2]);
  char base_dir[arg_len];
  strcpy(base_dir, argv[3]);
  char log_file_name[arg_len];
  strcpy(log_file_name, base_dir);
  strcat(log_file_name, "/Analysis/log.txt");
  FILE *log_file = fopen(log_file_name, "a");
  char output_file_name[arg_len];
  strcpy(output_file_name, base_dir);
  strcat(output_file_name, "/Analysis/");
  strcat(output_file_name, analysis);
  strcat(output_file_name, "/");
  strcat(output_file_name, species);
  strcat(output_file_name, "_");
  strcat(output_file_name, analysis);
  strcat(output_file_name, "/");
  strcat(output_file_name, species);
  strcat(output_file_name, "_di_simulated.csv");
  FILE *output = fopen(output_file_name, "w");
  fprintf(output, "Isolate_1,Isolate_2,SNPs,Sites,Divergence\n");
  char isolates_file_name[arg_len];
  strcpy(isolates_file_name, base_dir);
  strcat(isolates_file_name, "/Analysis/");
  strcat(isolates_file_name, analysis);
  strcat(isolates_file_name, "/");
  strcat(isolates_file_name, species);
  strcat(isolates_file_name, "_");
  strcat(isolates_file_name, analysis);
  strcat(isolates_file_name, "/");
  strcat(isolates_file_name, "Isolates.txt");
  char isolate_name[arg_len];
  int isolate_count;
  isolate_count = 0;
  FILE *isolates_file = fopen(isolates_file_name, "r");
  if (isolates_file != NULL) {
    while (fgets(isolate_name, sizeof isolate_name, isolates_file) != NULL) {
      isolate_count++;
    }
    fclose(isolates_file);
  } else {
    perror(isolates_file_name);
  }
  char isolate_name_array[isolate_count][arg_len];
  char isolate_file_name_array[isolate_count][arg_len];
  isolate_count = 0;
  FILE *isolates_file_2 = fopen(isolates_file_name, "r");
  if (isolates_file_2 != NULL) {
    while (fgets(isolate_name, sizeof isolate_name, isolates_file_2) != NULL) {
      int isolate_name_len;
      isolate_name_len = strlen(isolate_name);
      if (isolate_name[(isolate_name_len - 1)] == '\n') {
        isolate_name[(isolate_name_len - 1)] = '\0';
      }
      strcpy(isolate_name_array[isolate_count], isolate_name);
      strcpy(isolate_file_name_array[isolate_count], base_dir);
      strcat(isolate_file_name_array[isolate_count], "/Analysis/");
      strcat(isolate_file_name_array[isolate_count], analysis);
      strcat(isolate_file_name_array[isolate_count], "/");
      strcat(isolate_file_name_array[isolate_count], species);
      strcat(isolate_file_name_array[isolate_count], "_");
      strcat(isolate_file_name_array[isolate_count], analysis);
      strcat(isolate_file_name_array[isolate_count], "/Intergenic_files/");
      strcat(isolate_file_name_array[isolate_count], isolate_name);
      strcat(isolate_file_name_array[isolate_count], ".fasta");
      isolate_count++;
    }
    fclose(isolates_file_2);
  } else {
    perror(isolates_file_name);
  }
  int a;
  int b;
  int i;
  int genome_max = 1000000;
  char genome1[genome_max];
  char genome2[genome_max];
  int count;
  count = 0;
  for (a = 0; a < isolate_count; a++) {
    FILE *file1 = fopen(isolate_file_name_array[a], "r");
    if (file1 != NULL) {
      char line1[genome_max];
      while (fgets(line1, sizeof line1, file1) != NULL) {
        if (line1[0] != '>') {
          int line1_len = strlen(line1);
          line1_len = (line1_len - 1);
          if (line1[line1_len] == '\n') {
            line1[line1_len] = '\0';
          }
          strcpy(genome1, line1);
          fclose(file1);
        }
      }
    } else {
      perror(isolate_file_name_array[a]);
    }
    for (b = 0; b < isolate_count; b++) {
      if (a > b) {
        FILE *file2 = fopen(isolate_file_name_array[b], "r");
        if (file2 != NULL) {
          char line2[genome_max];
          while (fgets(line2, sizeof line2, file2) != NULL) {
            if (line2[0] != '>') {
              int line2_len = strlen(line2);
              line2_len = (line2_len - 1);
              if (line2[line2_len] == '\n') {
                line2[line2_len] = '\0';
              }
              strcpy(genome2, line2);
              fclose(file2);
            }
          }
        } else {
          perror(isolate_file_name_array[b]);
        }
        int genome_len;
        genome_len = strlen(genome1);
        int snp;
        snp = 0;
        int n;
        n = 0;
        for (i = 0; i < genome_len; i++) {
          if (genome1[i] == 'N' || genome2[i] == 'N') {
            n++;
          } else {
            if (genome1[i] != genome2[i]) {
              snp++;
            }
          }
        }
        int sites;
        sites = (genome_len - n);
        float div;
        div = ((float)snp / sites);
        float JC_div;
        JC_div = (((float)-3 / 4) * (log(1 - (((float)4 / 3) * div))));
        fprintf(output, "%s,%s,%i,%i,%0.6f\n", isolate_name_array[a], isolate_name_array[b], snp, sites, JC_div);
        count++;
      }
    }
  }
  printf("%s di calculated.\n", species);
  fprintf(log_file, "%s di calculated.\n", species);
  return 0;
}
```