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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0xd8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  movl   $0x61746164,0x4b(%rsp)
  movb   $0x0,0x4f(%rsp)
  cmp    $0x2,%edi
  je     L29
  cmp    $0x5,%edi
  jne    L174
L111:
  mov    0x8(%rbx),%rdi
  lea    D228(%rip),%rsi
  call   <fopen@plt>
  mov    0x10(%rbx),%rdi
  mov    %rax,%r12
  call   <atoi@plt>
  mov    0x18(%rbx),%rdi
  mov    %eax,0x24(%rsp)
  mov    %eax,%r15d
  call   <atoi@plt>
  mov    0x20(%rbx),%rdi
  mov    %eax,%r14d
  call   <atoi@plt>
  mov    %eax,0x8(%rsp)
  test   %r15d,%r15d
  je     L164
  lea    0x70(%rsp),%r15
  mov    $0x1,%edx
  lea    D87(%rip),%rsi
  mov    %r15,%rdi
  mov    %r15,0x30(%rsp)
  lea    D89(%rip),%r13
  call   <sprintf@plt>
  lea    0x50(%rsp),%rax
  lea    0x4b(%rsp),%rsi
  mov    %rax,%rbx
  mov    %rax,%rdi
  mov    %rsi,0x38(%rsp)
  mov    %rax,0x28(%rsp)
  call   <strcpy@plt>
  mov    %r15,%rsi
  mov    %rbx,%rdi
  lea    D182(%rip),%r15
  call   <strcat@plt>
  lea    D144(%rip),%rsi
  mov    %rbx,%rdi
  call   <fopen@plt>
  movl   $0x1,0x20(%rsp)
  mov    %r14d,(%rsp)
  mov    %rax,%rbp
  nopl   0x0(%rax,%rax,1)
L145:
  movl   $0x0,0x4(%rsp)
  cmpl   $0x1,0x20(%rsp)
  sete   0xf(%rsp)
  nopw   0x0(%rax,%rax,1)
L148:
  mov    0x4(%rsp),%edi
  test   %edi,%edi
  jne    L63
  cmpb   $0x0,0xf(%rsp)
  jne    L11
  mov    0x4(%rsp),%ecx
  test   %ecx,%ecx
  jne    L63
  mov    (%rsp),%eax
  test   %eax,%eax
  je     L78
  mov    %r12,0x10(%rsp)
  xor    %ecx,%ecx
  mov    0x18(%rsp),%r12
  lea    0xa0(%rsp),%rbx
  mov    %ecx,%r14d
  nopl   0x0(%rax)
L81:
  mov    %rbx,%rdx
  mov    %r15,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <fscanf@plt>
  mov    %rbx,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x1,%r14d
  call   <fprintf@plt>
  cmp    %r14d,(%rsp)
  jne    L81
  mov    0x10(%rsp),%r12
L78:
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  addl   $0x1,0x4(%rsp)
  mov    0x4(%rsp),%eax
  cmp    %eax,0x8(%rsp)
  jae    L148
  mov    %rbp,%rdi
  call   <fclose@plt>
  cmpl   $0x1,0x20(%rsp)
  jbe    L190
  mov    0x18(%rsp),%rdi
  call   <fclose@plt>
