user: 请从给定的汇编指令推导出C源代码:

```asm
<get_process_info>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x90,%rsp
  mov    %edi,-0x74(%rbp)
  mov    %rsi,-0x80(%rbp)
  mov    %rdx,-0x88(%rbp)
  mov    %rcx,-0x90(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x74(%rbp),%edx
  lea    -0x50(%rbp),%rax
  mov    %edx,%ecx
  lea    D43(%rip),%rdx
  mov    $0x40,%esi
  mov    %rax,%rdi
  call   <snprintf@plt>
  lea    -0x50(%rbp),%rax
  lea    D42(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x58(%rbp)
  cmpq   $0x0,-0x58(%rbp)
  jne    L30
  mov    $0x0,%eax
  jmp    L42
L30:
  movq   $0x0,-0x68(%rbp)
  jmp    L44
L47:
  mov    -0x68(%rbp),%rax
  mov    $0x4,%edx
  lea    D1(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L6
  mov    -0x68(%rbp),%rax
  add    $0x5,%rax
  mov    $0x9,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %eax,%edi
  call   <atoi@plt>
  movslq %eax,%rdx
  mov    -0x80(%rbp),%rax
  mov    %rdx,(%rax)
  jmp    L44
L6:
  mov    -0x68(%rbp),%rax
  mov    $0x4,%edx
  lea    D26(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L17
  mov    -0x68(%rbp),%rax
  add    $0x5,%rax
  mov    $0x9,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %eax,%edi
  call   <atoi@plt>
  movslq %eax,%rdx
  mov    -0x88(%rbp),%rax
  mov    %rdx,(%rax)
  jmp    L44
L17:
  mov    -0x68(%rbp),%rax
  mov    $0x7,%edx
  lea    D10(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L44
  mov    -0x68(%rbp),%rax
  mov    $0x9,%esi
  mov    %rax,%rdi
  call   <strrchr@plt>
  mov    %eax,%edi
  call   <atoi@plt>
  mov    -0x90(%rbp),%rdx
  mov    %eax,(%rdx)
L44:
  mov    -0x58(%rbp),%rdx
  lea    -0x60(%rbp),%rcx
  lea    -0x68(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <getline@plt>
  cmp    $0xffffffff,%eax
  jne    L47
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    $0x1,%eax
L42:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L25
  call   <__stack_chk_fail@plt>
L25:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D43
type: string
name: retrieve_data
arguments: tag: D42
type: string
name: retrieve_data
arguments: tag: D1
type: string
name: retrieve_data
arguments: tag: D26
type: string
name: retrieve_data
arguments: tag: D10
type: string

tool: D43: /proc/%d/status

tool: D42: r

tool: D1: Uid:

tool: D26: Gid:

tool: D10: NStgid:

assistant: ```c
int get_process_info(int pid, uid_t *uid, gid_t *gid, int *nspid) {
  char path[64];
  snprintf(path, sizeof(path), "/proc/%d/status", pid);
  FILE *status_file = fopen(path, "r");
  if (status_file == NULL) {
    return 0;
  }
  char *line = NULL;
  size_t size;
  while (getline(&line, &size, status_file) != -1) {
    if (strncmp(line, "Uid:", 4) == 0) {
      *uid = (uid_t)atoi(strchr(line + 5, '\t'));
    } else if (strncmp(line, "Gid:", 4) == 0) {
      *gid = (gid_t)atoi(strchr(line + 5, '\t'));
    } else if (strncmp(line, "NStgid:", 7) == 0) {
      *nspid = atoi(strrchr(line, '\t'));
    }
  }
  free(line);
  fclose(status_file);
  return 1;
}
```