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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x68,%rsp
  mov    %edi,-0x74(%rbp)
  mov    %rsi,-0x80(%rbp)
  mov    %rdx,-0x88(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  cmpl   $0x1,-0x74(%rbp)
  jne    L133
  mov    -0x88(%rbp),%rax
  mov    %rax,-0x68(%rbp)
  jmp    L0
L125:
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0x68(%rbp),%rax
  mov    (%rax),%rax
  lea    D3(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcspn@plt>
  mov    %rax,-0x50(%rbp)
  mov    -0x50(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,%r12
  mov    $0x0,%r13d
  mov    -0x50(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,%r14
  mov    $0x0,%r15d
  mov    -0x50(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L78:
  cmp    %rdx,%rsp
  je     L108
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L78
L108:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L41
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L41:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x68(%rbp),%rax
  mov    (%rax),%rcx
  mov    -0x50(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  mov    -0x48(%rbp),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  mov    %rax,-0x40(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,%rsi
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmpq   $0x0,-0x40(%rbp)
  jne    L58
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L51
L58:
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L51:
  mov    %rbx,%rsp
  addq   $0x8,-0x68(%rbp)
L0:
  mov    -0x68(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L125
  jmp    L132
L133:
  movl   $0x1,-0x6c(%rbp)
  jmp    L109
L101:
  mov    -0x6c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x60(%rbp)
  mov    -0x60(%rbp),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  mov    %rax,-0x58(%rbp)
  cmpq   $0x0,-0x58(%rbp)
  jne    L63
  mov    $0x1,%eax
  jmp    L22
L63:
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  addl   $0x1,-0x6c(%rbp)
L109:
  mov    -0x6c(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  jl     L101
L132:
  mov    $0x0,%eax
L22:
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L30
  call   <__stack_chk_fail@plt>
L30:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D3
datatype: string
name: extract_symbolic_data
arguments: data_tag: D1
datatype: string
name: extract_symbolic_data
arguments: data_tag: D22
datatype: string

tool: D3: =

tool: D1: getenv("%s") -> 

tool: D22: <null>

assistant: ```c
int main(int argc, char **argv, char **environ) {
  if (argc == 1) {
    char **env;
    for (env = environ; *env != 0; env++) {
      const size_t len = strcspn(*env, "=");
      char name[len + 1];
      strncpy(name, *env, len);
      name[len] = 0;
      const char *c = getenv(name);
      printf("getenv(\"%s\") -> ", name);
      if (!c) {
        printf("<null>\n");
      } else {
        printf("%s\n", c);
      }
    }
  } else {
    for (int i = 1; i < argc; ++i) {
      const char *name = argv[i];
      const char *c = getenv(name);
      if (!c)
        return 1;
      printf("%s\n", c);
    }
  }
  return 0;
}
```