user: 下面的汇编指令对应的C源代码是什么:

```asm
<str_to_long>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  movq   $0x0,-0x18(%rbp)
  movq   $0x0,-0x28(%rbp)
  movq   $0x1,-0x20(%rbp)
  movq   $0xffffffffffffffff,-0x10(%rbp)
  movq   $0x0,-0x8(%rbp)
L56:
  mov    -0x8(%rbp),%rax
  cmp    -0x40(%rbp),%rax
  jge    L177
  mov    -0x8(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbq %al,%rax
  mov    %rax,-0x30(%rbp)
  addq   $0x1,-0x8(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  je     L184
  cmpq   $0x2d,-0x30(%rbp)
  jne    L33
  mov    -0x8(%rbp),%rax
  cmp    -0x40(%rbp),%rax
  jge    L101
  mov    -0x8(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbq %al,%rax
  mov    %rax,-0x30(%rbp)
  addq   $0x1,-0x8(%rbp)
  cmpq   $0x39,-0x30(%rbp)
  jg     L3
  cmpq   $0x2f,-0x30(%rbp)
  jle    L3
  movq   $0x1,-0x28(%rbp)
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x10(%rbp)
  jmp    L3
L33:
  cmpq   $0x39,-0x30(%rbp)
  jg     L3
  cmpq   $0x2f,-0x30(%rbp)
  jle    L3
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x10(%rbp)
L3:
  cmpq   $0x1,-0x20(%rbp)
  je     L56
  movq   $0x1,-0x20(%rbp)
L38:
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  sub    $0x30,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x8(%rbp),%rax
  cmp    -0x40(%rbp),%rax
  jge    L195
  mov    -0x8(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbq %al,%rax
  mov    %rax,-0x30(%rbp)
  addq   $0x1,-0x8(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  je     L131
  cmpq   $0x39,-0x30(%rbp)
  jle    L207
  movq   $0x0,-0x20(%rbp)
L207:
  cmpq   $0x2f,-0x30(%rbp)
  jg     L50
  movq   $0x0,-0x20(%rbp)
L50:
  cmpq   $0x1,-0x20(%rbp)
  je     L38
  jmp    L95
L177:
  nop
  jmp    L95
L184:
  nop
  jmp    L95
L101:
  nop
  jmp    L95
L195:
  nop
  jmp    L95
L131:
  nop
L95:
  cmpq   $0x1,-0x28(%rbp)
  jne    L67
  negq   -0x18(%rbp)
L67:
  mov    -0x48(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x50(%rbp),%rax
  mov    -0x18(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x10(%rbp),%rax
  pop    %rbp
  ret
```

assistant: ```c
long str_to_long(char *str, long maxlen, long *pnext, long *result) {
  long c;
  long is_neg;
  long is_checking;
  long n;
  long ret;
  long next;
  n = 0;
  is_neg = 0;
  is_checking = 1;
  ret = -1;
  next = 0;
  do {
    if (next < maxlen) {
      c = (long)str[next];
      next = next + 1;
    } else {
      goto str_to_long_exit;
    }
    if (c == (0))
      goto str_to_long_exit;
    if (c == (long)'-') {
      if (next < maxlen) {
        c = (long)str[next];
        next = next + 1;
      } else {
        goto str_to_long_exit;
      }
      if (c <= (long)'9') {
        if (c >= (long)'0') {
          is_neg = 1;
          is_checking = 0;
          ret = 0;
        }
      }
    } else if (c <= (long)'9') {
      if (c >= (long)'0') {
        is_checking = 0;
        ret = 0;
      }
    }
  } while (is_checking == 1);
  is_checking = 1;
  do {
    n = n * 10 + (long)c - (long)'0';
    if (next < maxlen) {
      c = (long)str[next];
      next = next + 1;
    } else {
      goto str_to_long_exit;
    }
    if (c == (0))
      goto str_to_long_exit;
    if (c > (long)'9') {
      is_checking = 0;
    }
    if (c < (long)'0') {
      is_checking = 0;
    }
  } while (is_checking == 1);
str_to_long_exit:
  if (is_neg == 1) {
    n = 0 - n;
  }
  *pnext = next;
  *result = n;
  return ret;
}
```