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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x68,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  cmp    $0x2,%edi
  je     L46
  cmp    $0x5,%edi
  jne    L2
L29:
  mov    0x8(%rbx),%rdi
  lea    D3(%rip),%rsi
  call   <fopen@plt>
  mov    0x10(%rbx),%rdi
  mov    %rax,%r12
  call   <atoi@plt>
  mov    0x18(%rbx),%rdi
  mov    %eax,0x18(%rsp)
  call   <atoi@plt>
  mov    0x20(%rbx),%rdi
  mov    %eax,0x1c(%rsp)
  call   <atoi@plt>
  mov    %eax,0xc(%rsp)
  test   %eax,%eax
  je     L146
  xor    %r14d,%r14d
  lea    0x30(%rsp),%r13
  lea    D76(%rip),%rbp
  nopl   0x0(%rax)
L120:
  mov    %r13,%rdx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <fscanf@plt>
  add    $0x1,%r14d
  cmp    %r14d,0xc(%rsp)
  jne    L120
L146:
  lea    D108(%rip),%rsi
  lea    D12(%rip),%rdi
  call   <fopen@plt>
  mov    0x18(%rsp),%edx
  movl   $0x0,0x14(%rsp)
  lea    0x28(%rsp),%r15
  movl   $0x0,0x10(%rsp)
  mov    %rax,%rbp
  lea    D74(%rip),%r14
  lea    D2(%rip),%r13
  test   %edx,%edx
  je     L23
  nopl   0x0(%rax)
L15:
  mov    0xc(%rsp),%eax
  xor    %ebx,%ebx
  test   %eax,%eax
  je     L35
  nopw   0x0(%rax,%rax,1)
L90:
  mov    %r15,%rdx
  mov    %r14,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <fscanf@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  mov    $0x1,%eax
  movsd  0x28(%rsp),%xmm0
  add    $0x1,%ebx
  call   <fprintf@plt>
  cmp    %ebx,0xc(%rsp)
  jne    L90
L35:
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  addl   $0x1,0x10(%rsp)
  mov    0x10(%rsp),%eax
  cmp    %eax,0x1c(%rsp)
  je     L1
  addl   $0x1,0x14(%rsp)
  mov    0x14(%rsp),%eax
  cmp    %eax,0x18(%rsp)
  jne    L15
L23:
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    %r12,%rdi
  call   <fclose@plt>
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L141
  add    $0x68,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L1:
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  addl   $0x1,0x14(%rsp)
  mov    0x14(%rsp),%eax
  cmp    %eax,0x18(%rsp)
  je     L23
  movl   $0x0,0x10(%rsp)
  jmp    L15
L46:
  mov    0x8(%rsi),%rdi
  lea    D97(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L71
L2:
  lea    D117(%rip),%rdi
  call   <printf@plt>
  lea    D124(%rip),%rdi
  call   <errorHandler@plt>
  jmp    L29
L71:
  lea    D58(%rip),%rdi
  call   <printf@plt>
  lea    D118(%rip),%rdi
  call   <printf@plt>
  lea    D98(%rip),%rdi
  call   <printf@plt>
  lea    D129(%rip),%rdi
  call   <printf@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L29
L141:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D3
type_infered: string
name: retrieve_data
arguments: tag: D76
type_infered: string
name: retrieve_data
arguments: tag: D108
type_infered: string
name: retrieve_data
arguments: tag: D12
type_infered: string
name: retrieve_data
arguments: tag: D74
type_infered: string
name: retrieve_data
arguments: tag: D2
type_infered: string
name: retrieve_data
arguments: tag: D97
type_infered: string
name: retrieve_data
arguments: tag: D117
type_infered: string
name: retrieve_data
arguments: tag: D124
type_infered: string
name: retrieve_data
arguments: tag: D58
type_infered: string
name: retrieve_data
arguments: tag: D118
type_infered: string
name: retrieve_data
arguments: tag: D98
type_infered: string
name: retrieve_data
arguments: tag: D129
type_infered: string

tool: D3: r

tool: D76: %s

tool: D108: w

tool: D12: temp.gnu

tool: D74: %le

tool: D2: %le	

tool: D97: -h

tool: D117: 

Correct syntax is:

	./gplotForm filename N nrows ncols.


tool: D124: Type './sep -h' for help.


tool: D58: 

Call as:

	./gplotForm filename N nrows ncols.


tool: D118: 
Inserts a blank row every nrows for all ncols in filename

tool: D98:  for all N rows in
the file. Input file is not altered in 

tool: D129: any way. Output file is by default
called 'temp.gnu'.



assistant: ```c
int main(int argc, char *argv[]) {
  FILE *fIn, *fOut, *fTmp;
  char cBuffer[32];
  unsigned int count, i, j, k, N, nrows, ncols;
  double data;
  if (argc == 2 && strcmp(argv[1], "-h") == 0) {
    printf("\n\nCall as:\n\n\t./gplotForm filename N nrows ncols.\n");
    printf("\nInserts a blank row every nrows for all ncols in filename");
    printf(" for all N rows in\nthe file. Input file is not altered in ");
    printf("any way. Output file is by default\ncalled 'temp.gnu'.\n\n");
    exit(0);
  } else if (argc != 5) {
    printf("\n\nCorrect syntax is:\n\n\t./gplotForm filename N nrows ncols.\n");
    errorHandler("Type './sep -h' for help.\n");
  }
  fIn = fopen(argv[1], "r");
  N = atoi(argv[2]);
  nrows = atoi(argv[3]);
  ncols = atoi(argv[4]);
  for (i = 0; i < ncols; i++)
    fscanf(fIn, "%s", cBuffer);
  fOut = fopen("temp.gnu", "w");
  count = 0;
  for (j = 0; j < N; j++) {
    for (k = 0; k < ncols; k++) {
      fscanf(fIn, "%le", &data);
      fprintf(fOut, "%le\t", data);
    }
    fprintf(fOut, "\n");
    count++;
    if (count == nrows) {
      count = 0;
      fprintf(fOut, "\n");
    }
  }
  fclose(fOut);
  fclose(fIn);
  return 0;
}
```