user: 请从给定的汇编指令推导出C源代码:

```asm
<expr_get_curr_symbol>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  test   %rdi,%rdi
  je     L165
  cmpb   $0x0,(%rdi)
  mov    %rdi,%rbp
  je     L165
  mov    %rsi,%rbx
  test   %rsi,%rsi
  je     L165
  mov    %rdx,%r15
  test   %rdx,%rdx
  je     L165
  test   %rcx,%rcx
  je     L262
  cmp    %rsi,%rdi
  jae    L165
  movq   $0x0,(%rcx)
  movabs $0xfffffffeffffd9ff,%rax
  nopl   (%rax)
L117:
  movsbl 0x0(%rbp),%edi
  cmp    $0x20,%dil
  jbe    L45
  cmp    %rbp,%rbx
  je     L262
  lea    0x1(%rbp),%r14
  xor    %r13d,%r13d
  cmp    $0x2d,%dil
  je     L110
L154:
  call   <isdigit@plt>
  test   %rax,%rax
  je     L233
  mov    %r14,(%r15)
  cmp    %r14,%rbx
  jne    L54
  jmp    L203
  nopl   0x0(%rax,%rax,1)
L200:
  mov    (%r15),%rax
  lea    0x1(%rax),%r14
  mov    %r14,(%r15)
  cmp    %rbx,%r14
  je     L203
L54:
  movsbl (%r14),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L200
  mov    (%r15),%rbx
L203:
  sub    %r13,%rbp
  sub    %rbp,%rbx
  lea    0x1(%rbx),%rdi
L219:
  mov    %rbx,(%r12)
  call   <expr_alloc@plt>
  xor    %esi,%esi
  mov    %rax,%r13
  mov    (%r12),%rax
  mov    %r13,%rdi
  lea    0x1(%rax),%rdx
  call   <memset@plt>
  mov    (%r12),%rdx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <memcpy@plt>
  jmp    L263
  nopl   0x0(%rax)
L45:
  bt     %rdi,%rax
  jb     L160
  add    $0x1,%rbp
  cmp    %rbp,%rbx
  jne    L117
L262:
  xor    %r13d,%r13d
L263:
  add    $0x8,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L165:
  test   %r12,%r12
  je     L262
  movq   $0x0,(%r12)
  jmp    L262
  nop
L274:
  mov    $0x2d,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L176
L233:
  mov    %r14,(%r15)
  mov    $0x2,%edi
  mov    $0x1,%ebx
  jmp    L219
  nopl   0x0(%rax)
L110:
  cmp    %r14,%rbx
  je     L274
  movsbl 0x1(%rbp),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L75
  movsbl 0x0(%rbp),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L233
  mov    %r14,(%r15)
  jmp    L54
L75:
  lea    0x2(%rbp),%rax
  movsbl 0x1(%rbp),%edi
  mov    $0x1,%r13d
  mov    %r14,%rbp
  mov    %rax,%r14
  jmp    L154
L176:
  mov    %rbx,(%r15)
  jmp    L203
L160:
  cmp    %rbp,%rbx
  je     L262
  lea    0x1(%rbp),%r14
  xor    %r13d,%r13d
  jmp    L154
```

assistant: ```c
char *expr_get_curr_symbol(const char *buffer, const char *buffer_end, const char **next, size_t *symbol_size) {
  const char *bp, *tbp;
  char *symbol = NULL;
  int neg = 0;
  if (buffer == NULL || *buffer == 0 || buffer_end == NULL || next == NULL || symbol_size == NULL || buffer >= buffer_end) {
    if (symbol_size != NULL) {
      *symbol_size = 0;
    }
    return NULL;
  }
  *symbol_size = 0;
  bp = buffer;
  while (bp != buffer_end && ((*bp) == ' ' || (*bp) == '\n' || (*bp) == '\r' || (*bp) == '\t')) {
    bp++;
  }
  if (bp == buffer_end) {
    return NULL;
  }
  if (*bp == '-' && (bp + 1) != buffer_end && isdigit(*(bp + 1))) {
    bp += 1;
    neg = 1;
  }
  if (isdigit(*bp)) {
    (*next) = bp + 1;
    while ((*next) != buffer_end && isdigit(**next)) {
      (*next)++;
    }
    bp -= neg;
  } else {
    (*next) = bp + 1;
  }
  *symbol_size = (*next) - bp;
  symbol = (char *)expr_alloc(*symbol_size + 1);
  memset(symbol, 0, *symbol_size + 1);
  memcpy(symbol, bp, *symbol_size);
  return symbol;
}
```