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

```asm
<load_matrix_int>:
  endbr64
  push   %r15
  lea    D1(%rip),%r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  push   %r12
  lea    D10(%rip),%r12
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x38,%rsp
  mov    %rsi,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movl   $0x0,(%rsi)
  mov    %r15,%rsi
  movl   $0x0,(%rdx)
  call   <fopen@plt>
  mov    %rax,%r13
  jmp    L35
  cs nopw 0x0(%rax,%rax,1)
L65:
  mov    %r12,%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x1,%ebp
  call   <fscanf@plt>
L35:
  mov    %r13,%rdi
  call   <feof@plt>
  test   %eax,%eax
  je     L65
  mov    %r13,%rdi
  lea    D30(%rip),%r12
  call   <fclose@plt>
  mov    0x10(%rsp),%rax
  mov    %r14,%rdi
  mov    %r15,%rsi
  mov    %ebp,(%rax)
  xor    %ebp,%ebp
  call   <fopen@plt>
  mov    %rax,%rdi
  jmp    L31
  nopl   0x0(%rax)
L61:
  lea    0x24(%rsp),%r13
  mov    %r12,%rsi
  xor    %eax,%eax
  mov    %rdi,0x8(%rsp)
  mov    %r13,%rdx
  add    $0x1,%ebp
  call   <fscanf@plt>
  mov    0x8(%rsp),%rdi
L31:
  mov    %rdi,0x8(%rsp)
  call   <feof@plt>
  mov    0x8(%rsp),%rdi
  test   %eax,%eax
  je     L61
  call   <fclose@plt>
  mov    0x10(%rsp),%r12
  mov    %ebp,%eax
  mov    %r15,%rsi
  cltd
  mov    %r14,%rdi
  idivl  (%r12)
  mov    %eax,(%rbx)
  call   <fopen@plt>
  mov    %rax,%rbp
  mov    (%r12),%eax
  lea    0x0(,%rax,8),%edi
  mov    %eax,0x8(%rsp)
  call   <malloc@plt>
  mov    (%r12),%edx
  mov    %rax,0x18(%rsp)
  test   %edx,%edx
  jle    L55
  movl   $0x0,0x8(%rsp)
  mov    %rax,%r15
  lea    D30(%rip),%r12
  xchg   %ax,%ax
L14:
  mov    (%rbx),%eax
  lea    0x0(,%rax,8),%edi
  call   <malloc@plt>
  mov    %rax,(%r15)
  mov    (%rbx),%eax
  test   %eax,%eax
  jle    L69
  xor    %r14d,%r14d
  lea    0x24(%rsp),%r13
  nop
L13:
  mov    %r13,%rdx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <fscanf@plt>
  mov    (%r15),%rax
  mov    0x24(%rsp),%edx
  mov    %edx,(%rax,%r14,4)
  add    $0x1,%r14
  cmp    %r14d,(%rbx)
  jg     L13
L69:
  mov    0x10(%rsp),%rcx
  addl   $0x1,0x8(%rsp)
  add    $0x8,%r15
  mov    0x8(%rsp),%eax
  cmp    %eax,(%rcx)
  jg     L14
L55:
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L40
  mov    0x18(%rsp),%rax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L40:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D1
type: string
name: parse_data
arguments: tag: D10
type: string
name: parse_data
arguments: tag: D30
type: string

tool: D1: r

tool: D10: %*[^
]%*[
]

tool: D30: %d

assistant: ```c
int **load_matrix_int(char *fname, int *N, int *dim) {
  FILE *f;
  int **x;
  int i, j, k;
  int tmp;
  *N = 0;
  *dim = 0;
  k = 0;
  f = fopen(fname, "r");
  while (!feof(f)) {
    i = fscanf(f, "%*[^\n]%*[\n]");
    k++;
  }
  fclose(f);
  *N = k;
  k = 0;
  f = fopen(fname, "r");
  while (!feof(f)) {
    i = fscanf(f, "%d", &tmp);
    k++;
  }
  fclose(f);
  *dim = (k / *N);
  f = fopen(fname, "r");
  x = malloc(*N * sizeof(double *));
  for (i = 0; i < *N; i++) {
    x[i] = malloc(*dim * sizeof(double));
    for (j = 0; j < *dim; j++) {
      k = fscanf(f, "%d", &tmp);
      x[i][j] = tmp;
    }
  }
  fclose(f);
  return x;
}
```