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

```asm
<parsePATH>:
  endbr64
  push   %r15
  lea    D20(%rip),%r15
  push   %r14
  lea    D17(%rip),%r14
  push   %r13
  lea    D1(%rip),%r13
  push   %r12
  lea    D32(%rip),%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x158,%rsp
  mov    %rsi,0x20(%rsp)
  lea    0x40(%rsp),%rbx
  mov    %rdx,0x28(%rsp)
  mov    %rcx,0x30(%rsp)
  mov    %r8,0x38(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x148(%rsp)
  xor    %eax,%eax
  lea    0x40(%rdi),%rax
  mov    %rax,0x18(%rsp)
  jmp    L129
  xchg   %ax,%ax
L187:
  mov    %r14,%rdi
  call   <strlen@plt>
  mov    0x0(%rbp),%rdi
  mov    %r14,%rsi
  mov    %eax,%edx
  mov    %eax,0x8(%rsp)
  call   <strncmp@plt>
  mov    0x8(%rsp),%ecx
  test   %eax,%eax
  je     L18
L132:
  mov    %r13,%rdi
  call   <strlen@plt>
  mov    0x0(%rbp),%rdi
  mov    %r13,%rsi
  mov    %eax,%edx
  mov    %eax,0x8(%rsp)
  call   <strncmp@plt>
  mov    0x8(%rsp),%ecx
  test   %eax,%eax
  je     L65
L90:
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    0x0(%rbp),%rdi
  mov    %r12,%rsi
  mov    %eax,%edx
  mov    %eax,0x8(%rsp)
  call   <strncmp@plt>
  mov    0x8(%rsp),%ecx
  test   %eax,%eax
  je     L4
  add    $0x8,%rbp
  cmp    0x18(%rsp),%rbp
  je     L9
L129:
  mov    %r15,%rdi
  call   <strlen@plt>
  mov    0x0(%rbp),%rdi
  mov    %r15,%rsi
  mov    %eax,%edx
  mov    %eax,0x8(%rsp)
  call   <strncmp@plt>
  mov    0x8(%rsp),%ecx
  test   %eax,%eax
  jne    L187
  mov    $0x100,%edx
  xor    %esi,%esi
  mov    %rbx,%rdi
  mov    %ecx,0x8(%rsp)
  call   <memset@plt>
  mov    0x0(%rbp),%rsi
  mov    %rbx,%rdi
  call   <strcpy@plt>
  movslq 0x8(%rsp),%rcx
  mov    0x20(%rsp),%rax
  sub    %rcx,%rax
  mov    %rax,0x10(%rsp)
  jmp    L13
  nopw   0x0(%rax,%rax,1)
L24:
  movzbl (%rbx,%rcx,1),%eax
  mov    0x10(%rsp),%rdx
  mov    %al,(%rdx,%rcx,1)
  add    $0x1,%rcx
L13:
  mov    %rbx,%rdi
  mov    %rcx,0x8(%rsp)
  call   <strlen@plt>
  mov    0x8(%rsp),%rcx
  cmp    %ecx,%eax
  jg     L24
  jmp    L187
  nopl   0x0(%rax,%rax,1)
L4:
  mov    $0x100,%edx
  xor    %esi,%esi
  mov    %rbx,%rdi
  mov    %ecx,0x8(%rsp)
  call   <memset@plt>
  mov    0x0(%rbp),%rsi
  mov    %rbx,%rdi
  call   <strcpy@plt>
  movslq 0x8(%rsp),%rcx
  mov    0x38(%rsp),%rax
  sub    %rcx,%rax
  mov    %rax,0x10(%rsp)
  jmp    L85
  nopl   0x0(%rax,%rax,1)
L135:
  movzbl (%rbx,%rcx,1),%eax
  mov    0x10(%rsp),%rsi
  mov    %al,(%rsi,%rcx,1)
  add    $0x1,%rcx
L85:
  mov    %rbx,%rdi
  mov    %rcx,0x8(%rsp)
  call   <strlen@plt>
  mov    0x8(%rsp),%rcx
  cmp    %ecx,%eax
  jg     L135
  add    $0x8,%rbp
  cmp    0x18(%rsp),%rbp
  jne    L129
  nopl   (%rax)
L9:
  mov    0x148(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L170
  add    $0x158,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L65:
  mov    $0x100,%edx
  xor    %esi,%esi
  mov    %rbx,%rdi
  mov    %ecx,0x8(%rsp)
  call   <memset@plt>
  mov    0x0(%rbp),%rsi
  mov    %rbx,%rdi
  call   <strcpy@plt>
  movslq 0x8(%rsp),%rcx
  mov    0x28(%rsp),%rax
  sub    %rcx,%rax
  mov    %rax,0x10(%rsp)
  jmp    L57
  nopl   0x0(%rax,%rax,1)
L56:
  movzbl (%rbx,%rcx,1),%eax
  mov    0x10(%rsp),%rdx
  mov    %al,(%rdx,%rcx,1)
  add    $0x1,%rcx
L57:
  mov    %rbx,%rdi
  mov    %rcx,0x8(%rsp)
  call   <strlen@plt>
  mov    0x8(%rsp),%rcx
  cmp    %ecx,%eax
  jg     L56
  jmp    L90
  nopl   0x0(%rax,%rax,1)
L18:
  mov    $0x100,%edx
  xor    %esi,%esi
  mov    %rbx,%rdi
  mov    %ecx,0x8(%rsp)
  call   <memset@plt>
  mov    0x0(%rbp),%rsi
  mov    %rbx,%rdi
  call   <strcpy@plt>
  movslq 0x8(%rsp),%rcx
  mov    0x30(%rsp),%rax
  sub    %rcx,%rax
  mov    %rax,0x10(%rsp)
  jmp    L5
  nopl   0x0(%rax,%rax,1)
L48:
  movzbl (%rbx,%rcx,1),%eax
  mov    0x10(%rsp),%rsi
  mov    %al,(%rsi,%rcx,1)
  add    $0x1,%rcx
L5:
  mov    %rbx,%rdi
  mov    %rcx,0x8(%rsp)
  call   <strlen@plt>
  mov    0x8(%rsp),%rcx
  cmp    %ecx,%eax
  jg     L48
  jmp    L132
L170:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D20
data_type: string
name: extract_symbolic_data
arguments: data_label: D17
data_type: string
name: extract_symbolic_data
arguments: data_label: D1
data_type: string
name: extract_symbolic_data
arguments: data_label: D32
data_type: string

tool: D20: HOME=

tool: D17: USER=

tool: D1: PATH=

tool: D32: HOSTNAME=

assistant: ```c
int parsePATH(char *envp[], char home[], char path[], char user[], char hostname[]) {
  int len, i = 0, j = 0;
  char temp[256];
  for (int z = 0; z < 8; z++) {
    len = strlen("HOME=");
    if (!strncmp(envp[z], "HOME=", len)) {
      memset(temp, '\0', 256);
      strcpy(temp, (envp[z]));
      for (i = len, j = 0; i < strlen(temp); i++, j++)
        home[j] = temp[i];
    }
    len = strlen("USER=");
    if (!strncmp((envp[z]), "USER=", len)) {
      memset(temp, '\0', 256);
      strcpy(temp, (envp[z]));
      for (i = len, j = 0; i < strlen(temp); i++, j++)
        user[j] = temp[i];
    }
    len = strlen("PATH=");
    if (!strncmp((envp[z]), "PATH=", len)) {
      memset(temp, '\0', 256);
      strcpy(temp, (envp[z]));
      for (i = len, j = 0; i < strlen(temp); i++, j++)
        path[j] = temp[i];
    }
    len = strlen("HOSTNAME=");
    if (!strncmp((envp[z]), "HOSTNAME=", len)) {
      memset(temp, '\0', 256);
      strcpy(temp, (envp[z]));
      for (i = len, j = 0; i < strlen(temp); i++, j++)
        hostname[j] = temp[i];
    }
  }
  return 0;
}
```