user: 请将以下的汇编代码转换成C语言代码:

```asm
<read_int>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x60,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%rbx
  mov    %rdx,%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  test   %rsi,%rsi
  je     L67
L72:
  test   %rbp,%rbp
  je     L14
L51:
  test   %r12,%r12
  je     L84
L97:
  cmpb   $0x2a,(%rbx)
  je     L26
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <find_string@plt>
  mov    %rax,%rdi
L24:
  mov    %r12,%rdx
  lea    D25(%rip),%rsi
  call   <sscanf@plt>
  test   %rax,%rax
  je     L100
L29:
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L78
  add    $0x60,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L67:
  lea    D71(%rip),%rdx
  lea    D53(%rip),%rsi
  mov    $0xb5,%edi
  call   <errhandler@plt>
  jmp    L72
L14:
  lea    D62(%rip),%rdx
  lea    D53(%rip),%rsi
  mov    $0xb6,%edi
  call   <errhandler@plt>
  jmp    L51
L84:
  lea    D94(%rip),%rdx
  lea    D53(%rip),%rsi
  mov    $0xb7,%edi
  call   <errhandler@plt>
  jmp    L97
L26:
  lea    0x1(%rbx),%rsi
  mov    %rbp,%rdi
  call   <find_string@plt>
  mov    %rax,%rdi
  jmp    L24
L100:
  mov    %rsp,%r12
  mov    %rbx,%r8
  mov    %rbp,%rcx
  lea    D8(%rip),%rdx
  lea    D9(%rip),%rsi
  mov    %r12,%rdi
  call   <sprintf@plt>
  mov    %r12,%rdx
  lea    D53(%rip),%rsi
  mov    $0xbf,%edi
  call   <errhandler@plt>
  jmp    L29
L78:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D25
type_infered: string
name: retrieve_data
arguments: data_label: D71
type_infered: string
name: retrieve_data
arguments: data_label: D53
type_infered: string
name: retrieve_data
arguments: data_label: D62
type_infered: string
name: retrieve_data
arguments: data_label: D94
type_infered: string
name: retrieve_data
arguments: data_label: D8
type_infered: string
name: retrieve_data
arguments: data_label: D9
type_infered: string

tool: D25: %d

tool: D71: null pointer given as varable name

tool: D53: /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: D62: null pointer given as filename

tool: D94: null pointer given as variable

tool: D8: wrong format

tool: D9:  %s  File: %s   Variable: %s 

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