user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xd0,%rsp
  mov    %edi,-0xc4(%rbp)
  mov    %rsi,-0xd0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x61746164,-0x85(%rbp)
  movb   $0x0,-0x81(%rbp)
  cmpl   $0x2,-0xc4(%rbp)
  jne    L100
  mov    -0xd0(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  lea    D190(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L100
  lea    D229(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D79(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D91(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D201(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D138(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D174(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D142(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  jmp    L180
L100:
  cmpl   $0x5,-0xc4(%rbp)
  je     L180
  lea    D226(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D177(%rip),%rax
  mov    %rax,%rdi
  call   <errorHandler@plt>
L180:
  mov    -0xd0(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  lea    D81(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x98(%rbp)
  mov    -0xd0(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0xb4(%rbp)
  mov    -0xd0(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0xb0(%rbp)
  mov    -0xd0(%rbp),%rax
  add    $0x20,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0xac(%rbp)
  movl   $0x1,-0xc0(%rbp)
  jmp    L39
L162:
  mov    -0xc0(%rbp),%edx
  lea    -0x60(%rbp),%rax
  lea    D135(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0x85(%rbp),%rdx
  lea    -0x80(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x60(%rbp),%rdx
  lea    -0x80(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x80(%rbp),%rax
  lea    D101(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x90(%rbp)
  cmpl   $0x1,-0xc0(%rbp)
  jbe    L56
  lea    D81(%rip),%rax
  mov    %rax,%rsi
  lea    D123(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0xa0(%rbp)
L56:
  movl   $0x0,-0xbc(%rbp)
  jmp    L97
L27:
  cmpl   $0x1,-0xc0(%rbp)
  jne    L52
  cmpl   $0x0,-0xbc(%rbp)
  jne    L52
  movl   $0x0,-0xb8(%rbp)
  jmp    L101
L192:
  lea    -0x30(%rbp),%rdx
  mov    -0x98(%rbp),%rax
  lea    D215(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  lea    -0x30(%rbp),%rdx
  mov    -0x90(%rbp),%rax
  lea    D55(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  addl   $0x1,-0xb8(%rbp)
L101:
  mov    -0xb8(%rbp),%eax
  cmp    -0xb0(%rbp),%eax
  jb     L192
  jmp    L144
L52:
  cmpl   $0x0,-0xbc(%rbp)
  jne    L128
  movl   $0x0,-0xb8(%rbp)
  jmp    L5
L107:
  lea    -0x30(%rbp),%rdx
  mov    -0xa0(%rbp),%rax
  lea    D215(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  lea    -0x30(%rbp),%rdx
  mov    -0x90(%rbp),%rax
  lea    D55(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  addl   $0x1,-0xb8(%rbp)
L5:
  mov    -0xb8(%rbp),%eax
  cmp    -0xb0(%rbp),%eax
  jb     L107
  jmp    L144
L128:
  movl   $0x0,-0xb8(%rbp)
  jmp    L98
L166:
  lea    -0xa8(%rbp),%rdx
  mov    -0x98(%rbp),%rax
  lea    D18(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  mov    -0xa8(%rbp),%rdx
  mov    -0x90(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D227(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  addl   $0x1,-0xb8(%rbp)
L98:
  mov    -0xb8(%rbp),%eax
  cmp    -0xb0(%rbp),%eax
  jb     L166
L144:
  mov    -0x90(%rbp),%rax
  mov    %rax,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  addl   $0x1,-0xbc(%rbp)
L97:
  mov    -0xbc(%rbp),%eax
  cmp    -0xac(%rbp),%eax
  jbe    L27
  mov    -0x90(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  cmpl   $0x1,-0xc0(%rbp)
  jbe    L149
  mov    -0xa0(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
L149:
  addl   $0x1,-0xc0(%rbp)
L39:
  mov    -0xc0(%rbp),%eax
  cmp    -0xb4(%rbp),%eax
  jbe    L162
  mov    -0x98(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    $0x1,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L45
  call   <__stack_chk_fail@plt>
L45:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D190
type: string
name: unpack_data
arguments: tag: D229
type: string
name: unpack_data
arguments: tag: D79
type: string
name: unpack_data
arguments: tag: D8
type: string
name: unpack_data
arguments: tag: D91
type: string
name: unpack_data
arguments: tag: D201
type: string
name: unpack_data
arguments: tag: D138
type: string
name: unpack_data
arguments: tag: D174
type: string
name: unpack_data
arguments: tag: D142
type: string
name: unpack_data
arguments: tag: D37
type: string
name: unpack_data
arguments: tag: D226
type: string
name: unpack_data
arguments: tag: D177
type: string
name: unpack_data
arguments: tag: D81
type: string
name: unpack_data
arguments: tag: D135
type: string
name: unpack_data
arguments: tag: D101
type: string
name: unpack_data
arguments: tag: D123
type: string
name: unpack_data
arguments: tag: D215
type: string
name: unpack_data
arguments: tag: D55
type: string
name: unpack_data
arguments: tag: D18
type: string
name: unpack_data
arguments: tag: D227
type: string

tool: D190: -h

tool: D229: 

Call as:

	./break filename nFiles nCols nRows



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

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

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



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

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

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

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

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



tool: D226: 

Correct symtax is: ./break filename nFiles nCols nRows


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


tool: D81: r

tool: D135: %d

tool: D101: w

tool: D123: data1

tool: D215: %s

tool: D55: %s    

tool: D18: %le

tool: D227: %le   

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