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

```asm
<read_data_float2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %esi,-0x5c(%rbp)
  mov    %edx,%r13d
  mov    %rcx,-0x70(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  imul   $0x1e,%edx,%eax
  mov    %eax,-0x60(%rbp)
  cltq
  add    $0xf,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L62:
  cmp    %rdx,%rsp
  je     L74
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L62
L74:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L146
  orq    $0x0,-0x8(%rsp,%rax,1)
L146:
  mov    %rsp,-0x58(%rbp)
  lea    D26(%rip),%rsi
  mov    -0x68(%rbp),%rdi
  call   <fopen@plt>
  mov    %rax,-0x50(%rbp)
  test   %rax,%rax
  je     L60
L67:
  mov    -0x50(%rbp),%rdx
  mov    -0x60(%rbp),%esi
  mov    -0x58(%rbp),%rdi
  call   <fgets@plt>
  movl   $0x0,-0x48(%rbp)
  movl   $0x0,-0x44(%rbp)
  lea    D56(%rip),%r14
  jmp    L71
L60:
  mov    $0x0,%edx
  mov    -0x68(%rbp),%rsi
  lea    D2(%rip),%rdi
  call   <print_error_global@plt>
  jmp    L67
L30:
  mov    $0x0,%ecx
  jmp    L69
L133:
  test   %rbx,%rbx
  je     L85
  mov    %r13d,%ecx
  mov    -0x44(%rbp),%edx
  mov    -0x68(%rbp),%rsi
  lea    D3(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x50(%rbp),%rdi
  call   <fclose@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L85:
  mov    -0x50(%rbp),%rdx
  mov    -0x60(%rbp),%esi
  mov    -0x58(%rbp),%rdi
  call   <fgets@plt>
  add    %r13d,-0x48(%rbp)
L71:
  mov    -0x50(%rbp),%rdi
  call   <feof@plt>
  test   %eax,%eax
  jne    L64
  mov    -0x5c(%rbp),%ebx
  cmp    %ebx,-0x44(%rbp)
  jge    L64
  mov    %r14,%rsi
  mov    -0x58(%rbp),%rdi
  call   <strtok@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L30
  test   %r13d,%r13d
  jle    L30
  movslq -0x48(%rbp),%rax
  mov    -0x70(%rbp),%rsi
  lea    (%rsi,%rax,4),%r15
  mov    $0x1,%r12d
  mov    %rbx,%rdi
L104:
  call   <atof@plt>
  pxor   %xmm0,%xmm0
  cvtsi2ss %rax,%xmm0
  movss  %xmm0,-0x4(%r15,%r12,4)
  mov    %r14,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,%rdi
  mov    %r12d,%ecx
  test   %rax,%rax
  setne  %dl
  cmp    %r12d,%r13d
  setg   %al
  add    $0x1,%r12
  test   %al,%dl
  jne    L104
  mov    %rdi,%rbx
L69:
  addl   $0x1,-0x44(%rbp)
  mov    -0x44(%rbp),%eax
  cmp    %ecx,%r13d
  je     L133
  mov    %r13d,%r8d
  mov    %eax,%edx
  mov    -0x68(%rbp),%rsi
  lea    D0(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x50(%rbp),%rdi
  call   <fclose@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L133
L64:
  mov    -0x44(%rbp),%eax
  mov    -0x5c(%rbp),%ebx
  cmp    %ebx,%eax
  jne    L119
L39:
  mov    -0x50(%rbp),%rdi
  call   <feof@plt>
  test   %eax,%eax
  je     L8
L198:
  mov    -0x50(%rbp),%rdi
  call   <fclose@plt>
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L194
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L119:
  mov    %ebx,%ecx
  mov    %eax,%edx
  mov    -0x68(%rbp),%rsi
  lea    D28(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x50(%rbp),%rdi
  call   <fclose@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L39
L8:
  mov    -0x5c(%rbp),%edx
  mov    -0x68(%rbp),%rsi
  lea    D22(%rip),%rdi
  call   <printf@plt>
  mov    -0x50(%rbp),%rdi
  call   <fclose@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L198
L194:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D26
type_guessed: string
name: parse_data
arguments: tag: D56
type_guessed: string
name: parse_data
arguments: tag: D2
type_guessed: string
name: parse_data
arguments: tag: D3
type_guessed: string
name: parse_data
arguments: tag: D0
type_guessed: string
name: parse_data
arguments: tag: D28
type_guessed: string
name: parse_data
arguments: tag: D22
type_guessed: string

tool: D26: r

tool: D56:  

tool: D2: open

tool: D3: Error: unable to read file %s. It seems that line %d contains more than %d columns.



tool: D0: Error: unable to read file %s. It seems that line %d contains %d columns instead of %d.



tool: D28: Error: unable to read file %s. It seems that it contains %d lines instead of %d.



tool: D22: Error: unable to read file %s. It seems that it contains more than %d lines.



assistant: ```c
void read_data_float2(char *file_data, int N, int M, float *dat) {
  FILE *m_File = NULL;
  int i = 0;
  int j = 0;
  int max_char_per_line = 30 * M;
  char szbuff[max_char_per_line];
  char *token;
  int lmax = N;
  int cmax = M;
  i = 0;
  m_File = fopen(file_data, "r");
  if (!m_File)
    print_error_global("open", file_data, 0);
  token = fgets(szbuff, max_char_per_line, m_File);
  while (!feof(m_File) & (i < lmax)) {
    j = 0;
    token = strtok(szbuff, " ");
    while (token && j < cmax) {
      dat[i * M + j] = (float)atof(token);
      token = strtok(NULL, " ");
      j++;
    }
    i++;
    if (j != cmax) {
      printf("Error: unable to read file %s. It seems that"
             " line %d contains %d columns instead of %d."
             "\n\n",
             file_data, i, j, cmax);
      fclose(m_File);
      exit(1);
    }
    if (token) {
      printf("Error: unable to read file %s. It seems that"
             " line %d contains more than %d columns.\n\n",
             file_data, i, cmax);
      fclose(m_File);
      exit(1);
    }
    token = fgets(szbuff, max_char_per_line, m_File);
  }
  if (i != lmax) {
    printf("Error: unable to read file %s. It seems that it "
           "contains %d lines instead of %d.\n\n",
           file_data, i, lmax);
    fclose(m_File);
    exit(1);
  }
  if (!feof(m_File)) {
    printf("Error: unable to read file %s. It seems that it "
           "contains more than %d lines.\n\n",
           file_data, lmax);
    fclose(m_File);
    exit(1);
  }
  fclose(m_File);
}
```