user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<np_parse_list_str>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  movslq %r8d,%rbx
  add    %rcx,%rbx
  sub    $0x18,%rsp
  mov    %esi,0xc(%rsp)
  mov    %edx,0x8(%rsp)
  cmp    %rbx,%rcx
  jae    L19
  mov    %rdi,(%rsp)
  mov    %rcx,%r14
  mov    $0x1,%r13d
  xor    %r12d,%r12d
L144:
  movsbl (%r14),%edi
  xor    %r15d,%r15d
  cmp    $0x2d,%dil
  jne    L174
  movsbl 0x1(%r14),%edi
  mov    $0x1,%r15d
  add    $0x1,%r14
L174:
  call   <isdigit@plt>
  test   %rax,%rax
  je     L4
  xor    %ebp,%ebp
  jmp    L24
  nopw   0x0(%rax,%rax,1)
L70:
  movsbl (%r14),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L269
  cmp    $0xccccccc,%ebp
  jg     L4
  movsbl (%r14),%eax
  lea    0x0(%rbp,%rbp,4),%ecx
  add    $0x1,%r14
  lea    -0x30(%rax,%rcx,2),%ebp
  test   %ebp,%ebp
  js     L4
L24:
  cmp    %rbx,%r14
  jb     L70
L269:
  mov    %ebp,%eax
  neg    %eax
  test   %r15d,%r15d
  cmovne %eax,%ebp
  add    $0x1,%r12d
  cmp    %r12d,0x8(%rsp)
  je     L27
  lea    -0x1(%r13),%eax
  cmp    %eax,0xc(%rsp)
  jle    L4
  cmp    %rbx,%r14
  jb     L14
  mov    (%rsp),%rax
  mov    %r13d,%r15d
  mov    %ebp,(%rax)
  je     L87
  movsbl (%r14),%ecx
  test   %r12d,%r12d
  je     L160
L234:
  mov    $0x5f,%eax
L115:
  xor    %edi,%edi
  cmp    %ecx,%eax
  sete   %dil
  add    $0x1,%r14
  add    $0x1,%r13d
  call   <assert@plt>
  addq   $0x4,(%rsp)
  cmp    %r14,%rbx
  ja     L144
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  test   %r12d,%r12d
  jne    L4
  mov    %r15d,%eax
  cltd
  idivl  0x8(%rsp)
  jmp    L137
L88:
  cmp    $0x2c,%eax
  je     L81
  nopl   0x0(%rax,%rax,1)
L4:
  mov    $0xffffffff,%eax
L137:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L14:
  movsbl (%r14),%eax
  test   %r12d,%r12d
  je     L88
  cmp    $0x5f,%eax
  jne    L4
  mov    (%rsp),%rax
  mov    %r13d,%r15d
  mov    %ebp,(%rax)
  movsbl (%r14),%ecx
  jmp    L234
  nopl   0x0(%rax,%rax,1)
L27:
  lea    -0x1(%r13),%eax
  cmp    0xc(%rsp),%eax
  jge    L4
  cmp    %rbx,%r14
  jae    L63
  cmpb   $0x2c,(%r14)
  jne    L4
L81:
  mov    (%rsp),%rax
  mov    %r13d,%r15d
  mov    %ebp,(%rax)
  movsbl (%r14),%ecx
L160:
  xor    %r12d,%r12d
  mov    $0x2c,%eax
  jmp    L115
L63:
  mov    (%rsp),%rax
  mov    %r13d,%r15d
  mov    %ebp,(%rax)
  je     L278
  movsbl (%r14),%ecx
  xor    %r12d,%r12d
  mov    $0x2c,%eax
  jmp    L115
L19:
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  xor    %eax,%eax
  jmp    L137
L87:
  test   %r12d,%r12d
  jne    L4
L278:
  mov    %r13d,%eax
  cltd
  idivl  0x8(%rsp)
  jmp    L137
```

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;
}
```