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

```asm
<find_string>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdi,%r14
  mov    %rsi,%r15
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  lea    D139(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L173
L264:
  lea    D30(%rip),%rbx
  mov    $0x0,%r13d
  jmp    L131
L173:
  mov    %rsp,%rbx
  mov    %r15,%r8
  mov    %r14,%rcx
  lea    D165(%rip),%rdx
  lea    D136(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %rbx,%rdx
  lea    D102(%rip),%rsi
  mov    $0x79,%edi
  call   <errhandler@plt>
  jmp    L264
L5:
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %rbx,%rbp
  test   %eax,%eax
  jne    L1
L131:
  mov    %r12,%rdi
  call   <feof@plt>
  test   %eax,%eax
  jne    L172
  mov    %r12,%rdx
  mov    $0x400,%esi
  mov    %rbx,%rdi
  call   <fgets@plt>
  add    $0x1,%r13d
  mov    $0x0,%ebp
L83:
  mov    %rbx,%rdi
  call   <strlen@plt>
  cmp    %ebp,%eax
  jle    L208
  lea    (%rbx,%rbp,1),%rax
  add    $0x1,%rbp
  cmpb   $0x23,-0x1(%rbx,%rbp,1)
  jne    L83
  movb   $0x0,(%rax)
L208:
  movsbl (%rbx),%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L5
  cmpb   $0x0,(%rbx)
  je     L5
  add    $0x1,%rbx
  jmp    L208
L174:
  cmpb   $0x0,0x0(%rbp)
  je     L227
L66:
  add    $0x1,%rbp
L1:
  movsbl 0x0(%rbp),%edi
  call   <isalnum@plt>
  test   %rax,%rax
  jne    L174
  cmpb   $0x5f,0x0(%rbp)
  je     L66
  cmpb   $0xa,0x0(%rbp)
  jne    L227
L206:
  test   %r13d,%r13d
  je     L92
  mov    %rsp,%rdi
  mov    %r13d,%r9d
  mov    %rbx,%r8
  mov    %r14,%rcx
  lea    D86(%rip),%rdx
  lea    D88(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
L21:
  mov    %rsp,%rdx
  lea    D102(%rip),%rsi
  mov    $0x94,%edi
  call   <errhandler@plt>
L128:
  movb   $0x0,0x0(%rbp)
  mov    %rbx,%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L131
  add    $0x1,%rbp
  jmp    L295
L227:
  mov    %rbp,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jne    L128
  jmp    L206
L92:
  mov    %rsp,%rdi
  mov    %rbx,%r8
  mov    %r14,%rcx
  lea    D86(%rip),%rdx
  lea    D136(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L21
L287:
  add    $0x1,%rbp
L295:
  movsbl 0x0(%rbp),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L287
  cmpb   $0xa,0x0(%rbp)
  jne    L34
L281:
  test   %r13d,%r13d
  je     L118
  mov    %rsp,%rdi
  mov    %r13d,%r9d
  mov    %rbx,%r8
  mov    %r14,%rcx
  lea    D86(%rip),%rdx
  lea    D88(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
L136:
  mov    %rsp,%rdx
  lea    D102(%rip),%rsi
  mov    $0x9f,%edi
  call   <errhandler@plt>
L45:
  mov    %r12,%rdi
  call   <fclose@plt>
L50:
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L85
  mov    %rbp,%rax
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L34:
  mov    %rbp,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jne    L45
  jmp    L281
L118:
  mov    %rsp,%rdi
  mov    %rbx,%r8
  mov    %r14,%rcx
  lea    D86(%rip),%rdx
  lea    D136(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L136
L172:
  test   %r13d,%r13d
  je     L203
  mov    %rsp,%rdi
  mov    %r13d,%r9d
  mov    %r15,%r8
  mov    %r14,%rcx
  lea    D199(%rip),%rdx
  lea    D88(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
L106:
  mov    %rsp,%rdx
  lea    D102(%rip),%rsi
  mov    $0xa5,%edi
  call   <errhandler@plt>
  mov    $0x0,%ebp
  jmp    L50
L203:
  mov    %rsp,%rdi
  mov    %r15,%r8
  mov    %r14,%rcx
  lea    D199(%rip),%rdx
  lea    D136(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L106
L85:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D139
datatype: string
name: extract_symbolic_data
arguments: data_label: D165
datatype: string
name: extract_symbolic_data
arguments: data_label: D136
datatype: string
name: extract_symbolic_data
arguments: data_label: D102
datatype: string
name: extract_symbolic_data
arguments: data_label: D86
datatype: string
name: extract_symbolic_data
arguments: data_label: D88
datatype: string
name: extract_symbolic_data
arguments: data_label: D199
datatype: string

tool: D139: rt

tool: D165: Could not open file

tool: D136:  %s  File: %s   Variable: %s 

tool: D102: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Worksheet3/helper.c

tool: D86: wrong format

tool: D88:  %s  File: %s   Variable: %s  Line: %d

tool: D199: variable not found

assistant: ```c
char *find_string(const char *szFileName, const char *szVarName) {
  int nLine = 0;
  int i;
  FILE *fh = NULL;
  static char szBuffer[1024];
  char *szLine = szBuffer;
  char *szValue = NULL;
  char *szName = NULL;
  fh = fopen(szFileName, "rt");
  if (fh == 0) {
    char szTmp[80];
    if (0)
      sprintf(szTmp, " %s  File: %s   Variable: %s  Line: %d", "Could not open file", szFileName, szVarName, 0);
    else
      sprintf(szTmp, " %s  File: %s   Variable: %s ", "Could not open file", szFileName, szVarName);
    errhandler(121, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Worksheet3/helper.c", szTmp);
  };
  while (!feof(fh)) {
    fgets(szLine, 1024, fh);
    ++nLine;
    for (i = 0; i < strlen(szLine); i++)
      if (szLine[i] == '#') {
        szLine[i] = '\0';
        break;
      }
    while (isspace((int)*szLine) && *szLine)
      ++szLine;
    if (strlen(szLine) == 0)
      continue;
    szName = szLine;
    szValue = szLine;
    while ((isalnum((int)*szValue) || *szValue == '_') && *szValue)
      ++szValue;
    if (*szValue == '\n' || strlen(szValue) == 0) {
      char szTmp[80];
      if (nLine)
        sprintf(szTmp, " %s  File: %s   Variable: %s  Line: %d", "wrong format", szFileName, szName, nLine);
      else
        sprintf(szTmp, " %s  File: %s   Variable: %s ", "wrong format", szFileName, szName);
      errhandler(148, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Worksheet3/helper.c", szTmp);
    };
    *szValue = 0;
    ++szValue;
    if (strcmp(szVarName, szName))
      continue;
    while (isspace((int)*szValue))
      ++szValue;
    if (*szValue == '\n' || strlen(szValue) == 0) {
      char szTmp[80];
      if (nLine)
        sprintf(szTmp, " %s  File: %s   Variable: %s  Line: %d", "wrong format", szFileName, szName, nLine);
      else
        sprintf(szTmp, " %s  File: %s   Variable: %s ", "wrong format", szFileName, szName);
      errhandler(159, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Worksheet3/helper.c", szTmp);
    };
    fclose(fh);
    return szValue;
  }
  {
    char szTmp[80];
    if (nLine)
      sprintf(szTmp, " %s  File: %s   Variable: %s  Line: %d", "variable not found", szFileName, szVarName, nLine);
    else
      sprintf(szTmp, " %s  File: %s   Variable: %s ", "variable not found", szFileName, szVarName);
    errhandler(165, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Worksheet3/helper.c", szTmp);
  };
  return NULL;
}
```