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

```asm
<loadThresholds>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0x4,%esi
  mov    $0x3e8,%edi
  call   <calloc@plt>
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L65
  lea    D74(%rip),%rax
  mov    %rax,%rdi
  call   <terror@plt>
L65:
  mov    $0x4,%esi
  mov    $0x3e8,%edi
  call   <calloc@plt>
  mov    %rax,%rdx
  mov    -0x30(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L85
  lea    D11(%rip),%rax
  mov    %rax,%rdi
  call   <terror@plt>
L85:
  mov    -0x38(%rbp),%rax
  lea    D88(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  jne    L22
  lea    D58(%rip),%rax
  mov    %rax,%rdi
  call   <terror@plt>
L22:
  lea    -0x14(%rbp),%rsi
  lea    -0x18(%rbp),%rcx
  lea    -0x1c(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  mov    %rsi,%r8
  lea    D16(%rip),%rsi
  mov    %rax,%rdi
  call   <fscanf@plt>
  cmp    $0x3,%eax
  je     L38
  lea    D79(%rip),%rax
  mov    %rax,%rdi
  call   <terror@plt>
  jmp    L38
L74:
  mov    -0x1c(%rbp),%eax
  cmp    $0x3e7,%eax
  jle    L75
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  call   <terror@plt>
L75:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x18(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x14(%rbp),%edx
  mov    %edx,(%rax)
  lea    -0x14(%rbp),%rsi
  lea    -0x18(%rbp),%rcx
  lea    -0x1c(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  mov    %rsi,%r8
  lea    D16(%rip),%rsi
  mov    %rax,%rdi
  call   <fscanf@plt>
  cmp    $0x3,%eax
  je     L38
  lea    D79(%rip),%rax
  mov    %rax,%rdi
  call   <terror@plt>
L38:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <feof@plt>
  test   %eax,%eax
  je     L74
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L33
  call   <__stack_chk_fail@plt>
L33:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D74
type: string
name: unpack_data
arguments: tag: D11
type: string
name: unpack_data
arguments: tag: D88
type: string
name: unpack_data
arguments: tag: D58
type: string
name: unpack_data
arguments: tag: D16
type: string
name: unpack_data
arguments: tag: D79
type: string
name: unpack_data
arguments: tag: D15
type: string

tool: D74: enought memory for LowThreshold array

tool: D11: enought memory for UpperThreshold array

tool: D88: rt

tool: D58: open Low-Upper threshold file

tool: D16: %d	%d	%d


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

tool: D15: 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);
}
```