user: Demonstrate the C code that generates the assembly output below:

```asm
<read_data_double2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  mov    %edx,%ebx
  sub    $0x48,%rsp
  mov    %rcx,-0x68(%rbp)
  mov    %rdi,-0x60(%rbp)
  mov    %rsp,%rcx
  mov    %esi,-0x54(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  imul   $0x1e,%edx,%eax
  mov    %eax,-0x58(%rbp)
  cltq
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L102
L5:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L5
L102:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L108
L166:
  mov    -0x60(%rbp),%rdi
  lea    D30(%rip),%rsi
  mov    %rsp,-0x50(%rbp)
  call   <fopen@plt>
  mov    %rax,%r15
  test   %rax,%rax
  jne    L49
  mov    -0x60(%rbp),%rsi
  xor    %edx,%edx
  lea    D49(%rip),%rdi
  call   <print_error_global@plt>
L49:
  mov    -0x50(%rbp),%rdi
  mov    -0x58(%rbp),%esi
  mov    %r15,%rdx
  lea    D46(%rip),%r12
  call   <fgets@plt>
  mov    %r15,%rdi
  movl   $0x0,-0x48(%rbp)
  movl   $0x0,-0x44(%rbp)
  call   <feof@plt>
  test   %eax,%eax
  jne    L31
  xchg   %ax,%ax
L122:
  mov    -0x54(%rbp),%ecx
  cmp    %ecx,-0x44(%rbp)
  jge    L31
  mov    -0x50(%rbp),%rdi
  mov    %r12,%rsi
  call   <strtok@plt>
  mov    %rax,%r9
  test   %ebx,%ebx
  jle    L12
  test   %rax,%rax
  je     L12
  movslq -0x48(%rbp),%rax
  mov    -0x68(%rbp),%rcx
  mov    $0x1,%r14d
  mov    %r9,%rdi
  lea    (%rcx,%rax,8),%r13
  nopl   0x0(%rax)
L33:
  call   <atof@plt>
  pxor   %xmm0,%xmm0
  xor    %edi,%edi
  mov    %r12,%rsi
  cvtsi2sd %rax,%xmm0
  movsd  %xmm0,-0x8(%r13,%r14,8)
  call   <strtok@plt>
  mov    %r14d,%r10d
  test   %rax,%rax
  mov    %rax,%rdi
  setne  %dl
  cmp    %r14d,%ebx
  setg   %al
  add    $0x1,%r14
  test   %al,%dl
  jne    L33
  mov    %rdi,%r9
L62:
  addl   $0x1,-0x44(%rbp)
  mov    -0x44(%rbp),%edx
  cmp    %r10d,%ebx
  je     L77
  mov    -0x60(%rbp),%rsi
  mov    %ebx,%r8d
  mov    %r10d,%ecx
  xor    %eax,%eax
  lea    D12(%rip),%rdi
  mov    %r9,-0x70(%rbp)
  call   <printf@plt>
  mov    %r15,%rdi
  call   <fclose@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  mov    -0x70(%rbp),%r9
L77:
  test   %r9,%r9
  je     L125
  mov    -0x44(%rbp),%edx
  mov    -0x60(%rbp),%rsi
  mov    %ebx,%ecx
  lea    D55(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r15,%rdi
  call   <fclose@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L125:
  mov    -0x50(%rbp),%rdi
  mov    -0x58(%rbp),%esi
  mov    %r15,%rdx
  call   <fgets@plt>
  mov    %r15,%rdi
  add    %ebx,-0x48(%rbp)
  call   <feof@plt>
  test   %eax,%eax
  je     L122
L31:
  mov    -0x44(%rbp),%eax
  mov    -0x54(%rbp),%ecx
  cmp    %ecx,%eax
  je     L95
  mov    -0x60(%rbp),%rsi
  mov    %eax,%edx
  lea    D14(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r15,%rdi
  call   <fclose@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L95:
  mov    %r15,%rdi
  call   <feof@plt>
  test   %eax,%eax
  je     L56
L36:
  mov    %r15,%rdi
  call   <fclose@plt>
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L153
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopl   0x0(%rax)
L12:
  xor    %r10d,%r10d
  jmp    L62
L56:
  mov    -0x54(%rbp),%edx
  mov    -0x60(%rbp),%rsi
  lea    D5(%rip),%rdi
  call   <printf@plt>
  mov    %r15,%rdi
  call   <fclose@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L36
L108:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L166
L153:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D30
data_type: string
name: parse_data
arguments: tag: D49
data_type: string
name: parse_data
arguments: tag: D46
data_type: string
name: parse_data
arguments: tag: D12
data_type: string
name: parse_data
arguments: tag: D55
data_type: string
name: parse_data
arguments: tag: D14
data_type: string
name: parse_data
arguments: tag: D5
data_type: string

tool: D30: r

tool: D49: open

tool: D46:  

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



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



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



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



assistant: ```c
void read_data_double2(char *file_data, int N, int M, double *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] = (double)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);
}
```