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

```asm
<get_process_info>:
  endbr64
  push   %r15
  push   %r14
  mov    %rsi,%r14
  mov    $0x40,%esi
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %rdx,(%rsp)
  lea    0x20(%rsp),%rbp
  lea    D44(%rip),%rdx
  mov    %rcx,0x8(%rsp)
  mov    %edi,%ecx
  mov    %rbp,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  call   <snprintf@plt>
  lea    D41(%rip),%rsi
  mov    %rbp,%rdi
  call   <fopen@plt>
  test   %rax,%rax
  je     L10
  mov    %rax,%rbp
  lea    0x18(%rsp),%r12
  movq   $0x0,0x10(%rsp)
  lea    0x10(%rsp),%rbx
  lea    D6(%rip),%r13
  lea    D28(%rip),%r15
  nopl   (%rax)
L96:
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <getline@plt>
  cmp    $0xffffffff,%eax
  je     L83
  mov    0x10(%rsp),%rdi
  mov    $0x4,%edx
  mov    %r13,%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L82
  mov    0x10(%rsp),%rax
  mov    $0x9,%esi
  lea    0x5(%rax),%rdi
  call   <strchr@plt>
  mov    %eax,%edi
  call   <atoi@plt>
  cltq
  mov    %rax,(%r14)
  jmp    L96
  nopw   0x0(%rax,%rax,1)
L82:
  mov    0x10(%rsp),%rdi
  mov    $0x4,%edx
  mov    %r15,%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L57
  mov    0x10(%rsp),%rax
  mov    $0x9,%esi
  lea    0x5(%rax),%rdi
  call   <strchr@plt>
  mov    %eax,%edi
  call   <atoi@plt>
  mov    (%rsp),%rcx
  cltq
  mov    %rax,(%rcx)
  jmp    L96
  nop
L57:
  mov    0x10(%rsp),%rdi
  mov    $0x7,%edx
  lea    D43(%rip),%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L96
  mov    0x10(%rsp),%rdi
  mov    $0x9,%esi
  call   <strrchr@plt>
  mov    %eax,%edi
  call   <atoi@plt>
  mov    0x8(%rsp),%rcx
  mov    %eax,(%rcx)
  jmp    L96
  nopl   0x0(%rax)
L83:
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    $0x1,%eax
L80:
  mov    0x68(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L62
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L10:
  xor    %eax,%eax
  jmp    L80
L62:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D44
type_guessed: string
name: read_data
arguments: tag: D41
type_guessed: string
name: read_data
arguments: tag: D6
type_guessed: string
name: read_data
arguments: tag: D28
type_guessed: string
name: read_data
arguments: tag: D43
type_guessed: string

tool: D44: /proc/%d/status

tool: D41: r

tool: D6: Uid:

tool: D28: Gid:

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