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

```asm
<calculate>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  test   %esi,%esi
  jle    L69
  lea    -0x1(%rsi),%eax
  mov    %rdi,%rbx
  lea    D30(%rip),%r12
  lea    0x8(%rdi,%rax,8),%rbp
  lea    D10(%rip),%r13
  lea    D46(%rip),%r14
  jmp    L96
  nopl   0x0(%rax)
L8:
  cmpb   $0x0,0x1(%r15)
  jne    L75
  xor    %eax,%eax
  call   <pop@plt>
  xor    %eax,%eax
  movsd  %xmm0,0x8(%rsp)
  call   <pop@plt>
  addsd  0x8(%rsp),%xmm0
  call   <push@plt>
L4:
  add    $0x8,%rbx
  cmp    %rbp,%rbx
  je     L69
L96:
  mov    (%rbx),%r15
  mov    %r15,%rdi
  call   <isnumfmt@plt>
  test   %rax,%rax
  jne    L192
  movzbl (%r15),%eax
  cmp    $0x2b,%eax
  je     L8
L75:
  cmp    $0x2a,%eax
  jne    L277
  cmpb   $0x0,0x1(%r15)
  jne    L277
  xor    %eax,%eax
  add    $0x8,%rbx
  call   <pop@plt>
  xor    %eax,%eax
  movsd  %xmm0,0x8(%rsp)
  call   <pop@plt>
  mulsd  0x8(%rsp),%xmm0
  call   <push@plt>
  cmp    %rbp,%rbx
  jne    L96
L69:
  xor    %eax,%eax
  call   <gettop@plt>
  xor    %eax,%eax
  movsd  %xmm0,0x8(%rsp)
  call   <clearstack@plt>
  movsd  0x8(%rsp),%xmm0
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L192:
  mov    %r15,%rdi
  call   <atof@plt>
  call   <push@plt>
  jmp    L4
  nopw   0x0(%rax,%rax,1)
L277:
  cmp    $0x2d,%eax
  jne    L208
  cmpb   $0x0,0x1(%r15)
  jne    L208
  xor    %eax,%eax
  call   <swap@plt>
  xor    %eax,%eax
  call   <pop@plt>
  xor    %eax,%eax
  movsd  %xmm0,0x8(%rsp)
  call   <pop@plt>
  movsd  0x8(%rsp),%xmm1
  subsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  call   <push@plt>
  jmp    L4
  nop
L208:
  cmp    $0x2f,%eax
  jne    L82
  cmpb   $0x0,0x1(%r15)
  jne    L82
  xor    %eax,%eax
  call   <pop@plt>
  pxor   %xmm2,%xmm2
  ucomisd %xmm2,%xmm0
  movapd %xmm0,%xmm1
  jp     L91
  jne    L91
L70:
  xor    %eax,%eax
  movsd  %xmm2,0x8(%rsp)
  call   <pop@plt>
  movsd  0x8(%rsp),%xmm2
  movapd %xmm2,%xmm0
  call   <push@plt>
  lea    D42(%rip),%rdi
  call   <puts@plt>
  jmp    L4
  nopl   0x0(%rax,%rax,1)
L82:
  cmp    $0x25,%eax
  jne    L228
  cmpb   $0x0,0x1(%r15)
  jne    L228
  xor    %eax,%eax
  call   <pop@plt>
  pxor   %xmm2,%xmm2
  ucomisd %xmm2,%xmm0
  movapd %xmm0,%xmm1
  jp     L188
  je     L70
L188:
  xor    %eax,%eax
  movsd  %xmm1,0x8(%rsp)
  call   <pop@plt>
  movsd  0x8(%rsp),%xmm1
  cvttsd2si %xmm0,%eax
  pxor   %xmm0,%xmm0
  cvttsd2si %xmm1,%ecx
  cltd
  idiv   %ecx
  cvtsi2sd %edx,%xmm0
  call   <push@plt>
  jmp    L4
  nopl   0x0(%rax,%rax,1)
L228:
  mov    %r12,%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L113
  mov    %r13,%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L237
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L111
  call   <pop@plt>
  call   <sin@plt>
  call   <push@plt>
  jmp    L4
  nopl   (%rax)
L91:
  xor    %eax,%eax
  movsd  %xmm1,0x8(%rsp)
  call   <pop@plt>
  movsd  0x8(%rsp),%xmm1
  divsd  %xmm1,%xmm0
  call   <push@plt>
  jmp    L4
  nopl   0x0(%rax)
L113:
  call   <pop@plt>
  xor    %eax,%eax
  movsd  %xmm0,0x8(%rsp)
  call   <pop@plt>
  movsd  0x8(%rsp),%xmm1
  call   <pow@plt>
  call   <push@plt>
  jmp    L4
  nop
L111:
  mov    %r15,%rsi
  lea    D38(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L4
  cs nopw 0x0(%rax,%rax,1)
L237:
  call   <pop@plt>
  call   <exp@plt>
  call   <push@plt>
  jmp    L4
```

tool_calls: name: disassemble_data
arguments: data_tag: D30
datatype: string
name: disassemble_data
arguments: data_tag: D10
datatype: string
name: disassemble_data
arguments: data_tag: D46
datatype: string
name: disassemble_data
arguments: data_tag: D42
datatype: string
name: disassemble_data
arguments: data_tag: D38
datatype: string

tool: D30: pow

tool: D10: exp

tool: D46: sin

tool: D42: Error: divisor is 0

tool: D38: Error: unknown token %s


assistant: ```c
double calculate(char *tokens[], int len) {
  char *t;
  int i;
  for (i = 0; i < len; i++) {
    t = tokens[i];
    if (isnumfmt(t)) {
      push(atof(t));
    } else if (!strcmp(t, "+")) {
      push(pop() + pop());
    } else if (!strcmp(t, "*")) {
      push(pop() * pop());
    } else if (!strcmp(t, "-")) {
      swap();
      push(pop() - pop());
    } else if (!strcmp(t, "/")) {
      double tmp = pop();
      if (tmp != 0) {
        push(pop() / tmp);
      } else {
        pop();
        push(0.0);
        printf("Error: divisor is 0\n");
      }
    } else if (!strcmp(t, "%")) {
      double tmp = pop();
      if (tmp != 0) {
        push((int)pop() % (int)tmp);
      } else {
        pop();
        push(0.0);
        printf("Error: divisor is 0\n");
      }
    } else if (!strcmp(t, "pow")) {
      double tmp = pop();
      push(pow(pop(), tmp));
    } else if (!strcmp(t, "exp")) {
      push(exp(pop()));
    } else if (!strcmp(t, "sin")) {
      push(sin(pop()));
    } else {
      printf("Error: unknown token %s\n", t);
    }
  }
  double rt = gettop();
  clearstack();
  return rt;
}
```