user: What is the c source code of the assembly code below?

```asm
<read_n_columns>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x18(%rbp),%rcx
  mov    -0x38(%rbp),%rax
  mov    $0x3a,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <str_parseline@plt>
  mov    -0x40(%rbp),%rdx
  mov    %eax,(%rdx)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x1,%eax
  jle    L56
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  lea    -0x1(%rax),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <xmalloc@plt>
  cltq
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  mov    %rdx,(%rax)
  movl   $0xffffffff,-0x24(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L34
L37:
  mov    -0x18(%rbp),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <atoi@plt>
  mov    %eax,-0x20(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  lea    -0x10(%rbp),%rdx
  mov    -0x20(%rbp),%ecx
  mov    %ecx,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <read_column@plt>
  mov    %eax,-0x1c(%rbp)
  cmpl   $0x1,-0x28(%rbp)
  jle    L40
  mov    -0x1c(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  je     L40
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <error1@plt>
L40:
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x18(%rbp),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <free@plt>
  addl   $0x1,-0x28(%rbp)
L34:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x28(%rbp)
  jl     L37
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x24(%rbp),%eax
  jmp    L30
L56:
  nop
  mov    -0x38(%rbp),%rax
  mov    %rax,%rsi
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <warning1@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0xffffffff,%eax
L30:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L68
  call   <__stack_chk_fail@plt>
L68:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D3
type: string
name: unpack_data
arguments: data_tag: D1
type: string

tool: D3: different number of rows for different columns


tool: D1: invalid file:column1[:column2[:...]] specification '%s'


assistant: ```c
int read_n_columns(char *arg, int *n, double ***data) {
  char **L;
  int i, nr, nrec, ncol;
  double *dp;
  *n = str_parseline(arg, &L, ':');
  if (*n <= 1)
    goto invalid_format;
  (*n)--;
  *data = xmalloc(sizeof(double *) * (*n));
  nrec = -1;
  for (i = 0; i < (*n); i++) {
    ncol = atoi(L[i + 1]);
    nr = read_column(L[0], ncol, &dp);
    if (i > 1 && nr != nrec)
      error1("different number of rows for different columns\n");
    nrec = nr;
    (*data)[i] = dp;
    free(L[i + 1]);
  }
  free(L[0]);
  free(L);
  return nrec;
invalid_format:
  warning1("invalid file:column1[:column2[:...]] specification '%s'\n", arg);
  free(L);
  return -1;
}
```