user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movl   $0x1,-0x1c(%rbp)
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L31
L61:
  lea    -0x1d(%rbp),%rdx
  lea    -0x18(%rbp),%rax
  mov    %rax,%rsi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movzbl -0x1d(%rbp),%eax
  movsbl %al,%eax
  sub    $0x2a,%eax
  cmp    $0x29,%eax
  ja     L98
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D53(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D53(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  movsd  -0x18(%rbp),%xmm0
  movsd  -0x10(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  jmp    L122
  movsd  -0x18(%rbp),%xmm1
  movsd  -0x10(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  jmp    L122
  movsd  -0x18(%rbp),%xmm0
  movsd  -0x10(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  jmp    L122
  movsd  -0x18(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L55
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jne    L55
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L122
L55:
  movsd  -0x18(%rbp),%xmm1
  movsd  -0x10(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  jmp    L122
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  jmp    L122
  movl   $0x0,-0x1c(%rbp)
  jmp    L122
L98:
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  nop
L122:
  mov    -0x10(%rbp),%rax
  movq   %rax,%xmm0
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
L31:
  cmpl   $0x0,-0x1c(%rbp)
  jne    L61
  lea    D63(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L126
  call   <__stack_chk_fail@plt>
L126:
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D13
datatype: string
name: read_data
arguments: label: D6
datatype: string
name: read_data
arguments: label: D8
datatype: string
name: read_data
arguments: label: D49
datatype: string
name: read_data
arguments: label: D47
datatype: string
name: read_data
arguments: label: D63
datatype: string

tool: D13: Begin Calculations

tool: D6: %lf %c

tool: D8: ERROR: Division by 0 is not allowed!

tool: D49: ERROR: Unknown operator!

tool: D47: = %f


tool: D63: End of Calculations

assistant: ```c
int main(void) {
  double accumulator;
  double number;
  char operator;
  bool isCalculating;
  accumulator = 0.0;
  isCalculating = true;
  printf("Begin Calculations\n");
  while (isCalculating) {
    scanf("%lf %c", &number, &operator);
    switch (operator) {
    case '+':
      accumulator += number;
      break;
    case '-':
      accumulator -= number;
      break;
    case '*':
      accumulator *= number;
      break;
    case '/':
      if (number == 0)
        printf("ERROR: Division by 0 is not allowed!");
      else
        accumulator /= number;
      break;
    case 'S':
      accumulator = number;
      break;
    case 'E':
      isCalculating = false;
      break;
    default:
      printf("ERROR: Unknown operator!\n");
      break;
    }
    printf("= %f\n", accumulator);
  }
  printf("End of Calculations");
  return 0;
}
```