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

```asm
<checkEnvGPUBLAS>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %rdx,-0x18(%rbp)
  mov    %rcx,-0x20(%rbp)
  lea    D106(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  test   %rax,%rax
  je     L53
  lea    D106(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  mov    %rax,%rdi
  call   <atoi@plt>
  test   %eax,%eax
  jne    L1
  lea    D132(%rip),%rax
  mov    %rax,%rdi
  call   <fatalError@plt>
  jmp    L53
L1:
  lea    D106(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    -0x8(%rbp),%rdx
  mov    %eax,(%rdx)
L53:
  lea    D135(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  test   %rax,%rax
  je     L113
  lea    D135(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  mov    %rax,%rdi
  call   <atoi@plt>
  test   %eax,%eax
  jne    L39
  lea    D42(%rip),%rax
  mov    %rax,%rdi
  call   <fatalError@plt>
  jmp    L113
L39:
  lea    D135(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    -0x10(%rbp),%rdx
  mov    %eax,(%rdx)
L113:
  lea    D153(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  test   %rax,%rax
  je     L65
  lea    D153(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  mov    %rax,%rdi
  call   <atoi@plt>
  test   %eax,%eax
  jne    L84
  lea    D107(%rip),%rax
  mov    %rax,%rdi
  call   <fatalError@plt>
  jmp    L65
L84:
  lea    D153(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    -0x18(%rbp),%rdx
  mov    %eax,(%rdx)
L65:
  lea    D116(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  test   %rax,%rax
  je     L48
  lea    D116(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  mov    %rax,%rdi
  call   <atoi@plt>
  test   %eax,%eax
  jne    L50
  lea    D87(%rip),%rax
  mov    %rax,%rdi
  call   <fatalError@plt>
  jmp    L48
L50:
  lea    D116(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    -0x20(%rbp),%rdx
  mov    %eax,(%rdx)
L48:
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D106
data_type: string
name: retrieve_data
arguments: data_label: D132
data_type: string
name: retrieve_data
arguments: data_label: D135
data_type: string
name: retrieve_data
arguments: data_label: D42
data_type: string
name: retrieve_data
arguments: data_label: D153
data_type: string
name: retrieve_data
arguments: data_label: D107
data_type: string
name: retrieve_data
arguments: data_label: D116
data_type: string
name: retrieve_data
arguments: data_label: D87
data_type: string

tool: D106: NLOOP_MAX

tool: D132: NLOOP_MAX must be a positive integer

tool: D135: MIN_GPU_BLAS_SIZE

tool: D42: MIN_GPU_BLAS_SIZE must be a positive integer

tool: D153: MED_GPU_BLAS_SIZE

tool: D107: MED_GPU_BLAS_SIZE must be a positive integer

tool: D116: MAX_GPU_BLAS_SIZE

tool: D87: MAX_GPU_BLAS_SIZE must be a positive integer

assistant: ```c
int checkEnvGPUBLAS(unsigned int *NLOOP, unsigned int *smin, unsigned int *smed, unsigned int *smax) {
  if (getenv("NLOOP_MAX") != NULL) {
    if (atoi(getenv("NLOOP_MAX")) <= 0)
      fatalError("NLOOP_MAX must be a positive integer");
    else
      *NLOOP = atoi(getenv("NLOOP_MAX"));
  }
  if (getenv("MIN_GPU_BLAS_SIZE") != NULL) {
    if (atoi(getenv("MIN_GPU_BLAS_SIZE")) <= 0)
      fatalError("MIN_GPU_BLAS_SIZE must be a positive integer");
    else
      *smin = atoi(getenv("MIN_GPU_BLAS_SIZE"));
  }
  if (getenv("MED_GPU_BLAS_SIZE") != NULL) {
    if (atoi(getenv("MED_GPU_BLAS_SIZE")) <= 0)
      fatalError("MED_GPU_BLAS_SIZE must be a positive integer");
    else
      *smed = atoi(getenv("MED_GPU_BLAS_SIZE"));
  }
  if (getenv("MAX_GPU_BLAS_SIZE") != NULL) {
    if (atoi(getenv("MAX_GPU_BLAS_SIZE")) <= 0)
      fatalError("MAX_GPU_BLAS_SIZE must be a positive integer");
    else
      *smax = atoi(getenv("MAX_GPU_BLAS_SIZE"));
  }
  return 0;
}
```