user: Converte this assembly snippet into its equivalent C code:

```asm
<proc_node_init>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0xca8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  mov    $0x0,%eax
  call   <get_mem_rate@plt>
  movd   %xmm0,%eax
  mov    %eax,-0xcbc(%rbp)
  mov    $0x0,%eax
  call   <get_mem_total@plt>
  mov    %rax,-0xca8(%rbp)
  lea    D57(%rip),%rax
  mov    %rax,%rdi
  call   <opendir@plt>
  mov    %rax,-0xca0(%rbp)
  cmpq   $0x0,-0xca0(%rbp)
  je     L56
  jmp    L42
L91:
  mov    -0xc98(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0xcb0(%rbp)
  jmp    L39
L48:
  mov    -0xcb0(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  je     L73
  addq   $0x1,-0xcb0(%rbp)
L39:
  mov    -0xcb0(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L48
  jmp    L94
L73:
  nop
L94:
  mov    -0xcb0(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L38
  jmp    L42
L38:
  mov    -0xc98(%rbp),%rax
  mov    (%rax),%rdx
  lea    -0x430(%rbp),%rax
  lea    D42(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0xc80(%rbp),%rdx
  lea    -0x430(%rbp),%rax
  mov    $0x50,%ecx
  lea    D41(%rip),%rsi
  mov    %rax,%rdi
  call   <file2str@plt>
  lea    -0xc80(%rbp),%rax
  mov    $0xa,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0xc90(%rbp)
  mov    -0xc90(%rbp),%rax
  movb   $0x0,(%rax)
  lea    -0x430(%rbp),%rdx
  lea    -0xc30(%rbp),%rax
  lea    D40(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0x830(%rbp),%rax
  mov    $0x400,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x830(%rbp),%rcx
  lea    -0xc30(%rbp),%rax
  mov    $0x400,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <readlink@plt>
  cmp    $0xffffffff,%eax
  jne    L15
  lea    -0xc80(%rbp),%rdx
  lea    -0x830(%rbp),%rax
  lea    D45(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
L15:
  lea    -0x430(%rbp),%rax
  lea    D52(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <stat@plt>
  mov    D52(%rip),%eax
  mov    %eax,%edi
  call   <getpwuid@plt>
  mov    %rax,-0xc88(%rbp)
  lea    -0xcb8(%rbp),%rcx
  lea    -0xcc0(%rbp),%rdx
  mov    -0xca8(%rbp),%rsi
  lea    -0x430(%rbp),%rax
  mov    %rax,%rdi
  call   <get_process_mem_rate@plt>
  mov    -0xcc0(%rbp),%r12d
  mov    -0xcb8(%rbp),%r13
  mov    -0xc88(%rbp),%rax
  mov    (%rax),%ebx
  mov    -0xc98(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,%edi
  lea    -0xc80(%rbp),%rdx
  lea    -0x830(%rbp),%rax
  movd   %r12d,%xmm0
  mov    %r13,%r8
  mov    %ebx,%ecx
  mov    %rax,%rsi
  call   <proc_node_add@plt>
L42:
  mov    -0xca0(%rbp),%rax
  mov    %rax,%rdi
  call   <readdir@plt>
  mov    %rax,-0xc98(%rbp)
  cmpq   $0x0,-0xc98(%rbp)
  jne    L91
  mov    -0xca0(%rbp),%rax
  mov    %rax,%rdi
  call   <closedir@plt>
  jmp    L24
L56:
  nop
L24:
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L20
  call   <__stack_chk_fail@plt>
L20:
  add    $0xca8,%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: tag: D57
data_type: string
name: unpack_data
arguments: tag: D42
data_type: string
name: unpack_data
arguments: tag: D41
data_type: string
name: unpack_data
arguments: tag: D40
data_type: string
name: unpack_data
arguments: tag: D45
data_type: string

tool: D57: /proc/

tool: D42: /proc/%s

tool: D41: comm

tool: D40: %s/exe

tool: D45: [%s]

assistant: ```c
void proc_node_init(void) {
  char buf1[1024], buf2[1024];
  char ProcPath[1024], *ptr, comm[80];
  DIR *db, *directory;
  struct dirent *p;
  float MemUsedRate;
  unsigned long MemTotal;
  MemUsedRate = get_mem_rate();
  MemTotal = get_mem_total();
  db = opendir("/proc/");
  if (db == NULL)
    return;
  while (p = readdir(db)) {
    char *cs;
    for (cs = p->d_name; *cs; cs++)
      if (!isdigit(*cs))
        break;
    if (*cs)
      continue;
    sprintf(ProcPath, "/proc/%s", p->d_name);
    file2str(ProcPath, "comm", comm, sizeof comm);
    ptr = strstr(comm, "\n");
    *ptr = '\0';
    sprintf(buf1, "%s/exe", ProcPath);
    memset(buf2, 0, sizeof(buf2));
    if (readlink(buf1, buf2, sizeof(buf2)) == -1) {
      sprintf(buf2, "[%s]", comm);
    }
    static struct stat sb;
    stat(ProcPath, &sb);
    struct passwd *pw;
    pw = getpwuid(sb.st_uid);
    float ProcMemUsedRate;
    unsigned long ProcMemTotal;
    get_process_mem_rate(ProcPath, MemTotal, &ProcMemUsedRate, &ProcMemTotal);
    proc_node_add(atoi(p->d_name), buf2, comm, pw->pw_name, ProcMemTotal, ProcMemUsedRate);
  }
  closedir(db);
}
```