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

```asm
<read_int>:
  endbr64
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x60,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  test   %rsi,%rsi
  je     L21
  test   %r12,%r12
  je     L38
L96:
  test   %r13,%r13
  je     L8
L4:
  cmpb   $0x2a,(%rbx)
  je     L101
  mov    %r12,%rdi
  mov    %rbx,%rsi
  call   <find_string@plt>
  mov    %rax,%rdi
L26:
  mov    %r13,%rdx
  lea    D41(%rip),%rsi
  call   <sscanf@plt>
  test   %rax,%rax
  je     L37
L97:
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L19
  add    $0x60,%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  ret
  cs nopw 0x0(%rax,%rax,1)
L101:
  mov    %r12,%rdi
  lea    0x1(%rbx),%rsi
  call   <find_string@plt>
  mov    %rax,%rdi
  jmp    L26
  nopl   0x0(%rax)
L37:
  mov    %rsp,%r13
  mov    %rbx,%r8
  lea    D44(%rip),%rdx
  mov    %r12,%rcx
  mov    %r13,%rdi
  lea    D5(%rip),%rsi
  call   <sprintf@plt>
  mov    %r13,%rdx
  mov    $0xbf,%edi
  lea    D82(%rip),%rsi
  call   <errhandler@plt>
  jmp    L97
  nopl   (%rax)
L8:
  lea    D64(%rip),%rdx
  lea    D82(%rip),%rsi
  mov    $0xb7,%edi
  call   <errhandler@plt>
  jmp    L4
  nopl   (%rax)
L21:
  lea    D10(%rip),%rdx
  lea    D82(%rip),%rsi
  mov    $0xb5,%edi
  call   <errhandler@plt>
  test   %r12,%r12
  jne    L96
  nopl   0x0(%rax)
L38:
  lea    D79(%rip),%rdx
  lea    D82(%rip),%rsi
  mov    $0xb6,%edi
  call   <errhandler@plt>
  jmp    L96
L19:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D41
data_type: string
name: unpack_data
arguments: data_label: D44
data_type: string
name: unpack_data
arguments: data_label: D5
data_type: string
name: unpack_data
arguments: data_label: D82
data_type: string
name: unpack_data
arguments: data_label: D64
data_type: string
name: unpack_data
arguments: data_label: D10
data_type: string
name: unpack_data
arguments: data_label: D79
data_type: string

tool: D41: %d

tool: D44: wrong format

tool: D5:  %s  File: %s   Variable: %s 

tool: D82: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/grantathon/computational_fluid_dynamics/refs/heads/master/project/ns_sim_serial/helper.c

tool: D64: null pointer given as variable

tool: D10: null pointer given as varable name

tool: D79: null pointer given as filename

assistant: ```c
void read_int(const char *szFileName, const char *szVarName, int *pVariable) {
  char *szValue = NULL;
  if (szVarName == 0)
    errhandler(181, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/grantathon/computational_fluid_dynamics/refs/heads/master/project/ns_sim_serial/helper.c", "null pointer given as varable name");
  if (szFileName == 0)
    errhandler(182, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/grantathon/computational_fluid_dynamics/refs/heads/master/project/ns_sim_serial/helper.c", "null pointer given as filename");
  if (pVariable == 0)
    errhandler(183, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/grantathon/computational_fluid_dynamics/refs/heads/master/project/ns_sim_serial/helper.c", "null pointer given as variable");
  if (szVarName[0] == '*')
    szValue = find_string(szFileName, szVarName + 1);
  else
    szValue = find_string(szFileName, szVarName);
  if (sscanf(szValue, "%d", pVariable) == 0) {
    char szTmp[80];
    if (0)
      sprintf(szTmp, " %s  File: %s   Variable: %s  Line: %d", "wrong format", szFileName, szVarName, 0);
    else
      sprintf(szTmp, " %s  File: %s   Variable: %s ", "wrong format", szFileName, szVarName);
    errhandler(191, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/grantathon/computational_fluid_dynamics/refs/heads/master/project/ns_sim_serial/helper.c", szTmp);
  };
}
```