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

```asm
<RunJob>:
  endbr64
  push   %r15
  mov    %esi,%ecx
  push   %r14
  push   %r13
  mov    %esi,%r13d
  lea    D61(%rip),%rsi
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  mov    %edx,%ebx
  mov    %rdi,%rdx
  sub    $0x5c8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x5b8(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rbp
  mov    %rbp,%rdi
  call   <sprintf@plt>
  test   %ebx,%ebx
  jne    L79
L136:
  lea    D3(%rip),%rsi
  mov    %rbp,%rdi
  call   <fopen@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L19
  mov    %r13d,%esi
  mov    %r12,%rdi
  lea    0x100(%rsp),%r15
  call   <GetOwner@plt>
  mov    %r14,%rdx
  mov    $0xf0,%esi
  mov    %r15,%rdi
  mov    %rax,0x8(%rsp)
  call   <fgets@plt>
  test   %eax,%eax
  je     L99
  movzbl 0x100(%rsp),%edx
  xor    %eax,%eax
  test   %dl,%dl
  jne    L137
  jmp    L5
  nopl   0x0(%rax)
L74:
  add    $0x1,%rax
  movzbl (%r15,%rax,1),%edx
  test   %dl,%dl
  je     L5
L137:
  movslq %eax,%rcx
  cmp    $0xa,%dl
  jne    L74
  movb   $0x0,0x100(%rsp,%rcx,1)
L5:
  lea    0x1f0(%rsp),%r12
  mov    %r14,%rdx
  mov    $0xf0,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  test   %eax,%eax
  je     L99
  movzbl 0x1f0(%rsp),%edx
  xor    %eax,%eax
  test   %dl,%dl
  jne    L160
  jmp    L145
  nopl   (%rax)
L72:
  add    $0x1,%rax
  movzbl (%r12,%rax,1),%edx
  test   %dl,%dl
  je     L145
L160:
  movslq %eax,%rsi
  cmp    $0xa,%dl
  jne    L72
  movb   $0x0,0x1f0(%rsp,%rsi,1)
L145:
  mov    %r14,%rdi
  lea    0x3d0(%rsp),%r13
  lea    0x2e0(%rsp),%r14
  call   <fclose@plt>
  mov    %r12,%rcx
  mov    %r15,%rdx
  mov    %r13,%rdi
  lea    D20(%rip),%rsi
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    0x8(%rsp),%rdx
  xor    %eax,%eax
  mov    %r13,%rcx
  lea    D19(%rip),%rsi
  mov    %r14,%rdi
  call   <sprintf@plt>
  cmp    $0x1,%ebx
  jg     L42
L47:
  mov    %r14,%rdi
  call   <system@plt>
  mov    %rbp,%rdi
  call   <unlink@plt>
L19:
  mov    0x5b8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L163
  add    $0x5c8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L79:
  lea    0x4c0(%rsp),%r14
  mov    %r13d,%edx
  lea    D36(%rip),%rsi
  xor    %eax,%eax
  mov    %r14,%rdi
  call   <sprintf@plt>
  mov    %r14,%rdx
  xor    %esi,%esi
  lea    D55(%rip),%rdi
  call   <Message@plt>
  jmp    L136
  nopw   0x0(%rax,%rax,1)
L42:
  lea    0x4c0(%rsp),%r12
  mov    %r13,%rdx
  lea    D48(%rip),%rsi
  xor    %eax,%eax
  mov    %r12,%rdi
  lea    D55(%rip),%r13
  call   <sprintf@plt>
  xor    %esi,%esi
  mov    %r12,%rdx
  mov    %r13,%rdi
  call   <Message@plt>
  cmp    $0x2,%ebx
  je     L47
  mov    %r14,%rdx
  mov    %r12,%rdi
  lea    D14(%rip),%rsi
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %r12,%rdx
  xor    %esi,%esi
  mov    %r13,%rdi
  call   <Message@plt>
  mov    %r14,%rdi
  call   <system@plt>
  mov    %rbp,%rdi
  call   <unlink@plt>
  jmp    L19
  nop
L99:
  lea    0x4c0(%rsp),%r12
  mov    %r13d,%edx
  lea    D40(%rip),%rsi
  xor    %eax,%eax
  mov    %r12,%rdi
  call   <sprintf@plt>
  mov    %r12,%rdx
  mov    $0x1,%esi
  lea    D55(%rip),%rdi
  call   <Message@plt>
  mov    %r14,%rdi
  call   <fclose@plt>
  jmp    L19
L163:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D61
type_guessed: string
name: extract_symbolic_data
arguments: label: D3
type_guessed: string
name: extract_symbolic_data
arguments: label: D20
type_guessed: string
name: extract_symbolic_data
arguments: label: D19
type_guessed: string
name: extract_symbolic_data
arguments: label: D36
type_guessed: string
name: extract_symbolic_data
arguments: label: D55
type_guessed: string
name: extract_symbolic_data
arguments: label: D48
type_guessed: string
name: extract_symbolic_data
arguments: label: D14
type_guessed: string
name: extract_symbolic_data
arguments: label: D40
type_guessed: string

tool: D61: %s/%d

tool: D3: r

tool: D20: (cd %s; %s)

tool: D19: su - %s -c "%s"

tool: D36: Running job %d

tool: D55: simq

tool: D48: Command is: %s

tool: D14: Expanded command is: %s

tool: D40: Invalid Job file (%d)

assistant: ```c
void RunJob(char *queueDir, int jobID, int verbose) {
  char jobFile[240], pwd[240], job[240], exe[240], cmd[240];
  FILE *fp;
  sprintf(jobFile, "%s/%d", queueDir, jobID);
  if (verbose) {
    char msg[240];
    sprintf(msg, "Running job %d", jobID);
    Message("simq", 0, msg);
  }
  if ((fp = fopen(jobFile, "r")) != NULL) {
    char *username;
    username = GetOwner(queueDir, jobID);
    if (!fgets(pwd, 240, fp)) {
      char car_msg[240];
      sprintf(car_msg, "Invalid Job file (%d)", jobID);
      Message("simq", 1, car_msg);
      fclose(fp);
      return;
    };
    do {
      int _terminate_macro_j;
      for (_terminate_macro_j = 0; (pwd)[_terminate_macro_j]; _terminate_macro_j++) {
        if ((pwd)[_terminate_macro_j] == '\n') {
          (pwd)[_terminate_macro_j] = '\0';
          break;
        }
      }
    } while (0);
    if (!fgets(job, 240, fp)) {
      char car_msg[240];
      sprintf(car_msg, "Invalid Job file (%d)", jobID);
      Message("simq", 1, car_msg);
      fclose(fp);
      return;
    };
    do {
      int _terminate_macro_j;
      for (_terminate_macro_j = 0; (job)[_terminate_macro_j]; _terminate_macro_j++) {
        if ((job)[_terminate_macro_j] == '\n') {
          (job)[_terminate_macro_j] = '\0';
          break;
        }
      }
    } while (0);
    fclose(fp);
    sprintf(cmd, "(cd %s; %s)", pwd, job);
    sprintf(exe, "su - %s -c \"%s\"", username, cmd);
    if (verbose >= 2) {
      char msg[240];
      sprintf(msg, "Command is: %s", cmd);
      Message("simq", 0, msg);
    }
    if (verbose >= 3) {
      char msg[240];
      sprintf(msg, "Expanded command is: %s", exe);
      Message("simq", 0, msg);
    }
    system(exe);
    unlink(jobFile);
  }
}
```