user: 这段汇编代码用C语言表示是什么样的？

```asm
<FindResourceFile>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x598,%rsp
  mov    %rdi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x588(%rsp)
  xor    %eax,%eax
  call   <IsResourceInFile@plt>
  mov    %eax,%edx
  mov    $0x1,%eax
  test   %edx,%edx
  je     L70
L97:
  mov    0x588(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L126
  add    $0x598,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L70:
  lea    0x10(%rsp),%rbp
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    $0x2f,%esi
  mov    %rbp,%rdi
  call   <strrchr@plt>
  test   %rax,%rax
  je     L111
  lea    0x1(%rax),%rbp
  mov    %rbp,%rax
  lea    0x590(%rsp),%rcx
  sub    %rcx,%rax
  lea    0x580(%rax,%rbx,1),%rbx
L111:
  lea    D6(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  lea    0x10(%rsp),%rdi
  call   <IsResourceInFile@plt>
  mov    %eax,%edx
  mov    $0x1,%eax
  test   %edx,%edx
  jne    L97
  lea    0x10(%rsp),%rdi
  mov    $0x2f,%esi
  call   <strrchr@plt>
  mov    %rax,%rbp
  lea    0x1(%rax),%r12
  movzbl 0x1(%rax),%edi
  test   %dil,%dil
  je     L137
  mov    %r12,%rbx
  jmp    L6
L61:
  add    $0x1,%rbx
  movzbl (%rbx),%edi
  test   %dil,%dil
  je     L137
L6:
  movsbl %dil,%edi
  call   <isupper@plt>
  test   %rax,%rax
  je     L61
  movsbl (%rbx),%edi
  call   <tolower@plt>
  mov    %al,(%rbx)
  jmp    L61
L137:
  mov    $0x2e,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L52
L44:
  mov    %rbx,%r13
  sub    %r12,%r13
  cmp    $0x8,%r13
  jg     L134
  mov    %rbx,%rdi
  call   <strlen@plt>
  cmp    $0x4,%eax
  jle    L5
L134:
  lea    0x8(%rsp),%rdi
  mov    $0x7,%edx
  mov    %rbx,%rsi
  call   <strncpy@plt>
  movb   $0x0,0xc(%rsp)
  add    $0x7,%rbp
  cmp    $0x6,%r13
  cmovg  %rbp,%rbx
  movb   $0x7e,(%rbx)
  movb   $0x31,0x1(%rbx)
  lea    0x8(%rsp),%rsi
  lea    0x2(%rbx),%rdi
  call   <strcpy@plt>
L5:
  lea    0x10(%rsp),%rdi
  call   <IsResourceInFile@plt>
  jmp    L97
L52:
  mov    %r12,%rdi
  call   <strlen@plt>
  movslq %eax,%rbx
  add    %r12,%rbx
  jmp    L44
L126:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D6
type_infered: string

tool: D6: resource.frk/

assistant: ```c
int FindResourceFile(char *filename) {
  char *spt, *pt, *dpt;
  char buffer[1400];
  if (IsResourceInFile(filename))
    return (1);
  strcpy(buffer, filename);
  spt = strrchr(buffer, '/');
  if (spt == NULL) {
    spt = buffer;
    pt = filename;
  } else {
    ++spt;
    pt = filename + (spt - buffer);
  }
  strcpy(spt, "resource.frk/");
  strcat(spt, pt);
  if (IsResourceInFile(buffer))
    return (1);
  spt = strrchr(buffer, '/') + 1;
  for (pt = spt; *pt; ++pt)
    if (isupper(*pt))
      *pt = tolower(*pt);
  dpt = strchr(spt, '.');
  if (dpt == NULL)
    dpt = spt + strlen(spt);
  if (dpt - spt > 8 || strlen(dpt) > 4) {
    char exten[8];
    strncpy(exten, dpt, 7);
    exten[4] = '\0';
    if (dpt - spt > 6)
      dpt = spt + 6;
    *dpt++ = '~';
    *dpt++ = '1';
    strcpy(dpt, exten);
  }
  return (IsResourceInFile(buffer));
}
```