user: What is the c source code of the assembly code below?

```asm
<savePid>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  lea    D7(%rip),%rdi
  push   %rbx
  mov    %esi,%ebx
  sub    $0x218,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x208(%rsp)
  xor    %eax,%eax
  call   <debugMsg@plt>
  test   %ebx,%ebx
  je     L48
L31:
  lea    D105(%rip),%rdi
  mov    %rsp,%r12
  call   <debugMsg@plt>
  lea    D114(%rip),%rdi
  call   <debugMsg@plt>
  lea    D96(%rip),%rsi
  mov    %ebx,%edx
  mov    %r12,%rdi
  call   <sprintf@plt>
  lea    D31(%rip),%rdi
  call   <debugMsg@plt>
  lea    D103(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L6
L1:
  lea    D40(%rip),%r13
L58:
  lea    D8(%rip),%rdi
  call   <debugMsg@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <writeFile@plt>
  test   %rax,%rax
  mov    $0x0,%eax
  cmovne %ebx,%eax
  mov    0x208(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L0
  add    $0x218,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax,%rax,1)
L48:
  lea    D111(%rip),%rdi
  call   <debugMsg@plt>
  xor    %eax,%eax
  call   <getpid@plt>
  mov    %eax,%ebx
  jmp    L31
  nopw   0x0(%rax,%rax,1)
L6:
  lea    D5(%rip),%rsi
  mov    %rbp,%rdi
  lea    D39(%rip),%r13
  call   <strcmp@plt>
  test   %rax,%rax
  je     L58
  lea    D124(%rip),%rsi
  mov    %rbp,%rdi
  lea    D32(%rip),%r13
  call   <strcmp@plt>
  test   %rax,%rax
  je     L58
  jmp    L1
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D7
type: string
name: extract_symbolic_data
arguments: tag: D105
type: string
name: extract_symbolic_data
arguments: tag: D114
type: string
name: extract_symbolic_data
arguments: tag: D96
type: string
name: extract_symbolic_data
arguments: tag: D31
type: string
name: extract_symbolic_data
arguments: tag: D103
type: string
name: extract_symbolic_data
arguments: tag: D40
type: string
name: extract_symbolic_data
arguments: tag: D8
type: string
name: extract_symbolic_data
arguments: tag: D111
type: string
name: extract_symbolic_data
arguments: tag: D5
type: string
name: extract_symbolic_data
arguments: tag: D39
type: string
name: extract_symbolic_data
arguments: tag: D124
type: string
name: extract_symbolic_data
arguments: tag: D32
type: string

tool: D7: savePid() ...

tool: D105: savePid() ... pid is > 0 ...

tool: D114: savePid() ... sprintf ...

tool: D96: %d

tool: D31: savePid() ... sel arg ...

tool: D103: par

tool: D40: /tmp/.pidlbr-dmn

tool: D8: savePid() ... ok ...

tool: D111: savePid() ... pid is 0 ...

tool: D5: chi_1

tool: D39: /tmp/.pidlbr-1

tool: D124: chi_2

tool: D32: /tmp/.pidlbr-2

assistant: ```c
int savePid(char *pid_name, int pid_int) {
  debugMsg("savePid() ...");
  if (pid_int == 0) {
    debugMsg("savePid() ... pid is 0 ...");
    pid_int = getpid();
  }
  debugMsg("savePid() ... pid is > 0 ...");
  char pid_char[512];
  char *pid_file;
  debugMsg("savePid() ... sprintf ...");
  sprintf(pid_char, "%d", pid_int);
  debugMsg("savePid() ... sel arg ...");
  if (strcmp(pid_name, (char *)"par") == 0) {
    pid_file = "/tmp/.pidlbr-dmn";
  } else if (strcmp(pid_name, (char *)"chi_1") == 0) {
    pid_file = "/tmp/.pidlbr-1";
  } else if (strcmp(pid_name, (char *)"chi_2") == 0) {
    pid_file = "/tmp/.pidlbr-2";
  } else {
    pid_file = "/tmp/.pidlbr-dmn";
  }
  debugMsg("savePid() ... ok ...");
  if (writeFile(pid_file, pid_char) == 0) {
    return 0;
  } else {
    return pid_int;
  }
}
```