user: Please show me the C implementation that matches the assembly code listed below:

```asm
<readPirna>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x2c0,%rsp
  mov    %edi,-0x294(%rbp)
  mov    %esi,-0x298(%rbp)
  mov    %edx,-0x29c(%rbp)
  mov    %ecx,-0x2a0(%rbp)
  mov    %r8d,-0x2a4(%rbp)
  mov    %r9,-0x2b0(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x2b8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movsd  D94(%rip),%xmm0
  movsd  %xmm0,-0x258(%rbp)
  mov    -0x29c(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x250(%rbp)
  movl   $0x0,-0x27c(%rbp)
  jmp    L133
L21:
  mov    -0x2a0(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    -0x27c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x250(%rbp),%rdx
  add    %rcx,%rdx
  mov    %rax,(%rdx)
  movl   $0x0,-0x278(%rbp)
  jmp    L14
L10:
  mov    $0xd0,%edi
  call   <malloc@plt>
  mov    -0x27c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x250(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rcx
  mov    -0x278(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x3,%rdx
  add    %rcx,%rdx
  mov    %rax,(%rdx)
  movl   $0x0,-0x274(%rbp)
  jmp    L58
L66:
  mov    $0xd0,%edi
  call   <malloc@plt>
  mov    -0x27c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x250(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rcx
  mov    -0x278(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x3,%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rcx
  mov    -0x274(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x3,%rdx
  add    %rcx,%rdx
  mov    %rax,(%rdx)
  movl   $0x0,-0x270(%rbp)
  movl   $0x0,-0x270(%rbp)
  jmp    L51
L147:
  mov    -0x27c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x250(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x278(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x274(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x270(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  -0x258(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x270(%rbp)
L51:
  cmpl   $0x19,-0x270(%rbp)
  jle    L147
  addl   $0x1,-0x274(%rbp)
L58:
  cmpl   $0x19,-0x274(%rbp)
  jle    L66
  addl   $0x1,-0x278(%rbp)
L14:
  mov    -0x278(%rbp),%eax
  cmp    -0x2a0(%rbp),%eax
  jle    L10
  addl   $0x1,-0x27c(%rbp)
L133:
  mov    -0x27c(%rbp),%eax
  cmp    -0x29c(%rbp),%eax
  jle    L21
  mov    -0x2b8(%rbp),%rax
  mov    %rax,%rsi
  lea    D111(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x2b8(%rbp),%rax
  lea    D2(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L144
  lea    D115(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D77(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x298(%rbp),%ecx
  mov    -0x294(%rbp),%edx
  lea    -0x240(%rbp),%rax
  lea    D38(%rip),%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0x240(%rbp),%rax
  mov    %rax,%rsi
  lea    D126(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L93
L144:
  lea    D104(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x2b8(%rbp),%rdx
  lea    -0x240(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x240(%rbp),%rax
  mov    %rax,%rsi
  lea    D53(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L93:
  movl   $0x0,-0x26c(%rbp)
  lea    -0x240(%rbp),%rax
  lea    D66(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x248(%rbp)
  cmpq   $0x0,-0x248(%rbp)
  je     L87
  jmp    L82
L8:
  lea    -0x280(%rbp),%r8
  lea    -0x284(%rbp),%rdi
  lea    -0x288(%rbp),%rcx
  lea    -0x28c(%rbp),%rdx
  lea    -0x200(%rbp),%rax
  sub    $0x8,%rsp
  lea    -0x260(%rbp),%rsi
  push   %rsi
  mov    %r8,%r9
  mov    %rdi,%r8
  lea    D20(%rip),%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  add    $0x10,%rsp
  mov    -0x288(%rbp),%eax
  mov    -0x28c(%rbp),%edx
  sub    %edx,%eax
  mov    %eax,-0x268(%rbp)
  mov    -0x280(%rbp),%eax
  mov    -0x284(%rbp),%edx
  sub    %edx,%eax
  mov    %eax,-0x264(%rbp)
  mov    -0x288(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x250(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x280(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x268(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x264(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  -0x260(%rbp),%xmm0
  movsd  %xmm0,(%rax)
L82:
  mov    -0x248(%rbp),%rdx
  lea    -0x200(%rbp),%rax
  mov    $0x1f4,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L8
  mov    -0x248(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  lea    D87(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x2a4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x2b0(%rbp),%rax
  add    %rax,%rdx
  mov    -0x250(%rbp),%rax
  mov    %rax,(%rdx)
  jmp    L74
L87:
  lea    D93(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L74:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L30
  call   <__stack_chk_fail@plt>
L30:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D94
datatype: f64
name: retrieve_data
arguments: tag: D111
datatype: string
name: retrieve_data
arguments: tag: D2
datatype: string
name: retrieve_data
arguments: tag: D115
datatype: string
name: retrieve_data
arguments: tag: D77
datatype: string
name: retrieve_data
arguments: tag: D38
datatype: string
name: retrieve_data
arguments: tag: D126
datatype: string
name: retrieve_data
arguments: tag: D104
datatype: string
name: retrieve_data
arguments: tag: D53
datatype: string
name: retrieve_data
arguments: tag: D66
datatype: string
name: retrieve_data
arguments: tag: D20
datatype: string
name: retrieve_data
arguments: tag: D87
datatype: string
name: retrieve_data
arguments: tag: D93
datatype: string

tool: D94: 9999

tool: D111: filename2 = *%s* 


tool: D2: default

tool: D115: here 1

tool: D77: Reading default file... 

tool: D38: pirna_out_%d_%d.dat

tool: D126: File name = %s 



tool: D104: here 2 

tool: D53: Reading file %s... 


tool: D66: rt

tool: D20: %d	%d	%d	%d	%lf


tool: D87: Read file 


tool: D93: File read error! 

assistant: ```c
void readPirna(int evenId, int oddId, int n1, int n2, int location, double *****rnaupCollections, char *fileName2) {
  double ****rnaWins;
  double INF_1 = 9999;
  rnaWins = (double ****)malloc(sizeof(double ***) * (n1 + 1));
  int i, j, k;
  for (i = 0; i <= n1; i++) {
    rnaWins[i] = (double ***)malloc(sizeof(double **) * (n2 + 1));
    for (j = 0; j <= n2; j++) {
      rnaWins[i][j] = (double **)malloc(sizeof(double *) * (26));
      for (k = 0; k <= 25; k++) {
        rnaWins[i][j][k] = (double *)malloc(sizeof(double) * (26));
        int k2 = 0;
        for (k2 = 0; k2 <= 25; k2++) {
          rnaWins[i][j][k][k2] = INF_1;
        }
      }
    }
  }
  char fileName[50];
  printf("filename2 = *%s* \n", fileName2);
  if (!strcmp(fileName2, "default")) {
    printf("here 1\n");
    printf("Reading default file... \n");
    sprintf(fileName, "pirna_out_%d_%d.dat", evenId, oddId);
    printf("File name = %s \n\n", fileName);
  } else {
    printf("here 2 \n");
    strcpy(fileName, fileName2);
    printf("Reading file %s... \n", fileName);
  }
  int count = 0;
  FILE *file = fopen(fileName, "rt");
  if (file != NULL) {
    char line[500];
    while (fgets(line, sizeof line, file) != NULL) {
      int i1, j1, i2, j2;
      double energy;
      sscanf(line, "%d\t%d\t%d\t%d\t%lf\n", &i1, &j1, &i2, &j2, &energy);
      int w1 = j1 - i1;
      int w2 = j2 - i2;
      rnaWins[j1 + 1][j2 + 1][w1][w2] = energy;
    }
    fclose(file);
    printf("Read file \n\n");
    rnaupCollections[location] = rnaWins;
  } else {
    printf("File read error! \n");
  }
}
```