user: What is the c source code of the assembly code below:

```asm
<eval_scalar>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %rdi,%r12
  mov    %rsi,%r13
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rsi
  call   <eval_scalar_nomath@plt>
  mov    %eax,%ebp
  cmp    $0xffffffff,%eax
  je     L149
  movslq 0x4(%rsp),%rbx
  add    %r12,%rbx
  lea    0x4(%rsp),%r14
  jmp    L62
L250:
  add    $0x1,%rbx
L62:
  movsbl (%rbx),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L250
  movzbl (%rbx),%eax
  test   %al,%al
  je     L216
  cmp    $0x2b,%al
  je     L136
  cmp    $0x2d,%al
  jne    L177
  add    $0x1,%rbx
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <eval_scalar_nomath@plt>
  movslq 0x4(%rsp),%rdx
  add    %rdx,%rbx
  cmp    $0xffffffff,%eax
  je     L127
  test   $0x40000,%eax
  je     L102
  test   $0x40000,%ebp
  je     L197
  mov    %ebp,%edx
  shr    $0x9,%edx
  and    $0x1ff,%edx
  mov    %eax,%ecx
  shr    $0x9,%ecx
  and    $0x1ff,%ecx
  sub    %ecx,%edx
  shl    $0x9,%edx
  and    $0x3fe00,%edx
  sub    %eax,%ebp
  and    $0x1ff,%ebp
  or     %edx,%ebp
  or     $0x40000,%ebp
  jmp    L62
L197:
  lea    D23(%rip),%rdi
  mov    $0x0,%eax
  call   <error@plt>
  mov    %eax,%ebp
  jmp    L149
L102:
  test   $0x40000,%ebp
  jne    L69
  sub    %eax,%ebp
  and    $0x3ffff,%ebp
  jmp    L62
L69:
  lea    D17(%rip),%rdi
  mov    $0x0,%eax
  call   <error@plt>
  mov    %eax,%ebp
  jmp    L149
L136:
  add    $0x1,%rbx
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <eval_scalar_nomath@plt>
  movslq 0x4(%rsp),%rdx
  add    %rdx,%rbx
  cmp    $0xffffffff,%eax
  je     L100
  test   $0x40000,%eax
  je     L111
  test   $0x40000,%ebp
  je     L4
  mov    %ebp,%edx
  shr    $0x9,%edx
  and    $0x1ff,%edx
  mov    %eax,%ecx
  shr    $0x9,%ecx
  and    $0x1ff,%ecx
  add    %ecx,%edx
  shl    $0x9,%edx
  and    $0x3fe00,%edx
  add    %ebp,%eax
  and    $0x1ff,%eax
  or     %edx,%eax
  or     $0x40000,%eax
  mov    %eax,%ebp
  jmp    L62
L4:
  lea    D3(%rip),%rdi
  mov    $0x0,%eax
  call   <error@plt>
  mov    %eax,%ebp
  jmp    L149
L111:
  test   $0x40000,%ebp
  jne    L21
  add    %ebp,%eax
  and    $0x3ffff,%eax
  mov    %eax,%ebp
  jmp    L62
L21:
  lea    D18(%rip),%rdi
  mov    $0x0,%eax
  call   <error@plt>
  mov    %eax,%ebp
  jmp    L149
L177:
  mov    %rbx,%r14
  sub    %r12,%r14
  mov    %rbx,%rdx
  mov    %r14,%rsi
  lea    D39(%rip),%rdi
  mov    $0x0,%eax
  call   <error@plt>
  test   %r13,%r13
  je     L149
  mov    %r14d,0x0(%r13)
L149:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L142
  mov    %ebp,%eax
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L216:
  test   %r13,%r13
  je     L149
  sub    %r12,%rbx
  mov    %ebx,0x0(%r13)
  jmp    L149
L127:
  mov    %eax,%ebp
  jmp    L149
L100:
  mov    %eax,%ebp
  jmp    L149
L142:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D23
data_type: string
name: retrieve_data
arguments: data_tag: D17
data_type: string
name: retrieve_data
arguments: data_tag: D3
data_type: string
name: retrieve_data
arguments: data_tag: D18
data_type: string
name: retrieve_data
arguments: data_tag: D39
data_type: string

tool: D23: Type error: Cannot subtract vector from integer

tool: D17: Type error: Cannot subtract integer from vector

tool: D3: Type error: Cannot add vector to integer

tool: D18: Type error: Cannot add integer to vector

tool: D39: Unexpected operator or token after scalar "%.*s"

assistant: ```c
unsigned int eval_scalar(const char *text, int *len) {
  int ilen;
  unsigned int lval = eval_scalar_nomath(text, &ilen);
  unsigned int rval;
  const char *ip;
  if (lval == -1u)
    return -1u;
  ip = text + ilen;
  while (1) {
    while (isspace(*ip))
      ++ip;
    if (*ip == '\0')
      break;
    switch (*ip) {
    case '-':
      rval = eval_scalar_nomath(++ip, &ilen);
      ip += ilen;
      if (rval == -1u)
        return -1u;
      if (rval & 01000000) {
        if (lval & 01000000) {
          unsigned int x = (lval & 0777) - (rval & 0777);
          unsigned int y = ((lval >> 9) & 0777) - ((rval >> 9) & 0777);
          lval = 01000000 | ((y & 0777) << 9) | (x & 0777);
        } else
          return error("Type error: Cannot subtract vector from integer");
      } else {
        if (lval & 01000000)
          return error("Type error: Cannot subtract integer from vector");
        else
          lval = (lval - rval) & 0777777;
      }
      break;
    case '+':
      rval = eval_scalar_nomath(++ip, &ilen);
      ip += ilen;
      if (rval == -1u)
        return -1u;
      if (rval & 01000000) {
        if (lval & 01000000) {
          unsigned int x = (lval & 0777) + (rval & 0777);
          unsigned int y = ((lval >> 9) & 0777) + ((rval >> 9) & 0777);
          lval = 01000000 | ((y & 0777) << 9) | (x & 0777);
        } else
          return error("Type error: Cannot add vector to integer");
      } else {
        if (lval & 01000000)
          return error("Type error: Cannot add integer to vector");
        else
          lval = (lval + rval) & 0777777;
      }
      break;
    default:
      error("Unexpected operator or token after scalar \"%.*s\"", ip - text, ip);
      if (len != NULL)
        *len = ip - text;
      return lval;
    }
  }
  if (len != NULL)
    *len = ip - text;
  return lval;
}
```