L190:
  addl   $0x1,0x20(%rsp)
  mov    0x20(%rsp),%eax
  cmp    %eax,0x24(%rsp)
  jb     L164
  mov    0x30(%rsp),%rbp
  mov    0x20(%rsp),%r14d
  lea    D87(%rip),%rsi
  mov    %r14d,%edx
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    0x28(%rsp),%rbx
  mov    0x38(%rsp),%rsi
  mov    %rbx,%rdi
  call   <strcpy@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D144(%rip),%rsi
  mov    %rbx,%rdi
  call   <fopen@plt>
  mov    %rax,%rbp
  cmp    $0x1,%r14d
  jbe    L145
  lea    D228(%rip),%rsi
  lea    D53(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,0x18(%rsp)
  jmp    L145
  nopl   (%rax)
L63:
  mov    (%rsp),%edx
  xor    %ebx,%ebx
  lea    0x40(%rsp),%rcx
  mov    %ebx,%r14d
  mov    %rcx,%rbx
  test   %edx,%edx
  je     L78
L176:
  mov    %rbx,%rdx
  lea    D34(%rip),%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <fscanf@plt>
  movsd  0x40(%rsp),%xmm0
  mov    %rbp,%rdi
  lea    D177(%rip),%rsi
  mov    $0x1,%eax
  add    $0x1,%r14d
  call   <fprintf@plt>
  cmp    %r14d,(%rsp)
  jne    L176
  jmp    L78
  nopl   (%rax)
L11:
  mov    (%rsp),%esi
  xor    %ecx,%ecx
  lea    0xa0(%rsp),%rbx
  mov    %ecx,%r14d
  test   %esi,%esi
  je     L78
  nopl   0x0(%rax,%rax,1)
L191:
  mov    %rbx,%rdx
  mov    %r15,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <fscanf@plt>
  mov    %rbx,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x1,%r14d
  call   <fprintf@plt>
  cmp    %r14d,(%rsp)
  jne    L191
  jmp    L78
L164:
  mov    %r12,%rdi
  call   <fclose@plt>
  mov    0xc8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L181
  add    $0xd8,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L29:
  mov    0x8(%rsi),%rdi
  lea    D147(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L226
L174:
  lea    D59(%rip),%rdi
  call   <printf@plt>
  lea    D88(%rip),%rdi
  call   <errorHandler@plt>
  jmp    L111
L226:
  lea    D192(%rip),%rdi
  call   <printf@plt>
  lea    D116(%rip),%rdi
  call   <printf@plt>
  lea    D51(%rip),%rdi
  call   <printf@plt>
  lea    D62(%rip),%rdi
  call   <printf@plt>
  lea    D138(%rip),%rdi
  call   <printf@plt>
  lea    D47(%rip),%rdi
  call   <printf@plt>
  lea    D115(%rip),%rdi
  call   <printf@plt>
  lea    D75(%rip),%rdi
  call   <printf@plt>
  lea    D65(%rip),%rdi
  call   <printf@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L111
L181:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D228
type: string
name: disassemble_data
arguments: data_tag: D87
type: string
name: disassemble_data
arguments: data_tag: D89
type: string
name: disassemble_data
arguments: data_tag: D182
type: string
name: disassemble_data
arguments: data_tag: D144
type: string
name: disassemble_data
arguments: data_tag: D53
type: string
name: disassemble_data
arguments: data_tag: D34
type: string
name: disassemble_data
arguments: data_tag: D177
type: string
name: disassemble_data
arguments: data_tag: D147
type: string
name: disassemble_data
arguments: data_tag: D59
type: string
name: disassemble_data
arguments: data_tag: D88
type: string
name: disassemble_data
arguments: data_tag: D192
type: string
name: disassemble_data
arguments: data_tag: D116
type: string
name: disassemble_data
arguments: data_tag: D51
type: string
name: disassemble_data
arguments: data_tag: D62
type: string
name: disassemble_data
arguments: data_tag: D138
type: string
name: disassemble_data
arguments: data_tag: D47
type: string
name: disassemble_data
arguments: data_tag: D115
type: string
name: disassemble_data
arguments: data_tag: D75
type: string
name: disassemble_data
arguments: data_tag: D65
type: string

tool: D228: r

tool: D87: %d

tool: D89: %s    

tool: D182: %s

tool: D144: w

tool: D53: data1

tool: D34: %le

tool: D177: %le   

tool: D147: -h

tool: D59: 

Correct symtax is: ./break filename nFiles nCols nRows


tool: D88: Type './break -h' for help.


tool: D192: 

Call as:

	./break filename nFiles nCols nRows



tool: D116: Breaks a data file into several. Useful when calculations for 

tool: D51: several planes
in Z are done and need to be stored in 

tool: D62: independent files with only the X
and Y information.



tool: D138: Takes the filename to break as input 1 and the number of files 

tool: D47: to produce as
input 2, followed by the number of columns to 

tool: D115: read in the original file and
the number of rows in each of the 

tool: D75: output data files. The files are saved as
'data1, data2,...' and

tool: D65:  saves columns (X,Y,Z,T).



assistant: ```c
int main(int argc, char *argv[]) {
  FILE *fIn, *fOut, *fTmp;
  char filename[32], buffer[33], name[] = "data", title[33];
  unsigned int i, j, k, NFILES, NCOLS, NROWS;
  double data;
  if (argc == 2 && strcmp(argv[1], "-h") == 0) {
    printf("\n\nCall as:\n\n\t./break filename nFiles nCols nRows\n\n");
    printf("Breaks a data file into several. Useful when calculations for ");
    printf("several planes\nin Z are done and need to be stored in ");
    printf("independent files with only the X\nand Y information.\n\n");
    printf("Takes the filename to break as input 1 and the number of files ");
    printf("to produce as\ninput 2, followed by the number of columns to ");
    printf("read in the original file and\nthe number of rows in each of the ");
    printf("output data files. The files are saved as\n'data1, data2,...' and");
    printf(" saves columns (X,Y,Z,T).\n\n");
    exit(0);
  } else if (argc != 5) {
    printf("\n\nCorrect symtax is: ./break filename nFiles nCols nRows\n");
    errorHandler("Type './break -h' for help.\n");
  }
  fIn = fopen(argv[1], "r");
  NFILES = atoi(argv[2]);
  NCOLS = atoi(argv[3]);
  NROWS = atoi(argv[4]);
  for (i = 1; i <= NFILES; i++) {
    sprintf(buffer, "%d", i);
    strcpy(filename, name);
    strcat(filename, buffer);
    fOut = fopen(filename, "w");
    if (i > 1)
      fTmp = fopen("data1", "r");
    for (j = 0; j <= NROWS; j++) {
      if (i == 1 && j == 0) {
        for (k = 0; k < NCOLS; k++) {
          fscanf(fIn, "%s", &title);
          fprintf(fOut, "%s    ", title);
        }
      } else if (!j) {
        for (k = 0; k < NCOLS; k++) {
          fscanf(fTmp, "%s", &title);
          fprintf(fOut, "%s    ", title);
        }
      } else {
        for (k = 0; k < NCOLS; k++) {
          fscanf(fIn, "%le", &data);
          fprintf(fOut, "%le   ", data);
        }
      }
      fprintf(fOut, "\n");
    }
    fclose(fOut);
    if (i > 1)
      fclose(fTmp);
  }
  fclose(fIn);
  return 1;
}
```