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

```asm
<RunJob>:
  endbr64
  push   %r15
  mov    %esi,%ecx
  push   %r14
  push   %r13
  mov    %esi,%r13d
  lea    D23(%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    L2
L43:
  lea    D16(%rip),%rsi
  mov    %rbp,%rdi
  call   <fopen@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L33
  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     L64
  movzbl 0x100(%rsp),%edx
  xor    %eax,%eax
  test   %dl,%dl
  jne    L126
  jmp    L151
  nopl   0x0(%rax)
L95:
  add    $0x1,%rax
  movzbl (%r15,%rax,1),%edx
  test   %dl,%dl
  je     L151
L126:
  movslq %eax,%rcx
  cmp    $0xa,%dl
  jne    L95
  movb   $0x0,0x100(%rsp,%rcx,1)
L151:
  lea    0x1f0(%rsp),%r12
  mov    %r14,%rdx
  mov    $0xf0,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  test   %eax,%eax
  je     L64
  movzbl 0x1f0(%rsp),%edx
  xor    %eax,%eax
  test   %dl,%dl
  jne    L101
  jmp    L141
  nopl   (%rax)
L100:
  add    $0x1,%rax
  movzbl (%r12,%rax,1),%edx
  test   %dl,%dl
  je     L141
L101:
  movslq %eax,%rsi
  cmp    $0xa,%dl
  jne    L100
  movb   $0x0,0x1f0(%rsp,%rsi,1)
L141:
  mov    %r14,%rdi
  lea    0x3d0(%rsp),%r13
  lea    0x2e0(%rsp),%r14
  call   <fclose@plt>
  mov    %r12,%rcx
  mov    %r15,%rdx
  mov    %r13,%rdi
  lea    D103(%rip),%rsi
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    0x8(%rsp),%rdx
  xor    %eax,%eax
  mov    %r13,%rcx
  lea    D81(%rip),%rsi
  mov    %r14,%rdi
  call   <sprintf@plt>
  cmp    $0x1,%ebx
  jg     L45
L96:
  mov    %r14,%rdi
  call   <system@plt>
  mov    %rbp,%rdi
  call   <unlink@plt>
L33:
  mov    0x5b8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L57
  add    $0x5c8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L2:
  lea    0x4c0(%rsp),%r14
  mov    %r13d,%edx
  lea    D83(%rip),%rsi
  xor    %eax,%eax
  mov    %r14,%rdi
  call   <sprintf@plt>
  mov    %r14,%rdx
  xor    %esi,%esi
  lea    D7(%rip),%rdi
  call   <Message@plt>
  jmp    L43
  nopw   0x0(%rax,%rax,1)
L45:
  lea    0x4c0(%rsp),%r12
  mov    %r13,%rdx
  lea    D71(%rip),%rsi
  xor    %eax,%eax
  mov    %r12,%rdi
  lea    D7(%rip),%r13
  call   <sprintf@plt>
  xor    %esi,%esi
  mov    %r12,%rdx
  mov    %r13,%rdi
  call   <Message@plt>
  cmp    $0x2,%ebx
  je     L96
  mov    %r14,%rdx
  mov    %r12,%rdi
  lea    D55(%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    L33
  nop
L64:
  lea    0x4c0(%rsp),%r12
  mov    %r13d,%edx
  lea    D59(%rip),%rsi
  xor    %eax,%eax
  mov    %r12,%rdi
  call   <sprintf@plt>
  mov    %r12,%rdx
  mov    $0x1,%esi
  lea    D7(%rip),%rdi
  call   <Message@plt>
  mov    %r14,%rdi
  call   <fclose@plt>
  jmp    L33
L57:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D23
data_type: string
name: unpack_data
arguments: data_tag: D16
data_type: string
name: unpack_data
arguments: data_tag: D103
data_type: string
name: unpack_data
arguments: data_tag: D81
data_type: string
name: unpack_data
arguments: data_tag: D83
data_type: string
name: unpack_data
arguments: data_tag: D7
data_type: string
name: unpack_data
arguments: data_tag: D71
data_type: string
name: unpack_data
arguments: data_tag: D55
data_type: string
name: unpack_data
arguments: data_tag: D59
data_type: string

tool: D23: %s/%d

tool: D16: r

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

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

tool: D83: Running job %d

tool: D7: simq

tool: D71: Command is: %s

tool: D55: Expanded command is: %s

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