user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<load_matrix_int>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,%r13
  mov    %rsi,0x10(%rsp)
  mov    %rdx,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movl   $0x0,(%rsi)
  movl   $0x0,(%rdx)
  lea    D33(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,%rbx
  mov    $0x0,%r12d
  lea    D52(%rip),%r14
  jmp    L66
L13:
  mov    %r14,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  add    $0x1,%r12d
L66:
  mov    %rbx,%rdi
  call   <feof@plt>
  test   %eax,%eax
  je     L13
  mov    %rbx,%rdi
  call   <fclose@plt>
  mov    0x10(%rsp),%rax
  mov    %r12d,(%rax)
  lea    D33(%rip),%rsi
  mov    %r13,%rdi
  call   <fopen@plt>
  mov    %rax,%r12
  mov    $0x0,%ebx
  lea    D50(%rip),%r14
  jmp    L41
L29:
  lea    0x24(%rsp),%rdx
  mov    %r14,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  add    $0x1,%ebx
L41:
  mov    %r12,%rdi
  call   <feof@plt>
  test   %eax,%eax
  je     L29
  mov    %r12,%rdi
  call   <fclose@plt>
  mov    0x10(%rsp),%r15
  mov    %ebx,%eax
  cltd
  idivl  (%r15)
  mov    %eax,0x0(%rbp)
  lea    D33(%rip),%rsi
  mov    %r13,%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  mov    (%r15),%eax
  mov    %eax,0xc(%rsp)
  lea    0x0(,%rax,8),%edi
  call   <malloc@plt>
  mov    %rax,0x18(%rsp)
  cmpl   $0x0,(%r15)
  jle    L63
  mov    %rax,%r15
  movl   $0x0,0xc(%rsp)
  lea    D50(%rip),%r14
L6:
  mov    0x0(%rbp),%eax
  lea    0x0(,%rax,8),%edi
  call   <malloc@plt>
  mov    %r15,%r12
  mov    %rax,(%r15)
  cmpl   $0x0,0x0(%rbp)
  jle    L61
  mov    $0x0,%ebx
L75:
  lea    0x24(%rsp),%rdx
  mov    %r14,%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  mov    (%r12),%rax
  mov    0x24(%rsp),%edx
  mov    %edx,(%rax,%rbx,4)
  add    $0x1,%rbx
  cmp    %ebx,0x0(%rbp)
  jg     L75
L61:
  addl   $0x1,0xc(%rsp)
  mov    0xc(%rsp),%eax
  add    $0x8,%r15
  mov    0x10(%rsp),%rcx
  cmp    %eax,(%rcx)
  jg     L6
L63:
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L34
  mov    0x18(%rsp),%rax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L34:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D33
data_type: string
name: read_data
arguments: data_label: D52
data_type: string
name: read_data
arguments: data_label: D50
data_type: string

tool: D33: r

tool: D52: %*[^
]%*[
]

tool: D50: %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;
}
```