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

```asm
<FindJobs>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x140,%rsp
  mov    %rdi,-0x128(%rbp)
  mov    %esi,-0x12c(%rbp)
  mov    %rdx,-0x138(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x11c(%rbp)
  movl   $0xffffffff,-0x118(%rbp)
  movl   $0xffffffff,-0x114(%rbp)
  mov    -0x128(%rbp),%rax
  mov    %rax,%rdi
  call   <opendir@plt>
  mov    %rax,-0x110(%rbp)
  cmpq   $0x0,-0x110(%rbp)
  jne    L3
  mov    -0x128(%rbp),%rdx
  lea    -0x100(%rbp),%rax
  lea    D25(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0x100(%rbp),%rax
  mov    %rax,%rdx
  mov    $0x3,%esi
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <Message@plt>
  jmp    L3
L5:
  mov    -0x108(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  je     L3
  mov    -0x108(%rbp),%rax
  mov    (%rax),%rax
  lea    -0x120(%rbp),%rdx
  lea    D14(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  test   %rax,%rax
  je     L3
  cmpl   $0xffffffff,-0x118(%rbp)
  jne    L53
  mov    -0x120(%rbp),%eax
  mov    %eax,-0x118(%rbp)
L53:
  cmpl   $0xffffffff,-0x114(%rbp)
  jne    L55
  mov    -0x120(%rbp),%eax
  mov    %eax,-0x114(%rbp)
L55:
  mov    -0x120(%rbp),%eax
  cmp    %eax,-0x118(%rbp)
  jge    L110
  mov    -0x120(%rbp),%eax
  mov    %eax,-0x118(%rbp)
L110:
  mov    -0x120(%rbp),%eax
  cmp    %eax,-0x114(%rbp)
  jle    L58
  mov    -0x120(%rbp),%eax
  mov    %eax,-0x114(%rbp)
L58:
  addl   $0x1,-0x11c(%rbp)
L3:
  mov    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <readdir@plt>
  mov    %rax,-0x108(%rbp)
  cmpq   $0x0,-0x108(%rbp)
  jne    L5
  mov    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <closedir@plt>
  cmpl   $0x0,-0x11c(%rbp)
  je     L18
  cmpl   $0x1,-0x12c(%rbp)
  jne    L42
  mov    -0x138(%rbp),%rax
  mov    -0x118(%rbp),%edx
  mov    %edx,(%rax)
  jmp    L18
L42:
  mov    -0x138(%rbp),%rax
  mov    -0x114(%rbp),%edx
  mov    %edx,(%rax)
L18:
  mov    -0x11c(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L93
  call   <__stack_chk_fail@plt>
L93:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D25
datatype: string
name: extract_symbolic_data
arguments: data_tag: D7
datatype: string
name: extract_symbolic_data
arguments: data_tag: D14
datatype: string

tool: D25: Can't read directory: %s

tool: D7: simq

tool: D14: %d

assistant: ```c
int FindJobs(char *queueDir, int oldNew, int *jobID) {
  struct dirent *dirp;
  DIR *dp;
  int thisJobID, nJobs = 0, newestJobID = (-1), oldestJobID = (-1);
  if ((dp = opendir(queueDir)) == NULL) {
    char msg[240];
    sprintf(msg, "Can't read directory: %s", queueDir);
    Message("simq", 3, msg);
  }
  while ((dirp = readdir(dp)) != NULL) {
    if (dirp->d_name[0] != '.') {
      if (sscanf(dirp->d_name, "%d", &thisJobID)) {
        if (newestJobID == (-1))
          newestJobID = thisJobID;
        if (oldestJobID == (-1))
          oldestJobID = thisJobID;
        if (thisJobID > newestJobID)
          newestJobID = thisJobID;
        if (thisJobID < oldestJobID)
          oldestJobID = thisJobID;
        nJobs++;
      }
    }
  }
  closedir(dp);
  if (nJobs) {
    if (oldNew == 1) {
      *jobID = newestJobID;
    } else {
      *jobID = oldestJobID;
    }
  }
  return (nJobs);
}
```