user: Translate the below assembly code into C programming language:

```asm
<loadThresholds>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%r12
  mov    %rdx,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    $0x4,%esi
  mov    $0x3e8,%edi
  call   <calloc@plt>
  mov    %rax,0x0(%rbp)
  test   %rax,%rax
  je     L131
L32:
  mov    $0x4,%esi
  mov    $0x3e8,%edi
  call   <calloc@plt>
  mov    %rax,(%r12)
  test   %rax,%rax
  je     L58
L122:
  lea    D16(%rip),%rsi
  mov    %rbx,%rdi
  call   <fopen@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L48
L121:
  lea    0x10(%rsp),%rcx
  lea    0xc(%rsp),%rdx
  lea    0x14(%rsp),%r8
  lea    D13(%rip),%rsi
  mov    %rbx,%rdi
  call   <fscanf@plt>
  cmp    $0x3,%eax
  jne    L63
L73:
  lea    D13(%rip),%r15
L88:
  lea    0x14(%rsp),%r14
  lea    0x10(%rsp),%r13
  jmp    L89
L131:
  lea    D37(%rip),%rdi
  call   <terror@plt>
  jmp    L32
L58:
  lea    D71(%rip),%rdi
  call   <terror@plt>
  jmp    L122
L48:
  lea    D36(%rip),%rdi
  call   <terror@plt>
  jmp    L121
L63:
  lea    D5(%rip),%rdi
  call   <terror@plt>
  jmp    L73
L46:
  movslq 0xc(%rsp),%rax
  mov    0x0(%rbp,%rax,8),%rax
  mov    0x10(%rsp),%edx
  mov    %edx,(%rax)
  movslq 0xc(%rsp),%rax
  mov    (%r12,%rax,8),%rax
  mov    0x14(%rsp),%edx
  mov    %edx,(%rax)
  lea    0xc(%rsp),%rdx
  mov    %r14,%r8
  mov    %r13,%rcx
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   <fscanf@plt>
  cmp    $0x3,%eax
  jne    L98
L89:
  mov    %rbx,%rdi
  call   <feof@plt>
  test   %eax,%eax
  jne    L117
  cmpl   $0x3e7,0xc(%rsp)
  jle    L46
  lea    D20(%rip),%rdi
  call   <terror@plt>
  jmp    L46
L98:
  lea    D5(%rip),%rdi
  call   <terror@plt>
  jmp    L88
L117:
  mov    %rbx,%rdi
  call   <fclose@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L13
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L13:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D16
data_type: string
name: parse_data
arguments: data_tag: D13
data_type: string
name: parse_data
arguments: data_tag: D37
data_type: string
name: parse_data
arguments: data_tag: D71
data_type: string
name: parse_data
arguments: data_tag: D36
data_type: string
name: parse_data
arguments: data_tag: D5
data_type: string
name: parse_data
arguments: data_tag: D20
data_type: string

tool: D16: rt

tool: D13: %d	%d	%d


tool: D37: enought memory for LowThreshold array

tool: D71: enought memory for UpperThreshold array

tool: D36: open Low-Upper threshold file

tool: D5: Error reading the threshold file. Wrong format intTABintTABint

tool: D20: LowUp threshold out of range (maxL)

assistant: ```c
void loadThresholds(int **low, int **up, char *thresholdFile) {
  int length, lowSimilarity, upSimilarity;
  FILE *fThreshold;
  if ((*low = (int *)calloc(1000, sizeof(int))) == NULL)
    terror("enought memory for LowThreshold array");
  if ((*up = (int *)calloc(1000, sizeof(int))) == NULL)
    terror("enought memory for UpperThreshold array");
  if ((fThreshold = fopen(thresholdFile, "rt")) == NULL)
    terror("open Low-Upper threshold file");
  if (fscanf(fThreshold, "%d\t%d\t%d\n", &length, &lowSimilarity, &upSimilarity) != 3) {
    terror("Error reading the threshold file. Wrong format intTABintTABint");
  }
  while (!feof(fThreshold)) {
    if (length >= 1000)
      terror("LowUp threshold out of range (maxL)");
    *low[length] = lowSimilarity;
    *up[length] = upSimilarity;
    if (fscanf(fThreshold, "%d\t%d\t%d\n", &length, &lowSimilarity, &upSimilarity) != 3) {
      terror("Error reading the threshold file. Wrong format intTABintTABint");
    }
  }
  fclose(fThreshold);
}
```