user: 请将以下的汇编代码转换成C语言代码：

```asm
<np_parse_list_str>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %esi,0x1c(%rsp)
  mov    %edx,0x18(%rsp)
  movslq %r8d,%r12
  add    %rcx,%r12
  cmp    %r12,%rcx
  jae    L170
  mov    %rcx,%rbx
  mov    %rdi,0x10(%rsp)
  mov    $0x1,%r15d
  mov    $0x0,%r13d
  mov    $0x0,%r14d
L74:
  mov    %r14d,0xc(%rsp)
  cmpb   $0x2d,(%rbx)
  je     L70
L181:
  movsbl (%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L112
  mov    %r14d,%ebp
L8:
  cmp    %r12,%rbx
  jae    L113
  movsbl (%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L113
  cmp    $0xccccccc,%ebp
  jg     L77
  lea    0x0(%rbp,%rbp,4),%edx
  add    $0x1,%rbx
  movsbl -0x1(%rbx),%eax
  lea    -0x30(%rax,%rdx,2),%ebp
  test   %ebp,%ebp
  jns    L8
  mov    $0xffffffff,%eax
  jmp    L201
L70:
  add    $0x1,%rbx
  movl   $0x1,0xc(%rsp)
  jmp    L181
L113:
  mov    %ebp,%eax
  neg    %eax
  cmpl   $0x0,0xc(%rsp)
  cmovne %eax,%ebp
  add    $0x1,%r13d
  cmp    %r13d,0x18(%rsp)
  cmove  %r14d,%r13d
  lea    -0x1(%r15),%eax
  cmp    %eax,0x1c(%rsp)
  jle    L107
  cmp    %r12,%rbx
  jae    L21
  movsbl (%rbx),%edx
  cmp    $0x1,%r13d
  sbb    %eax,%eax
  and    $0xffffffcd,%eax
  add    $0x5f,%eax
  cmp    %eax,%edx
  jne    L101
  mov    %r15d,0xc(%rsp)
  mov    0x10(%rsp),%rax
  mov    %ebp,(%rax)
L154:
  movsbl (%rbx),%edx
  cmp    $0x1,%r13d
  sbb    %eax,%eax
  and    $0xffffffcd,%eax
  add    $0x5f,%eax
  cmp    %eax,%edx
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  add    $0x1,%rbx
  add    $0x1,%r15d
  addq   $0x4,0x10(%rsp)
  cmp    %rbx,%r12
  ja     L74
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  test   %r13d,%r13d
  je     L44
  mov    $0xffffffff,%eax
  jmp    L201
L21:
  mov    %r15d,0xc(%rsp)
  mov    0x10(%rsp),%rax
  mov    %ebp,(%rax)
  jne    L154
  mov    $0xffffffff,%eax
  test   %r13d,%r13d
  jne    L201
  mov    %r15d,%eax
  cltd
  idivl  0x18(%rsp)
  jmp    L201
L112:
  mov    $0xffffffff,%eax
  jmp    L201
L77:
  mov    $0xffffffff,%eax
L201:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L107:
  mov    $0xffffffff,%eax
  jmp    L201
L101:
  mov    $0xffffffff,%eax
  jmp    L201
L170:
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  movl   $0x0,0xc(%rsp)
L44:
  mov    0xc(%rsp),%eax
  cltd
  idivl  0x18(%rsp)
  jmp    L201
```

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