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

```asm
<np_parse_list_str>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  mov    %rcx,-0x38(%rbp)
  mov    %r8d,-0x3c(%rbp)
  mov    -0x3c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x18(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L175
L144:
  movl   $0x0,-0x10(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L17
  addq   $0x1,-0x38(%rbp)
  movl   $0x1,-0xc(%rbp)
L17:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L245
  mov    $0xffffffff,%eax
  jmp    L38
L132:
  cmpl   $0xccccccc,-0x10(%rbp)
  jle    L101
  mov    $0xffffffff,%eax
  jmp    L38
L101:
  mov    -0x10(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%ecx
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %ecx,%eax
  mov    %eax,-0x10(%rbp)
  cmpl   $0x0,-0x10(%rbp)
  jns    L245
  mov    $0xffffffff,%eax
  jmp    L38
L245:
  mov    -0x38(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jae    L208
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L132
L208:
  cmpl   $0x0,-0xc(%rbp)
  je     L94
  negl   -0x10(%rbp)
L94:
  addl   $0x1,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jne    L157
  movl   $0x0,-0x14(%rbp)
L157:
  mov    -0x18(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jge    L110
  mov    -0x38(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jae    L41
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmpl   $0x0,-0x14(%rbp)
  je     L55
  mov    $0x5f,%edx
  jmp    L234
L55:
  mov    $0x2c,%edx
L234:
  cmp    %eax,%edx
  je     L41
L110:
  mov    $0xffffffff,%eax
  jmp    L38
L41:
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x18(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x38(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jne    L153
  cmpl   $0x0,-0x14(%rbp)
  jne    L121
  mov    -0x18(%rbp),%eax
  cltd
  idivl  -0x30(%rbp)
  jmp    L38
L121:
  mov    $0xffffffff,%eax
  jmp    L38
L153:
  mov    -0x38(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmpl   $0x0,-0x14(%rbp)
  je     L40
  mov    $0x5f,%edx
  jmp    L35
L40:
  mov    $0x2c,%edx
L35:
  cmp    %eax,%edx
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  addq   $0x1,-0x38(%rbp)
L175:
  mov    -0x38(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jb     L144
  mov    -0x38(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  cmpl   $0x0,-0x14(%rbp)
  jne    L124
  mov    -0x18(%rbp),%eax
  cltd
  idivl  -0x30(%rbp)
  jmp    L38
L124:
  mov    $0xffffffff,%eax
L38:
  leave
  ret
```

assistant: ```c
int np_parse_list_str(int *Res, const int max_size, const int arity, const char *ptr, const int bytes) {
  const char *ptr_e = ptr + bytes;
  int s = 0, t = 0, x, sgn;
  while (ptr < ptr_e) {
    x = 0;
    sgn = 0;
    if (*ptr == '-') {
      ptr++;
      sgn = 1;
    }
    if (!isdigit(*ptr)) {
      return -1;
    }
    while (ptr < ptr_e && isdigit(*ptr)) {
      if (x > 0x7fffffff / 10) {
        return -1;
      }
      x = x * 10 + (*ptr++ - '0');
      if (x < 0) {
        return -1;
      }
    }
    if (sgn) {
      x = -x;
    }
    if (++t == arity) {
      t = 0;
    }
    if (s >= max_size || (ptr < ptr_e && *ptr != (t ? '_' : ','))) {
      return -1;
    }
    Res[s++] = x;
    if (ptr == ptr_e) {
      return t ? -1 : s / arity;
    }
    assert(*ptr == (t ? '_' : ','));
    ptr++;
  };
  assert(ptr == ptr_e);
  return t ? -1 : s / arity;
}
```